]> git.sur5r.net Git - bacula/bacula/blob - bacula/src/stored/bsr.h
6e08841214f47a1907ea3c164f2d9b6a7850f5b0
[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  * !!!!!!!!!!!!!!!!!! NOTE !!!!!!!!!!!!!!!!!!!!!!!!!!!!!
37  * !!!                                               !!!
38  * !!!   All records must have a pointer to          !!!
39  * !!!   the next item as the first item defined.    !!!
40  * !!!                                               !!!
41  * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
42  */
43
44 typedef struct s_bsr_client {
45    struct s_bsr_client *next;
46    char *ClientName;
47 } BSR_CLIENT;
48
49 typedef struct s_bsr_sessid {
50    struct s_bsr_sessid *next;
51    uint32_t sessid;
52    uint32_t sessid2;
53    int found;
54 } BSR_SESSID;
55
56 typedef struct s_bsr_volfile {
57    struct s_bsr_volfile *next;
58    uint32_t sfile;                    /* start file */
59    uint32_t efile;                    /* end file */
60    int found;
61 } BSR_VOLFILE;
62
63
64 typedef struct s_bsr_sesstime {
65    struct s_bsr_sesstime *next;
66    uint32_t sesstime;
67    int found;
68 } BSR_SESSTIME;
69
70 typedef struct s_bsr_findex {
71    struct s_bsr_findex *next;
72    int32_t findex;                    /* start file index */
73    int32_t findex2;                   /* end file index */
74    int found;
75 } BSR_FINDEX;
76
77 typedef struct s_bsr_jobid {
78    struct s_bsr_jobid *next;
79    uint32_t JobId;
80    uint32_t JobId2;
81    int found;
82 } BSR_JOBID;
83
84 typedef struct s_bsr_jobtype {
85    struct s_bsr_jobtype *next;
86    uint32_t JobType;
87 } BSR_JOBTYPE;
88
89 typedef struct s_bsr_joblevel {
90    struct s_bsr_joblevel *next;
91    uint32_t JobLevel;
92 } BSR_JOBLEVEL;
93
94 typedef struct s_bsr_job {
95    struct s_bsr_job *next;
96    char *Job;
97    int found;
98 } BSR_JOB;
99
100
101 typedef struct s_bsr {
102    struct s_bsr *next;                /* pointer to next one */
103    int           done;                /* set when everything found */
104    char         *VolumeName;
105    BSR_CLIENT   *client;
106    BSR_JOB      *job;
107    BSR_SESSID   *sessid;
108    BSR_SESSTIME *sesstime;
109    BSR_FINDEX   *FileIndex;
110    BSR_JOBID    *JobId;
111    BSR_JOBTYPE  *JobType;
112    BSR_JOBLEVEL *JobLevel;
113    BSR_VOLFILE  *volfile;
114    FF_PKT *ff;                        /* include/exclude */
115 } BSR;
116
117
118 #endif