]> git.sur5r.net Git - bacula/bacula/blob - bacula/src/wx-console/console_conf.h
- add stringlength cache to improve comparison in Win32UTF8->UCS2 cache
[bacula/bacula] / bacula / src / wx-console / console_conf.h
1 /*
2  * Version $Id$
3  */
4 /*
5    Copyright (C) 2000-2005 Kern Sibbald
6
7    This program is free software; you can redistribute it and/or
8    modify it under the terms of the GNU General Public License
9    version 2 as amended with additional clauses defined in the
10    file LICENSE in the main source directory.
11
12    This program is distributed in the hope that it will be useful,
13    but WITHOUT ANY WARRANTY; without even the implied warranty of
14    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 
15    the file LICENSE for additional details.
16
17  */
18
19 #ifndef CONSOLECONF_H
20 #define CONSOLECONF_H
21
22 #include "bacula.h"
23 #include "jcr.h"
24
25 /*
26  * Resource codes -- they must be sequential for indexing
27  */
28 #define R_FIRST                       1001
29
30 #define R_CONSOLE                     1001
31 #define R_DIRECTOR                    1002
32
33 #define R_LAST                        R_DIRECTOR
34
35 /*
36  * Some resource attributes
37  */
38 #define R_NAME                        1020
39 #define R_ADDRESS                     1021
40 #define R_PASSWORD                    1022
41 #define R_TYPE                        1023
42 #define R_BACKUP                      1024
43
44
45 /* Definition of the contents of each Resource */
46
47 /* Console "globals" */
48 struct CONRES {
49    RES   hdr;
50    char *rc_file;                     /* startup file */
51    char *hist_file;                   /* command history file */
52    char *password;                    /* UA server password */
53    int tls_enable;                    /* Enable TLS on all connections */
54    int tls_require;                   /* Require TLS on all connections */
55    char *tls_ca_certfile;             /* TLS CA Certificate File */
56    char *tls_ca_certdir;              /* TLS CA Certificate Directory */
57    char *tls_certfile;                /* TLS Client Certificate File */
58    char *tls_keyfile;                 /* TLS Client Key File */
59
60    TLS_CONTEXT *tls_ctx;              /* Shared TLS Context */
61 };
62
63 /* Director */
64 struct DIRRES {
65    RES   hdr;
66    int   DIRport;                     /* UA server port */
67    char *address;                     /* UA server address */
68    char *password;                    /* UA server password */
69    int tls_enable;                    /* Enable TLS on all connections */
70    int tls_require;                   /* Require TLS on all connections */
71    char *tls_ca_certfile;             /* TLS CA Certificate File */
72    char *tls_ca_certdir;              /* TLS CA Certificate Directory */
73    char *tls_certfile;                /* TLS Client Certificate File */
74    char *tls_keyfile;                 /* TLS Client Key File */
75
76    TLS_CONTEXT *tls_ctx;              /* Shared TLS Context */
77 };
78
79
80 /* Define the Union of all the above
81  * resource structure definitions.
82  */
83 union u_res {
84    DIRRES res_dir;
85    CONRES res_cons;
86    RES hdr;
87 };
88
89 typedef union u_res URES;
90
91 #endif // CONSOLECONF_H