/* */ #ifndef _D_DHT_PEER_LOOKUP_TASK_H_ #define _D_DHT_PEER_LOOKUP_TASK_H_ #include "DHTAbstractNodeLookupTask.h" #include namespace aria2 { class DownloadContext; class Peer; class PeerStorage; class BtRuntime; class DHTGetPeersReplyMessage; class DHTPeerLookupTask: public DHTAbstractNodeLookupTask { private: std::map _tokenStorage; std::vector > _peers; SharedHandle _peerStorage; SharedHandle _btRuntime; public: DHTPeerLookupTask(const SharedHandle& downloadContext); virtual void getNodesFromMessage (std::vector >& nodes, const DHTGetPeersReplyMessage* message); virtual void onReceivedInternal(const DHTGetPeersReplyMessage* message); virtual SharedHandle createMessage (const SharedHandle& remoteNode); virtual SharedHandle createCallback(); virtual void onFinish(); const std::vector >& getPeers() const { return _peers; } void setBtRuntime(const SharedHandle& btRuntime); void setPeerStorage(const SharedHandle& peerStorage); }; } // namespace aria2 #endif // _D_DHT_PEER_LOOKUP_TASK_H_