2019-03-26 22:04:53 +00:00
|
|
|
#ifndef WF_ADAPTER_IMPL_SERVER_PROTOCOL_H
|
|
|
|
#define WF_ADAPTER_IMPL_SERVER_PROTOCOL_H
|
|
|
|
|
|
|
|
#include "webfuse/adapter/impl/authenticators.h"
|
2020-02-16 20:03:17 +00:00
|
|
|
#include "webfuse/adapter/impl/mountpoint_factory.h"
|
2019-03-26 22:04:53 +00:00
|
|
|
#include "webfuse/adapter/impl/session_manager.h"
|
2020-03-29 15:40:33 +00:00
|
|
|
#include "webfuse/core/jsonrpc/proxy.h"
|
|
|
|
#include "webfuse/core/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;
|
2020-02-29 20:06:40 +00:00
|
|
|
struct wf_timer_manager;
|
2019-03-26 22:04:53 +00:00
|
|
|
|
|
|
|
struct wf_server_protocol
|
|
|
|
{
|
|
|
|
struct wf_impl_authenticators authenticators;
|
2020-02-16 20:03:17 +00:00
|
|
|
struct wf_impl_mountpoint_factory mountpoint_factory;
|
2019-03-26 22:04:53 +00:00
|
|
|
struct wf_impl_session_manager session_manager;
|
2020-03-01 15:55:58 +00:00
|
|
|
struct wf_jsonrpc_server * server;
|
2020-02-29 20:06:40 +00:00
|
|
|
struct wf_timer_manager * timer_manager;
|
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,
|
2020-02-16 20:03:17 +00:00
|
|
|
struct wf_impl_mountpoint_factory * mountpoint_factory);
|
2019-03-26 22:04:53 +00:00
|
|
|
|
|
|
|
extern void wf_impl_server_protocol_cleanup(
|
|
|
|
struct wf_server_protocol * protocol);
|
|
|
|
|
2020-03-21 08:18:04 +00:00
|
|
|
extern WF_API struct wf_server_protocol * wf_impl_server_protocol_create(
|
2020-02-16 20:03:17 +00:00
|
|
|
wf_create_mountpoint_fn * create_mountpoint,
|
|
|
|
void * create_mountpoint_context);
|
|
|
|
|
2019-03-26 22:04:53 +00:00
|
|
|
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
|