aria2/test/MockDHTMessageFactory.h

133 lines
4.0 KiB
C
Raw Normal View History

#ifndef _D_MOCK_DHT_MESSAGE_FACTORY_H_
#define _D_MOCK_DHT_MESSAGE_FACTORY_H_
#include "DHTMessageFactory.h"
#include "DHTNode.h"
#include "MockDHTMessage.h"
#include "bencode.h"
namespace aria2 {
class MockDHTMessageFactory:public DHTMessageFactory {
protected:
SharedHandle<DHTNode> _localNode;
public:
MockDHTMessageFactory() {}
virtual ~MockDHTMessageFactory() {}
2010-06-13 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net> 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
2010-06-13 11:25:21 +00:00
virtual SharedHandle<DHTQueryMessage>
2009-04-27 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net> Put BDE in aria2 namespace. BDE will also be used to store xml-rpc request. * src/AnnounceList.cc * src/AnnounceList.h * src/BDE.cc: Added * src/BDE.h: Added * src/DHTAbstractMessage.cc * src/DHTAbstractMessage.h * src/DHTAnnouncePeerMessage.cc * src/DHTAnnouncePeerMessage.h * src/DHTAnnouncePeerReplyMessage.cc * src/DHTAnnouncePeerReplyMessage.h * src/DHTFindNodeMessage.cc * src/DHTFindNodeMessage.h * src/DHTFindNodeReplyMessage.cc * src/DHTFindNodeReplyMessage.h * src/DHTGetPeersMessage.cc * src/DHTGetPeersMessage.h * src/DHTGetPeersReplyMessage.cc * src/DHTGetPeersReplyMessage.h * src/DHTMessageFactory.h * src/DHTMessageFactoryImpl.cc * src/DHTMessageFactoryImpl.h * src/DHTMessageReceiver.cc * src/DHTMessageTracker.cc * src/DHTMessageTracker.h * src/DHTPingMessage.cc * src/DHTPingMessage.h * src/DHTPingReplyMessage.cc * src/DHTPingReplyMessage.h * src/DHTQueryMessage.cc * src/DHTQueryMessage.h * src/DHTResponseMessage.cc * src/DHTResponseMessage.h * src/DefaultBtAnnounce.cc * src/DefaultBtContext.cc * src/DefaultBtContext.h * src/HandshakeExtensionMessage.cc * src/Makefile.am * src/PeerListProcessor.h * src/UTPexExtensionMessage.cc * src/bencode.cc * src/bencode.h * test/AnnounceListTest.cc * test/BDETest.cc: Added * test/BencodeTest.cc * test/DHTAnnouncePeerMessageTest.cc * test/DHTAnnouncePeerReplyMessageTest.cc * test/DHTFindNodeMessageTest.cc * test/DHTFindNodeReplyMessageTest.cc * test/DHTGetPeersMessageTest.cc * test/DHTGetPeersReplyMessageTest.cc * test/DHTMessageFactoryImplTest.cc * test/DHTMessageTrackerTest.cc * test/DHTPingMessageTest.cc * test/DHTPingReplyMessageTest.cc * test/Makefile.am * test/MockDHTMessageFactory.h * test/PeerListProcessorTest.cc
2009-04-27 11:45:22 +00:00
createQueryMessage(const BDE& dict,
const std::string& ipaddr, uint16_t port)
{
2010-06-13 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net> 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
2010-06-13 11:25:21 +00:00
return SharedHandle<DHTQueryMessage>();
}
2010-06-13 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net> 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
2010-06-13 11:25:21 +00:00
virtual SharedHandle<DHTResponseMessage>
createResponseMessage(const std::string& messageType,
const BDE& dict,
const std::string& ipaddr, uint16_t port)
{
SharedHandle<DHTNode> remoteNode(new DHTNode());
// TODO At this point, removeNode's ID is random.
remoteNode->setIPAddress(ipaddr);
remoteNode->setPort(port);
2010-06-13 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net> 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
2010-06-13 11:25:21 +00:00
SharedHandle<MockDHTResponseMessage> m
(new MockDHTResponseMessage(_localNode, remoteNode, dict["t"].s()));
return m;
}
2010-06-13 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net> 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
2010-06-13 11:25:21 +00:00
virtual SharedHandle<DHTQueryMessage>
createPingMessage(const SharedHandle<DHTNode>& remoteNode,
const std::string& transactionID = "")
{
2010-06-13 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net> 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
2010-06-13 11:25:21 +00:00
return SharedHandle<DHTQueryMessage>();
}
2010-06-13 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net> 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
2010-06-13 11:25:21 +00:00
virtual SharedHandle<DHTResponseMessage>
createPingReplyMessage(const SharedHandle<DHTNode>& remoteNode,
const unsigned char* remoteNodeID,
const std::string& transactionID)
{
2010-06-13 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net> 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
2010-06-13 11:25:21 +00:00
return SharedHandle<DHTResponseMessage>();
}
2010-06-13 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net> 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
2010-06-13 11:25:21 +00:00
virtual SharedHandle<DHTQueryMessage>
createFindNodeMessage(const SharedHandle<DHTNode>& remoteNode,
const unsigned char* targetNodeID,
const std::string& transactionID = "")
{
2010-06-13 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net> 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
2010-06-13 11:25:21 +00:00
return SharedHandle<DHTQueryMessage>();
}
2010-06-13 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net> 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
2010-06-13 11:25:21 +00:00
virtual SharedHandle<DHTResponseMessage>
createFindNodeReplyMessage
(const SharedHandle<DHTNode>& remoteNode,
const std::vector<SharedHandle<DHTNode> >& closestKNodes,
const std::string& transactionID)
{
2010-06-13 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net> 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
2010-06-13 11:25:21 +00:00
return SharedHandle<DHTResponseMessage>();
}
2010-06-13 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net> 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
2010-06-13 11:25:21 +00:00
virtual SharedHandle<DHTQueryMessage>
createGetPeersMessage(const SharedHandle<DHTNode>& remoteNode,
const unsigned char* infoHash,
const std::string& transactionID)
{
2010-06-13 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net> 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
2010-06-13 11:25:21 +00:00
return SharedHandle<DHTQueryMessage>();
}
2010-06-13 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net> 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
2010-06-13 11:25:21 +00:00
virtual SharedHandle<DHTResponseMessage>
createGetPeersReplyMessage
(const SharedHandle<DHTNode>& remoteNode,
const std::vector<SharedHandle<DHTNode> >& closestKNodes,
const std::string& token,
const std::string& transactionID)
{
2010-06-13 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net> 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
2010-06-13 11:25:21 +00:00
return SharedHandle<DHTResponseMessage>();
}
2010-06-13 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net> 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
2010-06-13 11:25:21 +00:00
virtual SharedHandle<DHTResponseMessage>
createGetPeersReplyMessage(const SharedHandle<DHTNode>& remoteNode,
const std::vector<SharedHandle<Peer> >& peers,
const std::string& token,
const std::string& transactionID)
{
2010-06-13 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net> 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
2010-06-13 11:25:21 +00:00
return SharedHandle<DHTResponseMessage>();
}
2010-06-13 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net> 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
2010-06-13 11:25:21 +00:00
virtual SharedHandle<DHTQueryMessage>
createAnnouncePeerMessage(const SharedHandle<DHTNode>& remoteNode,
const unsigned char* infoHash,
uint16_t tcpPort,
const std::string& token,
const std::string& transactionID = "")
{
2010-06-13 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net> 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
2010-06-13 11:25:21 +00:00
return SharedHandle<DHTQueryMessage>();
}
2010-06-13 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net> 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
2010-06-13 11:25:21 +00:00
virtual SharedHandle<DHTResponseMessage>
createAnnouncePeerReplyMessage(const SharedHandle<DHTNode>& remoteNode,
const std::string& transactionID)
{
2010-06-13 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net> 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
2010-06-13 11:25:21 +00:00
return SharedHandle<DHTResponseMessage>();
}
virtual SharedHandle<DHTMessage>
createUnknownMessage(const unsigned char* data, size_t length,
const std::string& ipaddr, uint16_t port)
{
return SharedHandle<DHTMessage>();
}
void setLocalNode(const SharedHandle<DHTNode>& node)
{
_localNode = node;
}
};
} // namespace aria2
#endif // _D_MOCK_DHT_MESSAGE_FACTORY_H_