Salome HOME
CCAR: remove debug prints from the standard trace and put these prints
[modules/kernel.git] / idl / SALOME_Session.idl
index 7d1d5a7c48d2886e2eb3d75e41f67c6245b731a3..502104a4310752ed1d359fab0c72d65ea6cc7eeb 100644 (file)
@@ -1,36 +1,33 @@
-//  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-//  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
-// 
-//  This library is free software; you can redistribute it and/or 
-//  modify it under the terms of the GNU Lesser General Public 
-//  License as published by the Free Software Foundation; either 
-//  version 2.1 of the License. 
-// 
-//  This library is distributed in the hope that it will be useful, 
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of 
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
-//  Lesser General Public License for more details. 
-// 
-//  You should have received a copy of the GNU Lesser General Public 
-//  License along with this library; if not, write to the Free Software 
-//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
-// 
-//  See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
+//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
 //
+//  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+//  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
 //
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of the GNU Lesser General Public
+//  License as published by the Free Software Foundation; either
+//  version 2.1 of the License.
+//
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+//  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
 //  File   : SALOME_Session.idl
 //  Author : Paul RASCLE, EDF
 //  $Header$
-
+//
 #include "SALOME_Component.idl"
-/*! \defgroup Kernel SALOME KERNEL module
-*/
 
-/*!  \ingroup Kernel 
-   
-  This package contains interfaces used for management of the session in %SALOME application.
-*/
+/*! \file SALOME_Session.idl \brief file that contains interface of the session
+ */
+
 module SALOME
 {
 /*! \brief State of the session
@@ -38,7 +35,9 @@ module SALOME
    This enumeration contains values defining the state of the session
   
 */ 
-  enum SessionState {asleep, running} ;
+  enum SessionState {asleep, /*!< Session is inactive */
+                    running /*!< Session is running */
+  } ;
 
 /*! \brief %Session State and Statistics
 
@@ -51,17 +50,16 @@ module SALOME
 /*! \brief State of the session
   
    It can be:
-   *     -# asleep  : no running study
-   *     -# running : one or more running studies
+        -# asleep  : no running study
+        -# running : one or more running studies
 */
     SessionState state ; 
-/*! Number of running studies
-*/
+//! Number of running studies
     short        runningStudies ;
-/*! It is True if GUI is active in the session
-*/
+//! It is True if GUI is active in the session
     boolean      activeGUI ;
   } ;
+
 /*! \brief Interface of the session
 
     The %session Server launches and stops GUI (Graphical User Interface).
@@ -70,35 +68,50 @@ module SALOME
 
   interface Session
   {
-/*! 
-   This exception is raised when trying to stop the %session with active GUI
-*/
+//!  This exception is raised when trying to stop the %session with active GUI
     exception GUIActive {} ;
-/*! 
-   This exception is raised when trying to stop the %session with a number of running studies.
-*/
+//!  This exception is raised when trying to stop the %session with a number of running studies.
     exception RunningStudies {} ;  
 
-/*! 
-   Launches GUI in the session
-*/
+//!  Launches GUI in the session
     void GetInterface(); 
-    //***//    VISU::VISU_Gen GetVisuGen();
-    Engines::Component GetVisuComponent();
 
-/*! 
-  Stops the %Session (It must be idle)
-*/
+//!  Returns a standalone component
+    Engines::Component GetComponent(in string theLibraryName);
+
+//!  Stops the %Session (It must be idle)
     void StopSession() raises(GUIActive, RunningStudies) ;
 
-/*! 
-  Gets Session State
-*/
+//!  Gets Session State
     StatSession GetStatSession() ;
-/*! 
-    Determines whether the server has already been loaded or not.
-*/ 
+
+//!  Determines whether the server has already been loaded or not.
     void ping();
-  } ;
+//!  Returns the PID of the server
+    long getPID();
+//!  Get Active study ID
+    long GetActiveStudyId();
+//!  Restores a state of the study at theSavePoint
+    boolean restoreVisualState(in long theSavePoint);
+
+ //! Send a message to the session GUI desktop that will emit a qt signal
+/*!
+    This method can be used to send a message to the GUI from the standalone
+    container.
+    Caution: this method can block the Session and the calling container
+    if it is called when container processes some request from the GUI
+    (mutual lock takes place).
+    In such a case it is recommended to use oneway method.
+*/
+    void emitMessage(in string theMessage);
 
+    //! same as emitMessage but in a non blocking way
+/*!
+    Emit a qt signal from the session GUI desktop window.
+    This method can be used to send a message to the GUI from the standalone
+    container.
+    This method never blocks the Session and the calling container.
+*/
+    oneway void emitMessageOneWay(in string theMessage);
+  } ;
 } ;