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_callback.cc

41 lines
660 B
C++
Raw Normal View History

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"
{
using wfp_jsonrpc_test::MockTimerCallback;
2020-03-22 19:09:40 +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);
}
}
namespace wfp_jsonrpc_test
2020-03-22 19:09:40 +00:00
{
MockTimerCallback::MockTimerCallback()
{
}
MockTimerCallback::~MockTimerCallback()
{
}
wfp_timer_on_timer_fn * MockTimerCallback::on_timer_fn()
2020-03-22 19:09:40 +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);
}
}