Salome HOME
PR: mergefrom_PRAS_br2_14Jan04
[modules/yacs.git] / idl / SALOME_Session.idl
1 //  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
2 //  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
3 // 
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. 
8 // 
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. 
13 // 
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 
17 // 
18 //  See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
19 //
20 //
21 //
22 //  File   : SALOME_Session.idl
23 //  Author : Paul RASCLE, EDF
24 //  $Header$
25
26 #include "SALOME_Component.idl"
27
28 /*!   
29   This package contains interfaces used for management of the session in %SALOME application.
30 */
31 module SALOME
32 {
33 /*! \brief State of the session
34    
35    This enumeration contains values defining the state of the session
36   
37 */ 
38   enum SessionState {asleep, running} ;
39
40 /*! \brief %Session State and Statistics
41
42
43     This struct contains a field list with general information about the session 
44 */
45    
46   struct StatSession
47   {
48 /*! \brief State of the session
49   
50    It can be:
51    *     -# asleep  : no running study
52    *     -# running : one or more running studies
53 */
54     SessionState state ; 
55 /*! Number of running studies
56 */
57     short        runningStudies ;
58 /*! It is True if GUI is active in the session
59 */
60     boolean      activeGUI ;
61   } ;
62 /*! \brief Interface of the session
63
64     The %session Server launches and stops GUI (Graphical User Interface).
65     The %session can be active without GUI (It can contain one or more running studies)
66 */
67
68   interface Session
69   {
70 /*! 
71    This exception is raised when trying to stop the %session with active GUI
72 */
73     exception GUIActive {} ;
74 /*! 
75    This exception is raised when trying to stop the %session with a number of running studies.
76 */
77     exception RunningStudies {} ;  
78
79 /*! 
80    Launches GUI in the session
81 */
82     void GetInterface(); 
83     //***//    VISU::VISU_Gen GetVisuGen();
84     Engines::Component GetVisuComponent();
85
86 /*! 
87   Stops the %Session (It must be idle)
88 */
89     void StopSession() raises(GUIActive, RunningStudies) ;
90
91 /*! 
92   Gets Session State
93 */
94     StatSession GetStatSession() ;
95 /*! 
96     Determines whether the server has already been loaded or not.
97 */ 
98     void ping();
99   } ;
100
101 } ;