Salome HOME
NRI : Check if a component-username is already associated with a component-name.
[modules/kernel.git] / src / Session / SALOME_Session_i.hxx
1 //=============================================================================
2 // File      : SALOME_Session_i.hxx
3 // Created   : mar jun 19 13:42:55 CEST 2001
4 // Author    : Paul RASCLE, EDF
5 // Project   : SALOME
6 // Copyright : EDF 2001
7 // $Header$
8 //=============================================================================
9
10 #ifndef _SALOME_SESSION_I_HXX_
11 #define _SALOME_SESSION_I_HXX_
12
13 #include <qthread.h> 
14
15 #include <SALOMEconfig.h>
16 #include CORBA_SERVER_HEADER(SALOME_Component)
17 //***//#include CORBA_SERVER_HEADER(VISU_Gen)
18 #include CORBA_SERVER_HEADER(SALOME_Session)
19 class SALOME_NamingService;
20 class SALOME_Session_QThread;
21
22 //! CORBA SALOME Session Servant
23
24 class SALOME_Session_i:  public POA_SALOME::Session,
25                          public PortableServer::RefCountServantBase
26 {
27 public:
28   SALOME_Session_i(int argc, char ** argv, CORBA::ORB_ptr orb, PortableServer::POA_ptr poa) ;
29   ~SALOME_Session_i() ;
30
31   //! Launch Graphical User Interface
32   void GetInterface();
33   //***//VISU::VISU_Gen_ptr GetVisuGen();
34   Engines::Component_ptr GetVisuComponent();
35
36   //! Stop the Session (must be idle): kill servant & server
37   void StopSession();
38
39   //! Get session state
40   SALOME::StatSession GetStatSession();
41
42   //! Register the servant to Naming Service
43   void NSregister();
44   
45   void ping(){};
46
47 protected:
48   //! A QT Thread for the GUI
49   SALOME_Session_QThread *_IAPPThread ;
50
51   //! Naming service interface
52   SALOME_NamingService *_NS;
53
54   int _argc ;
55   char **_argv;
56   CORBA::Boolean _isGUI ;
57   QMutex _GUIMutex ;
58   int _runningStudies ;
59   CORBA::ORB_var _orb;
60   PortableServer::POA_var _poa;
61 };
62
63 #endif
64