]> git.sur5r.net Git - bacula/bacula/blob - bacula/src/stored/reserve.h
Backport from BEE
[bacula/bacula] / bacula / src / stored / reserve.h
1 /*
2    Bacula® - The Network Backup Solution
3
4    Copyright (C) 2006-2014 Free Software Foundation Europe e.V.
5
6    The main author of Bacula is Kern Sibbald, with contributions from many
7    others, a complete list can be found in the file AUTHORS.
8
9    You may use this file and others of this release according to the
10    license defined in the LICENSE file, which includes the Affero General
11    Public License, v3.0 ("AGPLv3") and some additional permissions and
12    terms pursuant to its AGPLv3 Section 7.
13
14    Bacula® is a registered trademark of Kern Sibbald.
15 */
16 /*
17  * Definitions for reservation system.
18  *
19  *  Kern Sibbald, February MMVI
20  *
21  */
22
23 /*
24  *   Use Device command from Director
25  *   The DIR tells us what Device Name to use, the Media Type,
26  *      the Pool Name, and the Pool Type.
27  *
28  *    Ensure that the device exists and is opened, then store
29  *      the media and pool info in the JCR.  This class is used
30  *      only temporarily in this file.
31  */
32 class DIRSTORE {
33 public:
34    alist *device;
35    bool append;
36    char name[MAX_NAME_LENGTH];
37    char media_type[MAX_NAME_LENGTH];
38    char pool_name[MAX_NAME_LENGTH];
39    char pool_type[MAX_NAME_LENGTH];
40 };
41
42 /* Reserve context */
43 class RCTX {
44 public:
45    JCR *jcr;
46    char *device_name;
47    DIRSTORE *store;
48    DEVRES   *device;
49    DEVICE *low_use_drive;             /* Low use drive candidate */
50    int num_writers;                   /* for selecting low use drive */
51    bool try_low_use_drive;            /* see if low use drive available */
52    bool any_drive;                    /* Accept any drive if set */
53    bool PreferMountedVols;            /* Prefer volumes already mounted */
54    bool exact_match;                  /* Want exact volume */
55    bool have_volume;                  /* Have DIR suggested vol name */
56    bool suitable_device;              /* at least one device is suitable */
57    bool autochanger_only;             /* look at autochangers only */
58    bool notify_dir;                   /* Notify DIR about device */
59    bool append;                       /* set if append device */
60    char VolumeName[MAX_NAME_LENGTH];  /* Vol name suggested by DIR */
61 };