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