summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbala <balanatarajan@users.noreply.github.com>1999-12-09 23:10:53 +0000
committerbala <balanatarajan@users.noreply.github.com>1999-12-09 23:10:53 +0000
commitb2d04064159de3356e16e89d9afd097e3aa23052 (patch)
tree1f3e3f884eba74e50a5e201b5afd5437e02d7948
parentb17c9249c1c9e46a105b806f4d9252ef2cfe9320 (diff)
downloadATCD-b2d04064159de3356e16e89d9afd097e3aa23052.tar.gz
Compiling set.
-rw-r--r--TAO/tao/GIOP_Message_1_1.cpp126
-rw-r--r--TAO/tao/GIOP_Message_1_1.h72
-rw-r--r--TAO/tao/GIOP_Message_1_1.i1
3 files changed, 199 insertions, 0 deletions
diff --git a/TAO/tao/GIOP_Message_1_1.cpp b/TAO/tao/GIOP_Message_1_1.cpp
new file mode 100644
index 00000000000..6022df532a4
--- /dev/null
+++ b/TAO/tao/GIOP_Message_1_1.cpp
@@ -0,0 +1,126 @@
+//$id$
+#include "tao/GIOP_Message_1_1.h"
+#include "tao/GIOPC.h"
+#include "tao/Profile.h"
+#include "tao/Stub.h"
+#include "tao/Object_KeyC.h"
+#include "tao/Principal.h"
+
+//$Id$
+
+#if defined (__ACE_INLINE__)
+# include "tao/GIOP_Message_1_1.i"
+#endif /* __ACE_INLINE__ */
+
+TAO_GIOP_Message_1_1::TAO_GIOP_Message_1_1 (void)
+{
+ //no-op
+}
+
+
+TAO_GIOP_Message_1_1::~TAO_GIOP_Message_1_1 (void)
+{
+ //no-op
+}
+
+CORBA::Boolean
+TAO_GIOP_Message_1_1::write_request_header (const IOP::ServiceContextList& svc_ctx,
+ CORBA::ULong request_id,
+ CORBA::Octet response_flags,
+ TAO_Stub *stub,
+ const CORBA::Short address_disposition,
+ const char *opname,
+ TAO_OutputCDR &msg)
+{
+ // This i sepecific to GIOP 1.1. So put them here
+ msg << svc_ctx;
+
+ // Let us call our parent class to check what he can do for
+ // us.
+ TAO_GIOP_Message_Factory::write_request_header (svc_ctx,
+ request_id,
+ response_flags,
+ stub,
+ address_disposition,
+ opname,
+ msg);
+
+ // In this case we cannot recognise anything other than the Object
+ // key as the address disposition variable. But we do a sanity check
+ // anyway.
+ if (address_disposition == GIOP::KeyAddr)
+ {
+ // Put in the object key
+ TAO_Profile *profile =
+ stub->profile_in_use ();
+
+ TAO_ObjectKey *key = profile->_key ();
+
+ msg << *key;
+ }
+ else
+ {
+ if (TAO_orbdebug)
+ ACE_DEBUG ((LM_DEBUG,
+ "(%N | %l) Unable to handle this request \n"));
+ return 0;
+ }
+
+ msg << opname;
+
+ // The principal is not used. So send a null pointer
+ static CORBA::Principal_ptr principal = 0;
+ msg << principal;
+
+
+ return 1;
+
+}
+
+
+CORBA::Boolean
+TAO_GIOP_Message_1_1::
+write_locate_request_header (CORBA::ULong request_id,
+ TAO_Stub *stub,
+ const CORBA::Short address_disposition,
+ TAO_OutputCDR &msg)
+{
+ msg << request_id;
+
+ // In this case we cannot recognise anything other than the Object
+ // key as the address disposition variable. But we do a sanity check
+ // anyway.
+ if (address_disposition == GIOP::KeyAddr)
+ {
+ // Put in the object key
+ TAO_Profile *profile =
+ stub->profile_in_use ();
+
+ TAO_ObjectKey *key = profile->_key ();
+
+ // Everything is fine
+ msg << *key;
+ }
+ else
+ {
+ if (TAO_orbdebug)
+ ACE_DEBUG ((LM_DEBUG,
+ "(%N | %l) Unable to handle this request \n"));
+ return 0;
+ }
+
+ return 1;
+}
+
+
+const size_t
+TAO_GIOP_Message_1_1::get_header_len (void)
+{
+ return TAO_GIOP_1_1_HEADER_LEN;
+}
+
+const size_t
+TAO_GIOP_Message_1_1::get_message_size_offset (void)
+{
+ return TAO_GIOP_1_1_MESSAGE_SIZE_OFFSET;
+}
diff --git a/TAO/tao/GIOP_Message_1_1.h b/TAO/tao/GIOP_Message_1_1.h
new file mode 100644
index 00000000000..0439c718c69
--- /dev/null
+++ b/TAO/tao/GIOP_Message_1_1.h
@@ -0,0 +1,72 @@
+// -*- C++ -*-
+// $Id$
+
+// ============================================================================
+//
+// = LIBRARY
+// TAO
+//
+// = FILENAME
+// GIOP_Message_1_1.h
+//
+// = DESCRIPTION
+// Interface for the GIOP version 1.1 of the protocol
+//
+// = AUTHOR
+// Balachandran Natarajan <bala@cs.wustl.edu>
+//
+// ============================================================================
+#ifndef _TAO_GIOP_MESSAGE_1_1_H_
+#define _TAO_GIOP_MESSAGE_1_1_H_
+
+#include "tao/GIOP_Message_Factory.h"
+
+class TAO_Export TAO_GIOP_Message_1_1:public TAO_GIOP_Message_Factory
+{
+ // = TITLE
+ // Definitions of GIOP 1.1 specific stuff
+ //
+ // = DESCRIPTION
+ // This class will hold the specific details of 1.1
+ //
+public:
+
+ TAO_GIOP_Message_1_1 (void);
+ // Ctor
+
+ ~TAO_GIOP_Message_1_1 (void);
+ // Dtor
+
+ CORBA::Boolean
+ write_request_header (const IOP::ServiceContextList& svc_ctx,
+ CORBA::ULong request_id,
+ CORBA::Octet response_flags,
+ TAO_Stub *stub,
+ const CORBA::Short address_disposition,
+ const char *opname,
+ TAO_OutputCDR &msg);
+ // Writes the rquest header.
+
+ CORBA::Boolean write_locate_request_header (CORBA::ULong request_id,
+ TAO_Stub *stub,
+ const CORBA::Short address_disposition,
+ TAO_OutputCDR &msg);
+ // Write the locate request header
+
+ const size_t get_header_len (void);
+ // Returns the header length
+
+ const size_t get_message_size_offset (void);
+ // Returns the message size offset
+
+private:
+};
+
+const size_t TAO_GIOP_1_1_HEADER_LEN = 12;
+const size_t TAO_GIOP_1_1_MESSAGE_SIZE_OFFSET = 8;
+
+#if defined (__ACE_INLINE__)
+# include "tao/GIOP_Message_1_1.i"
+#endif /* __ACE_INLINE__ */
+
+#endif /*TAO_IIOP_ACCEPTOR_1_1_H_ */
diff --git a/TAO/tao/GIOP_Message_1_1.i b/TAO/tao/GIOP_Message_1_1.i
new file mode 100644
index 00000000000..ca0908bbcf6
--- /dev/null
+++ b/TAO/tao/GIOP_Message_1_1.i
@@ -0,0 +1 @@
+//$Id$