/*
 * This file was generated by orbit-idl - DO NOT EDIT!
 */

#include <string.h>
#include "CosEventChannel.h"

void
_ORBIT_CosEventComm_Disconnected_demarshal(GIOPRecvBuffer * _ORBIT_recv_buffer, CORBA_Environment * ev)
{
   CORBA_exception_set(ev, CORBA_USER_EXCEPTION, TC_CosEventComm_Disconnected_struct.repo_id, NULL);
}
void 
CosEventComm_PushConsumer_push(CosEventComm_PushConsumer _obj, const CORBA_any * data, CORBA_Environment * ev)
{
   static const ORBit_exception_demarshal_info _ORBIT_user_exceptions[] = {{(const CORBA_TypeCode) & TC_CosEventComm_Disconnected_struct, (gpointer) _ORBIT_CosEventComm_Disconnected_demarshal}, {CORBA_OBJECT_NIL, NULL}};
   register GIOP_unsigned_long _ORBIT_request_id,
    _ORBIT_system_exception_minor;
   register CORBA_completion_status _ORBIT_completion_status;
   register GIOPSendBuffer *_ORBIT_send_buffer;
   register GIOPRecvBuffer *_ORBIT_recv_buffer;
   register GIOPConnection *_cnx;
   if (_obj->servant && _obj->vepv && CosEventComm_PushConsumer__classid) {
      ((POA_CosEventComm_PushConsumer__epv *) _obj->vepv[CosEventComm_PushConsumer__classid])->push(_obj->servant, data, ev);
      return;
   }
   _cnx = ORBit_object_get_connection(_obj);
_ORBIT_retry_request:
   _ORBIT_send_buffer = NULL;
   _ORBIT_recv_buffer = NULL;
   _ORBIT_completion_status = CORBA_COMPLETED_NO;
   _ORBIT_request_id = GPOINTER_TO_UINT(alloca(0));
   {				/* marshalling */
      static const struct {
	 CORBA_unsigned_long len;
	 char opname[5];
      } _ORBIT_operation_name_data = {
	 5, "push"
      };
      static const struct iovec _ORBIT_operation_vec = {(gpointer) & _ORBIT_operation_name_data, 9};
      _ORBIT_send_buffer =
	 giop_send_request_buffer_use(_cnx, NULL, _ORBIT_request_id, CORBA_TRUE,
				      &(_obj->active_profile->object_key_vec), &_ORBIT_operation_vec, &ORBit_default_principal_iovec);

      _ORBIT_system_exception_minor = ex_CORBA_COMM_FAILURE;
      if (!_ORBIT_send_buffer)
	 goto _ORBIT_system_exception;
      ORBit_marshal_any(_ORBIT_send_buffer, &((*data)));
      giop_send_buffer_write(_ORBIT_send_buffer);
      _ORBIT_completion_status = CORBA_COMPLETED_MAYBE;
      giop_send_buffer_unuse(_ORBIT_send_buffer);
      _ORBIT_send_buffer = NULL;
   }
   {				/* demarshalling */
      register guchar *_ORBIT_curptr;
      _ORBIT_recv_buffer = giop_recv_reply_buffer_use_2(_cnx, _ORBIT_request_id, TRUE);
      if (!_ORBIT_recv_buffer)
	 goto _ORBIT_system_exception;
      _ORBIT_completion_status = CORBA_COMPLETED_YES;
      if (_ORBIT_recv_buffer->message.u.reply.reply_status != GIOP_NO_EXCEPTION)
	 goto _ORBIT_msg_exception;
      _ORBIT_curptr = GIOP_RECV_BUFFER(_ORBIT_recv_buffer)->cur;
      if (giop_msg_conversion_needed(GIOP_MESSAGE_BUFFER(_ORBIT_recv_buffer))) {
      } else {
      }
      giop_recv_buffer_unuse(_ORBIT_recv_buffer);
      return;
_ORBIT_system_exception:
      CORBA_exception_set_system(ev, _ORBIT_system_exception_minor, _ORBIT_completion_status);
      giop_recv_buffer_unuse(_ORBIT_recv_buffer);
      giop_send_buffer_unuse(_ORBIT_send_buffer);
      return;
_ORBIT_msg_exception:
      if (_ORBIT_recv_buffer->message.u.reply.reply_status == GIOP_LOCATION_FORWARD) {
	 if (_obj->forward_locations != NULL)
	    ORBit_delete_profiles(_obj->forward_locations);
	 _obj->forward_locations = ORBit_demarshal_IOR(_ORBIT_recv_buffer);
	 _cnx = ORBit_object_get_forwarded_connection(_obj);
	 giop_recv_buffer_unuse(_ORBIT_recv_buffer);

	 goto _ORBIT_retry_request;
      } else {
	 ORBit_handle_exception(_ORBIT_recv_buffer, ev, _ORBIT_user_exceptions, _obj->orb);
	 giop_recv_buffer_unuse(_ORBIT_recv_buffer);
	 return;
      }
   }
}
void 
CosEventComm_PushConsumer_disconnect_push_consumer(CosEventComm_PushConsumer _obj, CORBA_Environment * ev)
{
   register GIOP_unsigned_long _ORBIT_request_id,
    _ORBIT_system_exception_minor;
   register CORBA_completion_status _ORBIT_completion_status;
   register GIOPSendBuffer *_ORBIT_send_buffer;
   register GIOPRecvBuffer *_ORBIT_recv_buffer;
   register GIOPConnection *_cnx;
   if (_obj->servant && _obj->vepv && CosEventComm_PushConsumer__classid) {
      ((POA_CosEventComm_PushConsumer__epv *) _obj->vepv[CosEventComm_PushConsumer__classid])->disconnect_push_consumer(_obj->servant, ev);
      return;
   }
   _cnx = ORBit_object_get_connection(_obj);
_ORBIT_retry_request:
   _ORBIT_send_buffer = NULL;
   _ORBIT_recv_buffer = NULL;
   _ORBIT_completion_status = CORBA_COMPLETED_NO;
   _ORBIT_request_id = GPOINTER_TO_UINT(alloca(0));
   {				/* marshalling */
      static const struct {
	 CORBA_unsigned_long len;
	 char opname[25];
      } _ORBIT_operation_name_data = {
	 25, "disconnect_push_consumer"
      };
      static const struct iovec _ORBIT_operation_vec = {(gpointer) & _ORBIT_operation_name_data, 29};
      _ORBIT_send_buffer =
	 giop_send_request_buffer_use(_cnx, NULL, _ORBIT_request_id, CORBA_TRUE,
				      &(_obj->active_profile->object_key_vec), &_ORBIT_operation_vec, &ORBit_default_principal_iovec);

      _ORBIT_system_exception_minor = ex_CORBA_COMM_FAILURE;
      if (!_ORBIT_send_buffer)
	 goto _ORBIT_system_exception;
      giop_send_buffer_write(_ORBIT_send_buffer);
      _ORBIT_completion_status = CORBA_COMPLETED_MAYBE;
      giop_send_buffer_unuse(_ORBIT_send_buffer);
      _ORBIT_send_buffer = NULL;
   }
   {				/* demarshalling */
      register guchar *_ORBIT_curptr;
      _ORBIT_recv_buffer = giop_recv_reply_buffer_use_2(_cnx, _ORBIT_request_id, TRUE);
      if (!_ORBIT_recv_buffer)
	 goto _ORBIT_system_exception;
      _ORBIT_completion_status = CORBA_COMPLETED_YES;
      if (_ORBIT_recv_buffer->message.u.reply.reply_status != GIOP_NO_EXCEPTION)
	 goto _ORBIT_msg_exception;
      _ORBIT_curptr = GIOP_RECV_BUFFER(_ORBIT_recv_buffer)->cur;
      if (giop_msg_conversion_needed(GIOP_MESSAGE_BUFFER(_ORBIT_recv_buffer))) {
      } else {
      }
      giop_recv_buffer_unuse(_ORBIT_recv_buffer);
      return;
_ORBIT_system_exception:
      CORBA_exception_set_system(ev, _ORBIT_system_exception_minor, _ORBIT_completion_status);
      giop_recv_buffer_unuse(_ORBIT_recv_buffer);
      giop_send_buffer_unuse(_ORBIT_send_buffer);
      return;
_ORBIT_msg_exception:
      if (_ORBIT_recv_buffer->message.u.reply.reply_status == GIOP_LOCATION_FORWARD) {
	 if (_obj->forward_locations != NULL)
	    ORBit_delete_profiles(_obj->forward_locations);
	 _obj->forward_locations = ORBit_demarshal_IOR(_ORBIT_recv_buffer);
	 _cnx = ORBit_object_get_forwarded_connection(_obj);
	 giop_recv_buffer_unuse(_ORBIT_recv_buffer);

	 goto _ORBIT_retry_request;
      } else {
	 ORBit_handle_exception(_ORBIT_recv_buffer, ev, NULL, _obj->orb);
	 giop_recv_buffer_unuse(_ORBIT_recv_buffer);
	 return;
      }
   }
}
void 
CosEventComm_PushSupplier_disconnect_push_supplier(CosEventComm_PushSupplier _obj, CORBA_Environment * ev)
{
   register GIOP_unsigned_long _ORBIT_request_id,
    _ORBIT_system_exception_minor;
   register CORBA_completion_status _ORBIT_completion_status;
   register GIOPSendBuffer *_ORBIT_send_buffer;
   register GIOPRecvBuffer *_ORBIT_recv_buffer;
   register GIOPConnection *_cnx;
   if (_obj->servant && _obj->vepv && CosEventComm_PushSupplier__classid) {
      ((POA_CosEventComm_PushSupplier__epv *) _obj->vepv[CosEventComm_PushSupplier__classid])->disconnect_push_supplier(_obj->servant, ev);
      return;
   }
   _cnx = ORBit_object_get_connection(_obj);
_ORBIT_retry_request:
   _ORBIT_send_buffer = NULL;
   _ORBIT_recv_buffer = NULL;
   _ORBIT_completion_status = CORBA_COMPLETED_NO;
   _ORBIT_request_id = GPOINTER_TO_UINT(alloca(0));
   {				/* marshalling */
      static const struct {
	 CORBA_unsigned_long len;
	 char opname[25];
      } _ORBIT_operation_name_data = {
	 25, "disconnect_push_supplier"
      };
      static const struct iovec _ORBIT_operation_vec = {(gpointer) & _ORBIT_operation_name_data, 29};
      _ORBIT_send_buffer =
	 giop_send_request_buffer_use(_cnx, NULL, _ORBIT_request_id, CORBA_TRUE,
				      &(_obj->active_profile->object_key_vec), &_ORBIT_operation_vec, &ORBit_default_principal_iovec);

      _ORBIT_system_exception_minor = ex_CORBA_COMM_FAILURE;
      if (!_ORBIT_send_buffer)
	 goto _ORBIT_system_exception;
      giop_send_buffer_write(_ORBIT_send_buffer);
      _ORBIT_completion_status = CORBA_COMPLETED_MAYBE;
      giop_send_buffer_unuse(_ORBIT_send_buffer);
      _ORBIT_send_buffer = NULL;
   }
   {				/* demarshalling */
      register guchar *_ORBIT_curptr;
      _ORBIT_recv_buffer = giop_recv_reply_buffer_use_2(_cnx, _ORBIT_request_id, TRUE);
      if (!_ORBIT_recv_buffer)
	 goto _ORBIT_system_exception;
      _ORBIT_completion_status = CORBA_COMPLETED_YES;
      if (_ORBIT_recv_buffer->message.u.reply.reply_status != GIOP_NO_EXCEPTION)
	 goto _ORBIT_msg_exception;
      _ORBIT_curptr = GIOP_RECV_BUFFER(_ORBIT_recv_buffer)->cur;
      if (giop_msg_conversion_needed(GIOP_MESSAGE_BUFFER(_ORBIT_recv_buffer))) {
      } else {
      }
      giop_recv_buffer_unuse(_ORBIT_recv_buffer);
      return;
_ORBIT_system_exception:
      CORBA_exception_set_system(ev, _ORBIT_system_exception_minor, _ORBIT_completion_status);
      giop_recv_buffer_unuse(_ORBIT_recv_buffer);
      giop_send_buffer_unuse(_ORBIT_send_buffer);
      return;
_ORBIT_msg_exception:
      if (_ORBIT_recv_buffer->message.u.reply.reply_status == GIOP_LOCATION_FORWARD) {
	 if (_obj->forward_locations != NULL)
	    ORBit_delete_profiles(_obj->forward_locations);
	 _obj->forward_locations = ORBit_demarshal_IOR(_ORBIT_recv_buffer);
	 _cnx = ORBit_object_get_forwarded_connection(_obj);
	 giop_recv_buffer_unuse(_ORBIT_recv_buffer);

	 goto _ORBIT_retry_request;
      } else {
	 ORBit_handle_exception(_ORBIT_recv_buffer, ev, NULL, _obj->orb);
	 giop_recv_buffer_unuse(_ORBIT_recv_buffer);
	 return;
      }
   }
}
CORBA_any *
CosEventComm_PullSupplier_pull(CosEventComm_PullSupplier _obj, CORBA_Environment * ev)
{
   static const ORBit_exception_demarshal_info _ORBIT_user_exceptions[] = {{(const CORBA_TypeCode) & TC_CosEventComm_Disconnected_struct, (gpointer) _ORBIT_CosEventComm_Disconnected_demarshal}, {CORBA_OBJECT_NIL, NULL}};
   register GIOP_unsigned_long _ORBIT_request_id,
    _ORBIT_system_exception_minor;
   register CORBA_completion_status _ORBIT_completion_status;
   register GIOPSendBuffer *_ORBIT_send_buffer;
   register GIOPRecvBuffer *_ORBIT_recv_buffer;
   register GIOPConnection *_cnx;
   CORBA_any *_ORBIT_retval;
   if (_obj->servant && _obj->vepv && CosEventComm_PullSupplier__classid) {
      _ORBIT_retval = ((POA_CosEventComm_PullSupplier__epv *) _obj->vepv[CosEventComm_PullSupplier__classid])->pull(_obj->servant, ev);
      return _ORBIT_retval;
   }
   if (0)
      return *(&_ORBIT_retval);
   _cnx = ORBit_object_get_connection(_obj);
_ORBIT_retry_request:
   _ORBIT_send_buffer = NULL;
   _ORBIT_recv_buffer = NULL;
   _ORBIT_completion_status = CORBA_COMPLETED_NO;
   _ORBIT_request_id = GPOINTER_TO_UINT(alloca(0));
   {				/* marshalling */
      static const struct {
	 CORBA_unsigned_long len;
	 char opname[5];
      } _ORBIT_operation_name_data = {
	 5, "pull"
      };
      static const struct iovec _ORBIT_operation_vec = {(gpointer) & _ORBIT_operation_name_data, 9};
      _ORBIT_send_buffer =
	 giop_send_request_buffer_use(_cnx, NULL, _ORBIT_request_id, CORBA_TRUE,
				      &(_obj->active_profile->object_key_vec), &_ORBIT_operation_vec, &ORBit_default_principal_iovec);

      _ORBIT_system_exception_minor = ex_CORBA_COMM_FAILURE;
      if (!_ORBIT_send_buffer)
	 goto _ORBIT_system_exception;
      giop_send_buffer_write(_ORBIT_send_buffer);
      _ORBIT_completion_status = CORBA_COMPLETED_MAYBE;
      giop_send_buffer_unuse(_ORBIT_send_buffer);
      _ORBIT_send_buffer = NULL;
   }
   {				/* demarshalling */
      register guchar *_ORBIT_curptr;
      _ORBIT_recv_buffer = giop_recv_reply_buffer_use_2(_cnx, _ORBIT_request_id, TRUE);
      if (!_ORBIT_recv_buffer)
	 goto _ORBIT_system_exception;
      _ORBIT_completion_status = CORBA_COMPLETED_YES;
      if (_ORBIT_recv_buffer->message.u.reply.reply_status != GIOP_NO_EXCEPTION)
	 goto _ORBIT_msg_exception;
      _ORBIT_retval = CORBA_any__alloc();
      _ORBIT_curptr = GIOP_RECV_BUFFER(_ORBIT_recv_buffer)->cur;
      if (giop_msg_conversion_needed(GIOP_MESSAGE_BUFFER(_ORBIT_recv_buffer))) {
	 GIOP_RECV_BUFFER(_ORBIT_recv_buffer)->cur = _ORBIT_curptr;
	 ORBit_demarshal_any(_ORBIT_recv_buffer, &((*_ORBIT_retval)), CORBA_TRUE, GIOP_MESSAGE_BUFFER(_ORBIT_recv_buffer)->connection->orb_data);
	 _ORBIT_curptr = GIOP_RECV_BUFFER(_ORBIT_recv_buffer)->cur;
      } else {
	 GIOP_RECV_BUFFER(_ORBIT_recv_buffer)->cur = _ORBIT_curptr;
	 ORBit_demarshal_any(_ORBIT_recv_buffer, &((*_ORBIT_retval)), CORBA_TRUE, GIOP_MESSAGE_BUFFER(_ORBIT_recv_buffer)->connection->orb_data);
	 _ORBIT_curptr = GIOP_RECV_BUFFER(_ORBIT_recv_buffer)->cur;
      }
      giop_recv_buffer_unuse(_ORBIT_recv_buffer);
      return _ORBIT_retval;
_ORBIT_system_exception:
      CORBA_exception_set_system(ev, _ORBIT_system_exception_minor, _ORBIT_completion_status);
      giop_recv_buffer_unuse(_ORBIT_recv_buffer);
      giop_send_buffer_unuse(_ORBIT_send_buffer);
      return _ORBIT_retval;
_ORBIT_msg_exception:
      if (_ORBIT_recv_buffer->message.u.reply.reply_status == GIOP_LOCATION_FORWARD) {
	 if (_obj->forward_locations != NULL)
	    ORBit_delete_profiles(_obj->forward_locations);
	 _obj->forward_locations = ORBit_demarshal_IOR(_ORBIT_recv_buffer);
	 _cnx = ORBit_object_get_forwarded_connection(_obj);
	 giop_recv_buffer_unuse(_ORBIT_recv_buffer);

	 goto _ORBIT_retry_request;
      } else {
	 ORBit_handle_exception(_ORBIT_recv_buffer, ev, _ORBIT_user_exceptions, _obj->orb);
	 giop_recv_buffer_unuse(_ORBIT_recv_buffer);
	 return _ORBIT_retval;
      }
   }
}
CORBA_any *
CosEventComm_PullSupplier_try_pull(CosEventComm_PullSupplier _obj, CORBA_boolean * has_event, CORBA_Environment * ev)
{
   static const ORBit_exception_demarshal_info _ORBIT_user_exceptions[] = {{(const CORBA_TypeCode) & TC_CosEventComm_Disconnected_struct, (gpointer) _ORBIT_CosEventComm_Disconnected_demarshal}, {CORBA_OBJECT_NIL, NULL}};
   register GIOP_unsigned_long _ORBIT_request_id,
    _ORBIT_system_exception_minor;
   register CORBA_completion_status _ORBIT_completion_status;
   register GIOPSendBuffer *_ORBIT_send_buffer;
   register GIOPRecvBuffer *_ORBIT_recv_buffer;
   register GIOPConnection *_cnx;
   CORBA_any *_ORBIT_retval;
   if (_obj->servant && _obj->vepv && CosEventComm_PullSupplier__classid) {
      _ORBIT_retval = ((POA_CosEventComm_PullSupplier__epv *) _obj->vepv[CosEventComm_PullSupplier__classid])->try_pull(_obj->servant, has_event, ev);
      return _ORBIT_retval;
   }
   if (0)
      return *(&_ORBIT_retval);
   _cnx = ORBit_object_get_connection(_obj);
_ORBIT_retry_request:
   _ORBIT_send_buffer = NULL;
   _ORBIT_recv_buffer = NULL;
   _ORBIT_completion_status = CORBA_COMPLETED_NO;
   _ORBIT_request_id = GPOINTER_TO_UINT(alloca(0));
   {				/* marshalling */
      static const struct {
	 CORBA_unsigned_long len;
	 char opname[9];
      } _ORBIT_operation_name_data = {
	 9, "try_pull"
      };
      static const struct iovec _ORBIT_operation_vec = {(gpointer) & _ORBIT_operation_name_data, 13};
      _ORBIT_send_buffer =
	 giop_send_request_buffer_use(_cnx, NULL, _ORBIT_request_id, CORBA_TRUE,
				      &(_obj->active_profile->object_key_vec), &_ORBIT_operation_vec, &ORBit_default_principal_iovec);

      _ORBIT_system_exception_minor = ex_CORBA_COMM_FAILURE;
      if (!_ORBIT_send_buffer)
	 goto _ORBIT_system_exception;
      giop_send_buffer_write(_ORBIT_send_buffer);
      _ORBIT_completion_status = CORBA_COMPLETED_MAYBE;
      giop_send_buffer_unuse(_ORBIT_send_buffer);
      _ORBIT_send_buffer = NULL;
   }
   {				/* demarshalling */
      register guchar *_ORBIT_curptr;
      _ORBIT_recv_buffer = giop_recv_reply_buffer_use_2(_cnx, _ORBIT_request_id, TRUE);
      if (!_ORBIT_recv_buffer)
	 goto _ORBIT_system_exception;
      _ORBIT_completion_status = CORBA_COMPLETED_YES;
      if (_ORBIT_recv_buffer->message.u.reply.reply_status != GIOP_NO_EXCEPTION)
	 goto _ORBIT_msg_exception;
      _ORBIT_retval = CORBA_any__alloc();
      _ORBIT_curptr = GIOP_RECV_BUFFER(_ORBIT_recv_buffer)->cur;
      if (giop_msg_conversion_needed(GIOP_MESSAGE_BUFFER(_ORBIT_recv_buffer))) {
	 GIOP_RECV_BUFFER(_ORBIT_recv_buffer)->cur = _ORBIT_curptr;
	 ORBit_demarshal_any(_ORBIT_recv_buffer, &((*_ORBIT_retval)), CORBA_TRUE, GIOP_MESSAGE_BUFFER(_ORBIT_recv_buffer)->connection->orb_data);
	 _ORBIT_curptr = GIOP_RECV_BUFFER(_ORBIT_recv_buffer)->cur;
	 (*has_event) = *((CORBA_boolean *) _ORBIT_curptr);
      } else {
	 GIOP_RECV_BUFFER(_ORBIT_recv_buffer)->cur = _ORBIT_curptr;
	 ORBit_demarshal_any(_ORBIT_recv_buffer, &((*_ORBIT_retval)), CORBA_TRUE, GIOP_MESSAGE_BUFFER(_ORBIT_recv_buffer)->connection->orb_data);
	 _ORBIT_curptr = GIOP_RECV_BUFFER(_ORBIT_recv_buffer)->cur;
	 (*has_event) = *((CORBA_boolean *) _ORBIT_curptr);
      }
      giop_recv_buffer_unuse(_ORBIT_recv_buffer);
      return _ORBIT_retval;
_ORBIT_system_exception:
      CORBA_exception_set_system(ev, _ORBIT_system_exception_minor, _ORBIT_completion_status);
      giop_recv_buffer_unuse(_ORBIT_recv_buffer);
      giop_send_buffer_unuse(_ORBIT_send_buffer);
      return _ORBIT_retval;
_ORBIT_msg_exception:
      if (_ORBIT_recv_buffer->message.u.reply.reply_status == GIOP_LOCATION_FORWARD) {
	 if (_obj->forward_locations != NULL)
	    ORBit_delete_profiles(_obj->forward_locations);
	 _obj->forward_locations = ORBit_demarshal_IOR(_ORBIT_recv_buffer);
	 _cnx = ORBit_object_get_forwarded_connection(_obj);
	 giop_recv_buffer_unuse(_ORBIT_recv_buffer);

	 goto _ORBIT_retry_request;
      } else {
	 ORBit_handle_exception(_ORBIT_recv_buffer, ev, _ORBIT_user_exceptions, _obj->orb);
	 giop_recv_buffer_unuse(_ORBIT_recv_buffer);
	 return _ORBIT_retval;
      }
   }
}
void 
CosEventComm_PullSupplier_disconnect_pull_supplier(CosEventComm_PullSupplier _obj, CORBA_Environment * ev)
{
   register GIOP_unsigned_long _ORBIT_request_id,
    _ORBIT_system_exception_minor;
   register CORBA_completion_status _ORBIT_completion_status;
   register GIOPSendBuffer *_ORBIT_send_buffer;
   register GIOPRecvBuffer *_ORBIT_recv_buffer;
   register GIOPConnection *_cnx;
   if (_obj->servant && _obj->vepv && CosEventComm_PullSupplier__classid) {
      ((POA_CosEventComm_PullSupplier__epv *) _obj->vepv[CosEventComm_PullSupplier__classid])->disconnect_pull_supplier(_obj->servant, ev);
      return;
   }
   _cnx = ORBit_object_get_connection(_obj);
_ORBIT_retry_request:
   _ORBIT_send_buffer = NULL;
   _ORBIT_recv_buffer = NULL;
   _ORBIT_completion_status = CORBA_COMPLETED_NO;
   _ORBIT_request_id = GPOINTER_TO_UINT(alloca(0));
   {				/* marshalling */
      static const struct {
	 CORBA_unsigned_long len;
	 char opname[25];
      } _ORBIT_operation_name_data = {
	 25, "disconnect_pull_supplier"
      };
      static const struct iovec _ORBIT_operation_vec = {(gpointer) & _ORBIT_operation_name_data, 29};
      _ORBIT_send_buffer =
	 giop_send_request_buffer_use(_cnx, NULL, _ORBIT_request_id, CORBA_TRUE,
				      &(_obj->active_profile->object_key_vec), &_ORBIT_operation_vec, &ORBit_default_principal_iovec);

      _ORBIT_system_exception_minor = ex_CORBA_COMM_FAILURE;
      if (!_ORBIT_send_buffer)
	 goto _ORBIT_system_exception;
      giop_send_buffer_write(_ORBIT_send_buffer);
      _ORBIT_completion_status = CORBA_COMPLETED_MAYBE;
      giop_send_buffer_unuse(_ORBIT_send_buffer);
      _ORBIT_send_buffer = NULL;
   }
   {				/* demarshalling */
      register guchar *_ORBIT_curptr;
      _ORBIT_recv_buffer = giop_recv_reply_buffer_use_2(_cnx, _ORBIT_request_id, TRUE);
      if (!_ORBIT_recv_buffer)
	 goto _ORBIT_system_exception;
      _ORBIT_completion_status = CORBA_COMPLETED_YES;
      if (_ORBIT_recv_buffer->message.u.reply.reply_status != GIOP_NO_EXCEPTION)
	 goto _ORBIT_msg_exception;
      _ORBIT_curptr = GIOP_RECV_BUFFER(_ORBIT_recv_buffer)->cur;
      if (giop_msg_conversion_needed(GIOP_MESSAGE_BUFFER(_ORBIT_recv_buffer))) {
      } else {
      }
      giop_recv_buffer_unuse(_ORBIT_recv_buffer);
      return;
_ORBIT_system_exception:
      CORBA_exception_set_system(ev, _ORBIT_system_exception_minor, _ORBIT_completion_status);
      giop_recv_buffer_unuse(_ORBIT_recv_buffer);
      giop_send_buffer_unuse(_ORBIT_send_buffer);
      return;
_ORBIT_msg_exception:
      if (_ORBIT_recv_buffer->message.u.reply.reply_status == GIOP_LOCATION_FORWARD) {
	 if (_obj->forward_locations != NULL)
	    ORBit_delete_profiles(_obj->forward_locations);
	 _obj->forward_locations = ORBit_demarshal_IOR(_ORBIT_recv_buffer);
	 _cnx = ORBit_object_get_forwarded_connection(_obj);
	 giop_recv_buffer_unuse(_ORBIT_recv_buffer);

	 goto _ORBIT_retry_request;
      } else {
	 ORBit_handle_exception(_ORBIT_recv_buffer, ev, NULL, _obj->orb);
	 giop_recv_buffer_unuse(_ORBIT_recv_buffer);
	 return;
      }
   }
}
void 
CosEventComm_PullConsumer_disconnect_pull_consumer(CosEventComm_PullConsumer _obj, CORBA_Environment * ev)
{
   register GIOP_unsigned_long _ORBIT_request_id,
    _ORBIT_system_exception_minor;
   register CORBA_completion_status _ORBIT_completion_status;
   register GIOPSendBuffer *_ORBIT_send_buffer;
   register GIOPRecvBuffer *_ORBIT_recv_buffer;
   register GIOPConnection *_cnx;
   if (_obj->servant && _obj->vepv && CosEventComm_PullConsumer__classid) {
      ((POA_CosEventComm_PullConsumer__epv *) _obj->vepv[CosEventComm_PullConsumer__classid])->disconnect_pull_consumer(_obj->servant, ev);
      return;
   }
   _cnx = ORBit_object_get_connection(_obj);
_ORBIT_retry_request:
   _ORBIT_send_buffer = NULL;
   _ORBIT_recv_buffer = NULL;
   _ORBIT_completion_status = CORBA_COMPLETED_NO;
   _ORBIT_request_id = GPOINTER_TO_UINT(alloca(0));
   {				/* marshalling */
      static const struct {
	 CORBA_unsigned_long len;
	 char opname[25];
      } _ORBIT_operation_name_data = {
	 25, "disconnect_pull_consumer"
      };
      static const struct iovec _ORBIT_operation_vec = {(gpointer) & _ORBIT_operation_name_data, 29};
      _ORBIT_send_buffer =
	 giop_send_request_buffer_use(_cnx, NULL, _ORBIT_request_id, CORBA_TRUE,
				      &(_obj->active_profile->object_key_vec), &_ORBIT_operation_vec, &ORBit_default_principal_iovec);

      _ORBIT_system_exception_minor = ex_CORBA_COMM_FAILURE;
      if (!_ORBIT_send_buffer)
	 goto _ORBIT_system_exception;
      giop_send_buffer_write(_ORBIT_send_buffer);
      _ORBIT_completion_status = CORBA_COMPLETED_MAYBE;
      giop_send_buffer_unuse(_ORBIT_send_buffer);
      _ORBIT_send_buffer = NULL;
   }
   {				/* demarshalling */
      register guchar *_ORBIT_curptr;
      _ORBIT_recv_buffer = giop_recv_reply_buffer_use_2(_cnx, _ORBIT_request_id, TRUE);
      if (!_ORBIT_recv_buffer)
	 goto _ORBIT_system_exception;
      _ORBIT_completion_status = CORBA_COMPLETED_YES;
      if (_ORBIT_recv_buffer->message.u.reply.reply_status != GIOP_NO_EXCEPTION)
	 goto _ORBIT_msg_exception;
      _ORBIT_curptr = GIOP_RECV_BUFFER(_ORBIT_recv_buffer)->cur;
      if (giop_msg_conversion_needed(GIOP_MESSAGE_BUFFER(_ORBIT_recv_buffer))) {
      } else {
      }
      giop_recv_buffer_unuse(_ORBIT_recv_buffer);
      return;
_ORBIT_system_exception:
      CORBA_exception_set_system(ev, _ORBIT_system_exception_minor, _ORBIT_completion_status);
      giop_recv_buffer_unuse(_ORBIT_recv_buffer);
      giop_send_buffer_unuse(_ORBIT_send_buffer);
      return;
_ORBIT_msg_exception:
      if (_ORBIT_recv_buffer->message.u.reply.reply_status == GIOP_LOCATION_FORWARD) {
	 if (_obj->forward_locations != NULL)
	    ORBit_delete_profiles(_obj->forward_locations);
	 _obj->forward_locations = ORBit_demarshal_IOR(_ORBIT_recv_buffer);
	 _cnx = ORBit_object_get_forwarded_connection(_obj);
	 giop_recv_buffer_unuse(_ORBIT_recv_buffer);

	 goto _ORBIT_retry_request;
      } else {
	 ORBit_handle_exception(_ORBIT_recv_buffer, ev, NULL, _obj->orb);
	 giop_recv_buffer_unuse(_ORBIT_recv_buffer);
	 return;
      }
   }
}
void
_ORBIT_CosEventChannelAdmin_AlreadyConnected_demarshal(GIOPRecvBuffer * _ORBIT_recv_buffer, CORBA_Environment * ev)
{
   CORBA_exception_set(ev, CORBA_USER_EXCEPTION, TC_CosEventChannelAdmin_AlreadyConnected_struct.repo_id, NULL);
}
void
_ORBIT_CosEventChannelAdmin_TypeError_demarshal(GIOPRecvBuffer * _ORBIT_recv_buffer, CORBA_Environment * ev)
{
   CORBA_exception_set(ev, CORBA_USER_EXCEPTION, TC_CosEventChannelAdmin_TypeError_struct.repo_id, NULL);
}
void 
CosEventChannelAdmin_ProxyPushConsumer_connect_push_supplier(CosEventChannelAdmin_ProxyPushConsumer _obj, const CosEventComm_PushSupplier push_supplier, CORBA_Environment * ev)
{
   static const ORBit_exception_demarshal_info _ORBIT_user_exceptions[] = {{(const CORBA_TypeCode) & TC_CosEventChannelAdmin_AlreadyConnected_struct, (gpointer) _ORBIT_CosEventChannelAdmin_AlreadyConnected_demarshal}, {CORBA_OBJECT_NIL, NULL}};
   register GIOP_unsigned_long _ORBIT_request_id,
    _ORBIT_system_exception_minor;
   register CORBA_completion_status _ORBIT_completion_status;
   register GIOPSendBuffer *_ORBIT_send_buffer;
   register GIOPRecvBuffer *_ORBIT_recv_buffer;
   register GIOPConnection *_cnx;
   if (_obj->servant && _obj->vepv && CosEventChannelAdmin_ProxyPushConsumer__classid) {
      ((POA_CosEventChannelAdmin_ProxyPushConsumer__epv *) _obj->vepv[CosEventChannelAdmin_ProxyPushConsumer__classid])->connect_push_supplier(_obj->servant, push_supplier, ev);
      return;
   }
   _cnx = ORBit_object_get_connection(_obj);
_ORBIT_retry_request:
   _ORBIT_send_buffer = NULL;
   _ORBIT_recv_buffer = NULL;
   _ORBIT_completion_status = CORBA_COMPLETED_NO;
   _ORBIT_request_id = GPOINTER_TO_UINT(alloca(0));
   {				/* marshalling */
      static const struct {
	 CORBA_unsigned_long len;
	 char opname[22];
      } _ORBIT_operation_name_data = {
	 22, "connect_push_supplier"
      };
      static const struct iovec _ORBIT_operation_vec = {(gpointer) & _ORBIT_operation_name_data, 26};
      _ORBIT_send_buffer =
	 giop_send_request_buffer_use(_cnx, NULL, _ORBIT_request_id, CORBA_TRUE,
				      &(_obj->active_profile->object_key_vec), &_ORBIT_operation_vec, &ORBit_default_principal_iovec);

      _ORBIT_system_exception_minor = ex_CORBA_COMM_FAILURE;
      if (!_ORBIT_send_buffer)
	 goto _ORBIT_system_exception;
      ORBit_marshal_object(_ORBIT_send_buffer, push_supplier);
      giop_send_buffer_write(_ORBIT_send_buffer);
      _ORBIT_completion_status = CORBA_COMPLETED_MAYBE;
      giop_send_buffer_unuse(_ORBIT_send_buffer);
      _ORBIT_send_buffer = NULL;
   }
   {				/* demarshalling */
      register guchar *_ORBIT_curptr;
      _ORBIT_recv_buffer = giop_recv_reply_buffer_use_2(_cnx, _ORBIT_request_id, TRUE);
      if (!_ORBIT_recv_buffer)
	 goto _ORBIT_system_exception;
      _ORBIT_completion_status = CORBA_COMPLETED_YES;
      if (_ORBIT_recv_buffer->message.u.reply.reply_status != GIOP_NO_EXCEPTION)
	 goto _ORBIT_msg_exception;
      _ORBIT_curptr = GIOP_RECV_BUFFER(_ORBIT_recv_buffer)->cur;
      if (giop_msg_conversion_needed(GIOP_MESSAGE_BUFFER(_ORBIT_recv_buffer))) {
      } else {
      }
      giop_recv_buffer_unuse(_ORBIT_recv_buffer);
      return;
_ORBIT_system_exception:
      CORBA_exception_set_system(ev, _ORBIT_system_exception_minor, _ORBIT_completion_status);
      giop_recv_buffer_unuse(_ORBIT_recv_buffer);
      giop_send_buffer_unuse(_ORBIT_send_buffer);
      return;
_ORBIT_msg_exception:
      if (_ORBIT_recv_buffer->message.u.reply.reply_status == GIOP_LOCATION_FORWARD) {
	 if (_obj->forward_locations != NULL)
	    ORBit_delete_profiles(_obj->forward_locations);
	 _obj->forward_locations = ORBit_demarshal_IOR(_ORBIT_recv_buffer);
	 _cnx = ORBit_object_get_forwarded_connection(_obj);
	 giop_recv_buffer_unuse(_ORBIT_recv_buffer);

	 goto _ORBIT_retry_request;
      } else {
	 ORBit_handle_exception(_ORBIT_recv_buffer, ev, _ORBIT_user_exceptions, _obj->orb);
	 giop_recv_buffer_unuse(_ORBIT_recv_buffer);
	 return;
      }
   }
}
void 
CosEventChannelAdmin_ProxyPullSupplier_connect_pull_consumer(CosEventChannelAdmin_ProxyPullSupplier _obj, const CosEventComm_PullConsumer pull_consumer, CORBA_Environment * ev)
{
   static const ORBit_exception_demarshal_info _ORBIT_user_exceptions[] = {{(const CORBA_TypeCode) & TC_CosEventChannelAdmin_AlreadyConnected_struct, (gpointer) _ORBIT_CosEventChannelAdmin_AlreadyConnected_demarshal}, {CORBA_OBJECT_NIL, NULL}};
   register GIOP_unsigned_long _ORBIT_request_id,
    _ORBIT_system_exception_minor;
   register CORBA_completion_status _ORBIT_completion_status;
   register GIOPSendBuffer *_ORBIT_send_buffer;
   register GIOPRecvBuffer *_ORBIT_recv_buffer;
   register GIOPConnection *_cnx;
   if (_obj->servant && _obj->vepv && CosEventChannelAdmin_ProxyPullSupplier__classid) {
      ((POA_CosEventChannelAdmin_ProxyPullSupplier__epv *) _obj->vepv[CosEventChannelAdmin_ProxyPullSupplier__classid])->connect_pull_consumer(_obj->servant, pull_consumer, ev);
      return;
   }
   _cnx = ORBit_object_get_connection(_obj);
_ORBIT_retry_request:
   _ORBIT_send_buffer = NULL;
   _ORBIT_recv_buffer = NULL;
   _ORBIT_completion_status = CORBA_COMPLETED_NO;
   _ORBIT_request_id = GPOINTER_TO_UINT(alloca(0));
   {				/* marshalling */
      static const struct {
	 CORBA_unsigned_long len;
	 char opname[22];
      } _ORBIT_operation_name_data = {
	 22, "connect_pull_consumer"
      };
      static const struct iovec _ORBIT_operation_vec = {(gpointer) & _ORBIT_operation_name_data, 26};
      _ORBIT_send_buffer =
	 giop_send_request_buffer_use(_cnx, NULL, _ORBIT_request_id, CORBA_TRUE,
				      &(_obj->active_profile->object_key_vec), &_ORBIT_operation_vec, &ORBit_default_principal_iovec);

      _ORBIT_system_exception_minor = ex_CORBA_COMM_FAILURE;
      if (!_ORBIT_send_buffer)
	 goto _ORBIT_system_exception;
      ORBit_marshal_object(_ORBIT_send_buffer, pull_consumer);
      giop_send_buffer_write(_ORBIT_send_buffer);
      _ORBIT_completion_status = CORBA_COMPLETED_MAYBE;
      giop_send_buffer_unuse(_ORBIT_send_buffer);
      _ORBIT_send_buffer = NULL;
   }
   {				/* demarshalling */
      register guchar *_ORBIT_curptr;
      _ORBIT_recv_buffer = giop_recv_reply_buffer_use_2(_cnx, _ORBIT_request_id, TRUE);
      if (!_ORBIT_recv_buffer)
	 goto _ORBIT_system_exception;
      _ORBIT_completion_status = CORBA_COMPLETED_YES;
      if (_ORBIT_recv_buffer->message.u.reply.reply_status != GIOP_NO_EXCEPTION)
	 goto _ORBIT_msg_exception;
      _ORBIT_curptr = GIOP_RECV_BUFFER(_ORBIT_recv_buffer)->cur;
      if (giop_msg_conversion_needed(GIOP_MESSAGE_BUFFER(_ORBIT_recv_buffer))) {
      } else {
      }
      giop_recv_buffer_unuse(_ORBIT_recv_buffer);
      return;
_ORBIT_system_exception:
      CORBA_exception_set_system(ev, _ORBIT_system_exception_minor, _ORBIT_completion_status);
      giop_recv_buffer_unuse(_ORBIT_recv_buffer);
      giop_send_buffer_unuse(_ORBIT_send_buffer);
      return;
_ORBIT_msg_exception:
      if (_ORBIT_recv_buffer->message.u.reply.reply_status == GIOP_LOCATION_FORWARD) {
	 if (_obj->forward_locations != NULL)
	    ORBit_delete_profiles(_obj->forward_locations);
	 _obj->forward_locations = ORBit_demarshal_IOR(_ORBIT_recv_buffer);
	 _cnx = ORBit_object_get_forwarded_connection(_obj);
	 giop_recv_buffer_unuse(_ORBIT_recv_buffer);

	 goto _ORBIT_retry_request;
      } else {
	 ORBit_handle_exception(_ORBIT_recv_buffer, ev, _ORBIT_user_exceptions, _obj->orb);
	 giop_recv_buffer_unuse(_ORBIT_recv_buffer);
	 return;
      }
   }
}
void 
CosEventChannelAdmin_ProxyPullConsumer_connect_pull_supplier(CosEventChannelAdmin_ProxyPullConsumer _obj, const CosEventComm_PullSupplier pull_supplier, CORBA_Environment * ev)
{
   static const ORBit_exception_demarshal_info _ORBIT_user_exceptions[] = {{(const CORBA_TypeCode) & TC_CosEventChannelAdmin_AlreadyConnected_struct, (gpointer) _ORBIT_CosEventChannelAdmin_AlreadyConnected_demarshal}, {(const CORBA_TypeCode) & TC_CosEventChannelAdmin_TypeError_struct, (gpointer) _ORBIT_CosEventChannelAdmin_TypeError_demarshal}, {CORBA_OBJECT_NIL, NULL}};
   register GIOP_unsigned_long _ORBIT_request_id,
    _ORBIT_system_exception_minor;
   register CORBA_completion_status _ORBIT_completion_status;
   register GIOPSendBuffer *_ORBIT_send_buffer;
   register GIOPRecvBuffer *_ORBIT_recv_buffer;
   register GIOPConnection *_cnx;
   if (_obj->servant && _obj->vepv && CosEventChannelAdmin_ProxyPullConsumer__classid) {
      ((POA_CosEventChannelAdmin_ProxyPullConsumer__epv *) _obj->vepv[CosEventChannelAdmin_ProxyPullConsumer__classid])->connect_pull_supplier(_obj->servant, pull_supplier, ev);
      return;
   }
   _cnx = ORBit_object_get_connection(_obj);
_ORBIT_retry_request:
   _ORBIT_send_buffer = NULL;
   _ORBIT_recv_buffer = NULL;
   _ORBIT_completion_status = CORBA_COMPLETED_NO;
   _ORBIT_request_id = GPOINTER_TO_UINT(alloca(0));
   {				/* marshalling */
      static const struct {
	 CORBA_unsigned_long len;
	 char opname[22];
      } _ORBIT_operation_name_data = {
	 22, "connect_pull_supplier"
      };
      static const struct iovec _ORBIT_operation_vec = {(gpointer) & _ORBIT_operation_name_data, 26};
      _ORBIT_send_buffer =
	 giop_send_request_buffer_use(_cnx, NULL, _ORBIT_request_id, CORBA_TRUE,
				      &(_obj->active_profile->object_key_vec), &_ORBIT_operation_vec, &ORBit_default_principal_iovec);

      _ORBIT_system_exception_minor = ex_CORBA_COMM_FAILURE;
      if (!_ORBIT_send_buffer)
	 goto _ORBIT_system_exception;
      ORBit_marshal_object(_ORBIT_send_buffer, pull_supplier);
      giop_send_buffer_write(_ORBIT_send_buffer);
      _ORBIT_completion_status = CORBA_COMPLETED_MAYBE;
      giop_send_buffer_unuse(_ORBIT_send_buffer);
      _ORBIT_send_buffer = NULL;
   }
   {				/* demarshalling */
      register guchar *_ORBIT_curptr;
      _ORBIT_recv_buffer = giop_recv_reply_buffer_use_2(_cnx, _ORBIT_request_id, TRUE);
      if (!_ORBIT_recv_buffer)
	 goto _ORBIT_system_exception;
      _ORBIT_completion_status = CORBA_COMPLETED_YES;
      if (_ORBIT_recv_buffer->message.u.reply.reply_status != GIOP_NO_EXCEPTION)
	 goto _ORBIT_msg_exception;
      _ORBIT_curptr = GIOP_RECV_BUFFER(_ORBIT_recv_buffer)->cur;
      if (giop_msg_conversion_needed(GIOP_MESSAGE_BUFFER(_ORBIT_recv_buffer))) {
      } else {
      }
      giop_recv_buffer_unuse(_ORBIT_recv_buffer);
      return;
_ORBIT_system_exception:
      CORBA_exception_set_system(ev, _ORBIT_system_exception_minor, _ORBIT_completion_status);
      giop_recv_buffer_unuse(_ORBIT_recv_buffer);
      giop_send_buffer_unuse(_ORBIT_send_buffer);
      return;
_ORBIT_msg_exception:
      if (_ORBIT_recv_buffer->message.u.reply.reply_status == GIOP_LOCATION_FORWARD) {
	 if (_obj->forward_locations != NULL)
	    ORBit_delete_profiles(_obj->forward_locations);
	 _obj->forward_locations = ORBit_demarshal_IOR(_ORBIT_recv_buffer);
	 _cnx = ORBit_object_get_forwarded_connection(_obj);
	 giop_recv_buffer_unuse(_ORBIT_recv_buffer);

	 goto _ORBIT_retry_request;
      } else {
	 ORBit_handle_exception(_ORBIT_recv_buffer, ev, _ORBIT_user_exceptions, _obj->orb);
	 giop_recv_buffer_unuse(_ORBIT_recv_buffer);
	 return;
      }
   }
}
void 
CosEventChannelAdmin_ProxyPushSupplier_connect_push_consumer(CosEventChannelAdmin_ProxyPushSupplier _obj, const CosEventComm_PushConsumer push_consumer, CORBA_Environment * ev)
{
   static const ORBit_exception_demarshal_info _ORBIT_user_exceptions[] = {{(const CORBA_TypeCode) & TC_CosEventChannelAdmin_AlreadyConnected_struct, (gpointer) _ORBIT_CosEventChannelAdmin_AlreadyConnected_demarshal}, {(const CORBA_TypeCode) & TC_CosEventChannelAdmin_TypeError_struct, (gpointer) _ORBIT_CosEventChannelAdmin_TypeError_demarshal}, {CORBA_OBJECT_NIL, NULL}};
   register GIOP_unsigned_long _ORBIT_request_id,
    _ORBIT_system_exception_minor;
   register CORBA_completion_status _ORBIT_completion_status;
   register GIOPSendBuffer *_ORBIT_send_buffer;
   register GIOPRecvBuffer *_ORBIT_recv_buffer;
   register GIOPConnection *_cnx;
   if (_obj->servant && _obj->vepv && CosEventChannelAdmin_ProxyPushSupplier__classid) {
      ((POA_CosEventChannelAdmin_ProxyPushSupplier__epv *) _obj->vepv[CosEventChannelAdmin_ProxyPushSupplier__classid])->connect_push_consumer(_obj->servant, push_consumer, ev);
      return;
   }
   _cnx = ORBit_object_get_connection(_obj);
_ORBIT_retry_request:
   _ORBIT_send_buffer = NULL;
   _ORBIT_recv_buffer = NULL;
   _ORBIT_completion_status = CORBA_COMPLETED_NO;
   _ORBIT_request_id = GPOINTER_TO_UINT(alloca(0));
   {				/* marshalling */
      static const struct {
	 CORBA_unsigned_long len;
	 char opname[22];
      } _ORBIT_operation_name_data = {
	 22, "connect_push_consumer"
      };
      static const struct iovec _ORBIT_operation_vec = {(gpointer) & _ORBIT_operation_name_data, 26};
      _ORBIT_send_buffer =
	 giop_send_request_buffer_use(_cnx, NULL, _ORBIT_request_id, CORBA_TRUE,
				      &(_obj->active_profile->object_key_vec), &_ORBIT_operation_vec, &ORBit_default_principal_iovec);

      _ORBIT_system_exception_minor = ex_CORBA_COMM_FAILURE;
      if (!_ORBIT_send_buffer)
	 goto _ORBIT_system_exception;
      ORBit_marshal_object(_ORBIT_send_buffer, push_consumer);
      giop_send_buffer_write(_ORBIT_send_buffer);
      _ORBIT_completion_status = CORBA_COMPLETED_MAYBE;
      giop_send_buffer_unuse(_ORBIT_send_buffer);
      _ORBIT_send_buffer = NULL;
   }
   {				/* demarshalling */
      register guchar *_ORBIT_curptr;
      _ORBIT_recv_buffer = giop_recv_reply_buffer_use_2(_cnx, _ORBIT_request_id, TRUE);
      if (!_ORBIT_recv_buffer)
	 goto _ORBIT_system_exception;
      _ORBIT_completion_status = CORBA_COMPLETED_YES;
      if (_ORBIT_recv_buffer->message.u.reply.reply_status != GIOP_NO_EXCEPTION)
	 goto _ORBIT_msg_exception;
      _ORBIT_curptr = GIOP_RECV_BUFFER(_ORBIT_recv_buffer)->cur;
      if (giop_msg_conversion_needed(GIOP_MESSAGE_BUFFER(_ORBIT_recv_buffer))) {
      } else {
      }
      giop_recv_buffer_unuse(_ORBIT_recv_buffer);
      return;
_ORBIT_system_exception:
      CORBA_exception_set_system(ev, _ORBIT_system_exception_minor, _ORBIT_completion_status);
      giop_recv_buffer_unuse(_ORBIT_recv_buffer);
      giop_send_buffer_unuse(_ORBIT_send_buffer);
      return;
_ORBIT_msg_exception:
      if (_ORBIT_recv_buffer->message.u.reply.reply_status == GIOP_LOCATION_FORWARD) {
	 if (_obj->forward_locations != NULL)
	    ORBit_delete_profiles(_obj->forward_locations);
	 _obj->forward_locations = ORBit_demarshal_IOR(_ORBIT_recv_buffer);
	 _cnx = ORBit_object_get_forwarded_connection(_obj);
	 giop_recv_buffer_unuse(_ORBIT_recv_buffer);

	 goto _ORBIT_retry_request;
      } else {
	 ORBit_handle_exception(_ORBIT_recv_buffer, ev, _ORBIT_user_exceptions, _obj->orb);
	 giop_recv_buffer_unuse(_ORBIT_recv_buffer);
	 return;
      }
   }
}
CosEventChannelAdmin_ProxyPushSupplier 
CosEventChannelAdmin_ConsumerAdmin_obtain_push_supplier(CosEventChannelAdmin_ConsumerAdmin _obj, CORBA_Environment * ev)
{
   register GIOP_unsigned_long _ORBIT_request_id,
    _ORBIT_system_exception_minor;
   register CORBA_completion_status _ORBIT_completion_status;
   register GIOPSendBuffer *_ORBIT_send_buffer;
   register GIOPRecvBuffer *_ORBIT_recv_buffer;
   register GIOPConnection *_cnx;
   CosEventChannelAdmin_ProxyPushSupplier _ORBIT_retval;
   if (_obj->servant && _obj->vepv && CosEventChannelAdmin_ConsumerAdmin__classid) {
      _ORBIT_retval = ((POA_CosEventChannelAdmin_ConsumerAdmin__epv *) _obj->vepv[CosEventChannelAdmin_ConsumerAdmin__classid])->obtain_push_supplier(_obj->servant, ev);
      return _ORBIT_retval;
   }
   if (0)
      return *(&_ORBIT_retval);
   _cnx = ORBit_object_get_connection(_obj);
_ORBIT_retry_request:
   _ORBIT_send_buffer = NULL;
   _ORBIT_recv_buffer = NULL;
   _ORBIT_completion_status = CORBA_COMPLETED_NO;
   _ORBIT_request_id = GPOINTER_TO_UINT(alloca(0));
   {				/* marshalling */
      static const struct {
	 CORBA_unsigned_long len;
	 char opname[21];
      } _ORBIT_operation_name_data = {
	 21, "obtain_push_supplier"
      };
      static const struct iovec _ORBIT_operation_vec = {(gpointer) & _ORBIT_operation_name_data, 25};
      _ORBIT_send_buffer =
	 giop_send_request_buffer_use(_cnx, NULL, _ORBIT_request_id, CORBA_TRUE,
				      &(_obj->active_profile->object_key_vec), &_ORBIT_operation_vec, &ORBit_default_principal_iovec);

      _ORBIT_system_exception_minor = ex_CORBA_COMM_FAILURE;
      if (!_ORBIT_send_buffer)
	 goto _ORBIT_system_exception;
      giop_send_buffer_write(_ORBIT_send_buffer);
      _ORBIT_completion_status = CORBA_COMPLETED_MAYBE;
      giop_send_buffer_unuse(_ORBIT_send_buffer);
      _ORBIT_send_buffer = NULL;
   }
   {				/* demarshalling */
      register guchar *_ORBIT_curptr;
      _ORBIT_recv_buffer = giop_recv_reply_buffer_use_2(_cnx, _ORBIT_request_id, TRUE);
      if (!_ORBIT_recv_buffer)
	 goto _ORBIT_system_exception;
      _ORBIT_completion_status = CORBA_COMPLETED_YES;
      if (_ORBIT_recv_buffer->message.u.reply.reply_status != GIOP_NO_EXCEPTION)
	 goto _ORBIT_msg_exception;
      _ORBIT_curptr = GIOP_RECV_BUFFER(_ORBIT_recv_buffer)->cur;
      if (giop_msg_conversion_needed(GIOP_MESSAGE_BUFFER(_ORBIT_recv_buffer))) {
	 GIOP_RECV_BUFFER(_ORBIT_recv_buffer)->cur = _ORBIT_curptr;
	 _ORBIT_retval = ORBit_demarshal_object(_ORBIT_recv_buffer, GIOP_MESSAGE_BUFFER(_ORBIT_recv_buffer)->connection->orb_data);
	 _ORBIT_curptr = GIOP_RECV_BUFFER(_ORBIT_recv_buffer)->cur;
      } else {
	 GIOP_RECV_BUFFER(_ORBIT_recv_buffer)->cur = _ORBIT_curptr;
	 _ORBIT_retval = ORBit_demarshal_object(_ORBIT_recv_buffer, GIOP_MESSAGE_BUFFER(_ORBIT_recv_buffer)->connection->orb_data);
	 _ORBIT_curptr = GIOP_RECV_BUFFER(_ORBIT_recv_buffer)->cur;
      }
      giop_recv_buffer_unuse(_ORBIT_recv_buffer);
      return _ORBIT_retval;
_ORBIT_system_exception:
      CORBA_exception_set_system(ev, _ORBIT_system_exception_minor, _ORBIT_completion_status);
      giop_recv_buffer_unuse(_ORBIT_recv_buffer);
      giop_send_buffer_unuse(_ORBIT_send_buffer);
      return _ORBIT_retval;
_ORBIT_msg_exception:
      if (_ORBIT_recv_buffer->message.u.reply.reply_status == GIOP_LOCATION_FORWARD) {
	 if (_obj->forward_locations != NULL)
	    ORBit_delete_profiles(_obj->forward_locations);
	 _obj->forward_locations = ORBit_demarshal_IOR(_ORBIT_recv_buffer);
	 _cnx = ORBit_object_get_forwarded_connection(_obj);
	 giop_recv_buffer_unuse(_ORBIT_recv_buffer);

	 goto _ORBIT_retry_request;
      } else {
	 ORBit_handle_exception(_ORBIT_recv_buffer, ev, NULL, _obj->orb);
	 giop_recv_buffer_unuse(_ORBIT_recv_buffer);
	 return _ORBIT_retval;
      }
   }
}
CosEventChannelAdmin_ProxyPullSupplier 
CosEventChannelAdmin_ConsumerAdmin_obtain_pull_supplier(CosEventChannelAdmin_ConsumerAdmin _obj, CORBA_Environment * ev)
{
   register GIOP_unsigned_long _ORBIT_request_id,
    _ORBIT_system_exception_minor;
   register CORBA_completion_status _ORBIT_completion_status;
   register GIOPSendBuffer *_ORBIT_send_buffer;
   register GIOPRecvBuffer *_ORBIT_recv_buffer;
   register GIOPConnection *_cnx;
   CosEventChannelAdmin_ProxyPullSupplier _ORBIT_retval;
   if (_obj->servant && _obj->vepv && CosEventChannelAdmin_ConsumerAdmin__classid) {
      _ORBIT_retval = ((POA_CosEventChannelAdmin_ConsumerAdmin__epv *) _obj->vepv[CosEventChannelAdmin_ConsumerAdmin__classid])->obtain_pull_supplier(_obj->servant, ev);
      return _ORBIT_retval;
   }
   if (0)
      return *(&_ORBIT_retval);
   _cnx = ORBit_object_get_connection(_obj);
_ORBIT_retry_request:
   _ORBIT_send_buffer = NULL;
   _ORBIT_recv_buffer = NULL;
   _ORBIT_completion_status = CORBA_COMPLETED_NO;
   _ORBIT_request_id = GPOINTER_TO_UINT(alloca(0));
   {				/* marshalling */
      static const struct {
	 CORBA_unsigned_long len;
	 char opname[21];
      } _ORBIT_operation_name_data = {
	 21, "obtain_pull_supplier"
      };
      static const struct iovec _ORBIT_operation_vec = {(gpointer) & _ORBIT_operation_name_data, 25};
      _ORBIT_send_buffer =
	 giop_send_request_buffer_use(_cnx, NULL, _ORBIT_request_id, CORBA_TRUE,
				      &(_obj->active_profile->object_key_vec), &_ORBIT_operation_vec, &ORBit_default_principal_iovec);

      _ORBIT_system_exception_minor = ex_CORBA_COMM_FAILURE;
      if (!_ORBIT_send_buffer)
	 goto _ORBIT_system_exception;
      giop_send_buffer_write(_ORBIT_send_buffer);
      _ORBIT_completion_status = CORBA_COMPLETED_MAYBE;
      giop_send_buffer_unuse(_ORBIT_send_buffer);
      _ORBIT_send_buffer = NULL;
   }
   {				/* demarshalling */
      register guchar *_ORBIT_curptr;
      _ORBIT_recv_buffer = giop_recv_reply_buffer_use_2(_cnx, _ORBIT_request_id, TRUE);
      if (!_ORBIT_recv_buffer)
	 goto _ORBIT_system_exception;
      _ORBIT_completion_status = CORBA_COMPLETED_YES;
      if (_ORBIT_recv_buffer->message.u.reply.reply_status != GIOP_NO_EXCEPTION)
	 goto _ORBIT_msg_exception;
      _ORBIT_curptr = GIOP_RECV_BUFFER(_ORBIT_recv_buffer)->cur;
      if (giop_msg_conversion_needed(GIOP_MESSAGE_BUFFER(_ORBIT_recv_buffer))) {
	 GIOP_RECV_BUFFER(_ORBIT_recv_buffer)->cur = _ORBIT_curptr;
	 _ORBIT_retval = ORBit_demarshal_object(_ORBIT_recv_buffer, GIOP_MESSAGE_BUFFER(_ORBIT_recv_buffer)->connection->orb_data);
	 _ORBIT_curptr = GIOP_RECV_BUFFER(_ORBIT_recv_buffer)->cur;
      } else {
	 GIOP_RECV_BUFFER(_ORBIT_recv_buffer)->cur = _ORBIT_curptr;
	 _ORBIT_retval = ORBit_demarshal_object(_ORBIT_recv_buffer, GIOP_MESSAGE_BUFFER(_ORBIT_recv_buffer)->connection->orb_data);
	 _ORBIT_curptr = GIOP_RECV_BUFFER(_ORBIT_recv_buffer)->cur;
      }
      giop_recv_buffer_unuse(_ORBIT_recv_buffer);
      return _ORBIT_retval;
_ORBIT_system_exception:
      CORBA_exception_set_system(ev, _ORBIT_system_exception_minor, _ORBIT_completion_status);
      giop_recv_buffer_unuse(_ORBIT_recv_buffer);
      giop_send_buffer_unuse(_ORBIT_send_buffer);
      return _ORBIT_retval;
_ORBIT_msg_exception:
      if (_ORBIT_recv_buffer->message.u.reply.reply_status == GIOP_LOCATION_FORWARD) {
	 if (_obj->forward_locations != NULL)
	    ORBit_delete_profiles(_obj->forward_locations);
	 _obj->forward_locations = ORBit_demarshal_IOR(_ORBIT_recv_buffer);
	 _cnx = ORBit_object_get_forwarded_connection(_obj);
	 giop_recv_buffer_unuse(_ORBIT_recv_buffer);

	 goto _ORBIT_retry_request;
      } else {
	 ORBit_handle_exception(_ORBIT_recv_buffer, ev, NULL, _obj->orb);
	 giop_recv_buffer_unuse(_ORBIT_recv_buffer);
	 return _ORBIT_retval;
      }
   }
}
CosEventChannelAdmin_ProxyPushConsumer 
CosEventChannelAdmin_SupplierAdmin_obtain_push_consumer(CosEventChannelAdmin_SupplierAdmin _obj, CORBA_Environment * ev)
{
   register GIOP_unsigned_long _ORBIT_request_id,
    _ORBIT_system_exception_minor;
   register CORBA_completion_status _ORBIT_completion_status;
   register GIOPSendBuffer *_ORBIT_send_buffer;
   register GIOPRecvBuffer *_ORBIT_recv_buffer;
   register GIOPConnection *_cnx;
   CosEventChannelAdmin_ProxyPushConsumer _ORBIT_retval;
   if (_obj->servant && _obj->vepv && CosEventChannelAdmin_SupplierAdmin__classid) {
      _ORBIT_retval = ((POA_CosEventChannelAdmin_SupplierAdmin__epv *) _obj->vepv[CosEventChannelAdmin_SupplierAdmin__classid])->obtain_push_consumer(_obj->servant, ev);
      return _ORBIT_retval;
   }
   if (0)
      return *(&_ORBIT_retval);
   _cnx = ORBit_object_get_connection(_obj);
_ORBIT_retry_request:
   _ORBIT_send_buffer = NULL;
   _ORBIT_recv_buffer = NULL;
   _ORBIT_completion_status = CORBA_COMPLETED_NO;
   _ORBIT_request_id = GPOINTER_TO_UINT(alloca(0));
   {				/* marshalling */
      static const struct {
	 CORBA_unsigned_long len;
	 char opname[21];
      } _ORBIT_operation_name_data = {
	 21, "obtain_push_consumer"
      };
      static const struct iovec _ORBIT_operation_vec = {(gpointer) & _ORBIT_operation_name_data, 25};
      _ORBIT_send_buffer =
	 giop_send_request_buffer_use(_cnx, NULL, _ORBIT_request_id, CORBA_TRUE,
				      &(_obj->active_profile->object_key_vec), &_ORBIT_operation_vec, &ORBit_default_principal_iovec);

      _ORBIT_system_exception_minor = ex_CORBA_COMM_FAILURE;
      if (!_ORBIT_send_buffer)
	 goto _ORBIT_system_exception;
      giop_send_buffer_write(_ORBIT_send_buffer);
      _ORBIT_completion_status = CORBA_COMPLETED_MAYBE;
      giop_send_buffer_unuse(_ORBIT_send_buffer);
      _ORBIT_send_buffer = NULL;
   }
   {				/* demarshalling */
      register guchar *_ORBIT_curptr;
      _ORBIT_recv_buffer = giop_recv_reply_buffer_use_2(_cnx, _ORBIT_request_id, TRUE);
      if (!_ORBIT_recv_buffer)
	 goto _ORBIT_system_exception;
      _ORBIT_completion_status = CORBA_COMPLETED_YES;
      if (_ORBIT_recv_buffer->message.u.reply.reply_status != GIOP_NO_EXCEPTION)
	 goto _ORBIT_msg_exception;
      _ORBIT_curptr = GIOP_RECV_BUFFER(_ORBIT_recv_buffer)->cur;
      if (giop_msg_conversion_needed(GIOP_MESSAGE_BUFFER(_ORBIT_recv_buffer))) {
	 GIOP_RECV_BUFFER(_ORBIT_recv_buffer)->cur = _ORBIT_curptr;
	 _ORBIT_retval = ORBit_demarshal_object(_ORBIT_recv_buffer, GIOP_MESSAGE_BUFFER(_ORBIT_recv_buffer)->connection->orb_data);
	 _ORBIT_curptr = GIOP_RECV_BUFFER(_ORBIT_recv_buffer)->cur;
      } else {
	 GIOP_RECV_BUFFER(_ORBIT_recv_buffer)->cur = _ORBIT_curptr;
	 _ORBIT_retval = ORBit_demarshal_object(_ORBIT_recv_buffer, GIOP_MESSAGE_BUFFER(_ORBIT_recv_buffer)->connection->orb_data);
	 _ORBIT_curptr = GIOP_RECV_BUFFER(_ORBIT_recv_buffer)->cur;
      }
      giop_recv_buffer_unuse(_ORBIT_recv_buffer);
      return _ORBIT_retval;
_ORBIT_system_exception:
      CORBA_exception_set_system(ev, _ORBIT_system_exception_minor, _ORBIT_completion_status);
      giop_recv_buffer_unuse(_ORBIT_recv_buffer);
      giop_send_buffer_unuse(_ORBIT_send_buffer);
      return _ORBIT_retval;
_ORBIT_msg_exception:
      if (_ORBIT_recv_buffer->message.u.reply.reply_status == GIOP_LOCATION_FORWARD) {
	 if (_obj->forward_locations != NULL)
	    ORBit_delete_profiles(_obj->forward_locations);
	 _obj->forward_locations = ORBit_demarshal_IOR(_ORBIT_recv_buffer);
	 _cnx = ORBit_object_get_forwarded_connection(_obj);
	 giop_recv_buffer_unuse(_ORBIT_recv_buffer);

	 goto _ORBIT_retry_request;
      } else {
	 ORBit_handle_exception(_ORBIT_recv_buffer, ev, NULL, _obj->orb);
	 giop_recv_buffer_unuse(_ORBIT_recv_buffer);
	 return _ORBIT_retval;
      }
   }
}
CosEventChannelAdmin_ProxyPullConsumer 
CosEventChannelAdmin_SupplierAdmin_obtain_pull_consumer(CosEventChannelAdmin_SupplierAdmin _obj, CORBA_Environment * ev)
{
   register GIOP_unsigned_long _ORBIT_request_id,
    _ORBIT_system_exception_minor;
   register CORBA_completion_status _ORBIT_completion_status;
   register GIOPSendBuffer *_ORBIT_send_buffer;
   register GIOPRecvBuffer *_ORBIT_recv_buffer;
   register GIOPConnection *_cnx;
   CosEventChannelAdmin_ProxyPullConsumer _ORBIT_retval;
   if (_obj->servant && _obj->vepv && CosEventChannelAdmin_SupplierAdmin__classid) {
      _ORBIT_retval = ((POA_CosEventChannelAdmin_SupplierAdmin__epv *) _obj->vepv[CosEventChannelAdmin_SupplierAdmin__classid])->obtain_pull_consumer(_obj->servant, ev);
      return _ORBIT_retval;
   }
   if (0)
      return *(&_ORBIT_retval);
   _cnx = ORBit_object_get_connection(_obj);
_ORBIT_retry_request:
   _ORBIT_send_buffer = NULL;
   _ORBIT_recv_buffer = NULL;
   _ORBIT_completion_status = CORBA_COMPLETED_NO;
   _ORBIT_request_id = GPOINTER_TO_UINT(alloca(0));
   {				/* marshalling */
      static const struct {
	 CORBA_unsigned_long len;
	 char opname[21];
      } _ORBIT_operation_name_data = {
	 21, "obtain_pull_consumer"
      };
      static const struct iovec _ORBIT_operation_vec = {(gpointer) & _ORBIT_operation_name_data, 25};
      _ORBIT_send_buffer =
	 giop_send_request_buffer_use(_cnx, NULL, _ORBIT_request_id, CORBA_TRUE,
				      &(_obj->active_profile->object_key_vec), &_ORBIT_operation_vec, &ORBit_default_principal_iovec);

      _ORBIT_system_exception_minor = ex_CORBA_COMM_FAILURE;
      if (!_ORBIT_send_buffer)
	 goto _ORBIT_system_exception;
      giop_send_buffer_write(_ORBIT_send_buffer);
      _ORBIT_completion_status = CORBA_COMPLETED_MAYBE;
      giop_send_buffer_unuse(_ORBIT_send_buffer);
      _ORBIT_send_buffer = NULL;
   }
   {				/* demarshalling */
      register guchar *_ORBIT_curptr;
      _ORBIT_recv_buffer = giop_recv_reply_buffer_use_2(_cnx, _ORBIT_request_id, TRUE);
      if (!_ORBIT_recv_buffer)
	 goto _ORBIT_system_exception;
      _ORBIT_completion_status = CORBA_COMPLETED_YES;
      if (_ORBIT_recv_buffer->message.u.reply.reply_status != GIOP_NO_EXCEPTION)
	 goto _ORBIT_msg_exception;
      _ORBIT_curptr = GIOP_RECV_BUFFER(_ORBIT_recv_buffer)->cur;
      if (giop_msg_conversion_needed(GIOP_MESSAGE_BUFFER(_ORBIT_recv_buffer))) {
	 GIOP_RECV_BUFFER(_ORBIT_recv_buffer)->cur = _ORBIT_curptr;
	 _ORBIT_retval = ORBit_demarshal_object(_ORBIT_recv_buffer, GIOP_MESSAGE_BUFFER(_ORBIT_recv_buffer)->connection->orb_data);
	 _ORBIT_curptr = GIOP_RECV_BUFFER(_ORBIT_recv_buffer)->cur;
      } else {
	 GIOP_RECV_BUFFER(_ORBIT_recv_buffer)->cur = _ORBIT_curptr;
	 _ORBIT_retval = ORBit_demarshal_object(_ORBIT_recv_buffer, GIOP_MESSAGE_BUFFER(_ORBIT_recv_buffer)->connection->orb_data);
	 _ORBIT_curptr = GIOP_RECV_BUFFER(_ORBIT_recv_buffer)->cur;
      }
      giop_recv_buffer_unuse(_ORBIT_recv_buffer);
      return _ORBIT_retval;
_ORBIT_system_exception:
      CORBA_exception_set_system(ev, _ORBIT_system_exception_minor, _ORBIT_completion_status);
      giop_recv_buffer_unuse(_ORBIT_recv_buffer);
      giop_send_buffer_unuse(_ORBIT_send_buffer);
      return _ORBIT_retval;
_ORBIT_msg_exception:
      if (_ORBIT_recv_buffer->message.u.reply.reply_status == GIOP_LOCATION_FORWARD) {
	 if (_obj->forward_locations != NULL)
	    ORBit_delete_profiles(_obj->forward_locations);
	 _obj->forward_locations = ORBit_demarshal_IOR(_ORBIT_recv_buffer);
	 _cnx = ORBit_object_get_forwarded_connection(_obj);
	 giop_recv_buffer_unuse(_ORBIT_recv_buffer);

	 goto _ORBIT_retry_request;
      } else {
	 ORBit_handle_exception(_ORBIT_recv_buffer, ev, NULL, _obj->orb);
	 giop_recv_buffer_unuse(_ORBIT_recv_buffer);
	 return _ORBIT_retval;
      }
   }
}
CosEventChannelAdmin_ConsumerAdmin 
CosEventChannelAdmin_EventChannel_for_consumers(CosEventChannelAdmin_EventChannel _obj, CORBA_Environment * ev)
{
   register GIOP_unsigned_long _ORBIT_request_id,
    _ORBIT_system_exception_minor;
   register CORBA_completion_status _ORBIT_completion_status;
   register GIOPSendBuffer *_ORBIT_send_buffer;
   register GIOPRecvBuffer *_ORBIT_recv_buffer;
   register GIOPConnection *_cnx;
   CosEventChannelAdmin_ConsumerAdmin _ORBIT_retval;
   if (_obj->servant && _obj->vepv && CosEventChannelAdmin_EventChannel__classid) {
      _ORBIT_retval = ((POA_CosEventChannelAdmin_EventChannel__epv *) _obj->vepv[CosEventChannelAdmin_EventChannel__classid])->for_consumers(_obj->servant, ev);
      return _ORBIT_retval;
   }
   if (0)
      return *(&_ORBIT_retval);
   _cnx = ORBit_object_get_connection(_obj);
_ORBIT_retry_request:
   _ORBIT_send_buffer = NULL;
   _ORBIT_recv_buffer = NULL;
   _ORBIT_completion_status = CORBA_COMPLETED_NO;
   _ORBIT_request_id = GPOINTER_TO_UINT(alloca(0));
   {				/* marshalling */
      static const struct {
	 CORBA_unsigned_long len;
	 char opname[14];
      } _ORBIT_operation_name_data = {
	 14, "for_consumers"
      };
      static const struct iovec _ORBIT_operation_vec = {(gpointer) & _ORBIT_operation_name_data, 18};
      _ORBIT_send_buffer =
	 giop_send_request_buffer_use(_cnx, NULL, _ORBIT_request_id, CORBA_TRUE,
				      &(_obj->active_profile->object_key_vec), &_ORBIT_operation_vec, &ORBit_default_principal_iovec);

      _ORBIT_system_exception_minor = ex_CORBA_COMM_FAILURE;
      if (!_ORBIT_send_buffer)
	 goto _ORBIT_system_exception;
      giop_send_buffer_write(_ORBIT_send_buffer);
      _ORBIT_completion_status = CORBA_COMPLETED_MAYBE;
      giop_send_buffer_unuse(_ORBIT_send_buffer);
      _ORBIT_send_buffer = NULL;
   }
   {				/* demarshalling */
      register guchar *_ORBIT_curptr;
      _ORBIT_recv_buffer = giop_recv_reply_buffer_use_2(_cnx, _ORBIT_request_id, TRUE);
      if (!_ORBIT_recv_buffer)
	 goto _ORBIT_system_exception;
      _ORBIT_completion_status = CORBA_COMPLETED_YES;
      if (_ORBIT_recv_buffer->message.u.reply.reply_status != GIOP_NO_EXCEPTION)
	 goto _ORBIT_msg_exception;
      _ORBIT_curptr = GIOP_RECV_BUFFER(_ORBIT_recv_buffer)->cur;
      if (giop_msg_conversion_needed(GIOP_MESSAGE_BUFFER(_ORBIT_recv_buffer))) {
	 GIOP_RECV_BUFFER(_ORBIT_recv_buffer)->cur = _ORBIT_curptr;
	 _ORBIT_retval = ORBit_demarshal_object(_ORBIT_recv_buffer, GIOP_MESSAGE_BUFFER(_ORBIT_recv_buffer)->connection->orb_data);
	 _ORBIT_curptr = GIOP_RECV_BUFFER(_ORBIT_recv_buffer)->cur;
      } else {
	 GIOP_RECV_BUFFER(_ORBIT_recv_buffer)->cur = _ORBIT_curptr;
	 _ORBIT_retval = ORBit_demarshal_object(_ORBIT_recv_buffer, GIOP_MESSAGE_BUFFER(_ORBIT_recv_buffer)->connection->orb_data);
	 _ORBIT_curptr = GIOP_RECV_BUFFER(_ORBIT_recv_buffer)->cur;
      }
      giop_recv_buffer_unuse(_ORBIT_recv_buffer);
      return _ORBIT_retval;
_ORBIT_system_exception:
      CORBA_exception_set_system(ev, _ORBIT_system_exception_minor, _ORBIT_completion_status);
      giop_recv_buffer_unuse(_ORBIT_recv_buffer);
      giop_send_buffer_unuse(_ORBIT_send_buffer);
      return _ORBIT_retval;
_ORBIT_msg_exception:
      if (_ORBIT_recv_buffer->message.u.reply.reply_status == GIOP_LOCATION_FORWARD) {
	 if (_obj->forward_locations != NULL)
	    ORBit_delete_profiles(_obj->forward_locations);
	 _obj->forward_locations = ORBit_demarshal_IOR(_ORBIT_recv_buffer);
	 _cnx = ORBit_object_get_forwarded_connection(_obj);
	 giop_recv_buffer_unuse(_ORBIT_recv_buffer);

	 goto _ORBIT_retry_request;
      } else {
	 ORBit_handle_exception(_ORBIT_recv_buffer, ev, NULL, _obj->orb);
	 giop_recv_buffer_unuse(_ORBIT_recv_buffer);
	 return _ORBIT_retval;
      }
   }
}
CosEventChannelAdmin_SupplierAdmin 
CosEventChannelAdmin_EventChannel_for_suppliers(CosEventChannelAdmin_EventChannel _obj, CORBA_Environment * ev)
{
   register GIOP_unsigned_long _ORBIT_request_id,
    _ORBIT_system_exception_minor;
   register CORBA_completion_status _ORBIT_completion_status;
   register GIOPSendBuffer *_ORBIT_send_buffer;
   register GIOPRecvBuffer *_ORBIT_recv_buffer;
   register GIOPConnection *_cnx;
   CosEventChannelAdmin_SupplierAdmin _ORBIT_retval;
   if (_obj->servant && _obj->vepv && CosEventChannelAdmin_EventChannel__classid) {
      _ORBIT_retval = ((POA_CosEventChannelAdmin_EventChannel__epv *) _obj->vepv[CosEventChannelAdmin_EventChannel__classid])->for_suppliers(_obj->servant, ev);
      return _ORBIT_retval;
   }
   if (0)
      return *(&_ORBIT_retval);
   _cnx = ORBit_object_get_connection(_obj);
_ORBIT_retry_request:
   _ORBIT_send_buffer = NULL;
   _ORBIT_recv_buffer = NULL;
   _ORBIT_completion_status = CORBA_COMPLETED_NO;
   _ORBIT_request_id = GPOINTER_TO_UINT(alloca(0));
   {				/* marshalling */
      static const struct {
	 CORBA_unsigned_long len;
	 char opname[14];
      } _ORBIT_operation_name_data = {
	 14, "for_suppliers"
      };
      static const struct iovec _ORBIT_operation_vec = {(gpointer) & _ORBIT_operation_name_data, 18};
      _ORBIT_send_buffer =
	 giop_send_request_buffer_use(_cnx, NULL, _ORBIT_request_id, CORBA_TRUE,
				      &(_obj->active_profile->object_key_vec), &_ORBIT_operation_vec, &ORBit_default_principal_iovec);

      _ORBIT_system_exception_minor = ex_CORBA_COMM_FAILURE;
      if (!_ORBIT_send_buffer)
	 goto _ORBIT_system_exception;
      giop_send_buffer_write(_ORBIT_send_buffer);
      _ORBIT_completion_status = CORBA_COMPLETED_MAYBE;
      giop_send_buffer_unuse(_ORBIT_send_buffer);
      _ORBIT_send_buffer = NULL;
   }
   {				/* demarshalling */
      register guchar *_ORBIT_curptr;
      _ORBIT_recv_buffer = giop_recv_reply_buffer_use_2(_cnx, _ORBIT_request_id, TRUE);
      if (!_ORBIT_recv_buffer)
	 goto _ORBIT_system_exception;
      _ORBIT_completion_status = CORBA_COMPLETED_YES;
      if (_ORBIT_recv_buffer->message.u.reply.reply_status != GIOP_NO_EXCEPTION)
	 goto _ORBIT_msg_exception;
      _ORBIT_curptr = GIOP_RECV_BUFFER(_ORBIT_recv_buffer)->cur;
      if (giop_msg_conversion_needed(GIOP_MESSAGE_BUFFER(_ORBIT_recv_buffer))) {
	 GIOP_RECV_BUFFER(_ORBIT_recv_buffer)->cur = _ORBIT_curptr;
	 _ORBIT_retval = ORBit_demarshal_object(_ORBIT_recv_buffer, GIOP_MESSAGE_BUFFER(_ORBIT_recv_buffer)->connection->orb_data);
	 _ORBIT_curptr = GIOP_RECV_BUFFER(_ORBIT_recv_buffer)->cur;
      } else {
	 GIOP_RECV_BUFFER(_ORBIT_recv_buffer)->cur = _ORBIT_curptr;
	 _ORBIT_retval = ORBit_demarshal_object(_ORBIT_recv_buffer, GIOP_MESSAGE_BUFFER(_ORBIT_recv_buffer)->connection->orb_data);
	 _ORBIT_curptr = GIOP_RECV_BUFFER(_ORBIT_recv_buffer)->cur;
      }
      giop_recv_buffer_unuse(_ORBIT_recv_buffer);
      return _ORBIT_retval;
_ORBIT_system_exception:
      CORBA_exception_set_system(ev, _ORBIT_system_exception_minor, _ORBIT_completion_status);
      giop_recv_buffer_unuse(_ORBIT_recv_buffer);
      giop_send_buffer_unuse(_ORBIT_send_buffer);
      return _ORBIT_retval;
_ORBIT_msg_exception:
      if (_ORBIT_recv_buffer->message.u.reply.reply_status == GIOP_LOCATION_FORWARD) {
	 if (_obj->forward_locations != NULL)
	    ORBit_delete_profiles(_obj->forward_locations);
	 _obj->forward_locations = ORBit_demarshal_IOR(_ORBIT_recv_buffer);
	 _cnx = ORBit_object_get_forwarded_connection(_obj);
	 giop_recv_buffer_unuse(_ORBIT_recv_buffer);

	 goto _ORBIT_retry_request;
      } else {
	 ORBit_handle_exception(_ORBIT_recv_buffer, ev, NULL, _obj->orb);
	 giop_recv_buffer_unuse(_ORBIT_recv_buffer);
	 return _ORBIT_retval;
      }
   }
}
void 
CosEventChannelAdmin_EventChannel_destroy(CosEventChannelAdmin_EventChannel _obj, CORBA_Environment * ev)
{
   register GIOP_unsigned_long _ORBIT_request_id,
    _ORBIT_system_exception_minor;
   register CORBA_completion_status _ORBIT_completion_status;
   register GIOPSendBuffer *_ORBIT_send_buffer;
   register GIOPRecvBuffer *_ORBIT_recv_buffer;
   register GIOPConnection *_cnx;
   if (_obj->servant && _obj->vepv && CosEventChannelAdmin_EventChannel__classid) {
      ((POA_CosEventChannelAdmin_EventChannel__epv *) _obj->vepv[CosEventChannelAdmin_EventChannel__classid])->destroy(_obj->servant, ev);
      return;
   }
   _cnx = ORBit_object_get_connection(_obj);
_ORBIT_retry_request:
   _ORBIT_send_buffer = NULL;
   _ORBIT_recv_buffer = NULL;
   _ORBIT_completion_status = CORBA_COMPLETED_NO;
   _ORBIT_request_id = GPOINTER_TO_UINT(alloca(0));
   {				/* marshalling */
      static const struct {
	 CORBA_unsigned_long len;
	 char opname[8];
      } _ORBIT_operation_name_data = {
	 8, "destroy"
      };
      static const struct iovec _ORBIT_operation_vec = {(gpointer) & _ORBIT_operation_name_data, 12};
      _ORBIT_send_buffer =
	 giop_send_request_buffer_use(_cnx, NULL, _ORBIT_request_id, CORBA_TRUE,
				      &(_obj->active_profile->object_key_vec), &_ORBIT_operation_vec, &ORBit_default_principal_iovec);

      _ORBIT_system_exception_minor = ex_CORBA_COMM_FAILURE;
      if (!_ORBIT_send_buffer)
	 goto _ORBIT_system_exception;
      giop_send_buffer_write(_ORBIT_send_buffer);
      _ORBIT_completion_status = CORBA_COMPLETED_MAYBE;
      giop_send_buffer_unuse(_ORBIT_send_buffer);
      _ORBIT_send_buffer = NULL;
   }
   {				/* demarshalling */
      register guchar *_ORBIT_curptr;
      _ORBIT_recv_buffer = giop_recv_reply_buffer_use_2(_cnx, _ORBIT_request_id, TRUE);
      if (!_ORBIT_recv_buffer)
	 goto _ORBIT_system_exception;
      _ORBIT_completion_status = CORBA_COMPLETED_YES;
      if (_ORBIT_recv_buffer->message.u.reply.reply_status != GIOP_NO_EXCEPTION)
	 goto _ORBIT_msg_exception;
      _ORBIT_curptr = GIOP_RECV_BUFFER(_ORBIT_recv_buffer)->cur;
      if (giop_msg_conversion_needed(GIOP_MESSAGE_BUFFER(_ORBIT_recv_buffer))) {
      } else {
      }
      giop_recv_buffer_unuse(_ORBIT_recv_buffer);
      return;
_ORBIT_system_exception:
      CORBA_exception_set_system(ev, _ORBIT_system_exception_minor, _ORBIT_completion_status);
      giop_recv_buffer_unuse(_ORBIT_recv_buffer);
      giop_send_buffer_unuse(_ORBIT_send_buffer);
      return;
_ORBIT_msg_exception:
      if (_ORBIT_recv_buffer->message.u.reply.reply_status == GIOP_LOCATION_FORWARD) {
	 if (_obj->forward_locations != NULL)
	    ORBit_delete_profiles(_obj->forward_locations);
	 _obj->forward_locations = ORBit_demarshal_IOR(_ORBIT_recv_buffer);
	 _cnx = ORBit_object_get_forwarded_connection(_obj);
	 giop_recv_buffer_unuse(_ORBIT_recv_buffer);

	 goto _ORBIT_retry_request;
      } else {
	 ORBit_handle_exception(_ORBIT_recv_buffer, ev, NULL, _obj->orb);
	 giop_recv_buffer_unuse(_ORBIT_recv_buffer);
	 return;
      }
   }
}
CosEventChannelAdmin_EventChannel 
CosEventChannelAdmin_EventChannelFactory_new_event_channel(CosEventChannelAdmin_EventChannelFactory _obj, CORBA_Environment * ev)
{
   register GIOP_unsigned_long _ORBIT_request_id,
    _ORBIT_system_exception_minor;
   register CORBA_completion_status _ORBIT_completion_status;
   register GIOPSendBuffer *_ORBIT_send_buffer;
   register GIOPRecvBuffer *_ORBIT_recv_buffer;
   register GIOPConnection *_cnx;
   CosEventChannelAdmin_EventChannel _ORBIT_retval;
   if (_obj->servant && _obj->vepv && CosEventChannelAdmin_EventChannelFactory__classid) {
      _ORBIT_retval = ((POA_CosEventChannelAdmin_EventChannelFactory__epv *) _obj->vepv[CosEventChannelAdmin_EventChannelFactory__classid])->new_event_channel(_obj->servant, ev);
      return _ORBIT_retval;
   }
   if (0)
      return *(&_ORBIT_retval);
   _cnx = ORBit_object_get_connection(_obj);
_ORBIT_retry_request:
   _ORBIT_send_buffer = NULL;
   _ORBIT_recv_buffer = NULL;
   _ORBIT_completion_status = CORBA_COMPLETED_NO;
   _ORBIT_request_id = GPOINTER_TO_UINT(alloca(0));
   {				/* marshalling */
      static const struct {
	 CORBA_unsigned_long len;
	 char opname[18];
      } _ORBIT_operation_name_data = {
	 18, "new_event_channel"
      };
      static const struct iovec _ORBIT_operation_vec = {(gpointer) & _ORBIT_operation_name_data, 22};
      _ORBIT_send_buffer =
	 giop_send_request_buffer_use(_cnx, NULL, _ORBIT_request_id, CORBA_TRUE,
				      &(_obj->active_profile->object_key_vec), &_ORBIT_operation_vec, &ORBit_default_principal_iovec);

      _ORBIT_system_exception_minor = ex_CORBA_COMM_FAILURE;
      if (!_ORBIT_send_buffer)
	 goto _ORBIT_system_exception;
      giop_send_buffer_write(_ORBIT_send_buffer);
      _ORBIT_completion_status = CORBA_COMPLETED_MAYBE;
      giop_send_buffer_unuse(_ORBIT_send_buffer);
      _ORBIT_send_buffer = NULL;
   }
   {				/* demarshalling */
      register guchar *_ORBIT_curptr;
      _ORBIT_recv_buffer = giop_recv_reply_buffer_use_2(_cnx, _ORBIT_request_id, TRUE);
      if (!_ORBIT_recv_buffer)
	 goto _ORBIT_system_exception;
      _ORBIT_completion_status = CORBA_COMPLETED_YES;
      if (_ORBIT_recv_buffer->message.u.reply.reply_status != GIOP_NO_EXCEPTION)
	 goto _ORBIT_msg_exception;
      _ORBIT_curptr = GIOP_RECV_BUFFER(_ORBIT_recv_buffer)->cur;
      if (giop_msg_conversion_needed(GIOP_MESSAGE_BUFFER(_ORBIT_recv_buffer))) {
	 GIOP_RECV_BUFFER(_ORBIT_recv_buffer)->cur = _ORBIT_curptr;
	 _ORBIT_retval = ORBit_demarshal_object(_ORBIT_recv_buffer, GIOP_MESSAGE_BUFFER(_ORBIT_recv_buffer)->connection->orb_data);
	 _ORBIT_curptr = GIOP_RECV_BUFFER(_ORBIT_recv_buffer)->cur;
      } else {
	 GIOP_RECV_BUFFER(_ORBIT_recv_buffer)->cur = _ORBIT_curptr;
	 _ORBIT_retval = ORBit_demarshal_object(_ORBIT_recv_buffer, GIOP_MESSAGE_BUFFER(_ORBIT_recv_buffer)->connection->orb_data);
	 _ORBIT_curptr = GIOP_RECV_BUFFER(_ORBIT_recv_buffer)->cur;
      }
      giop_recv_buffer_unuse(_ORBIT_recv_buffer);
      return _ORBIT_retval;
_ORBIT_system_exception:
      CORBA_exception_set_system(ev, _ORBIT_system_exception_minor, _ORBIT_completion_status);
      giop_recv_buffer_unuse(_ORBIT_recv_buffer);
      giop_send_buffer_unuse(_ORBIT_send_buffer);
      return _ORBIT_retval;
_ORBIT_msg_exception:
      if (_ORBIT_recv_buffer->message.u.reply.reply_status == GIOP_LOCATION_FORWARD) {
	 if (_obj->forward_locations != NULL)
	    ORBit_delete_profiles(_obj->forward_locations);
	 _obj->forward_locations = ORBit_demarshal_IOR(_ORBIT_recv_buffer);
	 _cnx = ORBit_object_get_forwarded_connection(_obj);
	 giop_recv_buffer_unuse(_ORBIT_recv_buffer);

	 goto _ORBIT_retry_request;
      } else {
	 ORBit_handle_exception(_ORBIT_recv_buffer, ev, NULL, _obj->orb);
	 giop_recv_buffer_unuse(_ORBIT_recv_buffer);
	 return _ORBIT_retval;
      }
   }
}
