]> git.sur5r.net Git - bacula/bacula/blob - bacula/src/stored/bsr.h
Use rentrant mysql lib, eliminate race in sql_list, Win32 streams, misc see kes-1.31
[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-2003 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 /*
34  * List of Volume names to be read by Storage daemon.
35  *  Formed by Storage daemon from BSR  
36  */
37 struct s_vol_list {
38    struct s_vol_list *next;
39    char VolumeName[MAX_NAME_LENGTH];
40    int Slot; 
41    int start_file;
42 };
43 typedef struct s_vol_list VOL_LIST;
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 typedef struct s_bsr_volume {
56    struct s_bsr_volume *next;
57    char VolumeName[MAX_NAME_LENGTH];
58 } BSR_VOLUME;
59
60 typedef struct s_bsr_client {
61    struct s_bsr_client *next;
62    char ClientName[MAX_NAME_LENGTH];
63 } BSR_CLIENT;
64
65 typedef struct s_bsr_sessid {
66    struct s_bsr_sessid *next;
67    uint32_t sessid;
68    uint32_t sessid2;
69    int done;                          /* local done */
70 } BSR_SESSID;
71
72 typedef struct s_bsr_sesstime {
73    struct s_bsr_sesstime *next;
74    uint32_t sesstime;
75    int done;                          /* local done */
76 } BSR_SESSTIME;
77
78 typedef struct s_bsr_volfile {
79    struct s_bsr_volfile *next;
80    uint32_t sfile;                    /* start file */
81    uint32_t efile;                    /* end file */
82    int done;                          /* local done */
83 } BSR_VOLFILE;
84
85 typedef struct s_bsr_volblock {
86    struct s_bsr_volblock *next;
87    uint32_t sblock;                   /* start block */
88    uint32_t eblock;                   /* end block */
89    int done;                          /* local done */
90 } BSR_VOLBLOCK;
91
92
93 typedef struct s_bsr_findex {
94    struct s_bsr_findex *next;
95    int32_t findex;                    /* start file index */
96    int32_t findex2;                   /* end file index */
97    int done;                          /* local done */
98 } BSR_FINDEX;
99
100 typedef struct s_bsr_jobid {
101    struct s_bsr_jobid *next;
102    uint32_t JobId;
103    uint32_t JobId2;
104 } BSR_JOBID;
105
106 typedef struct s_bsr_jobtype {
107    struct s_bsr_jobtype *next;
108    uint32_t JobType;
109 } BSR_JOBTYPE;
110
111 typedef struct s_bsr_joblevel {
112    struct s_bsr_joblevel *next;
113    uint32_t JobLevel;
114 } BSR_JOBLEVEL;
115
116 typedef struct s_bsr_job {
117    struct s_bsr_job *next;
118    char Job[MAX_NAME_LENGTH];
119    int done;
120 } BSR_JOB;
121
122 typedef struct s_bsr_stream {
123    struct s_bsr_stream *next;
124    int32_t stream;                    /* stream desired */
125 } BSR_STREAM;
126
127 typedef struct s_bsr {
128    struct s_bsr *next;                /* pointer to next one */
129    int           done;                /* set when everything found */
130    BSR_VOLUME   *volume;
131    int32_t       Slot;                /* Slot */
132    uint32_t      count;               /* count of files to restore this bsr */
133    uint32_t      found;               /* count of restored files this bsr */
134    BSR_VOLFILE  *volfile;
135    BSR_VOLBLOCK *volblock;
136    BSR_SESSTIME *sesstime;
137    BSR_SESSID   *sessid;
138    BSR_JOBID    *JobId;
139    BSR_JOB      *job;
140    BSR_CLIENT   *client;
141    BSR_FINDEX   *FileIndex;
142    BSR_JOBTYPE  *JobType;
143    BSR_JOBLEVEL *JobLevel;
144    BSR_STREAM   *stream;
145 } BSR;
146
147
148 #endif