]> git.sur5r.net Git - bacula/bacula/blob - bacula/src/stored/reserve.h
Switch from GPLv2 to AGPLv3
[bacula/bacula] / bacula / src / stored / reserve.h
1 /*
2    Bacula® - The Network Backup Solution
3
4    Copyright (C) 2006-2007 Free Software Foundation Europe e.V.
5
6    The main author of Bacula is Kern Sibbald, with contributions from
7    many others, a complete list can be found in the file AUTHORS.
8    This program is Free Software; you can redistribute it and/or
9    modify it under the terms of version three of the GNU Affero General Public
10    License as published by the Free Software Foundation and included
11    in the file LICENSE.
12
13    This program is distributed in the hope that it will be useful, but
14    WITHOUT ANY WARRANTY; without even the implied warranty of
15    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16    General Public License for more details.
17
18    You should have received a copy of the GNU Affero General Public License
19    along with this program; if not, write to the Free Software
20    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
21    02110-1301, USA.
22
23    Bacula® is a registered trademark of Kern Sibbald.
24    The licensor of Bacula is the Free Software Foundation Europe
25    (FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich,
26    Switzerland, email:ftf@fsfeurope.org.
27 */
28 /*
29  * Definitions for reservation system.
30  *
31  *  Kern Sibbald, February MMVI
32  *
33  *  Version $Id$
34  */ 
35
36 /*
37  *   Use Device command from Director
38  *   The DIR tells us what Device Name to use, the Media Type,
39  *      the Pool Name, and the Pool Type.
40  *
41  *    Ensure that the device exists and is opened, then store
42  *      the media and pool info in the JCR.  This class is used
43  *      only temporarily in this file.
44  */
45 class DIRSTORE {
46 public:
47    alist *device;
48    bool append;
49    char name[MAX_NAME_LENGTH];
50    char media_type[MAX_NAME_LENGTH];
51    char pool_name[MAX_NAME_LENGTH];
52    char pool_type[MAX_NAME_LENGTH];
53 };
54
55 /* Reserve context */
56 class RCTX {
57 public:
58    JCR *jcr;
59    char *device_name;
60    DIRSTORE *store;
61    DEVRES   *device;
62    DEVICE *low_use_drive;             /* Low use drive candidate */
63    int num_writers;                   /* for selecting low use drive */
64    bool try_low_use_drive;            /* see if low use drive available */
65    bool any_drive;                    /* Accept any drive if set */
66    bool PreferMountedVols;            /* Prefer volumes already mounted */
67    bool exact_match;                  /* Want exact volume */
68    bool have_volume;                  /* Have DIR suggested vol name */
69    bool suitable_device;              /* at least one device is suitable */
70    bool autochanger_only;             /* look at autochangers only */
71    bool notify_dir;                   /* Notify DIR about device */
72    bool append;                       /* set if append device */
73    char VolumeName[MAX_NAME_LENGTH];  /* Vol name suggested by DIR */
74 };