summaryrefslogtreecommitdiff
path: root/TAO/tao/request.h
blob: 4641988276ba31de0b5936e1bf0a313354603e22 (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
85
// This may look like C, but it's really -*- C++ -*-

// ============================================================================
//
// = LIBRARY
//    TAO
// 
// = FILENAME
//    request.h
//
// = DESCRIPTION
//     
//    Header file for Win32 C/C++/COM interface to CORBA's Dynamic
//    Invocation Interface "Request" type.
//
// = AUTHOR
//     Copyright 1994-1995 by Sun Microsystems, Inc.
// 
// ============================================================================

#if !defined (TAO_REQUEST_H)
#  define TAO_REQUEST_ H

class TAO_Export CORBA_Request
{
public:
  CORBA::Object_ptr target (void) const { return target_; }
  // Return the target of this request.
  
  const CORBA::Char *operation (void) const { return opname_; }
  // Return the operation name for the request.
  
  CORBA::NVList_ptr arguments (void) { return args_; }
  // Return the arguments for the request.
  
  CORBA::NamedValue_ptr result (void) { return result_; }
  // Return the result for the request.
  
  CORBA::ExceptionList_ptr exceptions (void) { return &exceptions_; }
  // Return the exceptions resulting from this request.
  
  CORBA::Environment *env (void) { return &env_; }
  // Return the <Environment> for this request.

  void invoke (void);
  // Perform method resolution and invoke an appropriate method. If
  // the method returns successfully, its result is placed in the
  // result argument specified on <create_request>. The behavior is
  // undefined if this <Request> has already been used with a previous
  // call to <invoke>, <send>, or <send_multiple_requests>.
  
  void send_oneway (void);
  // Send a oneway request.

  // = Stuff required for COM IUnknown support

  CORBA::ULong AddRef (void);
  CORBA::ULong Release (void);

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);

  ~CORBA_Request (void);

  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_;

  CORBA::ULong refcount_;
};

#endif /* TAO_REQUEST_H */