1 // Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
3 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License.
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
23 // File : SALOME_Session.idl
24 // Author : Paul RASCLE, EDF
27 #include "SALOME_Component.idl"
29 /*! \file SALOME_Session.idl \brief file that contains interface of the session
34 /*! \brief State of the session
36 This enumeration contains values defining the state of the session
39 enum SessionState {asleep, /*!< Session is inactive */
40 running /*!< Session is running */
43 /*! \brief %Session State and Statistics
46 This struct contains a field list with general information about the session
51 /*! \brief State of the session
54 -# asleep : no running study
55 -# running : one or more running studies
58 //! 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)
72 //! This exception is raised when trying to stop the %session with active GUI
73 exception GUIActive {} ;
74 //! This exception is raised when trying to stop the %session with a number of running studies.
75 exception RunningStudies {} ;
77 //! Launches GUI in the session
80 //! Returns a standalone component
81 Engines::Component GetComponent(in string theLibraryName);
83 //! Stops the %Session (It must be idle)
84 void StopSession() raises(GUIActive, RunningStudies) ;
86 //! Gets Session State
87 StatSession GetStatSession() ;
89 //! Determines whether the server has already been loaded or not.
91 //! Returns the PID of the server
95 //! Get Active study ID
96 long GetActiveStudyId();
97 //! Restores a state of the study at theSavePoint
98 boolean restoreVisualState(in long theSavePoint);
100 //! Send a message to the session GUI desktop that will emit a qt signal
102 This method can be used to send a message to the GUI from the standalone
104 Caution: this method can block the Session and the calling container
105 if it is called when container processes some request from the GUI
106 (mutual lock takes place).
107 In such a case it is recommended to use oneway method.
109 void emitMessage(in string theMessage);
111 //! same as emitMessage but in a non blocking way
113 Emit a qt signal from the session GUI desktop window.
114 This method can be used to send a message to the GUI from the standalone
116 This method never blocks the Session and the calling container.
118 oneway void emitMessageOneWay(in string theMessage);