/* */ #ifndef _D_DHT_GET_PEERS_MESSAGE_H_ #define _D_DHT_GET_PEERS_MESSAGE_H_ #include "DHTQueryMessage.h" #include "DHTConstants.h" #include "A2STR.h" namespace aria2 { class DHTPeerAnnounceStorage; class DHTTokenTracker; class DHTGetPeersMessage:public DHTQueryMessage { private: unsigned char _infoHash[DHT_ID_LENGTH]; WeakHandle _peerAnnounceStorage; WeakHandle _tokenTracker; protected: virtual std::string toStringOptional() const; public: DHTGetPeersMessage(const SharedHandle& localNode, const SharedHandle& remoteNode, const unsigned char* infoHash, const std::string& transactionID = A2STR::NIL); virtual ~DHTGetPeersMessage(); virtual void doReceivedAction(); virtual Dictionary* getArgument(); virtual std::string getMessageType() const; virtual void validate() const; const unsigned char* getInfoHash() const { return _infoHash; } void setPeerAnnounceStorage(const WeakHandle& storage); void setTokenTracker(const WeakHandle& tokenTracker); static const std::string GET_PEERS; static const std::string INFO_HASH; }; } // namespace aria2 #endif // _D_DHT_GET_PEERS_MESSAGE_H_