4 Bacula® - The Network Backup Solution
6 Copyright (C) 2007-2007 Free Software Foundation Europe e.V.
8 The main author of Bacula is Kern Sibbald, with contributions from
9 many others, a complete list can be found in the file AUTHORS.
10 This program is Free Software; you can redistribute it and/or
11 modify it under the terms of version two of the GNU General Public
12 License as published by the Free Software Foundation plus additions
13 that are listed in the file LICENSE.
15 This program is distributed in the hope that it will be useful, but
16 WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 General Public License for more details.
20 You should have received a copy of the GNU General Public License
21 along with this program; if not, write to the Free Software
22 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
25 Bacula® is a registered trademark of John Walker.
26 The licensor of Bacula is the Free Software Foundation Europe
27 (FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich,
28 Switzerland, email:ftf@fsfeurope.org.
33 * Kern Sibbald, January 2007
37 #include "ui_console.h"
42 #ifndef MAX_NAME_LENGTH
43 #define MAX_NAME_LENGTH 128
47 * Structure for obtaining the defaults for a job
52 QString messages_name;
68 class Console : public BatStack, public Ui::ConsoleForm
73 Console(QStackedWidget *parent);
74 void display_text(const char *buf);
75 void display_text(const QString buf);
76 void display_textf(const char *fmt, ...);
77 void update_cursor(void);
78 void write_dir(const char *buf);
79 bool dir_cmd(const char *cmd, QStringList &results);
80 bool authenticate_director(JCR *jcr, DIRRES *director, CONRES *cons);
81 bool is_connected() { return m_sock != NULL; };
82 const QFont get_font();
86 void notify(bool enable);
87 QStringList get_list(char *cmd);
88 bool get_job_defaults(struct job_defaults &);
90 void beginNewCommand();
91 void displayToPrompt();
92 void discardToPrompt();
93 void setTreeItem(QTreeWidgetItem *item);
94 void setDirRes(DIRRES *dir);
95 void dosql(QString* sqlcmd, QStringList& strlstret);
98 QStringList client_list;
99 QStringList fileset_list;
100 QStringList messages_list;
101 QStringList pool_list;
102 QStringList storage_list;
103 QStringList type_list;
104 QStringList level_list;
109 void read_dir(int fd);
111 int write(const char *msg);
112 int write(QString msg);
113 void status_dir(void);
115 void poll_messages(void);
118 QTextEdit *m_textEdit;
122 QSocketNotifier *m_notifier;
123 QTextCursor *m_cursor;
125 bool m_messages_pending;
129 #endif /* _CONSOLE_H_ */