1
0
mirror of https://github.com/falk-werner/webfuse synced 2024-10-27 20:34:10 +00:00

added mountpoint factory interface

This commit is contained in:
Falk Werner 2020-02-13 21:48:42 +01:00
parent 8ef90fb504
commit 16705acf81
3 changed files with 58 additions and 1 deletions

View File

@ -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

View File

@ -0,0 +1,24 @@
#ifndef WF_ADAPTER_MOUNTPOINT_FACTORY_H
#define WF_ADAPTER_MOUNTPOINT_FACTORY_H
#include <webfuse/adapter/api.h>
#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

View File

@ -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);