1 // Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
2 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
4 // This library is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU Lesser General Public
6 // License as published by the Free Software Foundation; either
7 // version 2.1 of the License.
9 // This library is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 // Lesser General Public License for more details.
14 // You should have received a copy of the GNU Lesser General Public
15 // License along with this library; if not, write to the Free Software
16 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 // See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
22 // File : SALOME_Session.idl
23 // Author : Paul RASCLE, EDF
26 #include "SALOME_Component.idl"
29 This package contains interfaces used for management of the session in %SALOME application.
33 /*! \brief State of the session
35 This enumeration contains values defining the state of the session
38 enum SessionState {asleep, /*! Session is inactive */
39 running /*! Session is running */
42 /*! \brief %Session State and Statistics
45 This struct contains a field list with general information about the session
50 /*! \brief State of the session
53 * -# asleep : no running study
54 * -# running : one or more running studies
57 /*! Number of running studies
59 short runningStudies ;
60 /*! It is True if GUI is active in the session
64 /*! \brief Interface of the session
66 The %session Server launches and stops GUI (Graphical User Interface).
67 The %session can be active without GUI (It can contain one or more running studies)
73 This exception is raised when trying to stop the %session with active GUI
75 exception GUIActive {} ;
77 This exception is raised when trying to stop the %session with a number of running studies.
79 exception RunningStudies {} ;
82 Launches GUI in the session
87 Returns a standalone component
89 Engines::Component GetComponent(in string theLibraryName);
92 Stops the %Session (It must be idle)
94 void StopSession() raises(GUIActive, RunningStudies) ;
99 StatSession GetStatSession() ;
101 Determines whether the server has already been loaded or not.
105 Returns the PID of the server
111 long GetActiveStudyId();
113 Restores a state of the study at theSavePoint
115 boolean restoreVisualState(in long theSavePoint);
117 Emit a qt signal from the session GUI desktop window.
118 This method can be used to send a message to the GUI from the standalone
120 Caution: this method can block the Session and the calling container
121 if it is called when container processes some request from the GUI
122 (mutual lock takes place).
123 In such a case it is recommended to use oneway method.
125 void emitMessage(in string theMessage);
127 Emit a qt signal from the session GUI desktop window.
128 This method can be used to send a message to the GUI from the standalone
130 This method never blocks the Session and the calling container.
132 oneway void emitMessageOneWay(in string theMessage);