diff --git a/include/webfuse/adapter/mountpoint.h b/include/webfuse/adapter/mountpoint.h new file mode 100644 index 0000000..9b1d57f --- /dev/null +++ b/include/webfuse/adapter/mountpoint.h @@ -0,0 +1,28 @@ +#ifndef WF_ADAPTER_MOUNTPOINT_H +#define WF_ADAPTER_MOUNTPOINT_H + +#ifdef __cplusplus +extern "C" +{ +#endif + +struct wf_mountpoint; + +extern struct wf_mountpoint * +wf_mountpoint_create( + char const * path); + +extern void +wf_mountpoint_release( + struct wf_mountpoint * mountpoint); + +extern char const * +wf_mountpoint_get_path( + struct wf_mountpoint const * mountpoint); + +#ifdef __cplusplus +} +#endif + + +#endif diff --git a/include/webfuse/adapter/mountpoint_factory.h b/include/webfuse/adapter/mountpoint_factory.h new file mode 100644 index 0000000..a265c6f --- /dev/null +++ b/include/webfuse/adapter/mountpoint_factory.h @@ -0,0 +1,24 @@ +#ifndef WF_ADAPTER_MOUNTPOINT_FACTORY_H +#define WF_ADAPTER_MOUNTPOINT_FACTORY_H + +#include + +#ifdef __cplusplus +extern "C" +{ +#endif + +struct wf_mountpoint; + +typedef struct wf_mountpoint * +wf_create_mountpoint_fn( + char const * filesystem, + void * user_data); + + +#ifdef __cplusplus +} +#endif + + +#endif diff --git a/include/webfuse/adapter/server_config.h b/include/webfuse/adapter/server_config.h index cc1b6d3..778cc8c 100644 --- a/include/webfuse/adapter/server_config.h +++ b/include/webfuse/adapter/server_config.h @@ -3,6 +3,7 @@ #include "webfuse/adapter/api.h" #include "webfuse/adapter/authenticate.h" +#include "webfuse/adapter/mountpoint_factory.h" #ifdef __cplusplus extern "C" @@ -16,11 +17,15 @@ extern WF_API struct wf_server_config * wf_server_config_create(void); extern WF_API void wf_server_config_dispose( struct wf_server_config * config); - extern WF_API void wf_server_config_set_mountpoint( struct wf_server_config * config, char const * mount_point); +extern WF_API void wf_server_config_set_mountpoint_factory( + struct wf_server_config * config, + wf_create_mountpoint_fn * create_mountpoint, + void * user_data); + extern WF_API void wf_server_config_set_documentroot( struct wf_server_config * config, char const * document_root);