2020-06-21 19:02:34 +00:00
|
|
|
#include "webfuse_provider/jsonrpc/mock_timer.hpp"
|
2020-06-21 19:18:43 +00:00
|
|
|
#include "webfuse_provider/test_util/wrap.hpp"
|
2020-03-22 19:09:40 +00:00
|
|
|
|
|
|
|
extern "C"
|
|
|
|
{
|
2020-06-16 21:57:41 +00:00
|
|
|
static wfp_jsonrpc_test::ITimer * wfp_jsonrpc_MockTimer = nullptr;
|
2020-03-22 19:09:40 +00:00
|
|
|
|
2020-06-16 21:57:41 +00:00
|
|
|
WFP_WRAP_FUNC0(wfp_jsonrpc_MockTimer, wfp_timer_manager *, wfp_timer_manager_create);
|
|
|
|
WFP_WRAP_FUNC1(wfp_jsonrpc_MockTimer, void, wfp_timer_manager_dispose, wfp_timer_manager *);
|
|
|
|
WFP_WRAP_FUNC1(wfp_jsonrpc_MockTimer, void, wfp_timer_manager_check, wfp_timer_manager *);
|
2020-03-22 19:09:40 +00:00
|
|
|
|
2020-06-16 21:57:41 +00:00
|
|
|
WFP_WRAP_FUNC3(wfp_jsonrpc_MockTimer, wfp_timer *, wfp_timer_create, wfp_timer_manager *, wfp_timer_on_timer_fn *, void *);
|
|
|
|
WFP_WRAP_FUNC1(wfp_jsonrpc_MockTimer, void, wfp_timer_dispose, wfp_timer *);
|
|
|
|
WFP_WRAP_FUNC2(wfp_jsonrpc_MockTimer, void, wfp_timer_start, wfp_timer *, int);
|
|
|
|
WFP_WRAP_FUNC1(wfp_jsonrpc_MockTimer, void, wfp_timer_cancel, wfp_timer *);
|
2020-03-22 19:09:40 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
|
2020-06-16 21:57:41 +00:00
|
|
|
namespace wfp_jsonrpc_test
|
2020-03-22 19:09:40 +00:00
|
|
|
{
|
|
|
|
MockTimer::MockTimer()
|
|
|
|
{
|
2020-06-16 21:57:41 +00:00
|
|
|
wfp_jsonrpc_MockTimer = this;
|
2020-03-22 19:09:40 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
MockTimer::~MockTimer()
|
|
|
|
{
|
2020-06-16 21:57:41 +00:00
|
|
|
wfp_jsonrpc_MockTimer = nullptr;
|
2020-03-22 19:09:40 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|