2019-03-24 01:03:31 +00:00
|
|
|
#ifndef WSFS_ADAPTER_IMPL_SERVER_PROTOCOL_H
|
|
|
|
#define WSFS_ADAPTER_IMPL_SERVER_PROTOCOL_H
|
2019-03-24 00:15:29 +00:00
|
|
|
|
2019-03-24 01:03:31 +00:00
|
|
|
#include "wsfs/adapter/impl/filesystem.h"
|
|
|
|
#include "wsfs/adapter/impl/jsonrpc/server.h"
|
|
|
|
#include "wsfs/adapter/impl/time/timeout_manager.h"
|
|
|
|
#include "wsfs/adapter/impl/authenticators.h"
|
|
|
|
#include "wsfs/adapter/impl/session_manager.h"
|
2019-03-24 00:15:29 +00:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C"
|
|
|
|
{
|
|
|
|
#endif
|
|
|
|
|
2019-03-24 01:03:31 +00:00
|
|
|
struct lws_protocols;
|
|
|
|
|
2019-03-24 03:00:06 +00:00
|
|
|
struct server_protocol
|
2019-03-24 01:03:31 +00:00
|
|
|
{
|
2019-03-24 02:25:29 +00:00
|
|
|
struct timeout_manager timeout_manager;
|
|
|
|
struct filesystem filesystem;
|
|
|
|
struct jsonrpc_server rpc;
|
|
|
|
struct authenticators authenticators;
|
|
|
|
struct session_manager session_manager;
|
2019-03-24 01:03:31 +00:00
|
|
|
};
|
|
|
|
|
2019-03-24 02:25:29 +00:00
|
|
|
extern bool server_protocol_init(
|
2019-03-24 03:00:06 +00:00
|
|
|
struct server_protocol * protocol,
|
2019-03-24 01:03:31 +00:00
|
|
|
char * mount_point);
|
|
|
|
|
2019-03-24 02:25:29 +00:00
|
|
|
extern void server_protocol_cleanup(
|
2019-03-24 03:00:06 +00:00
|
|
|
struct server_protocol * protocol);
|
2019-03-24 01:03:31 +00:00
|
|
|
|
2019-03-24 03:00:06 +00:00
|
|
|
extern struct server_protocol * server_protocol_create(
|
2019-03-24 00:15:29 +00:00
|
|
|
char * mount_point);
|
|
|
|
|
2019-03-24 02:25:29 +00:00
|
|
|
extern void server_protocol_dispose(
|
2019-03-24 03:00:06 +00:00
|
|
|
struct server_protocol * protocol);
|
2019-03-24 00:15:29 +00:00
|
|
|
|
2019-03-24 02:25:29 +00:00
|
|
|
extern void server_protocol_init_lws(
|
2019-03-24 03:00:06 +00:00
|
|
|
struct server_protocol * protocol,
|
2019-03-24 00:15:29 +00:00
|
|
|
struct lws_protocols * lws_protocol);
|
|
|
|
|
2019-03-24 02:25:29 +00:00
|
|
|
extern void server_protocol_add_authenticator(
|
2019-03-24 03:00:06 +00:00
|
|
|
struct server_protocol * protocol,
|
2019-03-24 00:15:29 +00:00
|
|
|
char const * type,
|
2019-03-24 03:00:06 +00:00
|
|
|
authenticate_fn * authenticate,
|
2019-03-24 00:15:29 +00:00
|
|
|
void * user_data);
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|