/* */ #include "BtFileAllocationEntry.h" #include #include "BtSetup.h" #include "RequestGroup.h" #include "Command.h" #include "DownloadEngine.h" #include "DownloadContext.h" namespace aria2 { BtFileAllocationEntry::BtFileAllocationEntry(RequestGroup* requestGroup): FileAllocationEntry(requestGroup, 0) {} BtFileAllocationEntry::~BtFileAllocationEntry() {} void BtFileAllocationEntry::prepareForNextAction (std::vector& commands, DownloadEngine* e) { BtSetup().setup(commands, _requestGroup, e, _requestGroup->getOption().get()); if(!_requestGroup->downloadFinished()) { _requestGroup->getDownloadContext()->resetDownloadStartTime(); const std::vector >& fileEntries = _requestGroup->getDownloadContext()->getFileEntries(); if(isUriSuppliedForRequsetFileEntry(fileEntries.begin(), fileEntries.end())) { _requestGroup->createNextCommandWithAdj(commands, e, 0); } } } } // namespace aria2