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

#include <string.h>
#include "test-tc.h"

void 
_ORBIT_skel_TestTC__get_type(POA_TestTC * _ORBIT_servant, GIOPRecvBuffer * _ORBIT_recv_buffer, CORBA_Environment * ev, CORBA_TypeCode(*_impl__get_type) (PortableServer_Servant _servant, CORBA_Environment * ev))
{
   CORBA_TypeCode _ORBIT_retval;
   _ORBIT_retval = _impl__get_type(_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_encode_CORBA_TypeCode(_ORBIT_retval, _ORBIT_send_buffer);
	 } 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_TestTC(POA_TestTC * 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_type"))
	       break;
	    *impl = (gpointer) servant->vepv->TestTC_epv->_get_type;
	    return (ORBitSkeleton) _ORBIT_skel_TestTC__get_type;
	    break;
	 default:
	    break;
   }
   return NULL;
}

static void 
init_local_objref_TestTC(CORBA_Object obj, POA_TestTC * servant)
{
   obj->vepv[TestTC__classid] = servant->vepv->TestTC_epv;
}
void 
POA_TestTC__init(PortableServer_Servant servant,
		 CORBA_Environment * env)
{
   static const PortableServer_ClassInfo class_info = {(ORBit_impl_finder) & get_skel_TestTC, "IDL:TestTC:1.0", (ORBit_local_objref_init) & init_local_objref_TestTC};
   PortableServer_ServantBase__init(((PortableServer_ServantBase *) servant), env);
   ORBIT_OBJECT_KEY(((PortableServer_ServantBase *) servant)->_private)->class_info = (PortableServer_ClassInfo *) & class_info;
   if (!TestTC__classid)
      TestTC__classid = ORBit_register_class(&class_info);
}

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