X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=idl%2FSALOME_Session.idl;h=a1174f1498eb6085590524e5d7254b9207b5c2d3;hb=f9ce15cb3b95e2156c0b967ec70b69ba1d864a2f;hp=9a96d8b5f50d1378dc0fc138723797934a00139a;hpb=e6bfea36374791cd31c274a2f97df90dc60ddaf3;p=modules%2Fkernel.git diff --git a/idl/SALOME_Session.idl b/idl/SALOME_Session.idl index 9a96d8b5f..a1174f149 100644 --- a/idl/SALOME_Session.idl +++ b/idl/SALOME_Session.idl @@ -1,66 +1,65 @@ -// 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.salome-platform.org/ or email : webmaster.salome@opencascade.com +// Copyright (C) 2007-2021 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, or (at your option) any later version. +// +// 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" +#include "SALOME_GenericObj.idl" + +/*! \file SALOME_Session.idl \brief file that contains interface of the session + */ -/*! - This package contains interfaces used for management of the session in %SALOME application. -*/ module SALOME { /*! \brief State of the session - + This enumeration contains values defining the state of the session - -*/ - enum SessionState {asleep, /*! Session is inactive */ - running /*! Session is running */ + +*/ + enum SessionState {asleep, /*!< Session is inactive */ + running, /*!< Session is running */ + shutdown /*!< Session is shutting down */ } ; /*! \brief %Session State and Statistics - - This struct contains a field list with general information about the session + This struct contains a field list with general information about the session */ - + struct StatSession { /*! \brief State of the session - + It can be: - * -# asleep : no running study - * -# running : one or more running studies -*/ - SessionState state ; -/*! Number of running studies -*/ - short runningStudies ; -/*! It is True if GUI is active in the session + -# asleep : no running study + -# running : one running study */ + SessionState state ; + + //! 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). @@ -69,45 +68,56 @@ 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. -*/ - exception RunningStudies {} ; +//! This exception is raised when trying to stop the %session with running study. + exception RunningStudy {} ; -/*! - Launches GUI in the session -*/ - void GetInterface(); +//! Launches GUI in the session + void GetInterface(); -/*! - Returns a standalone component -*/ - Engines::Component GetComponent(in string theLibraryName); +//! Returns a standalone component + Engines::EngineComponent GetComponent(in string theLibraryName); -/*! - Stops the %Session (It must be idle) -*/ - void StopSession() raises(GUIActive, RunningStudies) ; +//! Stops the %Session (It must be idle) + void StopSession() raises(GUIActive, RunningStudy) ; -/*! - Gets Session State -*/ +//! Gets Session State StatSession GetStatSession() ; -/*! - Determines whether the server has already been loaded or not. -*/ + +//! Shutdowns Session server + void Shutdown(); + +//! Determines whether the server has already been loaded or not. void ping(); +//! Returns the PID of the server + long getPID(); +//! Returns host name + string getHostname(); +//! Restores a state of the study at theSavePoint + boolean restoreVisualState(in long theSavePoint); + +//! Get list of selected entities + StringSeq getSelection(); + + //! Send a message to the session GUI desktop that will emit a qt signal /*! - Get Active study ID + 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. */ - long GetActiveStudyId(); + void emitMessage(in string theMessage); + + //! same as emitMessage but in a non blocking way /*! - Restores a state of the study at theSavePoint + 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. */ - boolean restoreVisualState(in long theSavePoint); + oneway void emitMessageOneWay(in string theMessage); } ; } ;