5 Bacula® - The Network Backup Solution
7 Copyright (C) 2000-2007 Free Software Foundation Europe e.V.
9 The main author of Bacula is Kern Sibbald, with contributions from
10 many others, a complete list can be found in the file AUTHORS.
11 This program is Free Software; you can redistribute it and/or
12 modify it under the terms of version two of the GNU General Public
13 License as published by the Free Software Foundation plus additions
14 that are listed in the file LICENSE.
16 This program is distributed in the hope that it will be useful, but
17 WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 General Public License for more details.
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., 51 Franklin Street, Fifth Floor, Boston, MA
26 Bacula® is a registered trademark of John Walker.
27 The licensor of Bacula is the Free Software Foundation Europe
28 (FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich,
29 Switzerland, email:ftf@fsfeurope.org.
34 * Kern Sibbald, January 2007
38 #include "ui_console.h"
41 #ifndef MAX_NAME_LENGTH
42 #define MAX_NAME_LENGTH 128
46 * Structure for obtaining the defaults for a job
51 QString messages_name;
60 char pool_name[MAX_NAME_LENGTH];
61 char messages_name[MAX_NAME_LENGTH];
62 char client_name[MAX_NAME_LENGTH];
63 char store_name[MAX_NAME_LENGTH];
64 char where[MAX_NAME_LENGTH];
65 char level[MAX_NAME_LENGTH];
66 char type[MAX_NAME_LENGTH];
67 char fileset_name[MAX_NAME_LENGTH];
68 char catalog_name[MAX_NAME_LENGTH];
78 class Console : public QWidget, public Ui::ConsoleForm
83 Console(QStackedWidget *parent);
84 void display_text(const char *buf);
85 void display_text(const QString buf);
86 void display_textf(const char *fmt, ...);
87 void update_cursor(void);
88 void write_dir(const char *buf);
89 bool authenticate_director(JCR *jcr, DIRRES *director, CONRES *cons);
90 bool is_connected() { return m_sock != NULL; };
91 const QFont get_font();
95 void setEnabled(bool enable) { m_notifier->setEnabled(enable); };
96 QStringList get_list(char *cmd);
97 bool get_job_defaults(struct job_defaults &);
100 QStringList job_list;
101 QStringList client_list;
102 QStringList fileset_list;
103 QStringList messages_list;
104 QStringList pool_list;
105 QStringList storage_list;
106 QStringList type_list;
107 QStringList level_list;
111 void read_dir(int fd);
113 int write(const char *msg);
114 void status_dir(void);
118 QTextEdit *m_textEdit;
122 QSocketNotifier *m_notifier;
123 QTextCursor *m_cursor;
124 QTreeWidgetItem *m_consoleItem;
127 #endif /* _CONSOLE_H_ */