]> git.sur5r.net Git - bacula/bacula/blob - bacula/src/stored/bsr.h
- Fix ANSI labels to put EOF1 and EOF2 after each file mark.
[bacula/bacula] / bacula / src / stored / bsr.h
1 /*
2  * BootStrap record definition -- for restoring files.
3  *
4  *    Kern Sibbald, June 2002
5  *
6  *   Version $Id$
7  *
8  */
9 /*
10    Copyright (C) 2000-2005 Kern Sibbald
11
12    This program is free software; you can redistribute it and/or
13    modify it under the terms of the GNU General Public License as
14    published by the Free Software Foundation; either version 2 of
15    the License, or (at your option) any later version.
16
17    This program is distributed in the hope that it will be useful,
18    but WITHOUT ANY WARRANTY; without even the implied warranty of
19    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20    General Public License for more details.
21
22    You should have received a copy of the GNU General Public
23    License along with this program; if not, write to the Free
24    Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
25    MA 02111-1307, USA.
26
27  */
28
29
30 #ifndef __BSR_H
31 #define __BSR_H 1
32
33 /*
34  * List of Volume names to be read by Storage daemon.
35  *  Formed by Storage daemon from BSR
36  */
37 struct VOL_LIST {
38    VOL_LIST *next;
39    char VolumeName[MAX_NAME_LENGTH];
40    char MediaType[MAX_NAME_LENGTH];
41    int Slot;
42    uint32_t start_file;
43 };
44
45
46 /*
47  * !!!!!!!!!!!!!!!!!! NOTE !!!!!!!!!!!!!!!!!!!!!!!!!!!!!
48  * !!!                                               !!!
49  * !!!   All records must have a pointer to          !!!
50  * !!!   the next item as the first item defined.    !!!
51  * !!!                                               !!!
52  * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
53  */
54
55 struct BSR_VOLUME {
56    BSR_VOLUME *next;
57    char VolumeName[MAX_NAME_LENGTH];
58    char MediaType[MAX_NAME_LENGTH];
59 };
60
61 struct BSR_CLIENT {
62    BSR_CLIENT *next;
63    char ClientName[MAX_NAME_LENGTH];
64 };
65
66 struct BSR_SESSID {
67    BSR_SESSID *next;
68    uint32_t sessid;
69    uint32_t sessid2;
70 };
71
72 struct BSR_SESSTIME {
73    BSR_SESSTIME *next;
74    uint32_t sesstime;
75    bool done;                         /* local done */
76 };
77
78 struct BSR_VOLFILE {
79    BSR_VOLFILE *next;
80    uint32_t sfile;                    /* start file */
81    uint32_t efile;                    /* end file */
82    bool done;                         /* local done */
83 };
84
85 struct BSR_VOLBLOCK {
86    BSR_VOLBLOCK *next;
87    uint32_t sblock;                   /* start block */
88    uint32_t eblock;                   /* end block */
89    bool done;                         /* local done */
90 };
91
92
93 struct BSR_FINDEX {
94    BSR_FINDEX *next;
95    int32_t findex;                    /* start file index */
96    int32_t findex2;                   /* end file index */
97    bool done;                         /* local done */
98 };
99
100 struct BSR_JOBID {
101    BSR_JOBID *next;
102    uint32_t JobId;
103    uint32_t JobId2;
104 };
105
106 struct BSR_JOBTYPE {
107    BSR_JOBTYPE *next;
108    uint32_t JobType;
109 };
110
111 struct BSR_JOBLEVEL {
112    BSR_JOBLEVEL *next;
113    uint32_t JobLevel;
114 };
115
116 struct BSR_JOB {
117    BSR_JOB *next;
118    char Job[MAX_NAME_LENGTH];
119    bool done;                         /* local done */
120 };
121
122 struct BSR_STREAM {
123    BSR_STREAM *next;
124    int32_t stream;                    /* stream desired */
125 };
126
127 struct BSR {
128    BSR          *next;                /* pointer to next one */
129    BSR          *root;                /* root bsr */
130    bool          reposition;          /* set when any bsr is marked done */
131    bool          mount_next_volume;   /* set when next volume should be mounted */
132    bool          done;                /* set when everything found for this bsr */
133    bool          use_fast_rejection;  /* set if fast rejection can be used */
134    bool          use_positioning;     /* set if we can position the archive */
135    BSR_VOLUME   *volume;
136    int32_t       Slot;                /* Slot */
137    uint32_t      count;               /* count of files to restore this bsr */
138    uint32_t      found;               /* count of restored files this bsr */
139    BSR_VOLFILE  *volfile;
140    BSR_VOLBLOCK *volblock;
141    BSR_SESSTIME *sesstime;
142    BSR_SESSID   *sessid;
143    BSR_JOBID    *JobId;
144    BSR_JOB      *job;
145    BSR_CLIENT   *client;
146    BSR_FINDEX   *FileIndex;
147    BSR_JOBTYPE  *JobType;
148    BSR_JOBLEVEL *JobLevel;
149    BSR_STREAM   *stream;
150 };
151
152
153 #endif