/* */ #ifndef _D_BT_ALLOWED_FAST_MESSAGE_H_ #define _D_BT_ALLOWED_FAST_MESSAGE_H_ #include "SimpleBtMessage.h" namespace aria2 { class BtAllowedFastMessage; typedef SharedHandle BtAllowedFastMessageHandle; class BtAllowedFastMessage : public SimpleBtMessage { private: size_t index; unsigned char* msg; static size_t MESSAGE_LENGTH; public: BtAllowedFastMessage(size_t index = 0) :SimpleBtMessage(), index(index), msg(0) {} virtual ~BtAllowedFastMessage() { delete [] msg; } static const uint8_t ID = 17; void setIndex(size_t index) { this->index = index; } size_t getIndex() const { return index; } static BtAllowedFastMessageHandle create(const unsigned char* data, size_t dataLength); virtual uint8_t getId() { return ID; } virtual void doReceivedAction(); virtual const unsigned char* getMessage(); virtual size_t getMessageLength(); virtual std::string toString() const; virtual void onSendComplete(); }; } // namespace aria2 #endif // _D_BT_ALLOWED_FAST_MESSAGE_H_