]> git.sur5r.net Git - bacula/bacula/blob - bacula/src/stored/stored.h
dc4eb5e34acee5242b618d71148ba0abf09f2e39
[bacula/bacula] / bacula / src / stored / stored.h
1 /*
2    Bacula(R) - The Network Backup Solution
3
4    Copyright (C) 2000-2015 Kern Sibbald
5    Copyright (C) 2000-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  * Storage daemon specific defines and includes
22  *
23  */
24
25 #ifndef __STORED_H_
26 #define __STORED_H_
27
28 #define STORAGE_DAEMON 1
29
30 /* Set to debug Lock() and Unlock() only */
31 #define DEV_DEBUG_LOCK
32
33 /*
34  * Set to define all SD locks except Lock()
35  *  currently this does not work. More locks
36  *  must be converted.
37  */
38 #define SD_DEBUG_LOCK
39 #ifdef SD_DEBUG_LOCK
40 const int sd_dbglvl = 300;
41 #else
42 const int sd_dbglvl = 300;
43 #endif
44
45 #ifdef HAVE_MTIO_H
46 #include <mtio.h>
47 #else
48 # ifdef HAVE_SYS_MTIO_H
49 # include <sys/mtio.h>
50 # else
51 #   ifdef HAVE_SYS_TAPE_H
52 #   include <sys/tape.h>
53 #   else
54     /* Needed for Mac 10.6 (Snow Leopard) */
55 #   include "lib/bmtio.h"
56 #   endif
57 # endif
58 #endif
59 #include "lock.h"
60 #include "block.h"
61 #include "record.h"
62 #include "dev.h"
63 #include "file_dev.h"
64 #include "tape_dev.h"
65 #include "stored_conf.h"
66 #include "bsr.h"
67 #include "jcr.h"
68 #include "vol_mgr.h"
69 #include "reserve.h"
70 #include "protos.h"
71 #ifdef HAVE_LIBZ
72 #include <zlib.h>                     /* compression headers */
73 #else
74 #define uLongf uint32_t
75 #endif
76 #ifdef HAVE_FNMATCH
77 #include <fnmatch.h>
78 #else
79 #include "lib/fnmatch.h"
80 #endif
81 #ifdef HAVE_DIRENT_H
82 #include <dirent.h>
83 #define NAMELEN(dirent) (strlen((dirent)->d_name))
84 #endif
85 #ifndef HAVE_READDIR_R
86 int readdir_r(DIR *dirp, struct dirent *entry, struct dirent **result);
87 #endif
88
89 #include "file_dev.h"
90 #include "tape_dev.h"
91 #include "vtape_dev.h"
92 #include "sd_plugins.h"
93
94 /* Daemon globals from stored.c */
95 extern STORES *me;                    /* "Global" daemon resource */
96 extern bool forge_on;                 /* proceed inspite of I/O errors */
97 extern pthread_mutex_t device_release_mutex;
98 extern pthread_cond_t wait_device_release; /* wait for any device to be released */
99
100 #endif /* __STORED_H_ */