1 /*
2    BAREOS® - Backup Archiving REcovery Open Sourced
3 
4    Copyright (C) 2000-2012 Free Software Foundation Europe e.V.
5    Copyright (C) 2011-2012 Planets Communications B.V.
6    Copyright (C) 2013-2020 Bareos GmbH & Co. KG
7 
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    Affero 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 #ifndef BAREOS_SRC_STORED_VOLUME_CATALOG_INFO_H_
24 #define BAREOS_SRC_STORED_VOLUME_CATALOG_INFO_H_
25 
26 #include "include/bareos.h"
27 
28 namespace storagedaemon {
29 
30 /* clang-format off */
31 struct VolumeCatalogInfo {
32   uint32_t VolCatJobs{0};          /**< number of jobs on this Volume */
33   uint32_t VolCatFiles{0};         /**< Number of files */
34   uint32_t VolCatBlocks{0};        /**< Number of blocks */
35   uint64_t VolCatBytes{0};         /**< Number of bytes written */
36   uint32_t VolCatMounts{0};        /**< Number of mounts this volume */
37   uint32_t VolCatErrors{0};        /**< Number of errors this volume */
38   uint32_t VolCatWrites{0};        /**< Number of writes this volume */
39   uint32_t VolCatReads{0};         /**< Number of reads this volume */
40   uint64_t VolCatRBytes{0};        /**< Number of bytes read */
41   uint32_t VolCatRecycles{0};      /**< Number of recycles this volume */
42   uint32_t EndFile{0};             /**< Last file number */
43   uint32_t EndBlock{0};            /**< Last block number */
44   int32_t LabelType{0};            /**< Bareos/ANSI/IBM */
45   int32_t Slot{0};                 /**< >0=Slot loaded, 0=nothing, -1=unknown */
46   uint32_t VolCatMaxJobs{0};       /**< Maximum Jobs to write to volume */
47   uint32_t VolCatMaxFiles{0};      /**< Maximum files to write to volume */
48   uint64_t VolCatMaxBytes{0};      /**< Max bytes to write to volume */
49   uint64_t VolCatCapacityBytes{0}; /**< capacity estimate */
50   btime_t VolReadTime{0};          /**< time spent reading */
51   btime_t VolWriteTime{0};         /**< time spent writing this Volume */
52   int64_t VolMediaId{0};           /**< MediaId */
53   utime_t VolFirstWritten{0};      /**< Time of first write */
54   utime_t VolLastWritten{0};       /**< Time of last write */
55   bool InChanger{false};           /**< Set if vol in current magazine */
56   bool is_valid{false};            /**< set if this data is valid */
57   char VolCatStatus[20]{0};        /**< Volume status */
58   char VolCatName[MAX_NAME_LENGTH]{0}; /**< Desired volume to mount */
59   char VolEncrKey[MAX_NAME_LENGTH]{0}; /**< Encryption Key needed to read the media
60                                 */
61   uint32_t VolMinBlocksize{0}; /**< Volume Minimum Blocksize */
62   uint32_t VolMaxBlocksize{0}; /**< Volume Maximum Blocksize */
63 };
64 /* clang-format on */
65 
66 }  // namespace storagedaemon
67 #endif  // BAREOS_SRC_STORED_VOLUME_CATALOG_INFO_H_
68