mirror of
https://github.com/aria2/aria2.git
synced 2025-01-24 02:31:29 +00:00
3dfbec0f9f
Rewritten DHTMessageCallback using Visitor pattern. Eliminated dynamic_pointer_cast. * src/DHTMessageCallbackImpl.cc: Removed * src/DHTMessageReceiver.cc * src/DHTAbstractNodeLookupTask.h * src/DHTAnnouncePeerReplyMessage.h * src/DHTReplaceNodeTask.h * src/DHTFindNodeReplyMessage.cc * src/DHTGetPeersReplyMessage.h * src/DHTPeerLookupTask.h * src/DHTMessageCallbackImpl.h: Removed * src/DHTMessageFactory.h * src/DHTNodeLookupTaskCallback.h * src/DHTMessageTracker.h * src/DHTMessageCallbackListener.h: Removed * src/DHTGetPeersReplyMessage.cc * src/DHTMessageCallback.h * src/DHTAnnouncePeerReplyMessage.cc * src/DHTNodeLookupTask.h * src/DHTReplaceNodeTask.cc * src/DHTPeerLookupTaskCallback.cc * src/DHTMessageTracker.cc * src/DHTPingReplyMessage.cc * src/DHTPingTask.cc * src/DHTMessageFactoryImpl.h * src/Makefile.am * src/DHTNodeLookupTask.cc * src/DHTPeerLookupTaskCallback.h * src/DHTPeerLookupTask.cc * src/DHTMessageReceiver.h * src/DHTMessageFactoryImpl.cc * src/DHTResponseMessage.h * src/DHTFindNodeReplyMessage.h * src/DHTPingReplyMessageCallback.h * src/Makefile.in * src/DHTBucketRefreshTask.cc * src/DHTNodeLookupTaskCallback.cc * src/DHTPingTask.h * src/DHTPingReplyMessage.h * src/DHTAbstractNodeLookupTask.cc: Removed * test/DHTMessageTrackerTest.cc * test/DHTPingMessageTest.cc * test/DHTGetPeersMessageTest.cc * test/MockDHTMessage.h * test/MockDHTMessageFactory.h * test/DHTFindNodeMessageTest.cc * test/MockDHTMessageCallback.h * test/DHTAnnouncePeerMessageTest.cc
28 lines
666 B
C++
28 lines
666 B
C++
#ifndef _D_MOCK_DHT_MESSAGE_CALLBACK_H_
|
|
#define _D_MOCK_DHT_MESSAGE_CALLBACK_H_
|
|
|
|
#include "DHTMessageCallback.h"
|
|
|
|
namespace aria2 {
|
|
|
|
class MockDHTMessageCallback:public DHTMessageCallback {
|
|
public:
|
|
MockDHTMessageCallback() {}
|
|
|
|
virtual ~MockDHTMessageCallback() {}
|
|
|
|
virtual void visit(const DHTAnnouncePeerReplyMessage* message) {}
|
|
|
|
virtual void visit(const DHTFindNodeReplyMessage* message) {}
|
|
|
|
virtual void visit(const DHTGetPeersReplyMessage* message) {}
|
|
|
|
virtual void visit(const DHTPingReplyMessage* message) {}
|
|
|
|
virtual void onTimeout(const SharedHandle<DHTNode>& remoteNode) {}
|
|
};
|
|
|
|
} // namespace aria2
|
|
|
|
#endif // _D_MOCK_DHT_MESSAGE_CALLBACK_H_
|