]> git.sur5r.net Git - bacula/bacula/blob - bacula/src/stored/reserve.h
20Feb06
[bacula/bacula] / bacula / src / stored / reserve.h
1 /*
2  * Definitions for reservation system.
3  *
4  *  Kern Sibbald, February MMVI
5  *
6  *  Version $Id$
7  */ 
8
9 /*
10    Copyright (C) 2006 Kern Sibbald
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
14    version 2 as amended with additional clauses defined in the
15    file LICENSE in the main source directory.
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 
20    the file LICENSE for additional details.
21
22  */
23
24 /*
25  *   Use Device command from Director
26  *   The DIR tells us what Device Name to use, the Media Type,
27  *      the Pool Name, and the Pool Type.
28  *
29  *    Ensure that the device exists and is opened, then store
30  *      the media and pool info in the JCR.  This class is used
31  *      only temporarily in this file.
32  */
33 class DIRSTORE {
34 public:
35    alist *device;
36    bool append;
37    char name[MAX_NAME_LENGTH];
38    char media_type[MAX_NAME_LENGTH];
39    char pool_name[MAX_NAME_LENGTH];
40    char pool_type[MAX_NAME_LENGTH];
41 };
42
43 /* Reserve context */
44 class RCTX {
45 public:
46    JCR *jcr;
47    char *device_name;
48    DIRSTORE *store;
49    DEVRES   *device;
50    DEVICE *low_use_drive;             /* Low use drive candidate */
51    int num_writers;                   /* for selecting low use drive */
52    bool try_low_use_drive;            /* see if low use drive available */
53    bool any_drive;                    /* Accept any drive if set */
54    bool PreferMountedVols;            /* Prefer volumes already mounted */
55    bool exact_match;                  /* Want exact volume */
56    bool have_volume;                  /* Have DIR suggested vol name */
57    bool suitable_device;              /* at least one device is suitable */
58    bool autochanger_only;             /* look at autochangers only */
59    bool notify_dir;                   /* Notify DIR about device */
60    char VolumeName[MAX_NAME_LENGTH];  /* Vol name suggested by DIR */
61 };