/* */ #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_