]> git.sur5r.net Git - bacula/bacula/blob - bacula/src/wx-console/console_thread.h
- wxbRestorePanel : Fixed problem when the newly created job is not at the end of...
[bacula/bacula] / bacula / src / wx-console / console_thread.h
1 /*
2  *
3  *    Interaction thread between director and the GUI
4  *
5  *    Nicolas Boichat, April-May 2004
6  *
7  */
8 /*
9    Copyright (C) 2004 Kern Sibbald and John Walker
10
11    This program is free software; you can redistribute it and/or
12    modify it under the terms of the GNU General Public License
13    as published by the Free Software Foundation; either version 2
14    of the License, or (at your option) any later version.
15
16    This program is distributed in the hope that it will be useful,
17    but WITHOUT ANY WARRANTY; without even the implied warranty of
18    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19    GNU General Public License for more details.
20
21    You should have received a copy of the GNU General Public License
22    along with this program; if not, write to the Free Software
23    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
24  */
25
26 #ifndef CONSOLE_THREAD_H
27 #define CONSOLE_THREAD_H
28
29 #include <wx/wxprec.h>
30
31 #include <wx/thread.h> // inheriting class's header file
32 #include "bacula.h"
33 #include "jcr.h"
34
35 /**
36  * Console thread, does interaction between bacula routines and the GUI
37  */
38 class console_thread : public wxThread
39 {
40    public:
41       // class constructor
42       console_thread();
43       // class destructor
44       ~console_thread();
45
46       void* Entry();
47       void Write(const char* str);
48       virtual void Delete();
49       
50       static void InitLib();
51       static void FreeLib();
52       static wxString LoadConfig(wxString configfile);
53    private:
54       static bool inited;
55       static bool configloaded;
56       
57       bool choosingdirector;
58       
59       int directorchoosen;
60       
61       BSOCK* UA_sock;
62       JCR jcr;
63 };
64
65 int pm_cst_strcpy(POOLMEM **pm, const char *str);
66
67 #endif // CONSOLE_THREAD_H
68