// This file is generated by omniidl (C++ backend)- omniORB_4_1. Do not edit.
#ifndef __SALOME__Session_hh__
#define __SALOME__Session_hh__

#ifndef __CORBA_H_EXTERNAL_GUARD__
#include <omniORB4/CORBA.h>
#endif

#ifndef  USE_stub_in_nt_dll
# define USE_stub_in_nt_dll_NOT_DEFINED_SALOME__Session
#endif
#ifndef  USE_core_stub_in_nt_dll
# define USE_core_stub_in_nt_dll_NOT_DEFINED_SALOME__Session
#endif
#ifndef  USE_dyn_stub_in_nt_dll
# define USE_dyn_stub_in_nt_dll_NOT_DEFINED_SALOME__Session
#endif



#ifndef __SALOME__Exception_hh_EXTERNAL_GUARD__
#define __SALOME__Exception_hh_EXTERNAL_GUARD__
#include <SALOME_Exception.hh>
#endif
#ifndef __SALOME__GenericObj_hh_EXTERNAL_GUARD__
#define __SALOME__GenericObj_hh_EXTERNAL_GUARD__
#include <SALOME_GenericObj.hh>
#endif
#ifndef __SALOMEDS_hh_EXTERNAL_GUARD__
#define __SALOMEDS_hh_EXTERNAL_GUARD__
#include <SALOMEDS.hh>
#endif
#ifndef __SALOME__PyNode_hh_EXTERNAL_GUARD__
#define __SALOME__PyNode_hh_EXTERNAL_GUARD__
#include <SALOME_PyNode.hh>
#endif
#ifndef __SALOME__Component_hh_EXTERNAL_GUARD__
#define __SALOME__Component_hh_EXTERNAL_GUARD__
#include <SALOME_Component.hh>
#endif



#ifdef USE_stub_in_nt_dll
# ifndef USE_core_stub_in_nt_dll
#  define USE_core_stub_in_nt_dll
# endif
# ifndef USE_dyn_stub_in_nt_dll
#  define USE_dyn_stub_in_nt_dll
# endif
#endif

#ifdef _core_attr
# error "A local CPP macro _core_attr has already been defined."
#else
# ifdef  USE_core_stub_in_nt_dll
#  define _core_attr _OMNIORB_NTDLL_IMPORT
# else
#  define _core_attr
# endif
#endif

#ifdef _dyn_attr
# error "A local CPP macro _dyn_attr has already been defined."
#else
# ifdef  USE_dyn_stub_in_nt_dll
#  define _dyn_attr _OMNIORB_NTDLL_IMPORT
# else
#  define _dyn_attr
# endif
#endif





_CORBA_MODULE SALOME

_CORBA_MODULE_BEG

  enum SessionState { asleep, running /*, __max_SessionState=0xffffffff */ };
  typedef SessionState& SessionState_out;

  _CORBA_MODULE_VAR _dyn_attr const ::CORBA::TypeCode_ptr _tc_SessionState;

  struct StatSession {
    typedef _CORBA_ConstrType_Fix_Var<StatSession> _var_type;

    
    SessionState state;

    ::CORBA::Short runningStudies;

    ::CORBA::Boolean activeGUI;

  

    void operator>>= (cdrStream &) const;
    void operator<<= (cdrStream &);
  };

  typedef StatSession::_var_type StatSession_var;

  typedef StatSession& StatSession_out;

  _CORBA_MODULE_VAR _dyn_attr const ::CORBA::TypeCode_ptr _tc_StatSession;

#ifndef __SALOME_mSession__
#define __SALOME_mSession__

  class Session;
  class _objref_Session;
  class _impl_Session;
  
  typedef _objref_Session* Session_ptr;
  typedef Session_ptr SessionRef;

  class Session_Helper {
  public:
    typedef Session_ptr _ptr_type;

    static _ptr_type _nil();
    static _CORBA_Boolean is_nil(_ptr_type);
    static void release(_ptr_type);
    static void duplicate(_ptr_type);
    static void marshalObjRef(_ptr_type, cdrStream&);
    static _ptr_type unmarshalObjRef(cdrStream&);
  };

  typedef _CORBA_ObjRef_Var<_objref_Session, Session_Helper> Session_var;
  typedef _CORBA_ObjRef_OUT_arg<_objref_Session,Session_Helper > Session_out;

#endif

  // interface Session
  class Session {
  public:
    // Declarations for this interface type.
    typedef Session_ptr _ptr_type;
    typedef Session_var _var_type;

    static _ptr_type _duplicate(_ptr_type);
    static _ptr_type _narrow(::CORBA::Object_ptr);
    static _ptr_type _unchecked_narrow(::CORBA::Object_ptr);
    
    static _ptr_type _nil();

    static inline void _marshalObjRef(_ptr_type, cdrStream&);

    static inline _ptr_type _unmarshalObjRef(cdrStream& s) {
      omniObjRef* o = omniObjRef::_unMarshal(_PD_repoId,s);
      if (o)
        return (_ptr_type) o->_ptrToObjRef(_PD_repoId);
      else
        return _nil();
    }

    static _core_attr const char* _PD_repoId;

    // Other IDL defined within this scope.
    class GUIActive : public ::CORBA::UserException {
    public:
      
      

      inline GUIActive() {
        pd_insertToAnyFn    = insertToAnyFn;
        pd_insertToAnyFnNCP = insertToAnyFnNCP;
      }
      GUIActive(const GUIActive&);
      
      GUIActive& operator=(const GUIActive&);
      virtual ~GUIActive();
      virtual void _raise() const;
      static GUIActive* _downcast(::CORBA::Exception*);
      static const GUIActive* _downcast(const ::CORBA::Exception*);
      static inline GUIActive* _narrow(::CORBA::Exception* _e) {
        return _downcast(_e);
      }
      
      inline void operator>>=(cdrStream&) const { }
      inline void operator<<=(cdrStream&) { }

      static _core_attr insertExceptionToAny    insertToAnyFn;
      static _core_attr insertExceptionToAnyNCP insertToAnyFnNCP;

      virtual ::CORBA::Exception* _NP_duplicate() const;

      static _core_attr const char* _PD_repoId;
      static _core_attr const char* _PD_typeId;

    private:
      virtual const char* _NP_typeId() const;
      virtual const char* _NP_repoId(int*) const;
      virtual void _NP_marshal(cdrStream&) const;
    };

    static _dyn_attr const ::CORBA::TypeCode_ptr _tc_GUIActive;

    class RunningStudies : public ::CORBA::UserException {
    public:
      
      

      inline RunningStudies() {
        pd_insertToAnyFn    = insertToAnyFn;
        pd_insertToAnyFnNCP = insertToAnyFnNCP;
      }
      RunningStudies(const RunningStudies&);
      
      RunningStudies& operator=(const RunningStudies&);
      virtual ~RunningStudies();
      virtual void _raise() const;
      static RunningStudies* _downcast(::CORBA::Exception*);
      static const RunningStudies* _downcast(const ::CORBA::Exception*);
      static inline RunningStudies* _narrow(::CORBA::Exception* _e) {
        return _downcast(_e);
      }
      
      inline void operator>>=(cdrStream&) const { }
      inline void operator<<=(cdrStream&) { }

      static _core_attr insertExceptionToAny    insertToAnyFn;
      static _core_attr insertExceptionToAnyNCP insertToAnyFnNCP;

      virtual ::CORBA::Exception* _NP_duplicate() const;

      static _core_attr const char* _PD_repoId;
      static _core_attr const char* _PD_typeId;

    private:
      virtual const char* _NP_typeId() const;
      virtual const char* _NP_repoId(int*) const;
      virtual void _NP_marshal(cdrStream&) const;
    };

    static _dyn_attr const ::CORBA::TypeCode_ptr _tc_RunningStudies;

  
  };

  class _objref_Session :
    public virtual ::CORBA::Object,
    public virtual omniObjRef
  {
  public:
    void GetInterface();
    Engines::Component_ptr GetComponent(const char* theLibraryName);
    void StopSession();
    StatSession GetStatSession();
    void ping();
    ::CORBA::Long getPID();
    char* getHostname();
    ::CORBA::Long GetActiveStudyId();
    ::CORBA::Boolean restoreVisualState(::CORBA::Long theSavePoint);
    void emitMessage(const char* theMessage);
    void emitMessageOneWay(const char* theMessage);

    inline _objref_Session()  { _PR_setobj(0); }  // nil
    _objref_Session(omniIOR*, omniIdentity*);

  protected:
    virtual ~_objref_Session();

    
  private:
    virtual void* _ptrToObjRef(const char*);

    _objref_Session(const _objref_Session&);
    _objref_Session& operator = (const _objref_Session&);
    // not implemented

    friend class Session;
  };

  class _pof_Session : public _OMNI_NS(proxyObjectFactory) {
  public:
    inline _pof_Session() : _OMNI_NS(proxyObjectFactory)(Session::_PD_repoId) {}
    virtual ~_pof_Session();

    virtual omniObjRef* newObjRef(omniIOR*,omniIdentity*);
    virtual _CORBA_Boolean is_a(const char*) const;
  };

  class _impl_Session :
    public virtual omniServant
  {
  public:
    virtual ~_impl_Session();

    virtual void GetInterface() = 0;
    virtual Engines::Component_ptr GetComponent(const char* theLibraryName) = 0;
    virtual void StopSession() = 0;
    virtual StatSession GetStatSession() = 0;
    virtual void ping() = 0;
    virtual ::CORBA::Long getPID() = 0;
    virtual char* getHostname() = 0;
    virtual ::CORBA::Long GetActiveStudyId() = 0;
    virtual ::CORBA::Boolean restoreVisualState(::CORBA::Long theSavePoint) = 0;
    virtual void emitMessage(const char* theMessage) = 0;
    virtual void emitMessageOneWay(const char* theMessage) = 0;
    
  public:  // Really protected, workaround for xlC
    virtual _CORBA_Boolean _dispatch(omniCallHandle&);

  private:
    virtual void* _ptrToInterface(const char*);
    virtual const char* _mostDerivedRepoId();
    
  };


  _CORBA_MODULE_VAR _dyn_attr const ::CORBA::TypeCode_ptr _tc_Session;

_CORBA_MODULE_END



_CORBA_MODULE POA_SALOME
_CORBA_MODULE_BEG

  class Session :
    public virtual SALOME::_impl_Session,
    public virtual ::PortableServer::ServantBase
  {
  public:
    virtual ~Session();

    inline ::SALOME::Session_ptr _this() {
      return (::SALOME::Session_ptr) _do_this(::SALOME::Session::_PD_repoId);
    }
  };

_CORBA_MODULE_END



_CORBA_MODULE OBV_SALOME
_CORBA_MODULE_BEG

_CORBA_MODULE_END





#undef _core_attr
#undef _dyn_attr

inline void operator >>=(SALOME::SessionState _e, cdrStream& s) {
  ::operator>>=((::CORBA::ULong)_e, s);
}

inline void operator <<= (SALOME::SessionState& _e, cdrStream& s) {
  ::CORBA::ULong _0RL_e;
  ::operator<<=(_0RL_e,s);
  if (_0RL_e <= SALOME::running) {
    _e = (SALOME::SessionState) _0RL_e;
  }
  else {
    OMNIORB_THROW(MARSHAL,_OMNI_NS(MARSHAL_InvalidEnumValue),
                  (::CORBA::CompletionStatus)s.completion());
  }
}

void operator<<=(::CORBA::Any& _a, SALOME::SessionState _s);
_CORBA_Boolean operator>>=(const ::CORBA::Any& _a, SALOME::SessionState& _s);

extern void operator<<=(::CORBA::Any& _a, const SALOME::StatSession& _s);
extern void operator<<=(::CORBA::Any& _a, SALOME::StatSession* _sp);
extern _CORBA_Boolean operator>>=(const ::CORBA::Any& _a, SALOME::StatSession*& _sp);
extern _CORBA_Boolean operator>>=(const ::CORBA::Any& _a, const SALOME::StatSession*& _sp);

void operator<<=(::CORBA::Any& _a, const SALOME::Session::GUIActive& _s);
void operator<<=(::CORBA::Any& _a, const SALOME::Session::GUIActive* _sp);
_CORBA_Boolean operator>>=(const ::CORBA::Any& _a, const SALOME::Session::GUIActive*& _sp);

void operator<<=(::CORBA::Any& _a, const SALOME::Session::RunningStudies& _s);
void operator<<=(::CORBA::Any& _a, const SALOME::Session::RunningStudies* _sp);
_CORBA_Boolean operator>>=(const ::CORBA::Any& _a, const SALOME::Session::RunningStudies*& _sp);

void operator<<=(::CORBA::Any& _a, SALOME::Session_ptr _s);
void operator<<=(::CORBA::Any& _a, SALOME::Session_ptr* _s);
_CORBA_Boolean operator>>=(const ::CORBA::Any& _a, SALOME::Session_ptr& _s);



inline void
SALOME::Session::_marshalObjRef(::SALOME::Session_ptr obj, cdrStream& s) {
  omniObjRef::_marshal(obj->_PR_getobj(),s);
}




#ifdef   USE_stub_in_nt_dll_NOT_DEFINED_SALOME__Session
# undef  USE_stub_in_nt_dll
# undef  USE_stub_in_nt_dll_NOT_DEFINED_SALOME__Session
#endif
#ifdef   USE_core_stub_in_nt_dll_NOT_DEFINED_SALOME__Session
# undef  USE_core_stub_in_nt_dll
# undef  USE_core_stub_in_nt_dll_NOT_DEFINED_SALOME__Session
#endif
#ifdef   USE_dyn_stub_in_nt_dll_NOT_DEFINED_SALOME__Session
# undef  USE_dyn_stub_in_nt_dll
# undef  USE_dyn_stub_in_nt_dll_NOT_DEFINED_SALOME__Session
#endif

#endif  // __SALOME__Session_hh__

