aria2/test/MockDHTTaskFactory.h

56 lines
1.3 KiB
C
Raw Normal View History

#ifndef D_MOCK_DHT_TASK_FACTORY_H
#define D_MOCK_DHT_TASK_FACTORY_H
#include "DHTTaskFactory.h"
namespace aria2 {
class MockDHTTaskFactory:public DHTTaskFactory {
public:
virtual ~MockDHTTaskFactory() {}
virtual std::shared_ptr<DHTTask>
createPingTask(const std::shared_ptr<DHTNode>& remoteNode,
2013-07-06 09:15:09 +00:00
int numRetry = 0) CXX11_OVERRIDE
{
return nullptr;
}
virtual std::shared_ptr<DHTTask>
2013-07-06 09:15:09 +00:00
createNodeLookupTask(const unsigned char* targetID) CXX11_OVERRIDE
{
return nullptr;
}
2013-07-06 09:15:09 +00:00
virtual std::shared_ptr<DHTTask> createBucketRefreshTask() CXX11_OVERRIDE
{
return nullptr;
}
virtual std::shared_ptr<DHTTask>
createPeerLookupTask(const std::shared_ptr<DownloadContext>& ctx,
uint16_t tcpPort,
const std::shared_ptr<PeerStorage>& peerStorage)
2013-07-06 09:15:09 +00:00
CXX11_OVERRIDE
{
return nullptr;
}
2012-10-01 14:52:22 +00:00
virtual std::shared_ptr<DHTTask>
2013-07-06 09:15:09 +00:00
createPeerAnnounceTask(const unsigned char* infoHash) CXX11_OVERRIDE
{
return nullptr;
}
virtual std::shared_ptr<DHTTask>
createReplaceNodeTask(const std::shared_ptr<DHTBucket>& bucket,
2013-07-06 09:15:09 +00:00
const std::shared_ptr<DHTNode>& newNode) CXX11_OVERRIDE
{
return nullptr;
}
};
} // namespace aria2
#endif // D_MOCK_DHT_TASK_FACTORY_H