diff --git a/middletier/CMakeLists.txt b/middletier/CMakeLists.txt index b14903dd4e3a367b8f07e871968dd241a59feee1..dc67a56e50f6bb428943cd92a0117ce343249e53 100644 --- a/middletier/CMakeLists.txt +++ b/middletier/CMakeLists.txt @@ -31,6 +31,7 @@ set (MIDDLE_TIER_LIB_SRC_FILES cta/MiddleTierAdmin.cpp cta/MiddleTierUser.cpp cta/Mount.cpp + cta/RetrievalFileTransfer.cpp cta/RetrievalJob.cpp cta/RetrievalJobQueues.cpp cta/RetrievalJobState.cpp @@ -45,6 +46,7 @@ set (MIDDLE_TIER_LIB_SRC_FILES cta/StorageClass.cpp cta/Tape.cpp cta/TapeException.cpp + cta/TapeFileLocation.cpp cta/TapePool.cpp cta/UserIdentity.cpp cta/UserRequest.cpp diff --git a/middletier/cta/RetrievalFileTransfer.cpp b/middletier/cta/RetrievalFileTransfer.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d54d5c8cfea4ce3b48fb99209d59ebb3e5da5329 --- /dev/null +++ b/middletier/cta/RetrievalFileTransfer.cpp @@ -0,0 +1,37 @@ +#include "cta/RetrievalFileTransfer.hpp" + +//------------------------------------------------------------------------------ +// constructor +//------------------------------------------------------------------------------ +cta::RetrievalFileTransfer::RetrievalFileTransfer() { +} + +//------------------------------------------------------------------------------ +// destructor +//------------------------------------------------------------------------------ +cta::RetrievalFileTransfer::~RetrievalFileTransfer() throw() { +} + +//------------------------------------------------------------------------------ +// constructor +//------------------------------------------------------------------------------ +cta::RetrievalFileTransfer::RetrievalFileTransfer( + const TapeFileLocation &tapeFile, const std::string &remoteFile): + m_tapeFile(tapeFile), + m_remoteFile(remoteFile) { +} + +//------------------------------------------------------------------------------ +// getTapeFile +//------------------------------------------------------------------------------ +const cta::TapeFileLocation &cta::RetrievalFileTransfer::getTapeFile() const + throw() { + return m_tapeFile; +} + +//------------------------------------------------------------------------------ +// getRemoteFile +//------------------------------------------------------------------------------ +const std::string &cta::RetrievalFileTransfer::getRemoteFile() const throw() { + return m_remoteFile; +} diff --git a/middletier/cta/TapeFileLocation.cpp b/middletier/cta/TapeFileLocation.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d2c44831721df8289d5d30fa59193fd44341ebc9 --- /dev/null +++ b/middletier/cta/TapeFileLocation.cpp @@ -0,0 +1,40 @@ +#include "cta/TapeFileLocation.hpp" + +//------------------------------------------------------------------------------ +// constructor +//------------------------------------------------------------------------------ +cta::TapeFileLocation::TapeFileLocation(): + m_fseq(0), + m_blockId(0) { +} + +//------------------------------------------------------------------------------ +// constructor +//------------------------------------------------------------------------------ +cta::TapeFileLocation::TapeFileLocation(const std::string &vid, + const uint64_t fseq, const uint64_t blockId): + m_vid(vid), + m_fseq(0), + m_blockId(0) { +} + +//------------------------------------------------------------------------------ +// getVid +//------------------------------------------------------------------------------ +const std::string &cta::TapeFileLocation::getVid() const throw() { + return m_vid; +} + +//------------------------------------------------------------------------------ +// getFseq +//------------------------------------------------------------------------------ +uint64_t cta::TapeFileLocation::getFseq() const throw() { + return m_fseq; +} + +//------------------------------------------------------------------------------ +// getBlockId +//------------------------------------------------------------------------------ +uint64_t cta::TapeFileLocation::getBlockId() const throw() { + return m_blockId; +} diff --git a/middletier/cta/TapeFileLocation.hpp b/middletier/cta/TapeFileLocation.hpp index 24dd667c4002be6171c662c498722cb433a1f5a2..37e5341ef0c95165b19858d9780062a6d967e9fa 100644 --- a/middletier/cta/TapeFileLocation.hpp +++ b/middletier/cta/TapeFileLocation.hpp @@ -38,14 +38,14 @@ public: * * @return The sequence number of the file. */ - uint64_t &getFseq() const throw(); + uint64_t getFseq() const throw(); /** * Returns the block identifier of the file. * * @return The block identifier of the file. */ - uint64_t &getBlockId() const throw(); + uint64_t getBlockId() const throw(); private: @@ -66,4 +66,4 @@ private: }; // class TapeFileLocation -}; // namepsace cta +} // namepsace cta