]> git.sur5r.net Git - bacula/bacula/blob - bacula/src/tray-monitor/tray_conf.h
Replace explicit checks for "/" with calls to IsPathSeparator, strchr with first_path...
[bacula/bacula] / bacula / src / tray-monitor / tray_conf.h
1 /*
2  * Tray Monitor specific configuration and defines
3  *
4  *   Adapted from dird_conf.c
5  *
6  *     Nicolas Boichat, August MMIV
7  *
8  *    Version $Id$
9  */
10 /*
11    Copyright (C) 2004 Kern Sibbald and John Walker
12
13    This program is free software; you can redistribute it and/or
14    modify it under the terms of the GNU General Public License as
15    published by the Free Software Foundation; either version 2 of
16    the License, or (at your option) any later version.
17
18    This program is distributed in the hope that it will be useful,
19    but WITHOUT ANY WARRANTY; without even the implied warranty of
20    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21    General Public License for more details.
22
23    You should have received a copy of the GNU General Public
24    License along with this program; if not, write to the Free
25    Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
26    MA 02111-1307, USA.
27
28  */
29
30 /* NOTE:  #includes at the end of this file */
31
32 /*
33  * Resource codes -- they must be sequential for indexing
34  */
35 enum rescode {
36    R_MONITOR = 1001,
37    R_DIRECTOR,
38    R_CLIENT,
39    R_STORAGE,
40    R_FIRST = R_MONITOR,
41    R_LAST  = R_STORAGE                /* keep this updated */
42 };
43
44
45 /*
46  * Some resource attributes
47  */
48 enum {
49    R_NAME = 1020,
50    R_ADDRESS,
51    R_PASSWORD,
52    R_TYPE,
53    R_BACKUP
54 };
55
56 /* Director */
57 struct DIRRES {
58    RES   hdr;
59    int   DIRport;                     /* UA server port */
60    char *address;                     /* UA server address */
61    int enable_ssl;                    /* Use SSL */
62 };
63
64 /*
65  *   Tray Monitor Resource
66  *
67  */
68 struct MONITOR {
69    RES   hdr;
70    int require_ssl;                   /* Require SSL for all connections */
71    MSGS *messages;                    /* Daemon message handler */
72    char *password;                    /* UA server password */
73    utime_t RefreshInterval;           /* Status refresh interval */
74    utime_t FDConnectTimeout;          /* timeout for connect in seconds */
75    utime_t SDConnectTimeout;          /* timeout in seconds */
76 };
77
78
79 /*
80  *   Client Resource
81  *
82  */
83 struct CLIENT {
84    RES   hdr;
85
86    int   FDport;                      /* Where File daemon listens */
87    char *address;
88    char *password;
89    int enable_ssl;                    /* Use SSL */
90 };
91
92 /*
93  *   Store Resource
94  *
95  */
96 struct STORE {
97    RES   hdr;
98
99    int   SDport;                      /* port where Directors connect */
100    char *address;
101    char *password;
102    int enable_ssl;                    /* Use SSL */
103 };
104
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    RES        hdr;
116 };
117