diff options
author | jai <jai@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2002-02-27 02:55:37 +0000 |
---|---|---|
committer | jai <jai@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2002-02-27 02:55:37 +0000 |
commit | a0dc6199d9bcaa496118568231c8d374121d0dd2 (patch) | |
tree | a1b9b92f40c1fa048ebea7d53cb343c688bc6fc1 /TAO/tao/Messaging/Messaging.h | |
parent | 5946f1064f6450d3b8ccff432c7c28c81a6b22a1 (diff) | |
download | ATCD-a0dc6199d9bcaa496118568231c8d374121d0dd2.tar.gz |
Mon Feb 26 18:10:24 2002 Jaiganesh Balasubramanian <jai@kelvar.ece.uci.edu
Diffstat (limited to 'TAO/tao/Messaging/Messaging.h')
-rw-r--r-- | TAO/tao/Messaging/Messaging.h | 97 |
1 files changed, 97 insertions, 0 deletions
diff --git a/TAO/tao/Messaging/Messaging.h b/TAO/tao/Messaging/Messaging.h new file mode 100644 index 00000000000..9aa5169a8f9 --- /dev/null +++ b/TAO/tao/Messaging/Messaging.h @@ -0,0 +1,97 @@ +// -*- C++ -*- + +// ================================================================ +/** + * @file Messaging.h + * + * $Id$ + * + * Include all the required headers to use CORBA Messaging easily. + * + * @author Carlos O'Ryan <coryan@uci.edu> + */ +// ================================================================ + +#ifndef TAO_MESSAGING_H +#define TAO_MESSAGING_H +#include "ace/pre.h" + +#include "MessagingC.h" +#include "messaging_export.h" + +class TAO_Messaging_Export TAO_Messaging_Initializer +{ +public: + /// Used to force the initialisation of the ORB code. + static int init (void); +}; + +# if defined(ACE_HAS_BROKEN_STATIC_CONSTRUCTORS) + +typedef int (*TAO_Module_Initializer) (void); + +static TAO_Module_Initializer +TAO_Requires_Messaging_Initializer = &TAO_Messaging_Initializer::init (); + +#else + +static int +TAO_Requires_Messaging_Initializer = TAO_Messaging_Initializer::init (); + +#endif /* ACE_HAS_BROKEN_STATIC_CONSTRUCTORS */ + +// Typedef for the Reply Handler Skeleton. +// This is handcrafted not generated by the IDL compiler. + +class TAO_InputCDR; + +enum TAO_AMI_Reply_Status +{ + TAO_AMI_REPLY_OK, + // Reply is normal. + + TAO_AMI_REPLY_NOT_OK, + // Reply is not normal and no exceptions + + TAO_AMI_REPLY_USER_EXCEPTION, + // An user exception was raised. + + TAO_AMI_REPLY_SYSTEM_EXCEPTION + // An system exception was raised. +}; + + +#if (TAO_HAS_AMI_CALLBACK == 1) + +typedef void (*TAO_Reply_Handler_Skeleton)( + TAO_InputCDR &, + Messaging::ReplyHandler_ptr, + CORBA::ULong reply_status + ACE_ENV_ARG_DECL_NOT_USED + ); + +struct TAO_Exception_Data; + +/** + * @namespace TAO_Messaging_Helper + * + * @brief Define helper functions for the CORBA Messaging + * implementation in TAO. + */ +namespace TAO_Messaging_Helper +{ + /// Implement the code shared by all the ExceptionHolder::raise_*() + /// operations + void TAO_Export exception_holder_raise (TAO_Exception_Data *exception_data, + CORBA::ULong exception_count, + CORBA::Octet *marshaled_data, + CORBA::ULong marshaled_data_length, + CORBA::Boolean byte_order, + CORBA::Boolean is_system_exception + ACE_ENV_ARG_DECL); +} + +#endif /* TAO_HAS_AMI_CALLBACK */ + +#include "ace/post.h" +#endif /* TAO_MESSAGING_H */ |