summaryrefslogtreecommitdiff
path: root/cpp/include/Ice/AsyncResult.h
blob: 730183fcf5250551d2863bce431e667e3159c24b (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
// **********************************************************************
//
// Copyright (c) 2003-2016 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 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 __wait() = 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&);

protected:

    static void __check(const AsyncResultPtr&, const ::std::string&);
};

}

#endif

#endif