summaryrefslogtreecommitdiff
path: root/TAO/tao/giop.h
diff options
context:
space:
mode:
authorgokhale <asgokhale@users.noreply.github.com>1998-03-10 23:03:00 +0000
committergokhale <asgokhale@users.noreply.github.com>1998-03-10 23:03:00 +0000
commitf607a04f211bcda1048cf0f650778cfa79e751d2 (patch)
treed4bab30beb9170069ea90668d2736b6897bfb044 /TAO/tao/giop.h
parenta7741fb00c4feb7c9bc05229fd6506f55587bdd0 (diff)
downloadATCD-f607a04f211bcda1048cf0f650778cfa79e751d2.tar.gz
*** empty log message ***
Diffstat (limited to 'TAO/tao/giop.h')
-rw-r--r--TAO/tao/giop.h102
1 files changed, 52 insertions, 50 deletions
diff --git a/TAO/tao/giop.h b/TAO/tao/giop.h
index 708502a1ceb..fc199565770 100644
--- a/TAO/tao/giop.h
+++ b/TAO/tao/giop.h
@@ -4,7 +4,7 @@
//
// = LIBRARY
// TAO
-//
+//
// = FILENAME
// giop.h
//
@@ -26,9 +26,9 @@
// GIOP code is reentrant.
//
// = AUTHOR
-// Copyright 1994-1995 by Sun Microsystems Inc.,
+// Copyright 1994-1995 by Sun Microsystems Inc.,
// Chris Cleeland <cleeland@cs.wustl.edu>
-//
+//
// ============================================================================
#if !defined (TAO_GIOP_H)
@@ -43,7 +43,7 @@
// Email to tag-request@omg.org to allocate tags.
typedef CORBA::ULong TAO_IOP_Profile_ID;
-enum
+enum
{
TAO_IOP_TAG_INTERNET_IOP = 0, // IIOP
TAO_IOP_TAG_MULTIPLE_COMPONENTS = 1, // DCE-CIOP
@@ -52,16 +52,16 @@ enum
TAO_IOP_TAG_ONC_IOP = 0x4f4e4300 // ONC IOP
};
-struct TAO_IOP_Tagged_Profile
+struct TAO_IOP_Tagged_Profile
// One per protocol.
-{
+{
TAO_IOP_Profile_ID tag;
TAO_opaque profile_data;
};
typedef TAO_Unbounded_Sequence<TAO_IOP_Tagged_Profile> TAO_IOP_Tagged_Profile_Sequence;
-struct TAO_IOP_IOR
+struct TAO_IOP_IOR
// = TITLE
// InteroperableObjectReference
//
@@ -82,7 +82,7 @@ struct TAO_IOP_IOR
typedef CORBA::ULong TAO_IOP_ComponentId;
-enum
+enum
// = DESCRIPTION
// These are all defined by DCE-CIOP in OMG TC document 95-3-10.
{
@@ -94,7 +94,7 @@ enum
TAO_IOP_TAG_LOCATION_POLICY = 12 // octet/enum
};
-struct TAO_IOP_TaggedComponent
+struct TAO_IOP_TaggedComponent
// = DESCRIPTION
// One way to represent multicomponent profiles, e.g. as done by the
// DCE-CIOP protocol. One of these gets encapsulated in
@@ -118,15 +118,15 @@ struct TAO_Version
CORBA::Octet minor;
};
-enum
- // = DESCRIPTION
+enum
+ // = DESCRIPTION
// GIOP protocol version 1.0 information.
-{
+{
MY_MAJOR = 1,
- MY_MINOR = 0
+ MY_MINOR = 0
};
-enum TAO_GIOP_MsgType
+enum TAO_GIOP_MsgType
// = DESCRIPTION
// All GIOP messages include a header and message type.
{
@@ -142,7 +142,7 @@ enum TAO_GIOP_MsgType
TAO_GIOP_MessageError = 6 // by both
};
-struct TAO_GIOP_MessageHeader
+struct TAO_GIOP_MessageHeader
{
CORBA::Char magic [4]; // "GIOP"
TAO_Version giop_version;
@@ -168,11 +168,11 @@ enum
TAO_GIOP_TransactionService = 0
// More service IDs may be defined by OMG.
-
+
// This is where our RIOP service ID will be defined...
};
-
-struct TAO_GIOP_ServiceContext
+
+struct TAO_GIOP_ServiceContext
{
TAO_GIOP_ServiceID context_id;
TAO_opaque context_data;
@@ -184,7 +184,7 @@ extern CORBA::TypeCode TC_ServiceContextList;
// = Request, Reply headers
-class TAO_Export TAO_GIOP_RequestHeader
+class TAO_Export TAO_GIOP_RequestHeader
// = TITLE
// This class embodies the header of a GIOP request.
//
@@ -194,23 +194,23 @@ class TAO_Export TAO_GIOP_RequestHeader
public:
TAO_GIOP_RequestHeader (void);
// Constructor.
-
+
CORBA::Boolean init (CDR &msg, CORBA::Environment& env);
// Initialize the header from the values found in <msg>.
-
+
//private:
TAO_GIOP_ServiceContextList service_info;
// The service context for the request (CORBA Reference?)
-
+
CORBA::ULong request_id;
// Unique identifier for a request
-
+
CORBA::Boolean response_expected;
// true if this request requires a response
-
+
TAO_opaque object_key;
// The object key of the destination object.
-
+
CORBA::String operation;
// Name of the operation being performed
@@ -218,69 +218,69 @@ public:
// Identifies the requester
};
-enum TAO_GIOP_ReplyStatusType
+enum TAO_GIOP_ReplyStatusType
{
- TAO_GIOP_NO_EXCEPTION,
+ TAO_GIOP_NO_EXCEPTION,
// Request completed successfully
- TAO_GIOP_USER_EXCEPTION,
+ TAO_GIOP_USER_EXCEPTION,
// Request terminated with user exception
- TAO_GIOP_SYSTEM_EXCEPTION,
+ TAO_GIOP_SYSTEM_EXCEPTION,
// Request terminated with system exception
- TAO_GIOP_LOCATION_FORWARD
+ TAO_GIOP_LOCATION_FORWARD
// @@ More info
};
-struct TAO_GIOP_ReplyHeader
+struct TAO_GIOP_ReplyHeader
{
- TAO_GIOP_ServiceContextList service_info;
- // Information
+ TAO_GIOP_ServiceContextList service_info;
+ // Information
- CORBA::ULong request_id;
+ CORBA::ULong request_id;
// Unique identifier of the request for which this is a reply
- TAO_GIOP_ReplyStatusType reply_status;
+ TAO_GIOP_ReplyStatusType reply_status;
// Status of the reply (see above enum)
};
-struct TAO_GIOP_CancelRequestHeader
+struct TAO_GIOP_CancelRequestHeader
// = DESCRIPTION
// Cancellation -- applies both to Requests and LocateRequests.
{
- CORBA::ULong request_id;
+ CORBA::ULong request_id;
// Unique identifier of the request being cancelled
};
-struct TAO_GIOP_LocateRequestHeader
+struct TAO_GIOP_LocateRequestHeader
// = DESCRIPTION
// Location service support
{
TAO_GIOP_LocateRequestHeader (void);
// Constructor
-
+
CORBA::Boolean init (CDR &msg, CORBA::Environment& env);
// Initialize the header from the values found in <msg>.
-
+
CORBA::ULong request_id;
TAO_opaque object_key;
};
-enum TAO_GIOP_LocateStatusType
+enum TAO_GIOP_LocateStatusType
{
TAO_GIOP_UNKNOWN_OBJECT,
TAO_GIOP_OBJECT_HERE,
TAO_GIOP_OBJECT_FORWARD
};
-struct TAO_GIOP_LocateReplyHeader
+struct TAO_GIOP_LocateReplyHeader
{
CORBA::ULong request_id;
TAO_GIOP_LocateStatusType locate_status;
};
-class TAO_Export TAO_GIOP_Invocation
+class TAO_Export TAO_GIOP_Invocation
// = TITLE
// Invocation: Sends a Request, optionally reads associated Reply.
// Uses transport info passed in, doesn't locate anything.
@@ -299,7 +299,7 @@ public:
// <start> goes beyond initialising data structures, and makes
// calls that may fail -- and thus throw exceptions.
- void put_param (CORBA::TypeCode_ptr tc,
+ void put_param (CORBA::TypeCode_ptr tc,
void *value,
CORBA::Environment &env);
@@ -311,6 +311,9 @@ public:
CORBA::Environment &env);
// No CORBA::Context support (deprecated).
+ CDR &stream (void);
+ // return the underlying stream
+
private:
IIOP_Object *data_;
// The object on which this invocation is going.
@@ -326,7 +329,7 @@ private:
u_char buffer [CDR::DEFAULT_BUFSIZE];
// Buffer used for CDR stream.
-
+
CDR stream_;
// Stream into which the request is placed.
@@ -334,7 +337,6 @@ private:
// The handler for the client's connection.
};
-
class TAO_Export TAO_GIOP
// = TITLE
// A namespace for GIOP-related operations.
@@ -343,7 +345,7 @@ class TAO_Export TAO_GIOP
// Only put static methods within this scope.
{
ACE_CLASS_IS_NAMESPACE (TAO_GIOP);
-
+
public:
// = Close a connection, first sending GIOP::CloseConnection
static void close_connection (TAO_Client_Connection_Handler *&handle,
@@ -352,16 +354,16 @@ public:
static CORBA::Boolean start_message (TAO_GIOP_MsgType t,
CDR &msg);
// Build the header for a message of type <t> into stream <msg>.
-
+
static CORBA::Boolean send_request (TAO_SVC_HANDLER *handler,
CDR &stream);
// Send message, returns TRUE if success, else FALSE.
static TAO_GIOP_MsgType recv_request (TAO_SVC_HANDLER *&handler,
- CDR &msg,
+ CDR &msg,
CORBA::Environment &env);
// Reads message, returns message type from header.
-
+
static void make_error (CDR &msg, ...);
// Construct a message containing an error so that it can be sent as
// a response to a request.