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