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:
16
include/wsfs/adapter/api.h
Normal file
16
include/wsfs/adapter/api.h
Normal 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
|
||||
31
include/wsfs/adapter/server.h
Normal file
31
include/wsfs/adapter/server.h
Normal 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
|
||||
35
include/wsfs/adapter/server_config.h
Normal file
35
include/wsfs/adapter/server_config.h
Normal 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
|
||||
28
include/wsfs/adapter/server_protocol.h
Normal file
28
include/wsfs/adapter/server_protocol.h
Normal 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
|
||||
Reference in New Issue
Block a user