Salome HOME
update test execution procedure
[modules/paravis.git] / idl / PVSERVER_Gen.idl
1 // Copyright (C) 2010-2015  CEA/DEN, EDF R&D
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 #include "SALOME_Component.idl"
27 #include "SALOMEDS.idl"
28 #include "SALOME_Exception.idl"
29
30 /*!
31   The main package of interfaces of the module %PARAVIS.
32   The main service provided by the interface is to give to the caller the URL of the pvserver, and to launch it
33   if it is not already started.  
34   The connection to the ParaView's pvserver should then be done using ParaView's API directly.
35 */
36 module PVSERVER_ORB {
37
38   /*!
39    * \brief The main interface class for PARAVIS server. 
40    * Instantiation of this class has to be done before access to any other PARAVIS interfaces
41    */
42   interface PVSERVER_Gen : Engines::EngineComponent, SALOMEDS::Driver
43   {
44     
45     /*!
46      * \brief Returns IOR of the current object.
47      */
48     string GetIOR();
49     
50     /*! If a pvserver is already started, returns its current URL, regardless of the provided
51      * parameters. 
52      * If not, start a pvserver on the machine hosting the PARAVIS engine and on the given port.
53      * If port <= 0, a free port is automatically detected, starting from the usual 11111 pvserver port.
54      */
55     string FindOrStartPVServer(in long port);
56
57     /*! Tries to stop the PVserver currently running (send KILL). 
58      * @return false if no server was running, true otherwise. 
59      */
60     boolean StopPVServer();
61     
62     /*! Gets the last trace string pushed by the GUI onto the engine.
63      */
64     string GetPythonTraceString();
65     
66     /*! HACK!! For now ParaView's trace mechanism is implemented in such away that asking the trace
67      * outside the GUI provides an incomplete script. Hence the GUI regularly pushes to the engine
68      * the latest status of the trace which is then returned by GetPythonTraceString().
69      */
70     void PutPythonTraceStringToEngine(in string trace);
71     
72     /*! Indicates if the GUI process is already connected to the pvserver. 
73      * This avoids multiple attempts to connect from a single thread (makes ParaView crash). */ 
74     void SetGUIConnected(in boolean isConnected);
75     
76     /*! Indicates if the GUI process is already connected to the pvserver. 
77      * This avoids multiple attempts to connect from a single thread (makes ParaView crash). */
78     boolean GetGUIConnected();
79     
80   };
81
82 };
83
84 #endif