1
0
mirror of https://github.com/falk-werner/webfuse-provider synced 2026-03-02 04:09:18 +00:00

reorganized project: prepared to extract common functionality

This commit is contained in:
Falk Werner
2019-02-25 20:17:13 +01:00
parent c7c28416db
commit 1976841334
88 changed files with 217 additions and 218 deletions

View File

@@ -0,0 +1,16 @@
#ifndef WSFS_API_H
#define WSFS_API_H
#ifndef WSFS_API
#define WSFS_API
#endif
#ifndef WSFS_EXPORT
#ifdef __GNUC__
#define WSFS_EXPORT __attribute__ ((visibility ("default")))
#else
#define WSFS_EXPORT
#endif
#endif
#endif

View File

@@ -0,0 +1,31 @@
#ifndef WSFS_SERVER_H
#define WSFS_SERVER_H
#include "wsfs/adapter/api.h"
struct wsfs_server;
struct wsfs_server_config;
#ifdef __cplusplus
extern "C"
{
#endif
extern WSFS_API struct wsfs_server * wsfs_server_create(
struct wsfs_server_config * config);
extern WSFS_API void wsfs_server_dispose(
struct wsfs_server * server);
extern WSFS_API void wsfs_server_run(
struct wsfs_server * server);
extern WSFS_API void wsfs_server_shutdown(
struct wsfs_server * server);
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -0,0 +1,35 @@
#ifndef WSFS_SERVER_CONFIG_H
#define WSFS_SERVER_CONFIG_H
#include "wsfs/adapter/api.h"
struct wsfs_server_config
{
char * mount_point;
char * document_root;
char * key_path;
char * cert_path;
char * vhost_name;
int port;
};
#ifdef __cplusplus
extern "C"
{
#endif
extern WSFS_API void wsfs_server_config_init(
struct wsfs_server_config * config);
extern WSFS_API void wsfs_server_config_cleanup(
struct wsfs_server_config * config);
extern WSFS_API void wsfs_server_config_clone(
struct wsfs_server_config * config,
struct wsfs_server_config * clone);
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -0,0 +1,28 @@
#ifndef WSFS_SERVER_PROTOCOL_H
#define WSFS_SERVER_PROTOCOL_H
#include "wsfs/adapter/api.h"
struct wsfs_server_protocol;
struct lws_protocols;
#ifdef __cplusplus
extern "C"
{
#endif
extern WSFS_API struct wsfs_server_protocol * wsfs_server_protocol_create(
char * mount_point);
extern WSFS_API void wsfs_server_protocol_dispose(
struct wsfs_server_protocol * protocol);
extern WSFS_API void wsfs_server_protocol_init_lws(
struct wsfs_server_protocol * protocol,
struct lws_protocols * lws_protocol);
#ifdef __cplusplus
}
#endif
#endif