]> git.sur5r.net Git - bacula/bacula/blob - bacula/src/qt-console/tray-monitor/tray_conf.h
Backport from BEE
[bacula/bacula] / bacula / src / qt-console / tray-monitor / tray_conf.h
1 /*
2    Bacula® - The Network Backup Solution
3
4    Copyright (C) 2004-2014 Free Software Foundation Europe e.V.
5
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.
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    Bacula® is a registered trademark of Kern Sibbald.
15 */
16 /*
17  * Tray Monitor specific configuration and defines
18  *
19  *   Adapted from dird_conf.c
20  *
21  *     Nicolas Boichat, August MMIV
22  *
23  */
24
25 /* NOTE:  #includes at the end of this file */
26
27 /*
28  * Resource codes -- they must be sequential for indexing
29  */
30 enum rescode {
31    R_MONITOR = 1001,
32    R_DIRECTOR,
33    R_CLIENT,
34    R_STORAGE,
35    R_CONSOLE_FONT,
36    R_FIRST = R_MONITOR,
37    R_LAST  = R_CONSOLE_FONT                /* keep this updated */
38 };
39
40
41 /*
42  * Some resource attributes
43  */
44 enum {
45    R_NAME = 1020,
46    R_ADDRESS,
47    R_PASSWORD,
48    R_TYPE,
49    R_BACKUP
50 };
51
52 /* Director */
53 struct DIRRES {
54    RES   hdr;
55    uint32_t DIRport;                  /* UA server port */
56    char *address;                     /* UA server address */
57    bool enable_ssl;                   /* Use SSL */
58 };
59
60 /*
61  *   Tray Monitor Resource
62  *
63  */
64 struct MONITOR {
65    RES   hdr;
66    bool require_ssl;                  /* Require SSL for all connections */
67    MSGS *messages;                    /* Daemon message handler */
68    char *password;                    /* UA server password */
69    utime_t RefreshInterval;           /* Status refresh interval */
70    utime_t FDConnectTimeout;          /* timeout for connect in seconds */
71    utime_t SDConnectTimeout;          /* timeout in seconds */
72    utime_t DIRConnectTimeout;         /* timeout in seconds */
73 };
74
75
76 /*
77  *   Client Resource
78  *
79  */
80 struct CLIENT {
81    RES   hdr;
82
83    uint32_t FDport;                   /* Where File daemon listens */
84    char *address;
85    char *password;
86    bool enable_ssl;                   /* Use SSL */
87 };
88
89 /*
90  *   Store Resource
91  *
92  */
93 struct STORE {
94    RES   hdr;
95
96    uint32_t SDport;                   /* port where Directors connect */
97    char *address;
98    char *password;
99    bool enable_ssl;                   /* Use SSL */
100 };
101
102 struct CONFONTRES {
103    RES   hdr;
104    char *fontface;                    /* Console Font specification */
105 };
106
107 /* Define the Union of all the above
108  * resource structure definitions.
109  */
110 union URES {
111    MONITOR    res_monitor;
112    DIRRES     res_dir;
113    CLIENT     res_client;
114    STORE      res_store;
115    CONFONTRES con_font;
116    RES        hdr;
117 };