]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/qt-console/console/console.h
Fix bat bug that consumes connections + add braces on ifs + rename subroutines
[bacula/bacula] / bacula / src / qt-console / console / console.h
index 198bf0ad0bd3f908e8c59ee8ec3c347d57a7ea33..783581848331a2c290a1917950ab624de9f2761e 100644 (file)
@@ -3,7 +3,7 @@
 /*
    Bacula® - The Network Backup Solution
 
-   Copyright (C) 2007-2008 Free Software Foundation Europe e.V.
+   Copyright (C) 2007-2009 Free Software Foundation Europe e.V.
 
    The main author of Bacula is Kern Sibbald, with contributions from
    many others, a complete list can be found in the file AUTHORS.
@@ -70,7 +70,7 @@ class Console : public Pages, public Ui::ConsoleForm
    friend class DirComm;
 
 public:
-   Console(QStackedWidget *parent);
+   Console(QTabWidget *parent);
    ~Console();
    int read(int conn);
    char *msg(int conn);
@@ -80,15 +80,22 @@ public:
    int notifyOff(); // enables/disables socket notification - returns the previous state
    bool notify(int conn, bool enable); // enables/disables socket notification - returns the previous state
    bool is_notify_enabled(int conn) const;
-   int availableDirComm();
+   bool getDirComm(int &conn);  
+   bool findDirComm(int &conn);
    void displayToPrompt(int conn);
+   QString returnFromPrompt(int conn);
 
+   bool dir_cmd(int conn, const char *cmd, QStringList &results);
    bool dir_cmd(const char *cmd, QStringList &results);
    bool dir_cmd(QString &cmd, QStringList &results);
    bool sql_cmd(const char *cmd, QStringList &results);
    bool sql_cmd(QString &cmd, QStringList &results);
+   bool sql_cmd(int &conn, QString &cmd, QStringList &results);
+   bool sql_cmd(int &conn, const char *cmd, QStringList &results, bool donotify);
    int write_dir(const char *buf);
+   int write_dir(const char *buf, bool dowait);
    void write_dir(int conn, const char *buf);
+   void write_dir(int conn, const char *buf, bool dowait);
    void getDirResName(QString &);
    void setDirRes(DIRRES *dir);
    void writeSettings();
@@ -105,16 +112,18 @@ public:
    void display_textf(const char *fmt, ...);
    void display_html(const QString buf);
    bool get_job_defaults(struct job_defaults &);
+   bool get_job_defaults(int &conn, struct job_defaults &);
    const QFont get_font();
    void beginNewCommand(int conn);
-   void getVolumeList(QStringList &);
-   void getStatusList(QStringList &);
+   void populateLists(bool forcenew);
 
 private:
+   bool get_job_defaults(int &conn, struct job_defaults &, bool donotify);
    void update_cursor(void);
    void stopTimer();
    bool is_connectedGui();
-   int newDirComm();
+   bool newDirComm(int &conn);
+   void populateLists(int conn);
 
 public:
    QStringList job_list;
@@ -125,6 +134,9 @@ public:
    QStringList storage_list;
    QStringList type_list;
    QStringList level_list;
+   QStringList volstatus_list;
+   QStringList mediatype_list;
+   QStringList location_list;
 
 public slots:
    void connect_dir();                     
@@ -137,6 +149,7 @@ public slots:
 
 public:
    DIRRES *m_dir;                  /* so various pages can reference it */
+   bool m_warningPrevent;
 
 private:
    QTextEdit *m_textEdit;