1
0
mirror of https://github.com/falk-werner/webfuse-provider synced 2024-10-27 20:44:10 +00:00
falk-werner_webfuse-provider/test/webfuse_provider/jsonrpc/mock_timer.cc

31 lines
970 B
C++
Raw Normal View History

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"
{
static wfp_jsonrpc_test::ITimer * wfp_jsonrpc_MockTimer = nullptr;
2020-03-22 19:09:40 +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
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
}
namespace wfp_jsonrpc_test
2020-03-22 19:09:40 +00:00
{
MockTimer::MockTimer()
{
wfp_jsonrpc_MockTimer = this;
2020-03-22 19:09:40 +00:00
}
MockTimer::~MockTimer()
{
wfp_jsonrpc_MockTimer = nullptr;
2020-03-22 19:09:40 +00:00
}
}