You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
73 lines
1.3 KiB
73 lines
1.3 KiB
5 years ago
|
#ifndef WFP_STATIC_FILESYSTEM_H
|
||
|
#define WFP_STATIC_FILESYSTEM_H
|
||
|
|
||
|
#ifndef __cplusplus
|
||
|
#include <stddef.h>
|
||
|
#else
|
||
|
#include <cstddef>
|
||
|
using ::std::size_t;
|
||
|
#endif
|
||
|
|
||
4 years ago
|
#include <webfuse_provider/api.h>
|
||
5 years ago
|
|
||
|
#ifdef __cplusplus
|
||
|
extern "C"
|
||
|
{
|
||
|
#endif
|
||
|
|
||
|
struct wfp_client_config;
|
||
|
|
||
|
struct wfp_static_filesystem;
|
||
|
|
||
|
typedef size_t
|
||
|
wfp_static_filesystem_read_fn(
|
||
|
size_t offset,
|
||
|
char * buffer,
|
||
|
size_t buffer_size,
|
||
|
void * user_data);
|
||
|
|
||
|
typedef void
|
||
|
wfp_static_filesystem_get_info_fn(
|
||
|
void * user_data,
|
||
|
int * result_mode,
|
||
|
size_t * result_size);
|
||
|
|
||
|
|
||
|
extern WFP_API struct wfp_static_filesystem *
|
||
|
wfp_static_filesystem_create(
|
||
|
struct wfp_client_config * config);
|
||
|
|
||
|
extern WFP_API void
|
||
|
wfp_static_filesystem_dispose(
|
||
|
struct wfp_static_filesystem * filesystem);
|
||
|
|
||
|
extern WFP_API void
|
||
|
wfp_static_filesystem_add(
|
||
|
struct wfp_static_filesystem * filesystem,
|
||
|
char const * path,
|
||
|
int mode,
|
||
|
char const * content,
|
||
|
size_t length);
|
||
|
|
||
|
extern WFP_API void
|
||
|
wfp_static_filesystem_add_text(
|
||
|
struct wfp_static_filesystem * filesystem,
|
||
|
char const * path,
|
||
|
int mode,
|
||
|
char const * content);
|
||
|
|
||
4 years ago
|
extern void
|
||
|
wfp_static_filesystem_set_user_data(
|
||
|
struct wfp_static_filesystem * filesystem,
|
||
|
void * user_data);
|
||
|
|
||
|
extern void *
|
||
|
wfp_static_filesystem_get_user_data(
|
||
|
struct wfp_static_filesystem * filesystem);
|
||
|
|
||
5 years ago
|
#ifdef __cplusplus
|
||
|
}
|
||
|
#endif
|
||
|
|
||
|
#endif
|