]> git.sur5r.net Git - bacula/bacula/blob - bacula/src/wx-console/console_thread.h
50f5703a2a171d52b418c92a2a708fef991fd36c
[bacula/bacula] / bacula / src / wx-console / console_thread.h
1 /*
2  *
3  *    Interaction thread between director and the GUI
4  *
5  *    Nicolas Boichat, April 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    private:
50       BSOCK* UA_sock;
51       JCR jcr;
52 };
53
54 int pm_cst_strcpy(POOLMEM **pm, const char *str);
55
56 #endif // CONSOLE_THREAD_H
57