2019-03-26 22:04:53 +00:00
|
|
|
#ifndef WF_ADAPTER_IMPL_SERVER_PROTOCOL_H
|
|
|
|
#define WF_ADAPTER_IMPL_SERVER_PROTOCOL_H
|
|
|
|
|
2019-04-01 20:15:12 +00:00
|
|
|
#include "webfuse/adapter/impl/jsonrpc/proxy.h"
|
2019-03-26 22:04:53 +00:00
|
|
|
#include "webfuse/adapter/impl/time/timeout_manager.h"
|
|
|
|
#include "webfuse/adapter/impl/authenticators.h"
|
|
|
|
#include "webfuse/adapter/impl/session_manager.h"
|
2019-04-01 20:15:12 +00:00
|
|
|
#include "webfuse/adapter/impl/jsonrpc/server.h"
|
2019-03-26 22:04:53 +00:00
|
|
|
|
2019-05-19 12:33:42 +00:00
|
|
|
#ifndef __cplusplus
|
|
|
|
#include <stdbool.h>
|
|
|
|
#endif
|
|
|
|
|
2019-03-26 22:04:53 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C"
|
|
|
|
{
|
|
|
|
#endif
|
|
|
|
|
|
|
|
struct lws_protocols;
|
|
|
|
|
|
|
|
struct wf_server_protocol
|
|
|
|
{
|
2019-04-17 20:51:16 +00:00
|
|
|
char * mount_point;
|
2019-03-26 22:04:53 +00:00
|
|
|
struct wf_impl_timeout_manager timeout_manager;
|
|
|
|
struct wf_impl_authenticators authenticators;
|
|
|
|
struct wf_impl_session_manager session_manager;
|
2019-04-01 20:15:12 +00:00
|
|
|
struct wf_impl_jsonrpc_server server;
|
2019-05-19 12:33:42 +00:00
|
|
|
bool is_operational;
|
2019-03-26 22:04:53 +00:00
|
|
|
};
|
|
|
|
|
2019-04-17 20:51:16 +00:00
|
|
|
extern void wf_impl_server_protocol_init(
|
2019-03-26 22:04:53 +00:00
|
|
|
struct wf_server_protocol * protocol,
|
|
|
|
char * mount_point);
|
|
|
|
|
|
|
|
extern void wf_impl_server_protocol_cleanup(
|
|
|
|
struct wf_server_protocol * protocol);
|
|
|
|
|
|
|
|
extern struct wf_server_protocol * wf_impl_server_protocol_create(
|
|
|
|
char * mount_point);
|
|
|
|
|
|
|
|
extern void wf_impl_server_protocol_dispose(
|
|
|
|
struct wf_server_protocol * protocol);
|
|
|
|
|
|
|
|
extern void wf_impl_server_protocol_init_lws(
|
|
|
|
struct wf_server_protocol * protocol,
|
|
|
|
struct lws_protocols * lws_protocol);
|
|
|
|
|
|
|
|
extern void wf_impl_server_protocol_add_authenticator(
|
|
|
|
struct wf_server_protocol * protocol,
|
|
|
|
char const * type,
|
|
|
|
wf_authenticate_fn * authenticate,
|
|
|
|
void * user_data);
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|