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