]> git.sur5r.net Git - bacula/bacula/blob - bacula/src/stored/reserve.h
Apply patches from bugs #2325 and #2326 to fix FIFO bugs
[bacula/bacula] / bacula / src / stored / reserve.h
1 /*
2    Bacula(R) - The Network Backup Solution
3
4    Copyright (C) 2000-2017 Kern Sibbald
5
6    The original author of Bacula is Kern Sibbald, with contributions
7    from many 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    This notice must be preserved when any source code is
15    conveyed and/or propagated.
16
17    Bacula(R) is a registered trademark of Kern Sibbald.
18 */
19 /*
20  * Definitions for reservation system.
21  *
22  *  Kern Sibbald, February MMVI
23  *
24  */
25
26 /*
27  *   Use Device command from Director
28  *   The DIR tells us what Device Name to use, the Media Type,
29  *      the Pool Name, and the Pool Type.
30  *
31  *    Ensure that the device exists and is opened, then store
32  *      the media and pool info in the JCR.  This class is used
33  *      only temporarily in this file.
34  */
35 class DIRSTORE {
36 public:
37    alist *device;
38    bool append;
39    char name[MAX_NAME_LENGTH];
40    char media_type[MAX_NAME_LENGTH];
41    char pool_name[MAX_NAME_LENGTH];
42    char pool_type[MAX_NAME_LENGTH];
43 };
44
45 /* Reserve context */
46 class RCTX {
47 public:
48    JCR *jcr;
49    char *device_name;
50    DIRSTORE *store;
51    DEVRES   *device;
52    DEVICE *low_use_drive;             /* Low use drive candidate */
53    bool try_low_use_drive;            /* see if low use drive available */
54    bool any_drive;                    /* Accept any drive if set */
55    bool PreferMountedVols;            /* Prefer volumes already mounted */
56    bool exact_match;                  /* Want exact volume */
57    bool have_volume;                  /* Have DIR suggested vol name */
58    bool suitable_device;              /* at least one device is suitable */
59    bool autochanger_only;             /* look at autochangers only */
60    bool notify_dir;                   /* Notify DIR about device */
61    bool append;                       /* set if append device */
62    char VolumeName[MAX_NAME_LENGTH];  /* Vol name suggested by DIR */
63 };