2019-03-26 22:04:53 +00:00
|
|
|
#ifndef WF_ADAPTER_IMPL_JSONRPC_REQUEST_H
|
|
|
|
#define WF_ADAPTER_IMPL_JSONRPC_REQUEST_H
|
2019-02-09 02:08:02 +00:00
|
|
|
|
|
|
|
#ifndef __cplusplus
|
|
|
|
#include <stdarg.h>
|
|
|
|
#include <stddef.h>
|
|
|
|
#include <stdbool.h>
|
|
|
|
#else
|
|
|
|
#include <cstdarg>
|
|
|
|
#include <cstddef>
|
|
|
|
using std::size_t;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include <jansson.h>
|
2019-04-01 20:15:12 +00:00
|
|
|
#include "webfuse/core/status.h"
|
|
|
|
#include "webfuse/adapter/impl/jsonrpc/send_fn.h"
|
2019-02-09 02:08:02 +00:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C"
|
|
|
|
{
|
|
|
|
#endif
|
|
|
|
|
2019-04-01 20:15:12 +00:00
|
|
|
struct wf_impl_jsonrpc_request;
|
|
|
|
|
|
|
|
extern bool wf_impl_jsonrpc_is_request(
|
|
|
|
json_t * message);
|
|
|
|
|
|
|
|
extern struct wf_impl_jsonrpc_request * wf_impl_jsonrpc_request_create(
|
|
|
|
int id,
|
|
|
|
wf_impl_jsonrpc_send_fn * send,
|
|
|
|
void * user_data);
|
|
|
|
|
|
|
|
extern void wf_impl_jsonrpc_request_dispose(
|
|
|
|
struct wf_impl_jsonrpc_request * request);
|
|
|
|
|
|
|
|
extern void * wf_impl_jsonrpc_request_get_userdata(
|
|
|
|
struct wf_impl_jsonrpc_request * request);
|
|
|
|
|
|
|
|
extern void wf_impl_jsonrpc_respond(
|
|
|
|
struct wf_impl_jsonrpc_request * request,
|
|
|
|
json_t * result);
|
|
|
|
|
|
|
|
extern void wf_impl_jsonrpc_respond_error(
|
|
|
|
struct wf_impl_jsonrpc_request * request,
|
|
|
|
wf_status status);
|
|
|
|
|
2019-02-09 02:08:02 +00:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|