diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2007-10-11 16:58:24 +0000 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2007-10-11 16:58:24 +0000 |
| commit | 048a2cf59737f761876e81a77e8d064c45c752d7 (patch) | |
| tree | 65c9d5498aafe6a8c8e640ddfcc43c7013504d0d /src/RequestGroupEntry.cc | |
| parent | e26bbbb9eee140ba24402fe872a752b42f0077de (diff) | |
2007-10-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Implemented BitTorrent/http/ftp integrated download.
I've rewritten lots of files and now some headers have forward
class declarations to reduce compile time.
The implementation is extremely alpha stage, I recommend to use this
for testing purpose only.
Diffstat (limited to 'src/RequestGroupEntry.cc')
| -rw-r--r-- | src/RequestGroupEntry.cc | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/src/RequestGroupEntry.cc b/src/RequestGroupEntry.cc index 980d65b0..cd17e043 100644 --- a/src/RequestGroupEntry.cc +++ b/src/RequestGroupEntry.cc @@ -33,12 +33,26 @@ */ /* copyright --> */ #include "RequestGroupEntry.h" -#include "DownloadCommand.h" +#include "RequestGroup.h" +#include "Command.h" + +RequestGroupEntry::RequestGroupEntry(RequestGroup* requestGroup, + Command* nextCommand): + _requestGroup(requestGroup), + _nextCommand(nextCommand) +{ + _requestGroup->increaseNumCommand(); +} RequestGroupEntry::~RequestGroupEntry() { - if(_shouldAddNumConnection) { - --_requestGroup->numConnection; - } - delete _nextDownloadCommand; + _requestGroup->decreaseNumCommand(); + delete _nextCommand; +} + +Command* RequestGroupEntry::popNextCommand() +{ + Command* temp = _nextCommand; + _nextCommand = 0; + return temp; } |
