summaryrefslogtreecommitdiff
path: root/src/TrackerWatcherCommand.h
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2007-10-11 16:58:24 +0000
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2007-10-11 16:58:24 +0000
commit048a2cf59737f761876e81a77e8d064c45c752d7 (patch)
tree65c9d5498aafe6a8c8e640ddfcc43c7013504d0d /src/TrackerWatcherCommand.h
parente26bbbb9eee140ba24402fe872a752b42f0077de (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/TrackerWatcherCommand.h')
-rw-r--r--src/TrackerWatcherCommand.h33
1 files changed, 24 insertions, 9 deletions
diff --git a/src/TrackerWatcherCommand.h b/src/TrackerWatcherCommand.h
index 785fa7c3..4cc02f93 100644
--- a/src/TrackerWatcherCommand.h
+++ b/src/TrackerWatcherCommand.h
@@ -35,28 +35,43 @@
#ifndef _D_TRACKER_WATCHER_COMMAND_H_
#define _D_TRACKER_WATCHER_COMMAND_H_
+#include "Command.h"
#include "BtContextAwareCommand.h"
-#include "TorrentDownloadEngine.h"
+#include "RequestGroupAware.h"
-class TrackerWatcherCommand : public BtContextAwareCommand {
+class DownloadEngine;
+class RequestGroup;
+extern typedef SharedHandle<RequestGroup> RequestGroupHandle;
+
+class TrackerWatcherCommand : public Command,
+ public BtContextAwareCommand,
+ public RequestGroupAware
+{
private:
- TorrentDownloadEngine* e;
+ DownloadEngine* e;
+ RequestGroupHandle _trackerRequestGroup;
/**
* Returns a command for announce request. Returns 0 if no announce request
* is needed.
*/
- Command* createRequestCommand(const string& url);
+ RequestGroupHandle createRequestGroup(const string& url);
+
+ string getTrackerResponse(const RequestGroupHandle& requestGroup);
+
+ void processTrackerResponse(const string& response);
+
public:
- TrackerWatcherCommand(int cuid,
- TorrentDownloadEngine* e,
+ TrackerWatcherCommand(int32_t cuid,
+ RequestGroup* requestGroup,
+ DownloadEngine* e,
const BtContextHandle& btContext);
- ~TrackerWatcherCommand();
+ virtual ~TrackerWatcherCommand();
- Command* createCommand();
+ RequestGroupHandle createAnnounce();
- bool execute();
+ virtual bool execute();
};
#endif // _D_TRACKER_WATCHER_COMMAND_H_