1 /* 2 BAREOS® - Backup Archiving REcovery Open Sourced 3 4 Copyright (C) 2018-2018 Bareos GmbH & Co. KG 5 6 This program is Free Software; you can redistribute it and/or 7 modify it under the terms of version three of the GNU Affero General Public 8 License as published by the Free Software Foundation and included 9 in the file LICENSE. 10 11 This program is distributed in the hope that it will be useful, but 12 WITHOUT ANY WARRANTY; without even the implied warranty of 13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 Affero General Public License for more details. 15 16 You should have received a copy of the GNU Affero General Public License 17 along with this program; if not, write to the Free Software 18 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 19 02110-1301, USA. 20 */ 21 #ifndef BAREOS_STORED_AUTOCHANGER_H_ 22 #define BAREOS_STORED_AUTOCHANGER_H_ 23 24 class BareosSocket; 25 26 namespace storagedaemon { 27 28 class DeviceControlRecord; 29 class Device; 30 31 bool InitAutochangers(); 32 int AutoloadDevice(DeviceControlRecord* dcr, int writing, BareosSocket* dir); 33 bool AutochangerCmd(DeviceControlRecord* dcr, 34 BareosSocket* dir, 35 const char* cmd); 36 bool AutochangerTransferCmd(DeviceControlRecord* dcr, 37 BareosSocket* dir, 38 slot_number_t src_slot, 39 slot_number_t dst_slot); 40 bool UnloadAutochanger(DeviceControlRecord* dcr, 41 slot_number_t loaded, 42 bool lock_set = false); 43 bool UnloadDev(DeviceControlRecord* dcr, Device* dev, bool lock_set = false); 44 slot_number_t GetAutochangerLoadedSlot(DeviceControlRecord* dcr, 45 bool lock_set = false); 46 47 } /* namespace storagedaemon */ 48 49 #endif // BAREOS_STORED_AUTOCHANGER_H_ 50