1 /*
2  * BAREOS® - Backup Archiving REcovery Open Sourced
3  *
4  * Copyright (C) 2019-2019 Bareos GmbH & Co. KG
5  *
6  * This program is Free Software; you can redistribute it and/or modify
7  * it under the terms of version three of the GNU Affero General Public License
8  * as published by the Free Software Foundation and included in the file
9  * LICENSE.
10  * This program is distributed in the hope that it will be useful, but WITHOUT
11  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
12  * FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
13  * details. You should have received a copy of the GNU Affero General Public
14  * License along with this program; if not, write to the Free Software
15  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
16  * USA.
17  *
18  */
19 
20 /*
21  * provides a struct to wrap a pair of VolumeSessionId and VolumeSessionTime
22  */
23 
24 #ifndef BAREOS_LIB_VOLUME_SESSION_INFO_H_
25 #define BAREOS_LIB_VOLUME_SESSION_INFO_H_ 1
26 
27 struct VolumeSessionInfo {
28   uint32_t id;
29   uint32_t time;
30 
31   /* explicit constructor disables default construction */
VolumeSessionInfoVolumeSessionInfo32   VolumeSessionInfo(uint32_t t_id, uint32_t t_time) : id(t_id), time(t_time) {}
33   bool operator==(const VolumeSessionInfo& rhs) const
34   {
35     return id == rhs.id && time == rhs.time;
36   }
37 };
38 
39 #endif /**  BAREOS_LIB_VOLUME_SESSION_INFO_H_ */
40