/* * This file was generated by orbit-idl - DO NOT EDIT! */ #include #include "hello.h" void _ORBIT_skel_hello__get_count(POA_hello * _ORBIT_servant, GIOPRecvBuffer * _ORBIT_recv_buffer, CORBA_Environment * ev, CORBA_long(*_impl__get_count) (PortableServer_Servant _servant, CORBA_Environment * ev)) { CORBA_long _ORBIT_retval; _ORBIT_retval = _impl__get_count(_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 (ev->_major == CORBA_NO_EXCEPTION) { giop_message_buffer_do_alignment(GIOP_MESSAGE_BUFFER (_ORBIT_send_buffer), 4); { guchar *_ORBIT_t; _ORBIT_t = alloca(sizeof(_ORBIT_retval)); memcpy(_ORBIT_t, &(_ORBIT_retval), sizeof(_ORBIT_retval)); giop_message_buffer_append_mem(GIOP_MESSAGE_BUFFER (_ORBIT_send_buffer), (_ORBIT_t), sizeof(_ORBIT_retval)); } } 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_hello_hi(POA_hello * _ORBIT_servant, GIOPRecvBuffer * _ORBIT_recv_buffer, CORBA_Environment * ev, CORBA_char * (*_impl_hi) (PortableServer_Servant _servant, const CORBA_char * request, CORBA_Environment * ev)) { CORBA_char *_ORBIT_retval; CORBA_char *request; { /* demarshalling */ guchar *_ORBIT_curptr; register CORBA_unsigned_long _ORBIT_tmpvar_6; CORBA_unsigned_long _ORBIT_tmpvar_7; _ORBIT_curptr = GIOP_RECV_BUFFER(_ORBIT_recv_buffer)->cur; if (giop_msg_conversion_needed(GIOP_MESSAGE_BUFFER(_ORBIT_recv_buffer))) { _ORBIT_curptr = ALIGN_ADDRESS(_ORBIT_curptr, 4); (*((guint32 *) & (_ORBIT_tmpvar_7))) = GUINT32_SWAP_LE_BE(*((guint32 *) _ORBIT_curptr)); _ORBIT_curptr += 4; request = (void *) _ORBIT_curptr; _ORBIT_curptr += sizeof(request[_ORBIT_tmpvar_6]) * _ORBIT_tmpvar_7; } else { _ORBIT_curptr = ALIGN_ADDRESS(_ORBIT_curptr, 4); _ORBIT_tmpvar_7 = *((CORBA_unsigned_long *) _ORBIT_curptr); _ORBIT_curptr += 4; request = (void *) _ORBIT_curptr; _ORBIT_curptr += sizeof(request[_ORBIT_tmpvar_6]) * _ORBIT_tmpvar_7; } } _ORBIT_retval = _impl_hi(_ORBIT_servant, request, 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 (ev->_major == CORBA_NO_EXCEPTION) { register CORBA_unsigned_long _ORBIT_tmpvar_2; CORBA_unsigned_long _ORBIT_tmpvar_3; _ORBIT_tmpvar_3 = strlen(_ORBIT_retval) + 1; giop_message_buffer_do_alignment(GIOP_MESSAGE_BUFFER (_ORBIT_send_buffer), 4); { guchar *_ORBIT_t; _ORBIT_t = alloca(sizeof(_ORBIT_tmpvar_3)); memcpy(_ORBIT_t, &(_ORBIT_tmpvar_3), sizeof(_ORBIT_tmpvar_3)); giop_message_buffer_append_mem(GIOP_MESSAGE_BUFFER (_ORBIT_send_buffer), (_ORBIT_t), sizeof(_ORBIT_tmpvar_3)); } giop_message_buffer_append_mem(GIOP_MESSAGE_BUFFER (_ORBIT_send_buffer), (_ORBIT_retval), sizeof(_ORBIT_retval[_ORBIT_tmpvar_2]) * _ORBIT_tmpvar_3); } 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); } } static ORBitSkeleton get_skel_hello(POA_hello * servant, GIOPRecvBuffer * _ORBIT_recv_buffer, gpointer * impl) { gchar *opname = _ORBIT_recv_buffer->message.u.request.operation; switch (opname[0]) { case '_': if (strcmp((opname + 1), "get_count")) break; *impl = (gpointer) servant->vepv->hello_epv->_get_count; return (ORBitSkeleton) _ORBIT_skel_hello__get_count; break; case 'h': if (strcmp((opname + 1), "i")) break; *impl = (gpointer) servant->vepv->hello_epv->hi; return (ORBitSkeleton) _ORBIT_skel_hello_hi; break; default: break; } return NULL; } static void init_local_objref_hello(CORBA_Object obj, POA_hello * servant) { obj->vepv[hello__classid] = servant->vepv->hello_epv; } void POA_hello__init(PortableServer_Servant servant, CORBA_Environment * env) { static const PortableServer_ClassInfo class_info = { (ORBit_impl_finder) & get_skel_hello, "IDL:hello:1.0", (ORBit_local_objref_init) & init_local_objref_hello }; PortableServer_ServantBase__init(((PortableServer_ServantBase *) servant), env); ORBIT_OBJECT_KEY(((PortableServer_ServantBase *) servant)->_private)-> class_info = (PortableServer_ClassInfo *) & class_info; if (!hello__classid) hello__classid = ORBit_register_class(&class_info); } void POA_hello__fini(PortableServer_Servant servant, CORBA_Environment * env) { PortableServer_ServantBase__fini(servant, env); }