/* */ #include "RequestGroupEntry.h" #include "RequestGroup.h" #include "Command.h" #include "DownloadContext.h" namespace aria2 { RequestGroupEntry::RequestGroupEntry(RequestGroup* requestGroup, Command* nextCommand): requestGroup_(requestGroup), nextCommand_(nextCommand) { requestGroup_->increaseNumCommand(); } RequestGroupEntry::~RequestGroupEntry() { requestGroup_->decreaseNumCommand(); delete nextCommand_; } Command* RequestGroupEntry::popNextCommand() { Command* temp = nextCommand_; nextCommand_ = 0; return temp; } void RequestGroupEntry::pushNextCommand(Command* nextCommand) { delete nextCommand_; nextCommand_ = nextCommand; } } // namespace aria2