# Python stubs generated by omniidl from .././../idl/SALOME_Session.idl

import omniORB, _omnipy
from omniORB import CORBA, PortableServer
_0_CORBA = CORBA

_omnipy.checkVersion(3,0, __file__)

# #include "SALOME_Exception.idl"
import SALOME_Exception_idl
_0_SALOME = omniORB.openModule("SALOME")
_0_SALOME__POA = omniORB.openModule("SALOME__POA")
# #include "SALOME_GenericObj.idl"
import SALOME_GenericObj_idl
_0_SALOME = omniORB.openModule("SALOME")
_0_SALOME__POA = omniORB.openModule("SALOME__POA")
# #include "SALOMEDS.idl"
import SALOMEDS_idl
_0_SALOMEDS = omniORB.openModule("SALOMEDS")
_0_SALOMEDS__POA = omniORB.openModule("SALOMEDS__POA")
# #include "SALOME_PyNode.idl"
import SALOME_PyNode_idl
_0_Engines = omniORB.openModule("Engines")
_0_Engines__POA = omniORB.openModule("Engines__POA")
# #include "SALOME_Component.idl"
import SALOME_Component_idl
_0_Engines = omniORB.openModule("Engines")
_0_Engines__POA = omniORB.openModule("Engines__POA")

#
# Start of module "SALOME"
#
__name__ = "SALOME"
_0_SALOME = omniORB.openModule("SALOME", r".././../idl/SALOME_Session.idl")
_0_SALOME__POA = omniORB.openModule("SALOME__POA", r".././../idl/SALOME_Session.idl")


# enum SessionState
_0_SALOME.asleep = omniORB.EnumItem("asleep", 0)
_0_SALOME.running = omniORB.EnumItem("running", 1)
_0_SALOME.SessionState = omniORB.Enum("IDL:SALOME/SessionState:1.0", (_0_SALOME.asleep, _0_SALOME.running,))

_0_SALOME._d_SessionState  = (omniORB.tcInternal.tv_enum, _0_SALOME.SessionState._NP_RepositoryId, "SessionState", _0_SALOME.SessionState._items)
_0_SALOME._tc_SessionState = omniORB.tcInternal.createTypeCode(_0_SALOME._d_SessionState)
omniORB.registerType(_0_SALOME.SessionState._NP_RepositoryId, _0_SALOME._d_SessionState, _0_SALOME._tc_SessionState)

# struct StatSession
_0_SALOME.StatSession = omniORB.newEmptyClass()
class StatSession (omniORB.StructBase):
    _NP_RepositoryId = "IDL:SALOME/StatSession:1.0"

    def __init__(self, state, runningStudies, activeGUI):
        self.state = state
        self.runningStudies = runningStudies
        self.activeGUI = activeGUI

_0_SALOME.StatSession = StatSession
_0_SALOME._d_StatSession  = (omniORB.tcInternal.tv_struct, StatSession, StatSession._NP_RepositoryId, "StatSession", "state", omniORB.typeMapping["IDL:SALOME/SessionState:1.0"], "runningStudies", omniORB.tcInternal.tv_short, "activeGUI", omniORB.tcInternal.tv_boolean)
_0_SALOME._tc_StatSession = omniORB.tcInternal.createTypeCode(_0_SALOME._d_StatSession)
omniORB.registerType(StatSession._NP_RepositoryId, _0_SALOME._d_StatSession, _0_SALOME._tc_StatSession)
del StatSession

# interface Session
_0_SALOME._d_Session = (omniORB.tcInternal.tv_objref, "IDL:SALOME/Session:1.0", "Session")
omniORB.typeMapping["IDL:SALOME/Session:1.0"] = _0_SALOME._d_Session
_0_SALOME.Session = omniORB.newEmptyClass()
class Session :
    _NP_RepositoryId = _0_SALOME._d_Session[1]

    def __init__(self, *args, **kw):
        raise RuntimeError("Cannot construct objects of this type.")

    _nil = CORBA.Object._nil

    
    # exception GUIActive
    _0_SALOME.Session.GUIActive = omniORB.newEmptyClass()
    class GUIActive (CORBA.UserException):
        _NP_RepositoryId = "IDL:SALOME/Session/GUIActive:1.0"

        _NP_ClassName = "SALOME.Session.GUIActive"

        def __init__(self):
            CORBA.UserException.__init__(self)
    
    _d_GUIActive  = (omniORB.tcInternal.tv_except, GUIActive, GUIActive._NP_RepositoryId, "GUIActive")
    _tc_GUIActive = omniORB.tcInternal.createTypeCode(_d_GUIActive)
    omniORB.registerType(GUIActive._NP_RepositoryId, _d_GUIActive, _tc_GUIActive)
    
    # exception RunningStudies
    _0_SALOME.Session.RunningStudies = omniORB.newEmptyClass()
    class RunningStudies (CORBA.UserException):
        _NP_RepositoryId = "IDL:SALOME/Session/RunningStudies:1.0"

        _NP_ClassName = "SALOME.Session.RunningStudies"

        def __init__(self):
            CORBA.UserException.__init__(self)
    
    _d_RunningStudies  = (omniORB.tcInternal.tv_except, RunningStudies, RunningStudies._NP_RepositoryId, "RunningStudies")
    _tc_RunningStudies = omniORB.tcInternal.createTypeCode(_d_RunningStudies)
    omniORB.registerType(RunningStudies._NP_RepositoryId, _d_RunningStudies, _tc_RunningStudies)


_0_SALOME.Session = Session
_0_SALOME._tc_Session = omniORB.tcInternal.createTypeCode(_0_SALOME._d_Session)
omniORB.registerType(Session._NP_RepositoryId, _0_SALOME._d_Session, _0_SALOME._tc_Session)

# Session operations and attributes
Session._d_GetInterface = ((), (), None)
Session._d_GetComponent = (((omniORB.tcInternal.tv_string,0), ), (omniORB.typeMapping["IDL:Engines/Component:1.0"], ), None)
Session._d_StopSession = ((), (), {_0_SALOME.Session.GUIActive._NP_RepositoryId: _0_SALOME.Session._d_GUIActive, _0_SALOME.Session.RunningStudies._NP_RepositoryId: _0_SALOME.Session._d_RunningStudies})
Session._d_GetStatSession = ((), (omniORB.typeMapping["IDL:SALOME/StatSession:1.0"], ), None)
Session._d_ping = ((), (), None)
Session._d_getPID = ((), (omniORB.tcInternal.tv_long, ), None)
Session._d_getHostname = ((), ((omniORB.tcInternal.tv_string,0), ), None)
Session._d_GetActiveStudyId = ((), (omniORB.tcInternal.tv_long, ), None)
Session._d_restoreVisualState = ((omniORB.tcInternal.tv_long, ), (omniORB.tcInternal.tv_boolean, ), None)
Session._d_emitMessage = (((omniORB.tcInternal.tv_string,0), ), (), None)
Session._d_emitMessageOneWay = (((omniORB.tcInternal.tv_string,0), ), None, None)

# Session object reference
class _objref_Session (CORBA.Object):
    _NP_RepositoryId = Session._NP_RepositoryId

    def __init__(self):
        CORBA.Object.__init__(self)

    def GetInterface(self, *args):
        return _omnipy.invoke(self, "GetInterface", _0_SALOME.Session._d_GetInterface, args)

    def GetComponent(self, *args):
        return _omnipy.invoke(self, "GetComponent", _0_SALOME.Session._d_GetComponent, args)

    def StopSession(self, *args):
        return _omnipy.invoke(self, "StopSession", _0_SALOME.Session._d_StopSession, args)

    def GetStatSession(self, *args):
        return _omnipy.invoke(self, "GetStatSession", _0_SALOME.Session._d_GetStatSession, args)

    def ping(self, *args):
        return _omnipy.invoke(self, "ping", _0_SALOME.Session._d_ping, args)

    def getPID(self, *args):
        return _omnipy.invoke(self, "getPID", _0_SALOME.Session._d_getPID, args)

    def getHostname(self, *args):
        return _omnipy.invoke(self, "getHostname", _0_SALOME.Session._d_getHostname, args)

    def GetActiveStudyId(self, *args):
        return _omnipy.invoke(self, "GetActiveStudyId", _0_SALOME.Session._d_GetActiveStudyId, args)

    def restoreVisualState(self, *args):
        return _omnipy.invoke(self, "restoreVisualState", _0_SALOME.Session._d_restoreVisualState, args)

    def emitMessage(self, *args):
        return _omnipy.invoke(self, "emitMessage", _0_SALOME.Session._d_emitMessage, args)

    def emitMessageOneWay(self, *args):
        return _omnipy.invoke(self, "emitMessageOneWay", _0_SALOME.Session._d_emitMessageOneWay, args)

    __methods__ = ["GetInterface", "GetComponent", "StopSession", "GetStatSession", "ping", "getPID", "getHostname", "GetActiveStudyId", "restoreVisualState", "emitMessage", "emitMessageOneWay"] + CORBA.Object.__methods__

omniORB.registerObjref(Session._NP_RepositoryId, _objref_Session)
_0_SALOME._objref_Session = _objref_Session
del Session, _objref_Session

# Session skeleton
__name__ = "SALOME__POA"
class Session (PortableServer.Servant):
    _NP_RepositoryId = _0_SALOME.Session._NP_RepositoryId


    _omni_op_d = {"GetInterface": _0_SALOME.Session._d_GetInterface, "GetComponent": _0_SALOME.Session._d_GetComponent, "StopSession": _0_SALOME.Session._d_StopSession, "GetStatSession": _0_SALOME.Session._d_GetStatSession, "ping": _0_SALOME.Session._d_ping, "getPID": _0_SALOME.Session._d_getPID, "getHostname": _0_SALOME.Session._d_getHostname, "GetActiveStudyId": _0_SALOME.Session._d_GetActiveStudyId, "restoreVisualState": _0_SALOME.Session._d_restoreVisualState, "emitMessage": _0_SALOME.Session._d_emitMessage, "emitMessageOneWay": _0_SALOME.Session._d_emitMessageOneWay}

Session._omni_skeleton = Session
_0_SALOME__POA.Session = Session
omniORB.registerSkeleton(Session._NP_RepositoryId, Session)
del Session
__name__ = "SALOME"

#
# End of module "SALOME"
#
__name__ = "SALOME_Session_idl"

_exported_modules = ( "SALOME", )

# The end.
