From 70802b63320582f0afa8229659ea9fe4a21d02ec Mon Sep 17 00:00:00 2001 From: Jose Date: Fri, 13 Jul 2012 00:18:06 +0200 Subject: WinRT support --- cpp/src/Ice/EndpointI.cpp | 36 +++++++++++++++++++++++++++++++++--- 1 file changed, 33 insertions(+), 3 deletions(-) (limited to 'cpp/src/Ice/EndpointI.cpp') diff --git a/cpp/src/Ice/EndpointI.cpp b/cpp/src/Ice/EndpointI.cpp index 5ac241dd909..afb8bdd2743 100644 --- a/cpp/src/Ice/EndpointI.cpp +++ b/cpp/src/Ice/EndpointI.cpp @@ -10,7 +10,6 @@ #include #include #include -#include #include #include #include @@ -58,7 +57,7 @@ IceInternal::EndpointI::ice_getHash() const } vector -IceInternal::EndpointI::connectors(const vector& addrs) const +IceInternal::EndpointI::connectors(const vector
& addrs) const { // // This method must be extended by endpoints which use the EndpointHostResolver to create @@ -72,6 +71,8 @@ IceInternal::EndpointI::EndpointI() : _hashInitialized(false) { } +#ifndef ICE_OS_WINRT + IceInternal::EndpointHostResolver::EndpointHostResolver(const InstancePtr& instance) : IceUtil::Thread("Ice endpoint host resolver thread"), _instance(instance), @@ -105,7 +106,7 @@ IceInternal::EndpointHostResolver::EndpointHostResolver(const InstancePtr& insta void IceInternal::EndpointHostResolver::resolve(const string& host, int port, const EndpointIPtr& endpoint, const EndpointI_connectorsPtr& callback) -{ +{ // // Try to get the addresses without DNS lookup. If this doesn't work, we queue a resolve // entry and the thread will take care of getting the endpoint addresses. @@ -188,3 +189,32 @@ IceInternal::EndpointHostResolver::run() } _queue.clear(); } + +#else + +IceInternal::EndpointHostResolver::EndpointHostResolver(const InstancePtr& instance) +{ +} + +void +IceInternal::EndpointHostResolver::resolve(const string&, int, + const EndpointIPtr& endpoint, + const EndpointI_connectorsPtr& callback) +{ + // + // No DNS lookup support with WinRT. + // + callback->connectors(endpoint->connectors()); +} + +void +IceInternal::EndpointHostResolver::destroy() +{ +} + +void +IceInternal::EndpointHostResolver::run() +{ +} + +#endif -- cgit v1.2.3