diff options
Diffstat (limited to 'cpp/include/Ice/ConnectionAsync.h')
-rw-r--r-- | cpp/include/Ice/ConnectionAsync.h | 32 |
1 files changed, 30 insertions, 2 deletions
diff --git a/cpp/include/Ice/ConnectionAsync.h b/cpp/include/Ice/ConnectionAsync.h index 5d850e577f4..4a27138aa53 100644 --- a/cpp/include/Ice/ConnectionAsync.h +++ b/cpp/include/Ice/ConnectionAsync.h @@ -42,11 +42,40 @@ public: catch(::Ice::Exception& ex) { ::IceInternal::CallbackNC<T>::__exception(__result, ex); - return; } } }; +#ifdef ICE_CPP11 +class Cpp11FnCallbackNC_Connection_flushBatchRequests : virtual public ::IceInternal::Cpp11FnCallbackNC +{ +public: + + Cpp11FnCallbackNC_Connection_flushBatchRequests(const ::IceInternal::Function<void (const ::Ice::Exception&)>& excb, + const ::IceInternal::Function<void (bool)>& sentcb) : + ::IceInternal::Cpp11FnCallbackNC(excb, sentcb) + { + CallbackBase::checkCallback(true, excb != nullptr); + } + + virtual void + __completed(const ::Ice::AsyncResultPtr& __result) const + { + ::Ice::ConnectionPtr __con = __result->getConnection(); + assert(__con); + try + { + __con->end_flushBatchRequests(__result); + assert(false); + } + catch(::Ice::Exception& ex) + { + ::IceInternal::Cpp11FnCallbackNC::__exception(__result, ex); + } + } +}; +#endif + template<class T> Callback_Connection_flushBatchRequestsPtr newCallback_Connection_flushBatchRequests(const IceUtil::Handle<T>& instance, void (T::*excb)(const ::Ice::Exception&), @@ -90,7 +119,6 @@ public: catch(::Ice::Exception& ex) { ::IceInternal::Callback<T, CT>::__exception(__result, ex); - return; } } }; |