Salome HOME
e4d7a83d4e44e2e6bc28b3361c572a87915ba4f4
[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/
18 //
19 // File:      Session_ServerCheck.hxx
20 // Author:    Vadim SANDLER
21
22 #if !defined(SESSION_SERVERCHECK_HXX)
23 #define SESSION_SERVERCHECK_HXX
24
25 #ifdef WNT
26 #include <SALOME_WNT.hxx>
27 #else
28 #define SALOME_WNT_EXPORT
29 #endif
30
31 #include <qthread.h> 
32 #include <qapplication.h> 
33
34 class QMutex;
35 class QWaitCondition;
36
37 /*!
38   Class Session_ServerCheck : check SALOME servers
39 */
40 class SALOME_WNT_EXPORT Session_ServerCheck : public QThread
41 {
42 public:
43   // constructor
44   Session_ServerCheck( QMutex*, QWaitCondition* );
45   // destructor
46   virtual ~Session_ServerCheck();
47
48   // thread loop
49   virtual void run() ;
50
51 private:
52   QMutex*         myMutex;             // splash mutex
53   QWaitCondition* myWC;                // splash wait condition
54
55   bool            myCheckCppContainer; // flag : check C++ container ?
56   bool            myCheckPyContainer;  // flag : check Python container ?
57   bool            myCheckSVContainer;  // flag : check supervision container ?
58   int             myAttempts;          // number of checks attemtps to get response from server
59   int             myDelay;             // delay between two attempts in microseconds
60 };
61
62 #endif