diff --git a/mediachanger/CMakeLists.txt b/mediachanger/CMakeLists.txt index 8a8fa468cec6c2197d1773995906b741bf1ecf4d..e57843c9a8e3a8f3f02a7c581102a647bc9fcf6c 100644 --- a/mediachanger/CMakeLists.txt +++ b/mediachanger/CMakeLists.txt @@ -40,7 +40,6 @@ set (MEDIACHANGER_LIB_SRC_FILES MessageHeader.cpp messages.cpp MmcProxyLog.cpp - MmcProxyNotSupported.cpp ${ProtoSources} RmcMarshal.cpp RmcMarshal.hpp diff --git a/mediachanger/MmcProxyNotSupported.cpp b/mediachanger/MmcProxyNotSupported.cpp deleted file mode 100644 index b1cb6396d211b65c61d72173b294e390f65650e6..0000000000000000000000000000000000000000 --- a/mediachanger/MmcProxyNotSupported.cpp +++ /dev/null @@ -1,57 +0,0 @@ -/* - * The CERN Tape Archive(CTA) project - * Copyright(C) 2015 CERN - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - *(at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ - -#include "mediachanger/ManualLibrarySlot.hpp" -#include "mediachanger/MmcProxyNotSupported.hpp" -#include "common/exception/Exception.hpp" - -//------------------------------------------------------------------------------ -// mountTapeReadOnly -//------------------------------------------------------------------------------ -void cta::mediachanger::MmcProxyNotSupported::mountTapeReadOnly(const std::string &vid, const LibrarySlot &librarySlot) { - cta::exception::Exception ex; - ex.getMessage() << "Manual mounting is not supported"; - throw ex; -} - -//------------------------------------------------------------------------------ -// mountTapeReadWrite -//------------------------------------------------------------------------------ -void cta::mediachanger::MmcProxyNotSupported::mountTapeReadWrite(const std::string &vid, const LibrarySlot &librarySlot) { - cta::exception::Exception ex; - ex.getMessage() << "Manual mounting is not supported"; - throw ex; -} - -//------------------------------------------------------------------------------ -// dismountTape -//------------------------------------------------------------------------------ -void cta::mediachanger::MmcProxyNotSupported::dismountTape(const std::string &vid, const LibrarySlot &librarySlot) { - cta::exception::Exception ex; - ex.getMessage() << "Manual dismounting is not supported"; - throw ex; -} - -//------------------------------------------------------------------------------ -// forceDismountTape -//------------------------------------------------------------------------------ -void cta::mediachanger::MmcProxyNotSupported::forceDismountTape(const std::string &vid, const LibrarySlot &librarySlot) { - cta::exception::Exception ex; - ex.getMessage() << "Manual dismounting is not supported"; - throw ex; -} diff --git a/mediachanger/MmcProxyNotSupported.hpp b/mediachanger/MmcProxyNotSupported.hpp deleted file mode 100644 index 5942eba13f22bcc17d0e1d92155bf9fdeabeb2b5..0000000000000000000000000000000000000000 --- a/mediachanger/MmcProxyNotSupported.hpp +++ /dev/null @@ -1,79 +0,0 @@ -/* - * The CERN Tape Archive(CTA) project - * Copyright(C) 2015 CERN - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - *(at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ - -#pragma once - -#include "mediachanger/MediaChangerProxy.hpp" - -namespace cta { -namespace mediachanger { - -/** - * Concrete class implementing a manual media-changer that throws - * "not supported" exceptions. - */ -class MmcProxyNotSupported: public MediaChangerProxy { -public: - - /** - * Requests the media changer to mount the specified tape for read-only - * access into the drive in the specified library slot. - * - * Please note that this method provides a best-effort service because not all - * media changers support read-only mounts. - * - * @param vid The volume identifier of the tape. - * @param librarySlot The library slot containing the tape drive. - */ - void mountTapeReadOnly(const std::string &vid, const LibrarySlot &librarySlot) override; - - /** - * Requests the media changer to mount the specified tape for read/write - * access into the drive in the specified library slot. - * - * @param vid The volume identifier of the tape. - * @param librarySlot The library slot containing the tape drive. - */ - void mountTapeReadWrite(const std::string &vid, const LibrarySlot &librarySlot) override; - - /** - * Requests the media changer to dismount the specified tape from the - * drive in the specifed library slot. - * - * @param vid The volume identifier of the tape. - * @param librarySlot The library slot containing the tape drive. - */ - void dismountTape(const std::string &vid, const LibrarySlot &librarySlot) override; - - /** - * Requests the media changer to forcefully dismount the specified tape from - * the drive in the specifed library slot. Forcefully means rewinding and - * ejecting the tape where necessary. - * - * Please note that this method provides a best-effort service because not all - * media changers support forceful dismounts. - * - * @param vid The volume identifier of the tape. - * @param librarySlot The library slot containing the tape drive. - */ - void forceDismountTape(const std::string &vid, const LibrarySlot &librarySlot) override; - -}; // class MmcProxyNotSupported - -} // namespace mediachanger -} // namespace cta