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

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

void
_ORBIT_CosEventComm_Disconnected_marshal(GIOPSendBuffer * _ORBIT_send_buffer, CORBA_Environment * ev)
{
}
void 
_ORBIT_skel_CosEventComm_PushConsumer_push(POA_CosEventComm_PushConsumer * _ORBIT_servant, GIOPRecvBuffer * _ORBIT_recv_buffer, CORBA_Environment * ev, void (*_impl_push) (PortableServer_Servant _servant, const CORBA_any * data, CORBA_Environment * ev))
{
   CORBA_any data = {NULL, NULL, CORBA_FALSE};
   {				/* demarshalling */
      guchar *_ORBIT_curptr;
      _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, &(data), CORBA_TRUE, (((ORBit_ObjectKey *) _ORBIT_servant->_private)->object->orb));
	 _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, &(data), CORBA_TRUE, (((ORBit_ObjectKey *) _ORBIT_servant->_private)->object->orb));
	 _ORBIT_curptr = GIOP_RECV_BUFFER(_ORBIT_recv_buffer)->cur;
      }
   }
   _impl_push(_ORBIT_servant, &(data), ev);
   {				/* marshalling */
      register GIOPSendBuffer *_ORBIT_send_buffer;
      _ORBIT_send_buffer = giop_send_reply_buffer_use(GIOP_MESSAGE_BUFFER(_ORBIT_recv_buffer)->connection, NULL, _ORBIT_recv_buffer->message.u.request.request_id, ev->_major);
      if (_ORBIT_send_buffer) {
	 if (ev->_major == CORBA_NO_EXCEPTION) {
	 } else if (ev->_major == CORBA_USER_EXCEPTION) {
	    static const ORBit_exception_marshal_info _ORBIT_user_exceptions[] = {{(const CORBA_TypeCode) & TC_CosEventComm_Disconnected_struct, (gpointer) _ORBIT_CosEventComm_Disconnected_marshal}, {CORBA_OBJECT_NIL, NULL}};
	    ORBit_send_user_exception(_ORBIT_send_buffer, ev, _ORBIT_user_exceptions);
	 } else
	    ORBit_send_system_exception(_ORBIT_send_buffer, ev);
	 giop_send_buffer_write(_ORBIT_send_buffer);
	 giop_send_buffer_unuse(_ORBIT_send_buffer);
      }
      CORBA_any__free(&data, NULL, CORBA_FALSE);
   }
}
void 
_ORBIT_skel_CosEventComm_PushConsumer_disconnect_push_consumer(POA_CosEventComm_PushConsumer * _ORBIT_servant, GIOPRecvBuffer * _ORBIT_recv_buffer, CORBA_Environment * ev, void (*_impl_disconnect_push_consumer) (PortableServer_Servant _servant, CORBA_Environment * ev))
{
   _impl_disconnect_push_consumer(_ORBIT_servant, ev);
   {				/* marshalling */
      register GIOPSendBuffer *_ORBIT_send_buffer;
      _ORBIT_send_buffer = giop_send_reply_buffer_use(GIOP_MESSAGE_BUFFER(_ORBIT_recv_buffer)->connection, NULL, _ORBIT_recv_buffer->message.u.request.request_id, ev->_major);
      if (_ORBIT_send_buffer) {
	 if (ev->_major == CORBA_NO_EXCEPTION) {
	 } else
	    ORBit_send_system_exception(_ORBIT_send_buffer, ev);
	 giop_send_buffer_write(_ORBIT_send_buffer);
	 giop_send_buffer_unuse(_ORBIT_send_buffer);
      }
   }
}
void 
_ORBIT_skel_CosEventComm_PushSupplier_disconnect_push_supplier(POA_CosEventComm_PushSupplier * _ORBIT_servant, GIOPRecvBuffer * _ORBIT_recv_buffer, CORBA_Environment * ev, void (*_impl_disconnect_push_supplier) (PortableServer_Servant _servant, CORBA_Environment * ev))
{
   _impl_disconnect_push_supplier(_ORBIT_servant, ev);
   {				/* marshalling */
      register GIOPSendBuffer *_ORBIT_send_buffer;
      _ORBIT_send_buffer = giop_send_reply_buffer_use(GIOP_MESSAGE_BUFFER(_ORBIT_recv_buffer)->connection, NULL, _ORBIT_recv_buffer->message.u.request.request_id, ev->_major);
      if (_ORBIT_send_buffer) {
	 if (ev->_major == CORBA_NO_EXCEPTION) {
	 } else
	    ORBit_send_system_exception(_ORBIT_send_buffer, ev);
	 giop_send_buffer_write(_ORBIT_send_buffer);
	 giop_send_buffer_unuse(_ORBIT_send_buffer);
      }
   }
}
void 
_ORBIT_skel_CosEventComm_PullSupplier_pull(POA_CosEventComm_PullSupplier * _ORBIT_servant, GIOPRecvBuffer * _ORBIT_recv_buffer, CORBA_Environment * ev, CORBA_any * (*_impl_pull) (PortableServer_Servant _servant, CORBA_Environment * ev))
{
   CORBA_any *_ORBIT_retval;
   _ORBIT_retval = _impl_pull(_ORBIT_servant, ev);
   {				/* marshalling */
      register GIOPSendBuffer *_ORBIT_send_buffer;
      _ORBIT_send_buffer = giop_send_reply_buffer_use(GIOP_MESSAGE_BUFFER(_ORBIT_recv_buffer)->connection, NULL, _ORBIT_recv_buffer->message.u.request.request_id, ev->_major);
      if (_ORBIT_send_buffer) {
	 if (ev->_major == CORBA_NO_EXCEPTION) {
	    ORBit_marshal_any(_ORBIT_send_buffer, &((*_ORBIT_retval)));
	 } else if (ev->_major == CORBA_USER_EXCEPTION) {
	    static const ORBit_exception_marshal_info _ORBIT_user_exceptions[] = {{(const CORBA_TypeCode) & TC_CosEventComm_Disconnected_struct, (gpointer) _ORBIT_CosEventComm_Disconnected_marshal}, {CORBA_OBJECT_NIL, NULL}};
	    ORBit_send_user_exception(_ORBIT_send_buffer, ev, _ORBIT_user_exceptions);
	 } else
	    ORBit_send_system_exception(_ORBIT_send_buffer, ev);
	 giop_send_buffer_write(_ORBIT_send_buffer);
	 giop_send_buffer_unuse(_ORBIT_send_buffer);
      }
      if (ev->_major == CORBA_NO_EXCEPTION)
	 CORBA_free(_ORBIT_retval);
   }
}
void 
_ORBIT_skel_CosEventComm_PullSupplier_try_pull(POA_CosEventComm_PullSupplier * _ORBIT_servant, GIOPRecvBuffer * _ORBIT_recv_buffer, CORBA_Environment * ev, CORBA_any * (*_impl_try_pull) (PortableServer_Servant _servant, CORBA_boolean * has_event, CORBA_Environment * ev))
{
   CORBA_any *_ORBIT_retval;
   CORBA_boolean has_event;
   {				/* demarshalling */
      guchar *_ORBIT_curptr;
      _ORBIT_curptr = GIOP_RECV_BUFFER(_ORBIT_recv_buffer)->cur;
      if (giop_msg_conversion_needed(GIOP_MESSAGE_BUFFER(_ORBIT_recv_buffer))) {
      } else {
      }
   }
   _ORBIT_retval = _impl_try_pull(_ORBIT_servant, &(has_event), ev);
   {				/* marshalling */
      register GIOPSendBuffer *_ORBIT_send_buffer;
      _ORBIT_send_buffer = giop_send_reply_buffer_use(GIOP_MESSAGE_BUFFER(_ORBIT_recv_buffer)->connection, NULL, _ORBIT_recv_buffer->message.u.request.request_id, ev->_major);
      if (_ORBIT_send_buffer) {
	 if (ev->_major == CORBA_NO_EXCEPTION) {
	    ORBit_marshal_any(_ORBIT_send_buffer, &((*_ORBIT_retval)));
	    giop_message_buffer_append_mem(GIOP_MESSAGE_BUFFER(_ORBIT_send_buffer), &(has_event), sizeof(has_event));
	 } else if (ev->_major == CORBA_USER_EXCEPTION) {
	    static const ORBit_exception_marshal_info _ORBIT_user_exceptions[] = {{(const CORBA_TypeCode) & TC_CosEventComm_Disconnected_struct, (gpointer) _ORBIT_CosEventComm_Disconnected_marshal}, {CORBA_OBJECT_NIL, NULL}};
	    ORBit_send_user_exception(_ORBIT_send_buffer, ev, _ORBIT_user_exceptions);
	 } else
	    ORBit_send_system_exception(_ORBIT_send_buffer, ev);
	 giop_send_buffer_write(_ORBIT_send_buffer);
	 giop_send_buffer_unuse(_ORBIT_send_buffer);
      }
      if (ev->_major == CORBA_NO_EXCEPTION)
	 CORBA_free(_ORBIT_retval);
   }
}
void 
_ORBIT_skel_CosEventComm_PullSupplier_disconnect_pull_supplier(POA_CosEventComm_PullSupplier * _ORBIT_servant, GIOPRecvBuffer * _ORBIT_recv_buffer, CORBA_Environment * ev, void (*_impl_disconnect_pull_supplier) (PortableServer_Servant _servant, CORBA_Environment * ev))
{
   _impl_disconnect_pull_supplier(_ORBIT_servant, ev);
   {				/* marshalling */
      register GIOPSendBuffer *_ORBIT_send_buffer;
      _ORBIT_send_buffer = giop_send_reply_buffer_use(GIOP_MESSAGE_BUFFER(_ORBIT_recv_buffer)->connection, NULL, _ORBIT_recv_buffer->message.u.request.request_id, ev->_major);
      if (_ORBIT_send_buffer) {
	 if (ev->_major == CORBA_NO_EXCEPTION) {
	 } else
	    ORBit_send_system_exception(_ORBIT_send_buffer, ev);
	 giop_send_buffer_write(_ORBIT_send_buffer);
	 giop_send_buffer_unuse(_ORBIT_send_buffer);
      }
   }
}
void 
_ORBIT_skel_CosEventComm_PullConsumer_disconnect_pull_consumer(POA_CosEventComm_PullConsumer * _ORBIT_servant, GIOPRecvBuffer * _ORBIT_recv_buffer, CORBA_Environment * ev, void (*_impl_disconnect_pull_consumer) (PortableServer_Servant _servant, CORBA_Environment * ev))
{
   _impl_disconnect_pull_consumer(_ORBIT_servant, ev);
   {				/* marshalling */
      register GIOPSendBuffer *_ORBIT_send_buffer;
      _ORBIT_send_buffer = giop_send_reply_buffer_use(GIOP_MESSAGE_BUFFER(_ORBIT_recv_buffer)->connection, NULL, _ORBIT_recv_buffer->message.u.request.request_id, ev->_major);
      if (_ORBIT_send_buffer) {
	 if (ev->_major == CORBA_NO_EXCEPTION) {
	 } else
	    ORBit_send_system_exception(_ORBIT_send_buffer, ev);
	 giop_send_buffer_write(_ORBIT_send_buffer);
	 giop_send_buffer_unuse(_ORBIT_send_buffer);
      }
   }
}
static ORBitSkeleton 
get_skel_CosEventComm_PushConsumer(POA_CosEventComm_PushConsumer * servant,
				   GIOPRecvBuffer * _ORBIT_recv_buffer,
				   gpointer * impl)
{
   gchar *opname = _ORBIT_recv_buffer->message.u.request.operation;
   switch (opname[0]) {
	 case 'd':
	    if (strcmp((opname + 1), "isconnect_push_consumer"))
	       break;
	    *impl = (gpointer) servant->vepv->CosEventComm_PushConsumer_epv->disconnect_push_consumer;
	    return (ORBitSkeleton) _ORBIT_skel_CosEventComm_PushConsumer_disconnect_push_consumer;
	    break;
	 case 'p':
	    if (strcmp((opname + 1), "ush"))
	       break;
	    *impl = (gpointer) servant->vepv->CosEventComm_PushConsumer_epv->push;
	    return (ORBitSkeleton) _ORBIT_skel_CosEventComm_PushConsumer_push;
	    break;
	 default:
	    break;
   }
   return NULL;
}

static void 
init_local_objref_CosEventComm_PushConsumer(CORBA_Object obj, POA_CosEventComm_PushConsumer * servant)
{
   obj->vepv[CosEventComm_PushConsumer__classid] = servant->vepv->CosEventComm_PushConsumer_epv;
}
void 
POA_CosEventComm_PushConsumer__init(PortableServer_Servant servant,
				    CORBA_Environment * env)
{
   static const PortableServer_ClassInfo class_info = {(ORBit_impl_finder) & get_skel_CosEventComm_PushConsumer, "IDL:omg.org/CosEventComm/PushConsumer:1.0", (ORBit_local_objref_init) & init_local_objref_CosEventComm_PushConsumer};
   PortableServer_ServantBase__init(((PortableServer_ServantBase *) servant), env);
   ORBIT_OBJECT_KEY(((PortableServer_ServantBase *) servant)->_private)->class_info = (PortableServer_ClassInfo *) & class_info;
   if (!CosEventComm_PushConsumer__classid)
      CosEventComm_PushConsumer__classid = ORBit_register_class(&class_info);
}

void 
POA_CosEventComm_PushConsumer__fini(PortableServer_Servant servant,
				    CORBA_Environment * env)
{
   PortableServer_ServantBase__fini(servant, env);
}

static ORBitSkeleton 
get_skel_CosEventComm_PushSupplier(POA_CosEventComm_PushSupplier * servant,
				   GIOPRecvBuffer * _ORBIT_recv_buffer,
				   gpointer * impl)
{
   gchar *opname = _ORBIT_recv_buffer->message.u.request.operation;
   switch (opname[0]) {
	 case 'd':
	    if (strcmp((opname + 1), "isconnect_push_supplier"))
	       break;
	    *impl = (gpointer) servant->vepv->CosEventComm_PushSupplier_epv->disconnect_push_supplier;
	    return (ORBitSkeleton) _ORBIT_skel_CosEventComm_PushSupplier_disconnect_push_supplier;
	    break;
	 default:
	    break;
   }
   return NULL;
}

static void 
init_local_objref_CosEventComm_PushSupplier(CORBA_Object obj, POA_CosEventComm_PushSupplier * servant)
{
   obj->vepv[CosEventComm_PushSupplier__classid] = servant->vepv->CosEventComm_PushSupplier_epv;
}
void 
POA_CosEventComm_PushSupplier__init(PortableServer_Servant servant,
				    CORBA_Environment * env)
{
   static const PortableServer_ClassInfo class_info = {(ORBit_impl_finder) & get_skel_CosEventComm_PushSupplier, "IDL:omg.org/CosEventComm/PushSupplier:1.0", (ORBit_local_objref_init) & init_local_objref_CosEventComm_PushSupplier};
   PortableServer_ServantBase__init(((PortableServer_ServantBase *) servant), env);
   ORBIT_OBJECT_KEY(((PortableServer_ServantBase *) servant)->_private)->class_info = (PortableServer_ClassInfo *) & class_info;
   if (!CosEventComm_PushSupplier__classid)
      CosEventComm_PushSupplier__classid = ORBit_register_class(&class_info);
}

void 
POA_CosEventComm_PushSupplier__fini(PortableServer_Servant servant,
				    CORBA_Environment * env)
{
   PortableServer_ServantBase__fini(servant, env);
}

static ORBitSkeleton 
get_skel_CosEventComm_PullSupplier(POA_CosEventComm_PullSupplier * servant,
				   GIOPRecvBuffer * _ORBIT_recv_buffer,
				   gpointer * impl)
{
   gchar *opname = _ORBIT_recv_buffer->message.u.request.operation;
   switch (opname[0]) {
	 case 'd':
	    if (strcmp((opname + 1), "isconnect_pull_supplier"))
	       break;
	    *impl = (gpointer) servant->vepv->CosEventComm_PullSupplier_epv->disconnect_pull_supplier;
	    return (ORBitSkeleton) _ORBIT_skel_CosEventComm_PullSupplier_disconnect_pull_supplier;
	    break;
	 case 'p':
	    if (strcmp((opname + 1), "ull"))
	       break;
	    *impl = (gpointer) servant->vepv->CosEventComm_PullSupplier_epv->pull;
	    return (ORBitSkeleton) _ORBIT_skel_CosEventComm_PullSupplier_pull;
	    break;
	 case 't':
	    if (strcmp((opname + 1), "ry_pull"))
	       break;
	    *impl = (gpointer) servant->vepv->CosEventComm_PullSupplier_epv->try_pull;
	    return (ORBitSkeleton) _ORBIT_skel_CosEventComm_PullSupplier_try_pull;
	    break;
	 default:
	    break;
   }
   return NULL;
}

static void 
init_local_objref_CosEventComm_PullSupplier(CORBA_Object obj, POA_CosEventComm_PullSupplier * servant)
{
   obj->vepv[CosEventComm_PullSupplier__classid] = servant->vepv->CosEventComm_PullSupplier_epv;
}
void 
POA_CosEventComm_PullSupplier__init(PortableServer_Servant servant,
				    CORBA_Environment * env)
{
   static const PortableServer_ClassInfo class_info = {(ORBit_impl_finder) & get_skel_CosEventComm_PullSupplier, "IDL:omg.org/CosEventComm/PullSupplier:1.0", (ORBit_local_objref_init) & init_local_objref_CosEventComm_PullSupplier};
   PortableServer_ServantBase__init(((PortableServer_ServantBase *) servant), env);
   ORBIT_OBJECT_KEY(((PortableServer_ServantBase *) servant)->_private)->class_info = (PortableServer_ClassInfo *) & class_info;
   if (!CosEventComm_PullSupplier__classid)
      CosEventComm_PullSupplier__classid = ORBit_register_class(&class_info);
}

void 
POA_CosEventComm_PullSupplier__fini(PortableServer_Servant servant,
				    CORBA_Environment * env)
{
   PortableServer_ServantBase__fini(servant, env);
}

static ORBitSkeleton 
get_skel_CosEventComm_PullConsumer(POA_CosEventComm_PullConsumer * servant,
				   GIOPRecvBuffer * _ORBIT_recv_buffer,
				   gpointer * impl)
{
   gchar *opname = _ORBIT_recv_buffer->message.u.request.operation;
   switch (opname[0]) {
	 case 'd':
	    if (strcmp((opname + 1), "isconnect_pull_consumer"))
	       break;
	    *impl = (gpointer) servant->vepv->CosEventComm_PullConsumer_epv->disconnect_pull_consumer;
	    return (ORBitSkeleton) _ORBIT_skel_CosEventComm_PullConsumer_disconnect_pull_consumer;
	    break;
	 default:
	    break;
   }
   return NULL;
}

static void 
init_local_objref_CosEventComm_PullConsumer(CORBA_Object obj, POA_CosEventComm_PullConsumer * servant)
{
   obj->vepv[CosEventComm_PullConsumer__classid] = servant->vepv->CosEventComm_PullConsumer_epv;
}
void 
POA_CosEventComm_PullConsumer__init(PortableServer_Servant servant,
				    CORBA_Environment * env)
{
   static const PortableServer_ClassInfo class_info = {(ORBit_impl_finder) & get_skel_CosEventComm_PullConsumer, "IDL:omg.org/CosEventComm/PullConsumer:1.0", (ORBit_local_objref_init) & init_local_objref_CosEventComm_PullConsumer};
   PortableServer_ServantBase__init(((PortableServer_ServantBase *) servant), env);
   ORBIT_OBJECT_KEY(((PortableServer_ServantBase *) servant)->_private)->class_info = (PortableServer_ClassInfo *) & class_info;
   if (!CosEventComm_PullConsumer__classid)
      CosEventComm_PullConsumer__classid = ORBit_register_class(&class_info);
}

void 
POA_CosEventComm_PullConsumer__fini(PortableServer_Servant servant,
				    CORBA_Environment * env)
{
   PortableServer_ServantBase__fini(servant, env);
}
