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