]> git.sur5r.net Git - bacula/bacula/blob - bacula/src/filed/filed.h
Backport from Bacula Enterprise
[bacula/bacula] / bacula / src / filed / filed.h
1 /*
2    Bacula(R) - The Network Backup Solution
3
4    Copyright (C) 2000-2015 Kern Sibbald
5    Copyright (C) 2001-2014 Free Software Foundation Europe e.V.
6
7    The original author of Bacula is Kern Sibbald, with contributions
8    from many others, a complete list can be found in the file AUTHORS.
9
10    You may use this file and others of this release according to the
11    license defined in the LICENSE file, which includes the Affero General
12    Public License, v3.0 ("AGPLv3") and some additional permissions and
13    terms pursuant to its AGPLv3 Section 7.
14
15    This notice must be preserved when any source code is 
16    conveyed and/or propagated.
17
18    Bacula(R) is a registered trademark of Kern Sibbald.
19 */
20 /*
21  * Bacula File Daemon specific configuration and defines
22  *
23  *     Kern Sibbald, Jan MMI
24  *
25  */
26
27 //#define TEST_WORKER
28 #ifdef  TEST_WORKER
29 #define ERROR_BUFFER_OVERFLOW 1
30 #define ERROR_SUCCESS 0
31 #endif
32
33
34 /* acl errors to report per job. */
35 #define ACL_MAX_ERROR_PRINT_PER_JOB   25
36  
37 /* xattr errors to report per job. */
38 #define XATTR_MAX_ERROR_PRINT_PER_JOB 25
39  
40 /* Return values from acl subroutines. */
41 enum bacl_rtn_code {
42    bacl_rtn_fatal = -1,
43    bacl_rtn_error =  0,
44    bacl_rtn_ok    =  1
45 };
46  
47 /* Return values from xattr subroutines. */
48 enum bxattr_rtn_code {
49    bxattr_rtn_fatal = -1,
50    bxattr_rtn_error =  0,
51    bxattr_rtn_ok    =  1
52 };
53
54 #define FILE_DAEMON 1
55 #include  "lib/htable.h"
56 #include  "filed_conf.h"
57 #include  "fd_plugins.h"
58 #include  "fd_snapshot.h"
59 #include  "findlib/find.h"
60 #include  "acl.h"
61 #include  "xattr.h"
62 #include  "jcr.h"
63 #include  "protos.h"                   /* file daemon prototypes */
64 #include  "lib/runscript.h"
65 #include  "lib/breg.h"
66 #ifdef HAVE_LIBZ
67 #include <zlib.h>                     /* compression headers */
68 #else
69 #define uLongf uint32_t
70 #endif
71 #ifdef HAVE_LZO
72 #include <lzo/lzoconf.h>
73 #include <lzo/lzo1x.h>
74 #endif
75
76 extern CLIENT *me;                    /* "Global" Client resource */
77 extern bool win32decomp;              /* Use decomposition of BackupRead data */
78 extern bool no_win32_write_errors;    /* Ignore certain errors */
79
80 void terminate_filed(int sig);
81
82 struct s_cmds {
83    const char *cmd;
84    int (*func)(JCR *);
85    int monitoraccess; /* specify if monitors have access to this function */
86 };
87
88 void allow_os_suspensions();
89 void prevent_os_suspensions();