/* */ #include "FileAllocationEntry.h" #include "FileAllocationIterator.h" #include "DownloadEngine.h" #include "RequestGroup.h" #include "PieceStorage.h" #include "DiskAdaptor.h" namespace aria2 { FileAllocationEntry::FileAllocationEntry(RequestGroup* requestGroup, std::unique_ptr nextCommand) : RequestGroupEntry{requestGroup, std::move(nextCommand)}, fileAllocationIterator_{requestGroup->getPieceStorage() ->getDiskAdaptor() ->fileAllocationIterator()} { } FileAllocationEntry::~FileAllocationEntry() = default; int64_t FileAllocationEntry::getCurrentLength() { return fileAllocationIterator_->getCurrentLength(); } int64_t FileAllocationEntry::getTotalLength() { return fileAllocationIterator_->getTotalLength(); } bool FileAllocationEntry::finished() { return fileAllocationIterator_->finished(); } void FileAllocationEntry::allocateChunk() { fileAllocationIterator_->allocateChunk(); } } // namespace aria2