summaryrefslogtreecommitdiff
path: root/TAO/IIOP/lib/corba/request.hh
blob: 74e6e31afbaf8e772c919ba3f7661a0c6bf468a7 (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
// @(#)request.hh	1.2 95/10/02
// Copyright 1994-1995 by Sun Microsystems, Inc.
//
// Header file for Win32 C/C++/COM interface to CORBA's Dynamic
// Invocation Interface "Request" type.
//

void                     CORBA_release (CORBA_Request_ptr req);
CORBA_Boolean            CORBA_is_nil (CORBA_Request_ptr req);

typedef CORBA_SEQUENCE <CORBA_TypeCode_ptr> CORBA_ExceptionList;
typedef CORBA_ExceptionList *CORBA_ExceptionList_ptr;

extern const IID         IID_CORBA_Request;

class _EXPCLASS CORBA_Request : public IUnknown
{
  public:
    //
    // XXX these should not be inlined
    //
    CORBA_Object_ptr		target () const { return _target; }
    const CORBA_Char		*operation () const { return _opname; }
    CORBA_NVList_ptr		arguments () { return _args; }
    CORBA_NamedValue_ptr        result () { return _result; }
    CORBA_ExceptionList_ptr	exceptions () { return &_exceptions; }
    CORBA_Environment           *env () { return &_env; }

    void                        invoke ();
    void                        send_oneway ();

    //
    // Stuff required for COM IUnknown support
    //
    ULONG __stdcall             AddRef ();
    ULONG __stdcall             Release ();
    HRESULT __stdcall           QueryInterface (
                                    REFIID      riid,
                                    void        **ppv
                                );

  private:
    friend class CORBA_Object;

			        CORBA_Request (
			            CORBA_Object_ptr	    obj,
				    const CORBA_Char        *op,
                                    CORBA_NVList_ptr        args,
                                    CORBA_NamedValue_ptr    result,
                                    CORBA_Flags             flags
			        );

			        CORBA_Request (
			            CORBA_Object_ptr	    obj,
			            const CORBA_Char	    *op
			        );

			        virtual ~CORBA_Request ();

    CORBA_Object_ptr            _target;
    const CORBA_Char		*_opname;
    CORBA_NVList_ptr		_args;
    CORBA_NamedValue_ptr        _result;
    CORBA_Flags			_flags;
    CORBA_Environment           _env;
    CORBA_ExceptionList         _exceptions;

    unsigned                    _refcount;
};