]> git.sur5r.net Git - bacula/bacula/blob - bacula/src/stored/stored.h
Switch from GPLv2 to AGPLv3
[bacula/bacula] / bacula / src / stored / stored.h
1 /*
2    Bacula® - The Network Backup Solution
3
4    Copyright (C) 2000-2009 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  *  Version $Id$
32  */
33
34 #ifndef __STORED_H_
35 #define __STORED_H_
36
37 #define STORAGE_DAEMON 1
38
39 /* Set to debug mutexes */
40 //#define SD_DEBUG_LOCK
41 #ifdef SD_DEBUG_LOCK
42 const int sd_dbglvl = 3;
43 #else
44 const int sd_dbglvl = 300;
45 #endif
46
47 #ifdef HAVE_MTIO_H
48 #include <mtio.h>
49 #else
50 # ifdef HAVE_SYS_MTIO_H
51 # include <sys/mtio.h>
52 # else
53 #   ifdef HAVE_SYS_TAPE_H
54 #   include <sys/tape.h>
55 #   else
56     /* Needed for Mac 10.6 (Snow Leopard) */
57 #   include "lib/bmtio.h"
58 #   endif
59 # endif
60 #endif
61 #include "lock.h"
62 #include "block.h"
63 #include "record.h"
64 #include "dev.h"
65 #include "stored_conf.h"
66 #include "bsr.h"
67 #include "jcr.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_FNMATCH
76 #include <fnmatch.h>
77 #else
78 #include "lib/fnmatch.h"
79 #endif
80 #ifdef HAVE_DIRENT_H
81 #include <dirent.h>
82 #define NAMELEN(dirent) (strlen((dirent)->d_name))
83 #endif
84 #ifndef HAVE_READDIR_R
85 int readdir_r(DIR *dirp, struct dirent *entry, struct dirent **result);
86 #endif
87
88 #include "vtape.h"
89
90 /* Daemon globals from stored.c */
91 extern STORES *me;                    /* "Global" daemon resource */
92 extern bool forge_on;                 /* proceed inspite of I/O errors */
93 extern pthread_mutex_t device_release_mutex;
94 extern pthread_cond_t wait_device_release; /* wait for any device to be released */                           
95
96 #endif /* __STORED_H_ */