]> git.sur5r.net Git - bacula/bacula/blob - bacula/src/stored/stored.h
2af78c4dcab09a35bee11a939c3f8780d11db5a9
[bacula/bacula] / bacula / src / stored / stored.h
1 /*
2    Bacula® - The Network Backup Solution
3
4    Copyright (C) 2000-2013 Free Software Foundation Europe e.V.
5
6    The main author of Bacula is Kern Sibbald, with contributions from
7    many others, a complete list can be found in the file AUTHORS.
8    This program is Free Software; you can redistribute it and/or
9    modify it under the terms of version three of the GNU Affero General Public
10    License as published by the Free Software Foundation and included
11    in the file LICENSE.
12
13    This program is distributed in the hope that it will be useful, but
14    WITHOUT ANY WARRANTY; without even the implied warranty of
15    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16    General Public License for more details.
17
18    You should have received a copy of the GNU Affero General Public License
19    along with this program; if not, write to the Free Software
20    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
21    02110-1301, USA.
22
23    Bacula® is a registered trademark of Kern Sibbald.
24    The licensor of Bacula is the Free Software Foundation Europe
25    (FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich,
26    Switzerland, email:ftf@fsfeurope.org.
27 */
28 /*
29  * Storage daemon specific defines and includes
30  *
31  */
32
33 #ifndef __STORED_H_
34 #define __STORED_H_
35
36 #define STORAGE_DAEMON 1
37
38 /* Set to debug mutexes */
39 //#define SD_DEBUG_LOCK
40 #ifdef SD_DEBUG_LOCK
41 const int sd_dbglvl = 3;
42 #else
43 const int sd_dbglvl = 300;
44 #endif
45
46 #ifdef HAVE_MTIO_H
47 #include <mtio.h>
48 #else
49 # ifdef HAVE_SYS_MTIO_H
50 # include <sys/mtio.h>
51 # else
52 #   ifdef HAVE_SYS_TAPE_H
53 #   include <sys/tape.h>
54 #   else
55     /* Needed for Mac 10.6 (Snow Leopard) */
56 #   include "lib/bmtio.h"
57 #   endif
58 # endif
59 #endif
60 #include "lock.h"
61 #include "block.h"
62 #include "record.h"
63 #include "dev.h"
64 #include "stored_conf.h"
65 #include "bsr.h"
66 #include "jcr.h"
67 #include "vol_mgr.h"
68 #include "reserve.h"
69 #include "protos.h"
70 #ifdef HAVE_LIBZ
71 #include <zlib.h>                     /* compression headers */
72 #else
73 #define uLongf uint32_t
74 #endif
75 #ifdef HAVE_LZO
76 #include <lzo/lzoconf.h>
77 #include <lzo/lzo1x.h>
78 #endif
79 #ifdef HAVE_FNMATCH
80 #include <fnmatch.h>
81 #else
82 #include "lib/fnmatch.h"
83 #endif
84 #ifdef HAVE_DIRENT_H
85 #include <dirent.h>
86 #define NAMELEN(dirent) (strlen((dirent)->d_name))
87 #endif
88 #ifndef HAVE_READDIR_R
89 int readdir_r(DIR *dirp, struct dirent *entry, struct dirent **result);
90 #endif
91
92 #include "vtape.h"
93 #include "sd_plugins.h"
94
95 /* Daemon globals from stored.c */
96 extern STORES *me;                    /* "Global" daemon resource */
97 extern bool forge_on;                 /* proceed inspite of I/O errors */
98 extern pthread_mutex_t device_release_mutex;
99 extern pthread_cond_t wait_device_release; /* wait for any device to be released */                           
100
101 #endif /* __STORED_H_ */