2 Bacula® - The Network Backup Solution
4 Copyright (C) 2001-2014 Free Software Foundation Europe e.V.
6 The main author of Bacula is Kern Sibbald, with contributions from many
7 others, a complete list can be found in the file AUTHORS.
9 You may use this file and others of this release according to the
10 license defined in the LICENSE file, which includes the Affero General
11 Public License, v3.0 ("AGPLv3") and some additional permissions and
12 terms pursuant to its AGPLv3 Section 7.
14 Bacula® is a registered trademark of Kern Sibbald.
17 * Includes specific to the Director User Agent Server
19 * Kern Sibbald, August MMI
31 B_DB *db; /* Pointing to shared or private db */
32 B_DB *shared_db; /* Main Bacula DB access */
33 B_DB *private_db; /* Private DB access */
35 CONRES *cons; /* console resource */
36 POOLMEM *cmd; /* return command/name buffer */
37 POOLMEM *args; /* command line arguments */
38 POOLMEM *errmsg; /* store error message */
39 char *argk[MAX_CMD_ARGS]; /* argument keywords */
40 char *argv[MAX_CMD_ARGS]; /* argument values */
41 int argc; /* number of arguments */
42 char **prompt; /* list of prompts */
43 char **unique; /* extra unique field */
44 int max_prompts; /* max size of list */
45 int num_prompts; /* current number in list */
46 char api_opts[MAX_NAME_LENGTH]; /* Api options */
47 int api; /* For programs want an API */
48 int cmd_index; /* Index in command table */
49 bool force_mult_db_connections; /* overwrite cat.mult_db_connections */
50 bool auto_display_messages; /* if set, display messages */
51 bool user_notified_msg_pending; /* set when user notified */
52 bool automount; /* if set, mount after label */
53 bool quit; /* if set, quit */
54 bool verbose; /* set for normal UA verbosity */
55 bool batch; /* set for non-interactive mode */
56 bool gui; /* set if talking to GUI program */
57 bool runscript; /* set if we are in runscript */
58 uint32_t pint32_val; /* positive integer */
59 int32_t int32_val; /* positive/negative */
60 int64_t int64_val; /* big int */
62 void signal(int sig) { UA_sock->signal(sig); };
64 /* The below are in ua_output.c */
65 void send_msg(const char *fmt, ...);
66 void error_msg(const char *fmt, ...);
67 void warning_msg(const char *fmt, ...);
68 void info_msg(const char *fmt, ...);
71 /* Context for insert_tree_handler() */
73 TREE_ROOT *root; /* root */
74 TREE_NODE *node; /* current node */
75 TREE_NODE *avail_node; /* unused node last insert */
76 int cnt; /* count for user feedback */
77 bool all; /* if set mark all as default */
78 bool hardlinks_in_mem; /* Set to optimize for speed */
80 uint32_t FileEstimate; /* estimate of number of files */
81 uint32_t FileCount; /* current count of files */
82 uint32_t LastCount; /* last count of files */
83 uint32_t DeltaCount; /* trigger for printing */
87 char **name; /* list of names */
88 int num_ids; /* ids stored */
89 int max_ids; /* size of array */
90 int num_del; /* number deleted */
91 int tot_ids; /* total to process */
95 /* Main structure for obtaining JobIds or Files to be restored */
100 char ClientName[MAX_NAME_LENGTH]; /* backup client */
101 char RestoreClientName[MAX_NAME_LENGTH]; /* restore client */
102 char RestoreMediaType[MAX_NAME_LENGTH]; /* restore Media type when storage override */
104 POOLMEM *JobIds; /* User entered string of JobIds */
105 POOLMEM *BaseJobIds; /* Base jobids */
110 uint32_t selected_files;
116 POOLMEM *fname; /* filename only */
117 POOLMEM *path; /* path only */
119 int fnl; /* filename length */
120 int pnl; /* path length */
122 bool all; /* mark all as default */
123 bool hardlinks_in_mem; /* keep hard links in memory */
127 #define MAX_ID_LIST_LEN 2000000