]> git.sur5r.net Git - bacula/bacula/blob - bacula/src/stored/stored.h
Refactor parts of stored/mount.c
[bacula/bacula] / bacula / src / stored / stored.h
1 /*
2    Bacula® - The Network Backup Solution
3
4    Copyright (C) 2000-2008 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 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 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 = 300;
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 "lock.h"
55 #include "block.h"
56 #include "record.h"
57 #include "dev.h"
58 #include "stored_conf.h"
59 #include "bsr.h"
60 #include "jcr.h"
61 #include "reserve.h"
62 #include "protos.h"
63 #ifdef HAVE_LIBZ
64 #include <zlib.h>                     /* compression headers */
65 #else
66 #define uLongf uint32_t
67 #endif
68 #ifdef HAVE_FNMATCH
69 #include <fnmatch.h>
70 #else
71 #include "lib/fnmatch.h"
72 #endif
73 #ifdef HAVE_DIRENT_H
74 #include <dirent.h>
75 #define NAMELEN(dirent) (strlen((dirent)->d_name))
76 #endif
77 #ifndef HAVE_READDIR_R
78 int readdir_r(DIR *dirp, struct dirent *entry, struct dirent **result);
79 #endif
80
81 /* Daemon globals from stored.c */
82 extern STORES *me;                    /* "Global" daemon resource */
83 extern bool forge_on;                 /* proceed inspite of I/O errors */
84 extern pthread_mutex_t device_release_mutex;
85 extern pthread_cond_t wait_device_release; /* wait for any device to be released */                           
86
87 #endif /* __STORED_H_ */