/* */ #ifndef _D_BT_MESSAGE_H_ #define _D_BT_MESSAGE_H_ #include "common.h" #include "SharedHandle.h" #include #include namespace aria2 { class BtEvent; class BtMessage { private: uint8_t _id; public: BtMessage(uint8_t id):_id(id) {} virtual ~BtMessage() {} virtual bool isSendingInProgress() = 0; virtual bool isInvalidate() = 0; virtual bool isUploading() = 0; uint8_t getId() { return _id; } virtual void doReceivedAction() = 0; virtual void send() = 0; virtual bool validate(std::deque& errors) = 0; virtual void handleEvent(const SharedHandle& event) = 0; virtual void onQueued() = 0; virtual std::string toString() const = 0; }; typedef SharedHandle BtMessageHandle; typedef std::deque BtMessages; } // namespace aria2 #endif // _D_BT_MESSAGE_H_