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