]> git.sur5r.net Git - bacula/bacula/blob - bacula/src/dird/dird.h
Big backport from Enterprise
[bacula/bacula] / bacula / src / dird / dird.h
1 /*
2    Bacula(R) - The Network Backup Solution
3
4    Copyright (C) 2000-2017 Kern Sibbald
5
6    The original author of Bacula is Kern Sibbald, with contributions
7    from many others, a complete list can be found in the file AUTHORS.
8
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.
13
14    This notice must be preserved when any source code is
15    conveyed and/or propagated.
16
17    Bacula(R) is a registered trademark of Kern Sibbald.
18 */
19 /*
20  * Includes specific to the Director
21  *
22  *     Kern Sibbald, December MM
23  */
24
25 #include "lib/ini.h"
26 #include "lib/runscript.h"
27 #include "lib/breg.h"
28 #include "dird_conf.h"
29
30 #define DIRECTOR_DAEMON 1
31
32 #include "dir_plugins.h"
33 #include "cats/cats.h"
34
35 #include "jcr.h"
36 #include "bsr.h"
37 #include "ua.h"
38 #include "jobq.h"
39
40 /* Globals that dird.c exports */
41 extern DIRRES *director;                     /* Director resource */
42 extern int FDConnectTimeout;
43 extern int SDConnectTimeout;
44
45 /* Used in ua_prune.c and ua_purge.c */
46
47 struct s_count_ctx {
48    int count;
49 };
50
51 #define MAX_DEL_LIST_LEN 2000000
52
53 struct del_ctx {
54    JobId_t *JobId;                    /* array of JobIds */
55    char *PurgedFiles;                 /* Array of PurgedFile flags */
56    int num_ids;                       /* ids stored */
57    int max_ids;                       /* size of array */
58    int num_del;                       /* number deleted */
59    int tot_ids;                       /* total to process */
60 };
61
62 /* Flags for find_next_volume_for_append() */
63 enum {
64   fnv_create_vol    = true,
65   fnv_no_create_vol = false,
66   fnv_prune         = true,
67   fnv_no_prune      = false
68 };
69
70 typedef struct {
71    char    *plugin_name;
72    POOLMEM *content;
73 } plugin_config_item;
74
75 struct idpkt {
76    POOLMEM *list;
77    uint32_t count;
78 };
79
80 void free_plugin_config_item(plugin_config_item *lst);
81 void free_plugin_config_items(alist *lst);
82
83 #include "protos.h"