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