]> git.sur5r.net Git - bacula/bacula/blob - bacula/src/stored/stored.h
11Apr07
[bacula/bacula] / bacula / src / stored / stored.h
1 /*
2    Bacula® - The Network Backup Solution
3
4    Copyright (C) 2000-2006 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 two of the GNU General Public
10    License as published by the Free Software Foundation plus additions
11    that are listed 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 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 John Walker.
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 const int sd_dbglvl = 100;
42
43 #ifdef HAVE_MTIO_H
44 #include <mtio.h>
45 #else
46 # ifdef HAVE_SYS_MTIO_H
47 # include <sys/mtio.h>
48 # else
49 #   ifdef HAVE_SYS_TAPE_H
50 #   include <sys/tape.h>
51 #   endif
52 # endif
53 #endif
54 #include "block.h"
55 #include "record.h"
56 #include "dev.h"
57 #include "stored_conf.h"
58 #include "bsr.h"
59 #include "jcr.h"
60 #include "reserve.h"
61 #include "protos.h"
62 #ifdef HAVE_LIBZ
63 #include <zlib.h>                     /* compression headers */
64 #else
65 #define uLongf uint32_t
66 #endif
67 #ifdef HAVE_FNMATCH
68 #include <fnmatch.h>
69 #else
70 #include "lib/fnmatch.h"
71 #endif
72 #ifdef HAVE_DIRENT_H
73 #include <dirent.h>
74 #define NAMELEN(dirent) (strlen((dirent)->d_name))
75 #endif
76 #ifndef HAVE_READDIR_R
77 int readdir_r(DIR *dirp, struct dirent *entry, struct dirent **result);
78 #endif
79
80 /* Daemon globals from stored.c */
81 extern STORES *me;                    /* "Global" daemon resource */
82 extern bool forge_on;                 /* proceed inspite of I/O errors */
83 extern pthread_mutex_t device_release_mutex;
84 extern pthread_cond_t wait_device_release; /* wait for any device to be released */                           
85
86 #endif /* __STORED_H_ */