/* */ #ifndef _D_DHT_GET_PEERS_REPLY_MESSAGE_H_ #define _D_DHT_GET_PEERS_REPLY_MESSAGE_H_ #include "DHTResponseMessage.h" #include #include "DHTConstants.h" namespace aria2 { class Peer; class DHTGetPeersReplyMessage:public DHTResponseMessage { private: std::string _token; std::deque > _closestKNodes; std::deque > _values; protected: virtual std::string toStringOptional() const; public: DHTGetPeersReplyMessage(const SharedHandle& localNode, const SharedHandle& remoteNode, const std::string& token, const std::string& transactionID); virtual ~DHTGetPeersReplyMessage(); virtual void doReceivedAction(); virtual BDE getResponse(); virtual std::string getMessageType() const; virtual void validate() const; const std::deque >& getClosestKNodes() const; const std::deque >& getValues() const; void setClosestKNodes(const std::deque >& closestKNodes); void setValues(const std::deque >& peers); const std::string& getToken() const { return _token; } static const std::string GET_PEERS; static const std::string TOKEN; static const std::string VALUES; static const std::string NODES; }; } // namespace aria2 #endif // _D_DHT_GET_PEERS_REPLY_MESSAGE_H_