Salome HOME
8de6a6d41822d0f9421241aaa1b29b8ce185b8f5
[modules/gui.git] / src / Session / Session_ServerCheck.hxx
1 // Copyright (C) 2005  OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA 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.
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 // File:      Session_ServerCheck.hxx
20 // Author:    Vadim SANDLER
21
22 #if !defined(SESSION_SERVERCHECK_HXX)
23 #define SESSION_SERVERCHECK_HXX
24
25 #include <SALOME_Session.hxx>
26
27 #include <qthread.h> 
28 #include <qapplication.h> 
29
30 class QMutex;
31 class QWaitCondition;
32
33 /*!
34   Class Session_ServerCheck : check SALOME servers
35 */
36 class SESSION_EXPORT Session_ServerCheck : public QThread
37 {
38 public:
39   // constructor
40   Session_ServerCheck( QMutex*, QWaitCondition* );
41   // destructor
42   virtual ~Session_ServerCheck();
43
44   // thread loop
45   virtual void run() ;
46
47 private:
48   QMutex*         myMutex;             // splash mutex
49   QWaitCondition* myWC;                // splash wait condition
50
51   bool            myCheckCppContainer; // flag : check C++ container ?
52   bool            myCheckPyContainer;  // flag : check Python container ?
53   bool            myCheckSVContainer;  // flag : check supervision container ?
54   int             myAttempts;          // number of checks attemtps to get response from server
55   int             myDelay;             // delay between two attempts in microseconds
56 };
57
58 #endif