]> git.sur5r.net Git - bacula/bacula/blob - bacula/src/qt-console/console/console.h
It now talks to Dir
[bacula/bacula] / bacula / src / qt-console / console / console.h
1
2 #ifndef _CONSOLE_H_
3 #define _CONSOLE_H_
4
5 #include <QtGui>
6
7 class DIRRES;
8 class BSOCK;
9 class JCR;
10 class CONRES;
11
12 class Console : public QWidget
13 {
14    Q_OBJECT 
15
16 public:
17    Console();
18    void set_text(const char *buf);
19    void set_textf(const char *fmt, ...);
20    void set_statusf(const char *fmt, ...);
21    void set_status_ready();
22    void set_status(const char *buf);
23    void write_dir(const char *buf);
24
25 public slots:
26    void connect();
27    void read_dir(int fd);
28
29 private:
30    QTextEdit *m_textEdit;
31    DIRRES *m_dir;
32    BSOCK *m_sock;   
33    bool m_at_prompt;
34    QSocketNotifier *m_notifier;
35 };
36
37 extern int authenticate_director(JCR *jcr, DIRRES *director, CONRES *cons);
38
39 #endif /* _CONSOLE_H_ */