/* */ #ifndef D_MOCK_BT_MESSAGE_H #define D_MOCK_BT_MESSAGE_H #include "BtMessage.h" namespace aria2 { class MockBtMessage : public BtMessage { private: bool sendingInProgress; bool invalidate; bool uploading; public: MockBtMessage():BtMessage(0) {} MockBtMessage(uint8_t id):BtMessage(id) {} virtual ~MockBtMessage() {} virtual bool isSendingInProgress() { return sendingInProgress; } void setSendingInProgress(bool flag) { this->sendingInProgress = flag; } virtual bool isInvalidate() { return invalidate; } void setInvalidate(bool flag) { this->invalidate = flag; } virtual bool isUploading() { return uploading; } void setUploading(bool flag) { this->uploading = flag; } virtual void doReceivedAction() { } virtual void send() {} virtual void validate() {} virtual void onAbortOutstandingRequestEvent (const BtAbortOutstandingRequestEvent& event) {} virtual void onCancelSendingPieceEvent (const BtCancelSendingPieceEvent& event) {} virtual void onChokingEvent(const BtChokingEvent& event) {} virtual void onQueued() {} virtual std::string toString() const { return "MockBtMessage"; } }; template class WrapBtMessage:public MockBtMessage { public: SharedHandle m_; WrapBtMessage(const SharedHandle& m):m_(m) {} }; } // namespace aria2 #endif // D_MOCK_BT_MESSAGE_H