]> git.sur5r.net Git - bacula/bacula/blob - bacula/src/tray-monitor/tray_conf.h
AIX also supports setmntent/getmntent so use that instead of much more complicated...
[bacula/bacula] / bacula / src / tray-monitor / tray_conf.h
1 /*
2    Bacula® - The Network Backup Solution
3
4    Copyright (C) 2004-2007 Free Software Foundation Europe e.V.
5
6    The main author of Bacula is Kern Sibbald, with contributions from
7    many others, a complete list can be found in the file AUTHORS.
8    This program is Free Software; you can redistribute it and/or
9    modify it under the terms of version three of the GNU Affero General Public
10    License as published by the Free Software Foundation and included
11    in the file LICENSE.
12
13    This program is distributed in the hope that it will be useful, but
14    WITHOUT ANY WARRANTY; without even the implied warranty of
15    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16    General Public License for more details.
17
18    You should have received a copy of the GNU Affero General Public License
19    along with this program; if not, write to the Free Software
20    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
21    02110-1301, USA.
22
23    Bacula® is a registered trademark of Kern Sibbald.
24    The licensor of Bacula is the Free Software Foundation Europe
25    (FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich,
26    Switzerland, email:ftf@fsfeurope.org.
27 */
28 /*
29  * Tray Monitor specific configuration and defines
30  *
31  *   Adapted from dird_conf.c
32  *
33  *     Nicolas Boichat, August MMIV
34  *
35  *    Version $Id$
36  */
37
38 /* NOTE:  #includes at the end of this file */
39
40 /*
41  * Resource codes -- they must be sequential for indexing
42  */
43 enum rescode {
44    R_MONITOR = 1001,
45    R_DIRECTOR,
46    R_CLIENT,
47    R_STORAGE,
48    R_CONSOLE_FONT,
49    R_FIRST = R_MONITOR,
50    R_LAST  = R_CONSOLE_FONT                /* keep this updated */
51 };
52
53
54 /*
55  * Some resource attributes
56  */
57 enum {
58    R_NAME = 1020,
59    R_ADDRESS,
60    R_PASSWORD,
61    R_TYPE,
62    R_BACKUP
63 };
64
65 /* Director */
66 struct DIRRES {
67    RES   hdr;
68    uint32_t DIRport;                  /* UA server port */
69    char *address;                     /* UA server address */
70    bool enable_ssl;                   /* Use SSL */
71 };
72
73 /*
74  *   Tray Monitor Resource
75  *
76  */
77 struct MONITOR {
78    RES   hdr;
79    bool require_ssl;                  /* Require SSL for all connections */
80    MSGS *messages;                    /* Daemon message handler */
81    char *password;                    /* UA server password */
82    utime_t RefreshInterval;           /* Status refresh interval */
83    utime_t FDConnectTimeout;          /* timeout for connect in seconds */
84    utime_t SDConnectTimeout;          /* timeout in seconds */
85 };
86
87
88 /*
89  *   Client Resource
90  *
91  */
92 struct CLIENT {
93    RES   hdr;
94
95    uint32_t FDport;                   /* Where File daemon listens */
96    char *address;
97    char *password;
98    bool enable_ssl;                   /* Use SSL */
99 };
100
101 /*
102  *   Store Resource
103  *
104  */
105 struct STORE {
106    RES   hdr;
107
108    uint32_t SDport;                   /* port where Directors connect */
109    char *address;
110    char *password;
111    bool enable_ssl;                   /* Use SSL */
112 };
113
114 struct CONFONTRES {
115    RES   hdr;
116    char *fontface;                    /* Console Font specification */
117 };
118
119 /* Define the Union of all the above
120  * resource structure definitions.
121  */
122 union URES {
123    MONITOR    res_monitor;
124    DIRRES     res_dir;
125    CLIENT     res_client;
126    STORE      res_store;
127    CONFONTRES con_font;
128    RES        hdr;
129 };