5 #ifndef ICE_INCOMING_ASYNC_H
6 #define ICE_INCOMING_ASYNC_H
11 #ifndef ICE_CPP11_MAPPING
19 class ICE_API AMDCallback :
public Ice::LocalObject
23 virtual ~AMDCallback();
29 virtual void ice_exception(const ::std::exception& ex) = 0;
34 virtual void ice_exception() = 0;
44 #if defined(_MSC_VER) && (_MSC_VER >= 1900)
45 # pragma warning(push)
46 # pragma warning(disable:4239)
53 class ICE_API IncomingAsync :
public IncomingBase,
54 #ifdef ICE_CPP11_MAPPING
55 public ::std::enable_shared_from_this<IncomingAsync>
57 public virtual Ice::AMDCallback
62 IncomingAsync(Incoming&);
64 #ifdef ICE_CPP11_MAPPING
66 static std::shared_ptr<IncomingAsync> create(Incoming&);
68 std::function<void()> response()
70 auto self = shared_from_this();
73 self->writeEmptyParams();
79 std::function<void(
const T&)> response()
81 auto self = shared_from_this();
82 return [
self](
const T& marshaledResult)
84 self->setMarshaledResult(marshaledResult);
89 std::function<void(std::exception_ptr)> exception()
91 auto self = shared_from_this();
92 return [
self](std::exception_ptr ex) {
self->completed(ex); };
97 virtual void ice_exception(const ::std::exception&);
98 virtual void ice_exception();
102 void kill(Incoming&);
106 #ifdef ICE_CPP11_MAPPING
107 void completed(std::exception_ptr);
112 void checkResponseSent();
119 const ResponseHandlerPtr _responseHandlerCopy;
122 #if defined(_MSC_VER) && (_MSC_VER >= 1900)
123 # pragma warning(pop)
128 #ifndef ICE_CPP11_MAPPING
136 class ICE_API AMD_Object_ice_invoke :
public virtual Ice::AMDCallback
140 virtual ~AMD_Object_ice_invoke();
149 virtual void ice_response(
bool ok,
const std::vector<Ice::Byte>& bytes) = 0;
158 virtual void ice_response(
bool ok,
const std::pair<const Ice::Byte*, const Ice::Byte*>& bytes) = 0;
170 class ICE_API AMD_Object_ice_invoke :
public ::Ice::AMD_Object_ice_invoke,
public IceInternal::IncomingAsync
174 AMD_Object_ice_invoke(IceInternal::Incoming&);
176 virtual void ice_response(
bool,
const std::vector< ::Ice::Byte>&);
177 virtual void ice_response(
bool,
const std::pair<const ::Ice::Byte*, const ::Ice::Byte*>&);