/* */ #include "StreamCheckIntegrityEntry.h" #include "RequestGroup.h" #include "DownloadEngine.h" #include "StreamFileAllocationEntry.h" #include "FileAllocationMan.h" #include "Request.h" namespace aria2 { StreamCheckIntegrityEntry::StreamCheckIntegrityEntry(const RequestHandle& currentRequest, RequestGroup* requestGroup, Command* nextCommand): PieceHashCheckIntegrityEntry(requestGroup, nextCommand), _currentRequest(currentRequest) {} StreamCheckIntegrityEntry::~StreamCheckIntegrityEntry() {} Commands StreamCheckIntegrityEntry::onDownloadIncomplete(DownloadEngine* e) { Commands commands; FileAllocationEntryHandle entry (new StreamFileAllocationEntry(_currentRequest, _requestGroup, popNextCommand())); if(_requestGroup->needsFileAllocation()) { e->_fileAllocationMan->pushFileAllocationEntry(entry); } else { commands = entry->prepareForNextAction(e); } return commands; } Commands StreamCheckIntegrityEntry::onDownloadFinished(DownloadEngine* e) { return Commands(); } } // namespace aria2