]> git.sur5r.net Git - bacula/bacula/blob - bacula/src/stored/bsr.h
First cut 1.23 -- kes07Jul02
[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, 2001, 2002 Kern Sibbald and John Walker
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 #include "findlib/find.h"
34
35 /*
36  * List of Volume names to be read by Storage daemon.
37  *  Formed by Storage daemon from BSR  
38  */
39 struct s_vol_list {
40    struct s_vol_list *next;
41    char VolumeName[MAX_NAME_LENGTH];
42    int Slot; 
43 };
44 typedef struct s_vol_list VOL_LIST;
45
46
47 /*
48  * !!!!!!!!!!!!!!!!!! NOTE !!!!!!!!!!!!!!!!!!!!!!!!!!!!!
49  * !!!                                               !!!
50  * !!!   All records must have a pointer to          !!!
51  * !!!   the next item as the first item defined.    !!!
52  * !!!                                               !!!
53  * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
54  */
55
56 typedef struct s_bsr_client {
57    struct s_bsr_client *next;
58    char ClientName[MAX_NAME_LENGTH];
59 } BSR_CLIENT;
60
61 typedef struct s_bsr_sessid {
62    struct s_bsr_sessid *next;
63    uint32_t sessid;
64    uint32_t sessid2;
65    int found;
66 } BSR_SESSID;
67
68 typedef struct s_bsr_sesstime {
69    struct s_bsr_sesstime *next;
70    uint32_t sesstime;
71    int found;
72 } BSR_SESSTIME;
73
74 typedef struct s_bsr_volfile {
75    struct s_bsr_volfile *next;
76    uint32_t sfile;                    /* start file */
77    uint32_t efile;                    /* end file */
78    int found;
79 } BSR_VOLFILE;
80
81 typedef struct s_bsr_findex {
82    struct s_bsr_findex *next;
83    int32_t findex;                    /* start file index */
84    int32_t findex2;                   /* end file index */
85    int found;
86 } BSR_FINDEX;
87
88 typedef struct s_bsr_jobid {
89    struct s_bsr_jobid *next;
90    uint32_t JobId;
91    uint32_t JobId2;
92    int found;
93 } BSR_JOBID;
94
95 typedef struct s_bsr_jobtype {
96    struct s_bsr_jobtype *next;
97    uint32_t JobType;
98 } BSR_JOBTYPE;
99
100 typedef struct s_bsr_joblevel {
101    struct s_bsr_joblevel *next;
102    uint32_t JobLevel;
103 } BSR_JOBLEVEL;
104
105 typedef struct s_bsr_job {
106    struct s_bsr_job *next;
107    char Job[MAX_NAME_LENGTH];
108    int found;
109 } BSR_JOB;
110
111 typedef struct s_bsr_stream {
112    struct s_bsr_stream *next;
113    int32_t stream;                    /* stream desired */
114    int found;
115 } BSR_STREAM;
116
117 typedef struct s_bsr {
118    struct s_bsr *next;                /* pointer to next one */
119    int           done;                /* set when everything found */
120    char         *VolumeName;
121    int32_t       Slot;                /* Slot */
122    BSR_VOLFILE  *volfile;
123    BSR_SESSTIME *sesstime;
124    BSR_SESSID   *sessid;
125    BSR_JOBID    *JobId;
126    BSR_JOB      *job;
127    BSR_CLIENT   *client;
128    BSR_FINDEX   *FileIndex;
129    BSR_JOBTYPE  *JobType;
130    BSR_JOBLEVEL *JobLevel;
131    BSR_STREAM   *stream;
132 // FF_PKT *ff;                        /* include/exclude */
133 } BSR;
134
135
136 #endif