diff options
author | Bernard Normier <bernard@zeroc.com> | 2017-01-11 16:15:49 -0500 |
---|---|---|
committer | Bernard Normier <bernard@zeroc.com> | 2017-01-11 16:15:49 -0500 |
commit | f6a5299766fe3db2273afd78f145486b091513ed (patch) | |
tree | 87eead6b9fa33e43f7b863093fd410167d9cb23a /cpp/src/Ice | |
parent | Fixed Glacier2/router IE browser test failure (diff) | |
download | ice-f6a5299766fe3db2273afd78f145486b091513ed.tar.bz2 ice-f6a5299766fe3db2273afd78f145486b091513ed.tar.xz ice-f6a5299766fe3db2273afd78f145486b091513ed.zip |
Moved UniquePtr to IceInternal
Removed ctor and assignment operator from UniquePtr
Diffstat (limited to 'cpp/src/Ice')
-rw-r--r-- | cpp/src/Ice/Application.cpp | 2 | ||||
-rw-r--r-- | cpp/src/Ice/BatchRequestQueue.h | 4 | ||||
-rw-r--r-- | cpp/src/Ice/ConnectRequestHandler.cpp | 2 | ||||
-rw-r--r-- | cpp/src/Ice/ConnectRequestHandler.h | 4 | ||||
-rw-r--r-- | cpp/src/Ice/ConnectionI.h | 4 | ||||
-rw-r--r-- | cpp/src/Ice/Instance.h | 1 | ||||
-rw-r--r-- | cpp/src/Ice/LocatorInfo.h | 4 | ||||
-rw-r--r-- | cpp/src/Ice/OutgoingAsync.cpp | 4 | ||||
-rw-r--r-- | cpp/src/Ice/Reference.cpp | 2 | ||||
-rw-r--r-- | cpp/src/Ice/RequestHandler.h | 4 | ||||
-rw-r--r-- | cpp/src/Ice/SHA1.cpp | 26 | ||||
-rw-r--r-- | cpp/src/Ice/WSTransceiver.cpp | 6 |
12 files changed, 31 insertions, 32 deletions
diff --git a/cpp/src/Ice/Application.cpp b/cpp/src/Ice/Application.cpp index 4b81f69614e..a2b733053e0 100644 --- a/cpp/src/Ice/Application.cpp +++ b/cpp/src/Ice/Application.cpp @@ -13,7 +13,7 @@ #include <IceUtil/CtrlCHandler.h> #include <IceUtil/Cond.h> #include <IceUtil/ArgVector.h> -#include <IceUtil/UniquePtr.h> +#include <Ice/UniquePtr.h> using namespace std; using namespace Ice; diff --git a/cpp/src/Ice/BatchRequestQueue.h b/cpp/src/Ice/BatchRequestQueue.h index c8cb3090e7a..878b2a2ef6d 100644 --- a/cpp/src/Ice/BatchRequestQueue.h +++ b/cpp/src/Ice/BatchRequestQueue.h @@ -13,7 +13,7 @@ #include <IceUtil/Shared.h> #include <IceUtil/Mutex.h> #include <IceUtil/Monitor.h> -#include <IceUtil/UniquePtr.h> +#include <Ice/UniquePtr.h> #include <Ice/BatchRequestInterceptor.h> #include <Ice/BatchRequestQueueF.h> @@ -54,7 +54,7 @@ private: bool _batchStreamCanFlush; int _batchRequestNum; size_t _batchMarker; - IceUtil::UniquePtr<Ice::LocalException> _exception; + IceInternal::UniquePtr<Ice::LocalException> _exception; size_t _maxSize; }; diff --git a/cpp/src/Ice/ConnectRequestHandler.cpp b/cpp/src/Ice/ConnectRequestHandler.cpp index e8b5acbd486..586852fe1fb 100644 --- a/cpp/src/Ice/ConnectRequestHandler.cpp +++ b/cpp/src/Ice/ConnectRequestHandler.cpp @@ -272,7 +272,7 @@ ConnectRequestHandler::flushRequests() #ifdef ICE_CPP11_MAPPING std::unique_ptr<Ice::LocalException> exception; #else - IceUtil::UniquePtr<Ice::LocalException> exception; + IceInternal::UniquePtr<Ice::LocalException> exception; #endif while(!_requests.empty()) // _requests is immutable when _flushing = true { diff --git a/cpp/src/Ice/ConnectRequestHandler.h b/cpp/src/Ice/ConnectRequestHandler.h index 1a250e41de4..4a0c5b2892b 100644 --- a/cpp/src/Ice/ConnectRequestHandler.h +++ b/cpp/src/Ice/ConnectRequestHandler.h @@ -12,7 +12,7 @@ #include <IceUtil/Monitor.h> #include <IceUtil/Mutex.h> -#include <IceUtil/UniquePtr.h> +#include <Ice/UniquePtr.h> #include <Ice/ConnectRequestHandlerF.h> #include <Ice/RequestHandler.h> @@ -63,7 +63,7 @@ private: Ice::ConnectionIPtr _connection; bool _compress; - IceUtil::UniquePtr<Ice::LocalException> _exception; + IceInternal::UniquePtr<Ice::LocalException> _exception; bool _initialized; bool _flushing; diff --git a/cpp/src/Ice/ConnectionI.h b/cpp/src/Ice/ConnectionI.h index 6bd7437c436..72652518b94 100644 --- a/cpp/src/Ice/ConnectionI.h +++ b/cpp/src/Ice/ConnectionI.h @@ -15,7 +15,7 @@ #include <IceUtil/Time.h> #include <IceUtil/StopWatch.h> #include <IceUtil/Timer.h> -#include <IceUtil/UniquePtr.h> +#include <Ice/UniquePtr.h> #include <Ice/CommunicatorF.h> #include <Ice/Connection.h> @@ -349,7 +349,7 @@ private: std::map<Int, IceInternal::OutgoingAsyncBasePtr> _asyncRequests; std::map<Int, IceInternal::OutgoingAsyncBasePtr>::iterator _asyncRequestsHint; - IceUtil::UniquePtr<LocalException> _exception; + IceInternal::UniquePtr<LocalException> _exception; const size_t _messageSizeMax; IceInternal::BatchRequestQueuePtr _batchRequestQueue; diff --git a/cpp/src/Ice/Instance.h b/cpp/src/Ice/Instance.h index 2e4fd503b16..c0d679085e3 100644 --- a/cpp/src/Ice/Instance.h +++ b/cpp/src/Ice/Instance.h @@ -42,7 +42,6 @@ #include <Ice/FacetMap.h> #include <Ice/Process.h> #include <list> -#include <IceUtil/UniquePtr.h> namespace Ice { diff --git a/cpp/src/Ice/LocatorInfo.h b/cpp/src/Ice/LocatorInfo.h index 36528f7790d..7809f211eb1 100644 --- a/cpp/src/Ice/LocatorInfo.h +++ b/cpp/src/Ice/LocatorInfo.h @@ -22,7 +22,7 @@ #include <Ice/PropertiesF.h> #include <Ice/Version.h> -#include <IceUtil/UniquePtr.h> +#include <Ice/UniquePtr.h> namespace IceInternal { @@ -139,7 +139,7 @@ public: bool _sent; bool _response; Ice::ObjectPrxPtr _proxy; - IceUtil::UniquePtr<Ice::Exception> _exception; + IceInternal::UniquePtr<Ice::Exception> _exception; }; typedef IceUtil::Handle<Request> RequestPtr; diff --git a/cpp/src/Ice/OutgoingAsync.cpp b/cpp/src/Ice/OutgoingAsync.cpp index 40c753fe656..4776672ff9a 100644 --- a/cpp/src/Ice/OutgoingAsync.cpp +++ b/cpp/src/Ice/OutgoingAsync.cpp @@ -994,7 +994,7 @@ OutgoingAsync::response() string operation; _is.read(operation, false); - IceUtil::UniquePtr<RequestFailedException> ex; + IceInternal::UniquePtr<RequestFailedException> ex; switch(replyStatus) { case replyObjectNotExist: @@ -1035,7 +1035,7 @@ OutgoingAsync::response() string unknown; _is.read(unknown, false); - IceUtil::UniquePtr<UnknownException> ex; + IceInternal::UniquePtr<UnknownException> ex; switch(replyStatus) { case replyUnknownException: diff --git a/cpp/src/Ice/Reference.cpp b/cpp/src/Ice/Reference.cpp index 8ec124a1c41..c55b3037a33 100644 --- a/cpp/src/Ice/Reference.cpp +++ b/cpp/src/Ice/Reference.cpp @@ -1796,7 +1796,7 @@ IceInternal::RoutableReference::createConnection(const vector<EndpointIPtr>& all const vector<EndpointIPtr> _endpoints; const GetConnectionCallbackPtr _callback; size_t _i; - IceUtil::UniquePtr<Ice::LocalException> _exception; + IceInternal::UniquePtr<Ice::LocalException> _exception; }; // diff --git a/cpp/src/Ice/RequestHandler.h b/cpp/src/Ice/RequestHandler.h index ac97141f743..5921ae52c01 100644 --- a/cpp/src/Ice/RequestHandler.h +++ b/cpp/src/Ice/RequestHandler.h @@ -11,7 +11,7 @@ #define ICE_REQUEST_HANDLER_H #include <IceUtil/Shared.h> -#include <IceUtil/UniquePtr.h> +#include <Ice/UniquePtr.h> #include <Ice/RequestHandlerF.h> #include <Ice/ReferenceF.h> @@ -44,7 +44,7 @@ public: private: - IceUtil::UniquePtr<Ice::LocalException> _ex; + IceInternal::UniquePtr<Ice::LocalException> _ex; }; diff --git a/cpp/src/Ice/SHA1.cpp b/cpp/src/Ice/SHA1.cpp index 141ffda9a6a..e8a7d986d42 100644 --- a/cpp/src/Ice/SHA1.cpp +++ b/cpp/src/Ice/SHA1.cpp @@ -7,7 +7,7 @@ // // ********************************************************************** -#include <IceUtil/SHA1.h> +#include <Ice/SHA1.h> #ifndef ICE_OS_UWP # if defined(_WIN32) @@ -25,7 +25,7 @@ using namespace IceUtil; #ifndef ICE_OS_UWP -namespace IceUtilInternal +namespace IceInternal { class SHA1::Hasher @@ -65,7 +65,7 @@ namespace const int SHA_DIGEST_LENGTH = 20; } -IceUtilInternal::SHA1::Hasher::Hasher() : +IceInternal::SHA1::Hasher::Hasher() : _ctx(0), _hash(0) { @@ -80,7 +80,7 @@ IceUtilInternal::SHA1::Hasher::Hasher() : } } -IceUtilInternal::SHA1::Hasher::~Hasher() +IceInternal::SHA1::Hasher::~Hasher() { if(_hash) { @@ -93,19 +93,19 @@ IceUtilInternal::SHA1::Hasher::~Hasher() } } # elif defined(__APPLE__) -IceUtilInternal::SHA1::Hasher::Hasher() +IceInternal::SHA1::Hasher::Hasher() { CC_SHA1_Init(&_ctx); } # else -IceUtilInternal::SHA1::Hasher::Hasher() +IceInternal::SHA1::Hasher::Hasher() { SHA1_Init(&_ctx); } # endif void -IceUtilInternal::SHA1::Hasher::update(const unsigned char* data, size_t length) +IceInternal::SHA1::Hasher::update(const unsigned char* data, size_t length) { # if defined(_WIN32) if(!CryptHashData(_hash, data, static_cast<DWORD>(length), 0)) @@ -120,7 +120,7 @@ IceUtilInternal::SHA1::Hasher::update(const unsigned char* data, size_t length) } void -IceUtilInternal::SHA1::Hasher::finalize(vector<unsigned char>& md) +IceInternal::SHA1::Hasher::finalize(vector<unsigned char>& md) { # if defined(_WIN32) md.resize(SHA_DIGEST_LENGTH); @@ -138,30 +138,30 @@ IceUtilInternal::SHA1::Hasher::finalize(vector<unsigned char>& md) # endif } -IceUtilInternal::SHA1::SHA1() : +IceInternal::SHA1::SHA1() : _hasher(new Hasher()) { } -IceUtilInternal::SHA1::~SHA1() +IceInternal::SHA1::~SHA1() { } void -IceUtilInternal::SHA1::update(const unsigned char* data, std::size_t length) +IceInternal::SHA1::update(const unsigned char* data, std::size_t length) { _hasher->update(data, length); } void -IceUtilInternal::SHA1::finalize(std::vector<unsigned char>& md) +IceInternal::SHA1::finalize(std::vector<unsigned char>& md) { _hasher->finalize(md); } #endif void -IceUtilInternal::sha1(const unsigned char* data, size_t length, vector<unsigned char>& md) +IceInternal::sha1(const unsigned char* data, size_t length, vector<unsigned char>& md) { #if defined(ICE_OS_UWP) auto dataA = diff --git a/cpp/src/Ice/WSTransceiver.cpp b/cpp/src/Ice/WSTransceiver.cpp index 2c074c75974..413b88ed630 100644 --- a/cpp/src/Ice/WSTransceiver.cpp +++ b/cpp/src/Ice/WSTransceiver.cpp @@ -18,7 +18,7 @@ #include <Ice/LocalException.h> #include <Ice/Base64.h> #include <IceUtil/Random.h> -#include <IceUtil/SHA1.h> +#include <Ice/SHA1.h> #include <IceUtil/StringUtil.h> // Python 2.7 under Windows. @@ -1028,7 +1028,7 @@ IceInternal::WSTransceiver::handleRequest(Buffer& responseBuffer) out << "Sec-WebSocket-Accept: "; string input = key + _wsUUID; vector<unsigned char> hash; - IceUtilInternal::sha1(reinterpret_cast<const unsigned char*>(&input[0]), input.size(), hash); + sha1(reinterpret_cast<const unsigned char*>(&input[0]), input.size(), hash); out << IceInternal::Base64::encode(hash) << "\r\n" << "\r\n"; // EOM string str = out.str(); @@ -1126,7 +1126,7 @@ IceInternal::WSTransceiver::handleResponse() } string input = _key + _wsUUID; vector<unsigned char> hash; - IceUtilInternal::sha1(reinterpret_cast<const unsigned char*>(&input[0]), input.size(), hash); + sha1(reinterpret_cast<const unsigned char*>(&input[0]), input.size(), hash); if(val != IceInternal::Base64::encode(hash)) { throw WebSocketException("invalid value `" + val + "' for Sec-WebSocket-Accept"); |