/* */ #ifndef D_DHT_TASK_FACTORY_H #define D_DHT_TASK_FACTORY_H #include "common.h" #include "SharedHandle.h" namespace aria2 { class DownloadContext; class PeerStorage; class DHTTask; class DHTNode; class DHTBucket; class DHTTaskFactory { public: virtual ~DHTTaskFactory() {} virtual SharedHandle createPingTask(const SharedHandle& remoteNode, int numRetry = 0) = 0; virtual SharedHandle createNodeLookupTask(const unsigned char* targetID) = 0; virtual SharedHandle createBucketRefreshTask() = 0; virtual SharedHandle createPeerLookupTask(const SharedHandle& ctx, uint16_t tcpPort, const SharedHandle& peerStorage) = 0; virtual SharedHandle createPeerAnnounceTask(const unsigned char* infoHash) = 0; virtual SharedHandle createReplaceNodeTask(const SharedHandle& bucket, const SharedHandle& newNode) = 0; }; } // namespace aria2 #endif // D_DHT_TASK_FACTORY_H