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