2020-06-16 21:57:41 +00:00
|
|
|
#ifndef WFP_JSONRPC_PROXY_INTERN_H
|
|
|
|
#define WFP_JSONRPC_PROXY_INTERN_H
|
2020-03-29 15:40:33 +00:00
|
|
|
|
2020-06-16 21:39:45 +00:00
|
|
|
#include "webfuse_provider/impl/jsonrpc/proxy.h"
|
|
|
|
#include "webfuse_provider/impl/jsonrpc/proxy_finished_fn.h"
|
|
|
|
#include "webfuse_provider/impl/jsonrpc/send_fn.h"
|
2020-03-29 15:40:33 +00:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C"
|
|
|
|
{
|
|
|
|
#endif
|
|
|
|
|
2020-06-16 21:57:41 +00:00
|
|
|
struct wfp_timer;
|
2020-03-29 15:40:33 +00:00
|
|
|
|
2020-06-16 21:57:41 +00:00
|
|
|
struct wfp_jsonrpc_request
|
2020-03-29 15:40:33 +00:00
|
|
|
{
|
|
|
|
bool is_pending;
|
2020-06-16 21:57:41 +00:00
|
|
|
wfp_jsonrpc_proxy_finished_fn * finished;
|
2020-03-29 15:40:33 +00:00
|
|
|
void * user_data;
|
|
|
|
int id;
|
2020-06-16 21:57:41 +00:00
|
|
|
struct wfp_timer * timer;
|
2020-03-29 15:40:33 +00:00
|
|
|
};
|
|
|
|
|
2020-06-16 21:57:41 +00:00
|
|
|
struct wfp_jsonrpc_proxy
|
2020-03-29 15:40:33 +00:00
|
|
|
{
|
2020-06-16 21:57:41 +00:00
|
|
|
struct wfp_jsonrpc_request request;
|
2020-03-29 15:40:33 +00:00
|
|
|
int timeout;
|
2020-06-16 21:57:41 +00:00
|
|
|
wfp_jsonrpc_send_fn * send;
|
2020-03-29 15:40:33 +00:00
|
|
|
void * user_data;
|
|
|
|
};
|
|
|
|
|
|
|
|
extern void
|
2020-06-16 21:57:41 +00:00
|
|
|
wfp_jsonrpc_proxy_init(
|
|
|
|
struct wfp_jsonrpc_proxy * proxy,
|
|
|
|
struct wfp_timer_manager * manager,
|
2020-03-29 15:40:33 +00:00
|
|
|
int timeout,
|
2020-06-16 21:57:41 +00:00
|
|
|
wfp_jsonrpc_send_fn * send,
|
2020-03-29 15:40:33 +00:00
|
|
|
void * user_data);
|
|
|
|
|
|
|
|
extern void
|
2020-06-16 21:57:41 +00:00
|
|
|
wfp_jsonrpc_proxy_cleanup(
|
|
|
|
struct wfp_jsonrpc_proxy * proxy);
|
2020-03-29 15:40:33 +00:00
|
|
|
|
2020-06-16 21:57:41 +00:00
|
|
|
extern void wfp_jsonrpc_proxy_vinvoke(
|
|
|
|
struct wfp_jsonrpc_proxy * proxy,
|
|
|
|
wfp_jsonrpc_proxy_finished_fn * finished,
|
2020-04-04 06:32:26 +00:00
|
|
|
void * user_data,
|
|
|
|
char const * method_name,
|
|
|
|
char const * param_info,
|
|
|
|
va_list args);
|
|
|
|
|
2020-06-16 21:57:41 +00:00
|
|
|
extern void wfp_jsonrpc_proxy_vnotify(
|
|
|
|
struct wfp_jsonrpc_proxy * proxy,
|
2020-04-04 06:55:59 +00:00
|
|
|
char const * method_name,
|
|
|
|
char const * param_info,
|
|
|
|
va_list args);
|
|
|
|
|
2020-03-29 15:40:33 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|