]> git.sur5r.net Git - bacula/bacula/blob - bacula/src/stored/bsr.h
restore + SQL editing cleanups
[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    int start_file;
44 };
45 typedef struct s_vol_list VOL_LIST;
46
47
48 /*
49  * !!!!!!!!!!!!!!!!!! NOTE !!!!!!!!!!!!!!!!!!!!!!!!!!!!!
50  * !!!                                               !!!
51  * !!!   All records must have a pointer to          !!!
52  * !!!   the next item as the first item defined.    !!!
53  * !!!                                               !!!
54  * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
55  */
56
57 typedef struct s_bsr_volume {
58    struct s_bsr_volume *next;
59    char VolumeName[MAX_NAME_LENGTH];
60 } BSR_VOLUME;
61
62 typedef struct s_bsr_client {
63    struct s_bsr_client *next;
64    char ClientName[MAX_NAME_LENGTH];
65 } BSR_CLIENT;
66
67 typedef struct s_bsr_sessid {
68    struct s_bsr_sessid *next;
69    uint32_t sessid;
70    uint32_t sessid2;
71    int done;                          /* local done */
72 } BSR_SESSID;
73
74 typedef struct s_bsr_sesstime {
75    struct s_bsr_sesstime *next;
76    uint32_t sesstime;
77    int done;                          /* local done */
78 } BSR_SESSTIME;
79
80 typedef struct s_bsr_volfile {
81    struct s_bsr_volfile *next;
82    uint32_t sfile;                    /* start file */
83    uint32_t efile;                    /* end file */
84    int done;                          /* local done */
85 } BSR_VOLFILE;
86
87 typedef struct s_bsr_volblock {
88    struct s_bsr_volblock *next;
89    uint32_t sblock;                   /* start block */
90    uint32_t eblock;                   /* end block */
91    int done;                          /* local done */
92 } BSR_VOLBLOCK;
93
94
95 typedef struct s_bsr_findex {
96    struct s_bsr_findex *next;
97    int32_t findex;                    /* start file index */
98    int32_t findex2;                   /* end file index */
99    int done;                          /* local done */
100 } BSR_FINDEX;
101
102 typedef struct s_bsr_jobid {
103    struct s_bsr_jobid *next;
104    uint32_t JobId;
105    uint32_t JobId2;
106 } BSR_JOBID;
107
108 typedef struct s_bsr_jobtype {
109    struct s_bsr_jobtype *next;
110    uint32_t JobType;
111 } BSR_JOBTYPE;
112
113 typedef struct s_bsr_joblevel {
114    struct s_bsr_joblevel *next;
115    uint32_t JobLevel;
116 } BSR_JOBLEVEL;
117
118 typedef struct s_bsr_job {
119    struct s_bsr_job *next;
120    char Job[MAX_NAME_LENGTH];
121    int done;
122 } BSR_JOB;
123
124 typedef struct s_bsr_stream {
125    struct s_bsr_stream *next;
126    int32_t stream;                    /* stream desired */
127 } BSR_STREAM;
128
129 typedef struct s_bsr {
130    struct s_bsr *next;                /* pointer to next one */
131    int           done;                /* set when everything found */
132    BSR_VOLUME   *volume;
133    int32_t       Slot;                /* Slot */
134    uint32_t      count;               /* count of files to restore this bsr */
135    uint32_t      found;               /* count of restored files this bsr */
136    BSR_VOLFILE  *volfile;
137    BSR_VOLBLOCK *volblock;
138    BSR_SESSTIME *sesstime;
139    BSR_SESSID   *sessid;
140    BSR_JOBID    *JobId;
141    BSR_JOB      *job;
142    BSR_CLIENT   *client;
143    BSR_FINDEX   *FileIndex;
144    BSR_JOBTYPE  *JobType;
145    BSR_JOBLEVEL *JobLevel;
146    BSR_STREAM   *stream;
147 // FF_PKT *ff;                        /* include/exclude */
148 } BSR;
149
150
151 #endif