]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/dird/ua.h
Cleanup new timeout code for bconsole
[bacula/bacula] / bacula / src / dird / ua.h
index eb849b2189185f1b38e1a9b56e807dd59271759d..4af9c01d5ae9deda404ffad407ba545e740db5a4 100644 (file)
@@ -7,8 +7,8 @@
    many others, a complete list can be found in the file AUTHORS.
    This program is Free Software; you can redistribute it and/or
    modify it under the terms of version two of the GNU General Public
-   License as published by the Free Software Foundation plus additions
-   that are listed in the file LICENSE.
+   License as published by the Free Software Foundation and included
+   in the file LICENSE.
 
    This program is distributed in the hope that it will be useful, but
    WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -20,7 +20,7 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   Bacula® is a registered trademark of John Walker.
+   Bacula® is a registered trademark of Kern Sibbald.
    The licensor of Bacula is the Free Software Foundation Europe
    (FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich,
    Switzerland, email:ftf@fsfeurope.org.
@@ -36,7 +36,8 @@
 #ifndef __UA_H_
 #define __UA_H_ 1
 
-struct UAContext {
+class UAContext {
+public:
    BSOCK *UA_sock;
    BSOCK *sd;
    JCR *jcr;
@@ -59,9 +60,18 @@ struct UAContext {
    bool verbose;                      /* set for normal UA verbosity */
    bool batch;                        /* set for non-interactive mode */
    bool gui;                          /* set if talking to GUI program */
+   bool runscript;                    /* set if we are in runscript */
    uint32_t pint32_val;               /* positive integer */
    int32_t  int32_val;                /* positive/negative */
    int64_t  int64_val;                /* big int */
+
+   void signal(int sig) { UA_sock->signal(sig); };
+
+   /* The below are in ua_output.c */
+   void send_msg(const char *fmt, ...);
+   void error_msg(const char *fmt, ...);
+   void warning_msg(const char *fmt, ...);
+   void info_msg(const char *fmt, ...);
 };
 
 /* Context for insert_tree_handler() */
@@ -92,7 +102,8 @@ struct RESTORE_CTX {
    utime_t JobTDate;
    uint32_t TotalFiles;
    JobId_t JobId;
-   char ClientName[MAX_NAME_LENGTH];
+   char ClientName[MAX_NAME_LENGTH];  /* backup client */
+   char RestoreClientName[MAX_NAME_LENGTH];  /* restore client */
    char last_jobid[20];
    POOLMEM *JobIds;                   /* User entered string of JobIds */
    STORE  *store;
@@ -101,6 +112,7 @@ struct RESTORE_CTX {
    int restore_jobs;
    uint32_t selected_files;
    char *where;
+   char *RegexWhere;
    RBSR *bsr;
    POOLMEM *fname;                    /* filename only */
    POOLMEM *path;                     /* path only */
@@ -114,5 +126,4 @@ struct RESTORE_CTX {
 
 #define MAX_ID_LIST_LEN 2000000
 
-
 #endif