From 7cd9b21937c42606354610c7ae85a0857b474cf5 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Tue, 8 Jun 2010 14:11:36 +0000 Subject: 2010-06-08 Tatsuhiro Tsujikawa Made public member variables of DownloadEngine private. Added accessor funcs. --- src/FileAllocationCommand.cc | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src/FileAllocationCommand.cc') diff --git a/src/FileAllocationCommand.cc b/src/FileAllocationCommand.cc index 7046e7cf..94c2dd87 100644 --- a/src/FileAllocationCommand.cc +++ b/src/FileAllocationCommand.cc @@ -46,6 +46,9 @@ #include "a2functional.h" #include "RecoverableException.h" #include "wallclock.h" +#include "RequestGroupMan.h" +#include "CheckIntegrityEntry.h" +#include "ServerStatMan.h" namespace aria2 { @@ -60,7 +63,7 @@ FileAllocationCommand::~FileAllocationCommand() {} bool FileAllocationCommand::executeInternal() { if(_requestGroup->isHaltRequested()) { - _e->_fileAllocationMan->dropPickedEntry(); + _e->getFileAllocationMan()->dropPickedEntry(); return true; } _fileAllocationEntry->allocateChunk(); @@ -70,7 +73,7 @@ bool FileAllocationCommand::executeInternal() _timer.difference(global::wallclock), util::itos(_requestGroup->getTotalLength(), true).c_str()); } - _e->_fileAllocationMan->dropPickedEntry(); + _e->getFileAllocationMan()->dropPickedEntry(); std::vector commands; try { @@ -83,14 +86,14 @@ bool FileAllocationCommand::executeInternal() _e->setNoWait(true); return true; } else { - _e->commands.push_back(this); + _e->addCommand(this); return false; } } bool FileAllocationCommand::handleException(Exception& e) { - _e->_fileAllocationMan->dropPickedEntry(); + _e->getFileAllocationMan()->dropPickedEntry(); logger->error(MSG_FILE_ALLOCATION_FAILURE, e, util::itos(cuid).c_str()); logger->error(MSG_DOWNLOAD_NOT_COMPLETE, util::itos(cuid).c_str(), _requestGroup->getDownloadContext()->getBasePath().c_str()); -- cgit