mirror of
https://github.com/falk-werner/webfuse
synced 2024-10-27 20:34:10 +00:00
44 lines
798 B
C++
44 lines
798 B
C++
#include "webfuse/mocks/mock_adapter_client_callback.hpp"
|
|
#include "webfuse/client.h"
|
|
|
|
extern "C"
|
|
{
|
|
|
|
static void
|
|
webfuse_test_MockAdapterClientCallback_callback(
|
|
wf_client * client,
|
|
int reason,
|
|
void * args)
|
|
{
|
|
void * user_data = wf_client_get_userdata(client);
|
|
auto * callback = reinterpret_cast<webfuse_test::MockAdapterClientCallback*>(user_data);
|
|
|
|
callback->Invoke(client, reason, args);
|
|
}
|
|
|
|
}
|
|
|
|
namespace webfuse_test
|
|
{
|
|
|
|
MockAdapterClientCallback::MockAdapterClientCallback()
|
|
{
|
|
|
|
}
|
|
|
|
MockAdapterClientCallback::~MockAdapterClientCallback()
|
|
{
|
|
|
|
}
|
|
|
|
void * MockAdapterClientCallback::GetUserData()
|
|
{
|
|
return reinterpret_cast<void*>(this);
|
|
}
|
|
|
|
wf_client_callback_fn * MockAdapterClientCallback::GetCallbackFn()
|
|
{
|
|
return &webfuse_test_MockAdapterClientCallback_callback;
|
|
}
|
|
|
|
} |