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_provider/impl/jsonrpc/server.h

46 lines
872 B
C
Raw Normal View History

#ifndef WFP_JSONRPC_SERVER_H
#define WFP_JSONRPC_SERVER_H
2020-03-01 15:55:58 +00:00
#ifndef __cplusplus
#include <stdarg.h>
#include <stdbool.h>
#else
#include <cstdarg>
#endif
#include <jansson.h>
2020-06-16 21:39:45 +00:00
#include "webfuse_provider/impl/jsonrpc/method_invoke_fn.h"
#include "webfuse_provider/impl/jsonrpc/send_fn.h"
2020-03-01 15:55:58 +00:00
#ifdef __cplusplus
extern "C"
{
#endif
struct wfp_jsonrpc_server;
2020-03-01 15:55:58 +00:00
extern struct wfp_jsonrpc_server *
wfp_jsonrpc_server_create(void);
2020-03-01 15:55:58 +00:00
extern void
wfp_jsonrpc_server_dispose(
struct wfp_jsonrpc_server * server);
2020-03-01 15:55:58 +00:00
extern void wfp_jsonrpc_server_add(
struct wfp_jsonrpc_server * server,
2020-03-01 15:55:58 +00:00
char const * method_name,
wfp_jsonrpc_method_invoke_fn * invoke,
2020-03-01 15:55:58 +00:00
void * user_data);
extern void wfp_jsonrpc_server_process(
struct wfp_jsonrpc_server * server,
2020-03-01 15:55:58 +00:00
json_t * request,
wfp_jsonrpc_send_fn * send,
2020-03-01 15:55:58 +00:00
void * user_data);
#ifdef __cplusplus
}
#endif
#endif