Salome HOME
d0a650e4716ad8e140c7e524ceb9b5058a841bc9
[modules/gui.git] / idl / PVSERVER_Gen.idl
1 // Copyright (C) 2010-2021  CEA/DEN, EDF R&D, OPEN CASCADE
2 //
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License, or (at your option) any later version.
7 //
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11 // Lesser General Public License for more details.
12 //
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
16 //
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 //
19 //  Author : Adrien Bruneton (CEA)
20
21
22 #ifndef __PVSERVER_GEN__
23 #define __PVSERVER_GEN__
24
25 #include "SALOME_Exception.idl"
26
27 /*!
28   PVSERVER interface. This is a standalone service, not inheriting the EngineComponent interfaces. 
29   
30   The main service provided by the interface is to give to the caller the URL of the pvserver, and to launch it
31   if it is not already started.  
32   The connection to the ParaView's pvserver should then be done using ParaView's API directly.
33 */
34 module PVSERVER_ORB {
35
36   /*!
37    * \brief The main interface class for PVSERVER CORBA service. 
38    * Instantiation of this class has to be done before access to any other PARAVIS interfaces
39    */
40   interface PVSERVER_Gen 
41   {
42     
43     /*!
44      * \brief Returns IOR of the current object.
45      */
46     string GetIOR();
47     
48     /*! If a pvserver is already started, returns its current URL, regardless of the provided
49      * parameters. 
50      * If not, start a pvserver on the machine hosting the PARAVIS engine and on the given port.
51      * If port <= 0, a free port is automatically detected, starting from the usual 11111 pvserver port.
52      */
53     string FindOrStartPVServer(in long port);
54
55     /*! Tries to stop the PVserver currently running (send KILL). 
56      * @return false if no server was running, true otherwise. 
57      */
58     boolean StopPVServer();
59     
60     /*! Indicates if the GUI process is already connected to the pvserver. 
61      * This avoids multiple attempts to connect from a single thread (makes ParaView crash). */ 
62     void SetGUIConnected(in boolean isConnected);
63     
64     /*! Indicates if the GUI process is already connected to the pvserver. 
65      * This avoids multiple attempts to connect from a single thread (makes ParaView crash). */
66     boolean GetGUIConnected();
67     
68   };
69
70 };
71
72 #endif