/* */ #ifndef D_BT_REQUEST_MESSAGE_H #define D_BT_REQUEST_MESSAGE_H #include "RangeBtMessage.h" namespace aria2 { class BtRequestMessage; typedef SharedHandle BtRequestMessageHandle; class BtRequestMessage : public RangeBtMessage { private: size_t blockIndex_; public: BtRequestMessage(size_t index = 0, uint32_t begin = 0, uint32_t length = 0, size_t blockIndex = 0); static const uint8_t ID = 6; static const std::string NAME; size_t getBlockIndex() const { return blockIndex_; } void setBlockIndex(size_t blockIndex) { blockIndex_ = blockIndex; } static SharedHandle create (const unsigned char* data, size_t dataLength); virtual void doReceivedAction(); virtual void onQueued(); virtual void onAbortOutstandingRequestEvent (const BtAbortOutstandingRequestEvent& event); }; } // namespace aria2 #endif // D_BT_REQUEST_MESSAGE_H