1
0
mirror of https://github.com/falk-werner/webfuse-provider synced 2024-10-27 20:44:10 +00:00
falk-werner_webfuse-provider/lib/webfuse/adapter/impl/jsonrpc/server.h

49 lines
1020 B
C
Raw Normal View History

2019-03-26 22:04:53 +00:00
#ifndef WF_ADAPTER_IMPL_JSONRPC_SERVER_H
#define WF_ADAPTER_IMPL_JSONRPC_SERVER_H
#ifndef __cplusplus
#include <stdarg.h>
#include <stdbool.h>
#else
#include <cstdarg>
#endif
#include <jansson.h>
#include "webfuse/core/status.h"
#include "webfuse/adapter/impl/jsonrpc/send_fn.h"
2019-03-26 22:04:53 +00:00
#include "webfuse/adapter/impl/jsonrpc/method.h"
#ifdef __cplusplus
extern "C"
2019-03-26 22:04:53 +00:00
{
#endif
2019-03-26 22:04:53 +00:00
struct wf_impl_jsonrpc_server
{
struct wf_impl_jsonrpc_method * methods;
};
extern void wf_impl_jsonrpc_server_init(
struct wf_impl_jsonrpc_server * server);
2019-03-26 22:04:53 +00:00
extern void wf_impl_jsonrpc_server_cleanup(
struct wf_impl_jsonrpc_server * server);
extern void wf_impl_jsonrpc_server_add(
struct wf_impl_jsonrpc_server * server,
char const * method_name,
2019-03-26 22:04:53 +00:00
wf_impl_jsonrpc_method_invoke_fn * invoke,
void * user_data);
2019-03-26 22:04:53 +00:00
extern void wf_impl_jsonrpc_server_process(
2019-03-26 22:04:53 +00:00
struct wf_impl_jsonrpc_server * server,
json_t * request,
wf_impl_jsonrpc_send_fn * send,
void * user_data);
2019-03-26 22:04:53 +00:00
#ifdef __cplusplus
}
#endif
#endif