text: // This file is generated by omniidl (C++ backend)- omniORB_4_1. Do not edit.
  
  #include "RemoteFileServer.hh"
  #include <omniORB4/IOP_S.h>
  #include <omniORB4/IOP_C.h>
  #include <omniORB4/callDescriptor.h>
  #include <omniORB4/callHandle.h>
  #include <omniORB4/objTracker.h>
  
  
  OMNI_USING_NAMESPACE(omni)
  
  static const char* _0RL_library_version = omniORB_4_1;
  
  
  
  examples::iiop::RemoteFileServer_ptr examples::iiop::RemoteFileServer_Helper::_nil() {
    return ::examples::iiop::RemoteFileServer::_nil();
  }
  
  CORBA::Boolean examples::iiop::RemoteFileServer_Helper::is_nil(::examples::iiop::RemoteFileServer_ptr p) {
    return CORBA::is_nil(p);
  
  }
  
  void examples::iiop::RemoteFileServer_Helper::release(::examples::iiop::RemoteFileServer_ptr p) {
    CORBA::release(p);
  }
  
  void examples::iiop::RemoteFileServer_Helper::marshalObjRef(::examples::iiop::RemoteFileServer_ptr obj, cdrStream& s) {
    ::examples::iiop::RemoteFileServer::_marshalObjRef(obj, s);
  }
  
  examples::iiop::RemoteFileServer_ptr examples::iiop::RemoteFileServer_Helper::unmarshalObjRef(cdrStream& s) {
    return ::examples::iiop::RemoteFileServer::_unmarshalObjRef(s);
  }
  
  void examples::iiop::RemoteFileServer_Helper::duplicate(::examples::iiop::RemoteFileServer_ptr obj) {
    if( obj && !obj->_NP_is_nil() )  omni::duplicateObjRef(obj);
  }
  
  examples::iiop::RemoteFileServer_ptr
  examples::iiop::RemoteFileServer::_duplicate(::examples::iiop::RemoteFileServer_ptr obj)
  {
    if( obj && !obj->_NP_is_nil() )  omni::duplicateObjRef(obj);
    return obj;
  }
  
  examples::iiop::RemoteFileServer_ptr
  examples::iiop::RemoteFileServer::_narrow(CORBA::Object_ptr obj)
  {
    if( !obj || obj->_NP_is_nil() || obj->_NP_is_pseudo() ) return _nil();
    _ptr_type e = (_ptr_type) obj->_PR_getobj()->_realNarrow(_PD_repoId);
    return e ? e : _nil();
  }
  
  
  examples::iiop::RemoteFileServer_ptr
  examples::iiop::RemoteFileServer::_unchecked_narrow(CORBA::Object_ptr obj)
  {
    if( !obj || obj->_NP_is_nil() || obj->_NP_is_pseudo() ) return _nil();
    _ptr_type e = (_ptr_type) obj->_PR_getobj()->_uncheckedNarrow(_PD_repoId);
    return e ? e : _nil();
  }
  
  examples::iiop::RemoteFileServer_ptr
  examples::iiop::RemoteFileServer::_nil()
  {
  #ifdef OMNI_UNLOADABLE_STUBS
    static _objref_RemoteFileServer _the_nil_obj;
    return &_the_nil_obj;
  #else
    static _objref_RemoteFileServer* _the_nil_ptr = 0;
    if( !_the_nil_ptr ) {
      omni::nilRefLock().lock();
      if( !_the_nil_ptr ) {
        _the_nil_ptr = new _objref_RemoteFileServer;
        registerNilCorbaObject(_the_nil_ptr);
      }
      omni::nilRefLock().unlock();
    }
    return _the_nil_ptr;
  #endif
  }
  
  const char* examples::iiop::RemoteFileServer::_PD_repoId = "RMI:examples.iiop.RemoteFileServer:0000000000000000";
  
  
  examples::iiop::_objref_RemoteFileServer::~_objref_RemoteFileServer() {
    
  }
  
  
  examples::iiop::_objref_RemoteFileServer::_objref_RemoteFileServer(omniIOR* ior, omniIdentity* id) :
     omniObjRef(::examples::iiop::RemoteFileServer::_PD_repoId, ior, id, 1)
     
     
  {
    _PR_setobj(this);
  }
  
  void*
  examples::iiop::_objref_RemoteFileServer::_ptrToObjRef(const char* id)
  {
    if( id == ::examples::iiop::RemoteFileServer::_PD_repoId )
      return (::examples::iiop::RemoteFileServer_ptr) this;
    
    if( id == ::CORBA::Object::_PD_repoId )
      return (::CORBA::Object_ptr) this;
  
    if( omni::strMatch(id, ::examples::iiop::RemoteFileServer::_PD_repoId) )
      return (::examples::iiop::RemoteFileServer_ptr) this;
    
    if( omni::strMatch(id, ::CORBA::Object::_PD_repoId) )
      return (::CORBA::Object_ptr) this;
  
    return 0;
  }
  
  // Proxy call descriptor class. Mangled signature:
  //  void_i_ccom_mhealthmarketscience_mrmiio_mRemoteInputStream_e_cjava_mio_mIOEx
  class _0RL_cd_5EAB75CAD9A547B4_00000000
    : public omniCallDescriptor
  {
  public:
    inline _0RL_cd_5EAB75CAD9A547B4_00000000(LocalCallFn lcfn,const char* op_,size_t oplen,_CORBA_Boolean upcall=0):
       omniCallDescriptor(lcfn, op_, oplen, 0, _user_exns, 1, upcall)
    {
      
    }
    
    void marshalArguments(cdrStream&);
    void unmarshalArguments(cdrStream&);
  
      
    void userException(cdrStream&,_OMNI_NS(IOP_C)*,const char*);
    static const char* const _user_exns[];
  
    com::healthmarketscience::rmiio::RemoteInputStream_var arg_0_;
    com::healthmarketscience::rmiio::RemoteInputStream_ptr arg_0;
  };
  
  void _0RL_cd_5EAB75CAD9A547B4_00000000::marshalArguments(cdrStream& _n)
  {
    com::healthmarketscience::rmiio::RemoteInputStream_Helper::marshalObjRef(arg_0,_n);
  
  }
  
  void _0RL_cd_5EAB75CAD9A547B4_00000000::unmarshalArguments(cdrStream& _n)
  {
    arg_0_ = com::healthmarketscience::rmiio::RemoteInputStream_Helper::unmarshalObjRef(_n);
    arg_0 = arg_0_.in();
  
  }
  
  const char* const _0RL_cd_5EAB75CAD9A547B4_00000000::_user_exns[] = {
    java::io::IOEx::_PD_repoId
  };
  
  void _0RL_cd_5EAB75CAD9A547B4_00000000::userException(cdrStream& s, _OMNI_NS(IOP_C)* iop_client, const char* repoId)
  {
    if ( omni::strMatch(repoId, java::io::IOEx::_PD_repoId) ) {
      java::io::IOEx _ex;
      _ex <<= s;
      if (iop_client) iop_client->RequestCompleted();
      throw _ex;
    }
  
  
    else {
      if (iop_client) iop_client->RequestCompleted(1);
      OMNIORB_THROW(UNKNOWN,UNKNOWN_UserException,
                    (CORBA::CompletionStatus)s.completion());
    }
  }
  
  // Local call call-back function.
  static void
  _0RL_lcfn_5EAB75CAD9A547B4_10000000(omniCallDescriptor* cd, omniServant* svnt)
  {
    _0RL_cd_5EAB75CAD9A547B4_00000000* tcd = (_0RL_cd_5EAB75CAD9A547B4_00000000*)cd;
    examples::iiop::_impl_RemoteFileServer* impl = (examples::iiop::_impl_RemoteFileServer*) svnt->_ptrToInterface(examples::iiop::RemoteFileServer::_PD_repoId);
  #ifdef HAS_Cplusplus_catch_exception_by_base
    impl->sendFile(tcd->arg_0);
  #else
    if (!cd->is_upcall())
      impl->sendFile(tcd->arg_0);
    else {
      try {
        impl->sendFile(tcd->arg_0);
      }
      catch(java::io::IOEx& ex) {
        throw omniORB::StubUserException(ex._NP_duplicate());
      }
  
  
    }
  #endif
  
  
  }
  
  void examples::iiop::_objref_RemoteFileServer::sendFile(com::healthmarketscience::rmiio::RemoteInputStream_ptr arg0)
  {
    _0RL_cd_5EAB75CAD9A547B4_00000000 _call_desc(_0RL_lcfn_5EAB75CAD9A547B4_10000000, "sendFile", 9);
    _call_desc.arg_0 = arg0;
  
    _invoke(_call_desc);
  
  
  
  }
  examples::iiop::_pof_RemoteFileServer::~_pof_RemoteFileServer() {}
  
  
  omniObjRef*
  examples::iiop::_pof_RemoteFileServer::newObjRef(omniIOR* ior, omniIdentity* id)
  {
    return new ::examples::iiop::_objref_RemoteFileServer(ior, id);
  }
  
  
  CORBA::Boolean
  examples::iiop::_pof_RemoteFileServer::is_a(const char* id) const
  {
    if( omni::ptrStrMatch(id, ::examples::iiop::RemoteFileServer::_PD_repoId) )
      return 1;
    
    return 0;
  }
  
  const examples::iiop::_pof_RemoteFileServer _the_pof_examples_miiop_mRemoteFileServer;
  
  examples::iiop::_impl_RemoteFileServer::~_impl_RemoteFileServer() {}
  
  
  CORBA::Boolean
  examples::iiop::_impl_RemoteFileServer::_dispatch(omniCallHandle& _handle)
  {
    const char* op = _handle.operation_name();
  
    if( omni::strMatch(op, "sendFile") ) {
  
      _0RL_cd_5EAB75CAD9A547B4_00000000 _call_desc(_0RL_lcfn_5EAB75CAD9A547B4_10000000, "sendFile", 9, 1);
      
      _handle.upcall(this,_call_desc);
      return 1;
    }
  
  
    return 0;
  }
  
  void*
  examples::iiop::_impl_RemoteFileServer::_ptrToInterface(const char* id)
  {
    if( id == ::examples::iiop::RemoteFileServer::_PD_repoId )
      return (::examples::iiop::_impl_RemoteFileServer*) this;
    
    if( id == ::CORBA::Object::_PD_repoId )
      return (void*) 1;
  
    if( omni::strMatch(id, ::examples::iiop::RemoteFileServer::_PD_repoId) )
      return (::examples::iiop::_impl_RemoteFileServer*) this;
    
    if( omni::strMatch(id, ::CORBA::Object::_PD_repoId) )
      return (void*) 1;
    return 0;
  }
  
  const char*
  examples::iiop::_impl_RemoteFileServer::_mostDerivedRepoId()
  {
    return ::examples::iiop::RemoteFileServer::_PD_repoId;
  }
  
  POA_examples::iiop::RemoteFileServer::~RemoteFileServer() {}
  
  