Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some C++ header cleanup #3345

Merged
merged 13 commits into from
Jan 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions cpp/src/Ice/Buffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,11 @@
//

#include "Ice/Buffer.h"
#include "Ice/LocalExceptions.h"

#include <cstdlib>
#include <cstring>

using namespace std;
using namespace Ice;
using namespace IceInternal;

IceInternal::Buffer::Container::Container() noexcept
Expand Down
4 changes: 0 additions & 4 deletions cpp/src/Ice/ConnectRequestHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,7 @@
#include "ConnectRequestHandler.h"
#include "ConnectionI.h"
#include "Ice/OutgoingAsync.h"
#include "Ice/Properties.h"
#include "Ice/Proxy.h"
#include "Instance.h"
#include "RouterInfo.h"
#include "ThreadPool.h"

using namespace std;
using namespace IceInternal;
Expand Down
4 changes: 1 addition & 3 deletions cpp/src/Ice/ConnectionFactory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@
#include "Ice/LoggerUtil.h"
#include "Ice/Properties.h"
#include "Instance.h"
#include "ObjectAdapterI.h" // For getThreadPool().
#include "Random.h"
#include "Reference.h"
#include "ObjectAdapterI.h"
#include "RouterInfo.h"
#include "ThreadPool.h"
#include "TraceLevels.h"
Expand Down
1 change: 0 additions & 1 deletion cpp/src/Ice/ConnectionI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
#include "ConnectionI.h"
#include "BatchRequestQueue.h"
#include "CheckIdentity.h"
#include "DefaultsAndOverrides.h"
#include "Endian.h"
#include "EndpointI.h"
#include "Ice/IncomingRequest.h"
Expand Down
2 changes: 1 addition & 1 deletion cpp/src/Ice/ConsoleUtil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
#include "ConsoleUtil.h"

#ifdef _WIN32
# include <mutex>
# include <windows.h>
#endif

#include <iostream>
#include <mutex>

using namespace IceInternal;
using namespace std;
Expand Down
1 change: 0 additions & 1 deletion cpp/src/Ice/DefaultsAndOverrides.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

#include "DefaultsAndOverrides.h"
#include "Ice/LocalExceptions.h"
#include "Ice/LoggerUtil.h"
#include "Ice/Properties.h"

using namespace std;
Expand Down
2 changes: 0 additions & 2 deletions cpp/src/Ice/EndpointFactoryManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,9 @@

#include "EndpointFactoryManager.h"
#include "DefaultsAndOverrides.h"
#include "Ice/Endpoint.h"
#include "Ice/InputStream.h"
#include "Ice/LocalExceptions.h"
#include "Ice/OutputStream.h"
#include "Ice/Properties.h"
#include "Ice/StringUtil.h"
#include "Instance.h"
#include "OpaqueEndpointI.h"
Expand Down
1 change: 0 additions & 1 deletion cpp/src/Ice/EventHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
//

#include "EventHandler.h"
#include "Instance.h"

using namespace std;
using namespace Ice;
Expand Down
2 changes: 1 addition & 1 deletion cpp/src/Ice/FileUtil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#include <cassert>
#include <climits>
#include <sstream>
#include <string.h>
#include <string>

#ifdef _WIN32
# include <Shlwapi.h>
Expand Down
3 changes: 0 additions & 3 deletions cpp/src/Ice/FixedRequestHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@
#include "FixedRequestHandler.h"
#include "ConnectionI.h"
#include "Ice/OutgoingAsync.h"
#include "Ice/Proxy.h"
#include "Reference.h"
#include "RouterInfo.h"

using namespace std;
using namespace Ice;
Expand Down
1 change: 0 additions & 1 deletion cpp/src/Ice/HttpParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

#include "HttpParser.h"
#include "Ice/Config.h"
#include "Ice/LocalExceptions.h"
#include "Ice/StringUtil.h"

#include <cassert>
Expand Down
2 changes: 0 additions & 2 deletions cpp/src/Ice/IPEndpointI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
#include "HashUtil.h"
#include "Ice/InputStream.h"
#include "Ice/LocalExceptions.h"
#include "Ice/LoggerUtil.h"
#include "Ice/Properties.h"
#include "Instance.h"
#include "NetworkProxy.h"
#include "ProtocolInstance.h"
Expand Down
1 change: 0 additions & 1 deletion cpp/src/Ice/IdleTimeoutTransceiverDecorator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
//

#include "IdleTimeoutTransceiverDecorator.h"
#include "Ice/Buffer.h"

#include <chrono>

Expand Down
1 change: 0 additions & 1 deletion cpp/src/Ice/Initialize.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
#include "Ice/Communicator.h"
#include "Ice/LocalExceptions.h"
#include "Ice/Properties.h"
#include "Ice/StringConverter.h"
#include "Ice/StringUtil.h"
#include "Instance.h"
#include "LoggerI.h"
Expand Down
5 changes: 0 additions & 5 deletions cpp/src/Ice/InputStream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@
#include "Endian.h"
#include "Ice/FactoryTable.h"
#include "Ice/LocalExceptions.h"
#include "Ice/LoggerUtil.h"
#include "Ice/Object.h"
#include "Ice/Proxy.h"
#include "Ice/SlicedData.h"
#include "Ice/StringConverter.h"
#include "Ice/UserExceptionFactory.h"
Expand All @@ -21,8 +18,6 @@

#include "DisableWarnings.h"

#include <iterator>

using namespace std;
using namespace Ice;
using namespace IceInternal;
Expand Down
3 changes: 0 additions & 3 deletions cpp/src/Ice/Instance.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
#include "Ice/LoggerUtil.h"
#include "Ice/ObserverHelper.h"
#include "Ice/Properties.h"
#include "Ice/ProxyFunctions.h"
#include "Ice/Router.h"
#include "Ice/StringUtil.h"
#include "Ice/UUID.h"
Expand All @@ -29,7 +28,6 @@
#include "ObjectAdapterFactory.h"
#include "PluginManagerI.h"
#include "PropertiesAdminI.h"
#include "ProtocolInstance.h"
#include "ReferenceFactory.h"
#include "RegisterPluginsInit.h"
#include "RetryQueue.h"
Expand All @@ -39,7 +37,6 @@
#include "TimeUtil.h"
#include "TraceLevels.h"
#include "ValueFactoryManagerI.h"
#include "WSEndpoint.h"

#include "DisableWarnings.h"

Expand Down
1 change: 0 additions & 1 deletion cpp/src/Ice/InstrumentationI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
#include "Ice/Communicator.h"
#include "Ice/Connection.h"
#include "Ice/Endpoint.h"
#include "Ice/LocalExceptions.h"
#include "Ice/LoggerUtil.h"
#include "Ice/ObjectAdapter.h"
#include "Ice/VersionFunctions.h"
Expand Down
3 changes: 0 additions & 3 deletions cpp/src/Ice/LocalExceptions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,11 @@
//

#include "Ice/LocalExceptions.h"
#include "Ice/Initialize.h"
#include "Ice/Proxy.h"
#include "Ice/StringUtil.h"
#include "Network.h"
#include "RequestFailedMessage.h"

#include <iomanip>

using namespace std;
using namespace Ice;
using namespace IceInternal;
Expand Down
1 change: 0 additions & 1 deletion cpp/src/Ice/LoggerAdminI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

#include "LoggerAdminI.h"
#include "Ice/Communicator.h"
#include "Ice/Connection.h"
#include "Ice/Initialize.h"
#include "Ice/LocalExceptions.h"
#include "Ice/LoggerUtil.h"
Expand Down
1 change: 0 additions & 1 deletion cpp/src/Ice/LoggerUtil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
#include "Ice/LoggerUtil.h"
#include "Ice/LocalExceptions.h"
#include "Ice/Logger.h"
#include "Ice/Plugin.h"
#include "Instance.h"

using namespace std;
Expand Down
4 changes: 1 addition & 3 deletions cpp/src/Ice/MetricsAdminI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,11 @@
//

#include "Ice/MetricsAdminI.h"
#include "Ice/Communicator.h"
#include "Ice/Logger.h"
#include "Ice/LoggerUtil.h"
#include "Ice/MetricsObserverI.h"
#include "Ice/Properties.h"
#include "Ice/StringUtil.h"
#include "Instance.h"
#include "InstrumentationI.h"

#include <chrono>
#include <stdexcept>
Expand Down
3 changes: 0 additions & 3 deletions cpp/src/Ice/Network.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,9 @@
//

#include "Network.h"
#include "Ice/Buffer.h"
#include "Ice/LocalExceptions.h"
#include "Ice/LoggerUtil.h" // For setTcpBufSize
#include "Ice/Properties.h" // For setTcpBufSize
#include "Ice/StringConverter.h"
#include "Ice/StringUtil.h"
#include "NetworkProxy.h"
#include "ProtocolInstance.h" // For setTcpBufSize
Expand All @@ -16,7 +14,6 @@
#include "DisableWarnings.h"

#include <cassert>
#include <functional>

// TODO: fix this warning
#if defined(_MSC_VER)
Expand Down
1 change: 0 additions & 1 deletion cpp/src/Ice/Options.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
#include "Ice/StringUtil.h"

#include <cassert>
#include <iostream>
#include <set>
#include <stdexcept>

Expand Down
1 change: 0 additions & 1 deletion cpp/src/Ice/SSL/RFC2253.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

#include "RFC2253.h"
#include "Ice/LocalExceptions.h"
#include "Ice/SSL/SSLException.h"
#include "Ice/StringUtil.h"

#include <cassert>
Expand Down
2 changes: 0 additions & 2 deletions cpp/src/Ice/SSL/SSLAcceptorI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,9 @@
//

#include "SSLAcceptorI.h"
#include "Ice/LocalExceptions.h"
#include "SSLEndpointI.h"
#include "SSLEngine.h"
#include "SSLInstance.h"
#include "SSLUtil.h"

#if defined(_WIN32)
# include "SchannelEngine.h"
Expand Down
8 changes: 0 additions & 8 deletions cpp/src/Ice/SSL/SSLConnectorI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,15 @@
//

#include "SSLConnectorI.h"
#include "../NetworkProxy.h"
#include "../StreamSocket.h"
#include "Ice/Communicator.h"
#include "Ice/LocalExceptions.h"
#include "Ice/LoggerUtil.h"
#include "Ice/SSL/ClientAuthenticationOptions.h"
#include "SSLEndpointI.h"
#include "SSLEngine.h"
#include "SSLInstance.h"
#include "SSLUtil.h"

#if defined(ICE_USE_SCHANNEL)
# include "SchannelEngine.h"
# include "SchannelTransceiverI.h"
using namespace Ice::SSL::Schannel;
#elif defined(ICE_USE_SECURE_TRANSPORT)
# include "SecureTransportEngine.h"
# include "SecureTransportTransceiverI.h"
using namespace Ice::SSL::SecureTransport;
#elif defined(ICE_USE_OPENSSL)
Expand Down
7 changes: 0 additions & 7 deletions cpp/src/Ice/SSL/SSLEndpointI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,7 @@
//

#include "SSLEndpointI.h"
#include "../DefaultsAndOverrides.h"
#include "../EndpointFactoryManager.h"
#include "../HashUtil.h"
#include "Ice/Comparable.h"
#include "Ice/InputStream.h"
#include "Ice/LocalExceptions.h"
#include "Ice/Object.h"
#include "Ice/OutputStream.h"
#include "SSLAcceptorI.h"
#include "SSLConnectorI.h"
#include "SSLInstance.h"
Expand Down
3 changes: 0 additions & 3 deletions cpp/src/Ice/SSL/SSLEngine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,10 @@

#include "SSLEngine.h"
#include "../Instance.h"
#include "Ice/Communicator.h"
#include "Ice/LocalExceptions.h"
#include "Ice/Logger.h"
#include "Ice/LoggerUtil.h"
#include "Ice/Properties.h"
#include "Ice/SSL/ConnectionInfo.h"
#include "Ice/StringUtil.h"
#include "TrustManager.h"

#include <string>
Expand Down
2 changes: 0 additions & 2 deletions cpp/src/Ice/SSL/SSLException.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@

#include "Ice/SSL/SSLException.h"

#include <string>

using namespace std;
using namespace Ice::SSL;

Expand Down
6 changes: 2 additions & 4 deletions cpp/src/Ice/SSL/SSLUtil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@
#include "../UniqueRef.h"
#include "DistinguishedName.h"
#include "Ice/Config.h"
#include "Ice/LocalExceptions.h"
#include "Ice/SSL/SSLException.h"
#include "Ice/StringConverter.h"
#include "Ice/StringUtil.h"
#include "RFC2253.h"

Expand Down Expand Up @@ -100,7 +98,7 @@ Ice::SSL::readFile(const string& file, vector<char>& buffer)
optional<string>
Ice::SSL::resolveFilePath(const string& path, const string& parentDir)
{
#if defined(ICE_USE_SECURE_TRANSPORT_IOS) || defined(ICE_SWIFT)
#if defined(ICE_USE_SECURE_TRANSPORT_IOS)
CFBundleRef bundle = CFBundleGetMainBundle();
if (bundle)
{
Expand Down Expand Up @@ -151,7 +149,7 @@ Ice::SSL::resolveFilePath(const string& path, const string& parentDir)
optional<string>
Ice::SSL::resolveDirPath(const string& path, const string& parentDir)
{
#if defined(ICE_USE_SECURE_TRANSPORT_IOS) || defined(ICE_SWIFT)
#if defined(ICE_USE_SECURE_TRANSPORT_IOS)
CFBundleRef bundle = CFBundleGetMainBundle();
if (bundle)
{
Expand Down
4 changes: 0 additions & 4 deletions cpp/src/Ice/SSL/SecureTransportEngine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,10 @@
#include "Ice/Config.h"
#include "Ice/LocalExceptions.h"
#include "Ice/Logger.h"
#include "Ice/LoggerUtil.h"
#include "Ice/Properties.h"
#include "Ice/SSL/SSLException.h"
#include "Ice/StringUtil.h"
#include "SSLEngine.h"
#include "SSLUtil.h"
#include "SecureTransportEngineF.h"
#include "SecureTransportTransceiverI.h"
#include "SecureTransportUtil.h"

// Disable deprecation warnings from SecureTransport APIs
Expand Down
3 changes: 0 additions & 3 deletions cpp/src/Ice/SSL/SecureTransportUtil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@
#include <fstream>
#include <sstream>

#include <CoreFoundation/CoreFoundation.h>
#include <Security/Security.h>

using namespace Ice;
using namespace IceInternal;
using namespace Ice::SSL;
Expand Down
Loading
Loading