diff options
author | Benoit Foucher <benoit@zeroc.com> | 2018-01-31 17:21:12 +0100 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2018-01-31 17:21:12 +0100 |
commit | c3f44e70ea6a8c9bd16281f4b7e2bcd8f7bae47f (patch) | |
tree | a02e199af243136b4dc4a83929e8c9a185c9dcd8 /cpp/src/Ice/Proxy.cpp | |
parent | Updated AutoStart description (diff) | |
download | ice-c3f44e70ea6a8c9bd16281f4b7e2bcd8f7bae47f.tar.bz2 ice-c3f44e70ea6a8c9bd16281f4b7e2bcd8f7bae47f.tar.xz ice-c3f44e70ea6a8c9bd16281f4b7e2bcd8f7bae47f.zip |
Added support for ice_fixed, ice_getTimeout, ice_getCompress methods (ICE-7996 & ICE-7976)
Diffstat (limited to 'cpp/src/Ice/Proxy.cpp')
-rw-r--r-- | cpp/src/Ice/Proxy.cpp | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/cpp/src/Ice/Proxy.cpp b/cpp/src/Ice/Proxy.cpp index d24fcc1c4b2..2df594c44e5 100644 --- a/cpp/src/Ice/Proxy.cpp +++ b/cpp/src/Ice/Proxy.cpp @@ -1199,6 +1199,12 @@ ICE_OBJECT_PRX::ice_compress(bool b) const } } +IceUtil::Optional<bool> +ICE_OBJECT_PRX::ice_getCompress() const +{ + return _reference->getCompress(); +} + ObjectPrxPtr ICE_OBJECT_PRX::ice_timeout(int t) const { @@ -1225,6 +1231,12 @@ ICE_OBJECT_PRX::ice_timeout(int t) const } } +IceUtil::Optional<int> +ICE_OBJECT_PRX::ice_getTimeout() const +{ + return _reference->getTimeout(); +} + ObjectPrxPtr ICE_OBJECT_PRX::ice_connectionId(const string& id) const { @@ -1247,6 +1259,39 @@ ICE_OBJECT_PRX::ice_getConnectionId() const return _reference->getConnectionId(); } +ObjectPrxPtr +ICE_OBJECT_PRX::ice_fixed(const ::Ice::ConnectionPtr& connection) const +{ + if(!connection) + { +#ifdef ICE_CPP11_MAPPING + throw invalid_argument("invalid null connection passed to ice_fixed"); +#else + throw IceUtil::IllegalArgumentException(__FILE__, __LINE__, "invalid null connection passed to ice_fixed"); +#endif + } + ::Ice::ConnectionIPtr impl = ICE_DYNAMIC_CAST(::Ice::ConnectionI, connection); + if(!impl) + { +#ifdef ICE_CPP11_MAPPING + throw invalid_argument("invalid connection passed to ice_fixed"); +#else + throw IceUtil::IllegalArgumentException(__FILE__, __LINE__, "invalid connection passed to ice_fixed"); +#endif + } + ReferencePtr ref = _reference->changeConnection(impl); + if(ref == _reference) + { + return CONST_POINTER_CAST_OBJECT_PRX; + } + else + { + ObjectPrxPtr proxy = _newInstance(); + proxy->setup(ref); + return proxy; + } +} + ConnectionPtr ICE_OBJECT_PRX::ice_getCachedConnection() const { |