2020-06-21 19:02:34 +00:00
|
|
|
#include "webfuse_provider/jsonrpc/mock_timer_callback.hpp"
|
2020-03-22 19:09:40 +00:00
|
|
|
|
|
|
|
extern "C"
|
|
|
|
{
|
2020-06-16 21:57:41 +00:00
|
|
|
using wfp_jsonrpc_test::MockTimerCallback;
|
2020-03-22 19:09:40 +00:00
|
|
|
|
2020-06-16 21:57:41 +00:00
|
|
|
static void wfp_jsonrpc_test_MockTimerCallback_on_timer(
|
|
|
|
wfp_timer * timer,
|
2020-03-22 19:09:40 +00:00
|
|
|
void * user_data)
|
|
|
|
{
|
|
|
|
auto * self = reinterpret_cast<MockTimerCallback*>(user_data);
|
|
|
|
self->on_timer(timer, user_data);
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2020-06-16 21:57:41 +00:00
|
|
|
namespace wfp_jsonrpc_test
|
2020-03-22 19:09:40 +00:00
|
|
|
{
|
|
|
|
|
|
|
|
MockTimerCallback::MockTimerCallback()
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
MockTimerCallback::~MockTimerCallback()
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2020-06-16 21:57:41 +00:00
|
|
|
wfp_timer_on_timer_fn * MockTimerCallback::on_timer_fn()
|
2020-03-22 19:09:40 +00:00
|
|
|
{
|
2020-06-16 21:57:41 +00:00
|
|
|
return &wfp_jsonrpc_test_MockTimerCallback_on_timer;
|
2020-03-22 19:09:40 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void * MockTimerCallback::user_data()
|
|
|
|
{
|
|
|
|
return reinterpret_cast<void*>(this);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|