blob: c16e6341e03a9257ad8a2f5fc67f1bc14471fca1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
|
// **********************************************************************
//
// Copyright (c) 2003-2017 ZeroC, Inc. All rights reserved.
//
// This copy of Ice is licensed to you under the terms described in the
// ICE_LICENSE file included in this distribution.
//
// **********************************************************************
#ifndef ICE_ASYNC_RESULT_H
#define ICE_ASYNC_RESULT_H
#ifndef ICE_CPP11_MAPPING
#include <IceUtil/Monitor.h>
#include <IceUtil/Mutex.h>
#include <Ice/LocalObject.h>
#include <Ice/CommunicatorF.h>
#include <Ice/ConnectionF.h>
#include <Ice/ProxyF.h>
#include <Ice/AsyncResultF.h>
namespace Ice
{
class ICE_API AsyncResult : private IceUtil::noncopyable, public Ice::LocalObject
{
public:
virtual ~AsyncResult();
virtual void cancel() = 0;
virtual Int getHash() const = 0;
virtual CommunicatorPtr getCommunicator() const = 0;
virtual ConnectionPtr getConnection() const = 0;
virtual ObjectPrxPtr getProxy() const = 0;
virtual bool isCompleted() const = 0;
virtual void waitForCompleted() = 0;
virtual bool isSent() const = 0;
virtual void waitForSent() = 0;
virtual void throwLocalException() const = 0;
virtual bool sentSynchronously() const = 0;
virtual LocalObjectPtr getCookie() const = 0;
virtual const std::string& getOperation() const = 0;
virtual bool waitForResponse() = 0;
virtual Ice::InputStream* startReadParams() = 0;
virtual void endReadParams() = 0;
virtual void readEmptyParams() = 0;
virtual void readParamEncaps(const ::Ice::Byte*&, ::Ice::Int&) = 0;
virtual void throwUserException() = 0;
static void check(const AsyncResultPtr&, const ::IceProxy::Ice::Object*, const ::std::string&);
static void check(const AsyncResultPtr&, const Connection*, const ::std::string&);
static void check(const AsyncResultPtr&, const Communicator*, const ::std::string&);
class Callback : public IceUtil::Shared
{
public:
virtual void run() = 0;
};
typedef IceUtil::Handle<Callback> CallbackPtr;
virtual void scheduleCallback(const CallbackPtr&) = 0;
protected:
static void check(const AsyncResultPtr&, const ::std::string&);
};
}
#endif
#endif
|