]> git.sur5r.net Git - bacula/bacula/blob - bacula/src/wx-console/console_conf.h
kes Simplify locking in the reservations system.
[bacula/bacula] / bacula / src / wx-console / console_conf.h
1 /*
2  * Version $Id$
3  */
4 /*
5    Bacula® - The Network Backup Solution
6
7    Copyright (C) 2000-2006 Free Software Foundation Europe e.V.
8
9    The main author of Bacula is Kern Sibbald, with contributions from
10    many others, a complete list can be found in the file AUTHORS.
11    This program is Free Software; you can redistribute it and/or
12    modify it under the terms of version two of the GNU General Public
13    License as published by the Free Software Foundation plus additions
14    that are listed in the file LICENSE.
15
16    This program is distributed in the hope that it will be useful, but
17    WITHOUT ANY WARRANTY; without even the implied warranty of
18    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19    General Public License for more details.
20
21    You should have received a copy of the GNU General Public License
22    along with this program; if not, write to the Free Software
23    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
24    02110-1301, USA.
25
26    Bacula® is a registered trademark of John Walker.
27    The licensor of Bacula is the Free Software Foundation Europe
28    (FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich,
29    Switzerland, email:ftf@fsfeurope.org.
30 */
31
32 #ifndef CONSOLECONF_H
33 #define CONSOLECONF_H
34
35 #include "bacula.h"
36 #include "jcr.h"
37
38 /*
39  * Resource codes -- they must be sequential for indexing
40  */
41 #define R_FIRST                       1001
42
43 #define R_CONSOLE                     1001
44 #define R_DIRECTOR                    1002
45
46 #define R_LAST                        R_DIRECTOR
47
48 /*
49  * Some resource attributes
50  */
51 #define R_NAME                        1020
52 #define R_ADDRESS                     1021
53 #define R_PASSWORD                    1022
54 #define R_TYPE                        1023
55 #define R_BACKUP                      1024
56
57
58 /* Definition of the contents of each Resource */
59
60 /* Console "globals" */
61 struct CONRES {
62    RES   hdr;
63    char *rc_file;                     /* startup file */
64    char *hist_file;                   /* command history file */
65    char *password;                    /* UA server password */
66    int tls_enable;                    /* Enable TLS on all connections */
67    int tls_require;                   /* Require TLS on all connections */
68    char *tls_ca_certfile;             /* TLS CA Certificate File */
69    char *tls_ca_certdir;              /* TLS CA Certificate Directory */
70    char *tls_certfile;                /* TLS Client Certificate File */
71    char *tls_keyfile;                 /* TLS Client Key File */
72
73    TLS_CONTEXT *tls_ctx;              /* Shared TLS Context */
74 };
75
76 /* Director */
77 struct DIRRES {
78    RES   hdr;
79    int   DIRport;                     /* UA server port */
80    char *address;                     /* UA server address */
81    char *password;                    /* UA server password */
82    int tls_enable;                    /* Enable TLS on all connections */
83    int tls_require;                   /* Require TLS on all connections */
84    char *tls_ca_certfile;             /* TLS CA Certificate File */
85    char *tls_ca_certdir;              /* TLS CA Certificate Directory */
86    char *tls_certfile;                /* TLS Client Certificate File */
87    char *tls_keyfile;                 /* TLS Client Key File */
88
89    TLS_CONTEXT *tls_ctx;              /* Shared TLS Context */
90 };
91
92
93 /* Define the Union of all the above
94  * resource structure definitions.
95  */
96 union u_res {
97    DIRRES res_dir;
98    CONRES res_cons;
99    RES hdr;
100 };
101
102 typedef union u_res URES;
103
104 #endif // CONSOLECONF_H