/* */ #ifndef _D_TRACKER_WATCHER_COMMAND_H_ #define _D_TRACKER_WATCHER_COMMAND_H_ #include "Command.h" #include "BtContextAwareCommand.h" #include "RequestGroupAware.h" class DownloadEngine; class RequestGroup; typedef SharedHandle RequestGroupHandle; class TrackerWatcherCommand : public Command, public BtContextAwareCommand, public RequestGroupAware { private: DownloadEngine* e; RequestGroupHandle _trackerRequestGroup; /** * Returns a command for announce request. Returns 0 if no announce request * is needed. */ RequestGroupHandle createRequestGroup(const string& url); string getTrackerResponse(const RequestGroupHandle& requestGroup); void processTrackerResponse(const string& response); public: TrackerWatcherCommand(int32_t cuid, RequestGroup* requestGroup, DownloadEngine* e, const BtContextHandle& btContext); virtual ~TrackerWatcherCommand(); RequestGroupHandle createAnnounce(); virtual bool execute(); }; #endif // _D_TRACKER_WATCHER_COMMAND_H_