mirror of
https://github.com/aria2/aria2.git
synced 2025-01-08 11:01:38 +00:00
41 lines
861 B
C++
41 lines
861 B
C++
#ifndef D_MOCK_DHT_TASK_QUEUE_H
|
|
#define D_MOCK_DHT_TASK_QUEUE_H
|
|
|
|
#include "DHTTaskQueue.h"
|
|
|
|
namespace aria2 {
|
|
|
|
class MockDHTTaskQueue:public DHTTaskQueue {
|
|
public:
|
|
std::deque<std::shared_ptr<DHTTask> > periodicTaskQueue1_;
|
|
|
|
std::deque<std::shared_ptr<DHTTask> > periodicTaskQueue2_;
|
|
|
|
std::deque<std::shared_ptr<DHTTask> > immediateTaskQueue_;
|
|
|
|
MockDHTTaskQueue() {}
|
|
|
|
virtual ~MockDHTTaskQueue() {}
|
|
|
|
virtual void executeTask() {}
|
|
|
|
virtual void addPeriodicTask1(const std::shared_ptr<DHTTask>& task)
|
|
{
|
|
periodicTaskQueue1_.push_back(task);
|
|
}
|
|
|
|
virtual void addPeriodicTask2(const std::shared_ptr<DHTTask>& task)
|
|
{
|
|
periodicTaskQueue2_.push_back(task);
|
|
}
|
|
|
|
virtual void addImmediateTask(const std::shared_ptr<DHTTask>& task)
|
|
{
|
|
immediateTaskQueue_.push_back(task);
|
|
}
|
|
};
|
|
|
|
} // namespace aria2
|
|
|
|
#endif // D_MOCK_DHT_TASK_QUEUE_H
|