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

renamed to webfuse

This commit is contained in:
Falk Werner
2019-03-26 23:04:53 +01:00
parent 1c9d1c8420
commit 7447fb5dff
203 changed files with 4639 additions and 4639 deletions

View File

@@ -0,0 +1,16 @@
#ifndef WFP_PROVIDER_API_H
#define WFP_PROVIDER_API_H
#ifndef WFP_API
#define WFP_API
#endif
#ifndef WFP_EXPORT
#ifdef __GNUC__
#define WFP_EXPORT __attribute__ ((visibility ("default")))
#else
#define WFP_EXPORT
#endif
#endif
#endif

View File

@@ -0,0 +1,39 @@
#ifndef WF_PROVIDER_CLIENT_H
#define WF_PROVIDER_CLIENT_H
#include "webfuse/provider/api.h"
#ifdef __cplusplus
extern "C"
{
#endif
struct wfp_client;
struct wfp_client_config;
extern WFP_API struct wfp_client * wfp_client_create(
struct wfp_client_config * config);
extern WFP_API void wfp_client_connect(
struct wfp_client * client,
char const * url);
extern WFP_API void wfp_client_disconnect(
struct wfp_client * client);
extern WFP_API void wfp_client_dispose(
struct wfp_client * client);
extern WFP_API void wfp_client_run(
struct wfp_client * client);
extern WFP_API void wfp_client_shutdown(
struct wfp_client * client);
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -0,0 +1,88 @@
#ifndef WF_PROVIDER_CLIENT_CONFIG_H
#define WF_PROVIDER_CLIENT_CONFIG_H
#include <webfuse/provider/api.h>
#include <webfuse/provider/operation/lookup.h>
#include <webfuse/provider/operation/getattr.h>
#include <webfuse/provider/operation/readdir.h>
#include <webfuse/provider/operation/open.h>
#include <webfuse/provider/operation/close.h>
#include <webfuse/provider/operation/read.h>
#ifdef __cplusplus
extern "C"
{
#endif
struct wfp_client_config;
typedef void wfp_connected_fn(
void * user_data);
typedef void wfp_disconnected_fn(
void * user_data);
typedef void wfp_ontimer_fn(
void * user_data);
extern WFP_API struct wfp_client_config * wfp_client_config_create(void);
extern WFP_API void wfp_client_config_dispose(
struct wfp_client_config * config);
extern WFP_API void wfp_client_config_set_userdata(
struct wfp_client_config * config,
void * user_data);
extern WFP_API void wfp_client_config_set_keypath(
struct wfp_client_config * config,
char const * key_path);
extern WFP_API void wfp_client_config_set_certpath(
struct wfp_client_config * config,
char const * cert_path);
extern WFP_API void wfp_client_config_set_onconnected(
struct wfp_client_config * config,
wfp_connected_fn * handler);
extern WFP_API void wfp_client_config_set_ondisconnected(
struct wfp_client_config * config,
wfp_disconnected_fn * handler);
extern WFP_API void wfp_client_config_set_ontimer(
struct wfp_client_config * config,
wfp_ontimer_fn * handler);
extern WFP_API void wfp_client_config_set_onlookup(
struct wfp_client_config * config,
wfp_lookup_fn * handler);
extern WFP_API void wfp_client_config_set_ongetattr(
struct wfp_client_config * config,
wfp_getattr_fn * handler);
extern WFP_API void wfp_client_config_set_onreaddir(
struct wfp_client_config * config,
wfp_readdir_fn * handler);
extern WFP_API void wfp_client_config_set_onopen(
struct wfp_client_config * config,
wfp_open_fn * handler);
extern WFP_API void wfp_client_config_set_onclose(
struct wfp_client_config * config,
wfp_close_fn * handler);
extern WFP_API void wfp_client_config_set_onread(
struct wfp_client_config * config,
wfp_read_fn * handler);
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -0,0 +1,32 @@
#ifndef WF_PROVIDER_CLIENT_PROTOCOL_H
#define WF_PROVIDER_CLIENT_PROTOCOL_H
#include "webfuse/provider/api.h"
#ifdef __cplusplus
extern "C"
{
#endif
struct wfp_client_protocol;
struct wfp_provider;
struct lws_protocols;
extern WFP_API struct wfp_client_protocol * wfp_client_protocol_create(
struct wfp_provider const * provider,
void * user_data);
extern WFP_API void wfp_client_protocol_dispose(
struct wfp_client_protocol * protocol);
extern WFP_API void wfp_client_protocol_init_lws(
struct wfp_client_protocol * protocol,
struct lws_protocols * lws_protocol);
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -0,0 +1,32 @@
#ifndef WF_PROVIDER_DIRBUFFER_H
#define WF_PROVIDER_DIRBUFFER_H
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include "webfuse/provider/api.h"
#ifdef __cplusplus
extern "C"
{
#endif
struct wfp_dirbuffer;
extern WFP_API struct wfp_dirbuffer * wfp_dirbuffer_create(void);
extern WFP_API void wfp_dirbuffer_dispose(
struct wfp_dirbuffer * buffer);
extern WFP_API void wfp_dirbuffer_add(
struct wfp_dirbuffer * buffer,
char const * name,
ino_t inode);
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -0,0 +1,31 @@
#ifndef WFP_OPERATION_CLOSE_H
#define WFP_OPERATION_CLOSE_H
#ifndef __cplusplus
#include <inttypes.h>
#else
#include <cinttypes>
#endif
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include "webfuse/provider/api.h"
#ifdef __cplusplus
extern "C"
{
#endif
typedef void wfp_close_fn(
ino_t inode,
uint32_t handle,
int flags,
void * user_data);
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -0,0 +1,22 @@
#ifndef WFP_OPERATION_ERROR_H
#define WFP_OPERATION_ERROR_H
#include "webfuse/provider/api.h"
#include "webfuse/core/status.h"
#ifdef __cplusplus
extern "C"
{
#endif
struct wfp_request;
extern WFP_API void wfp_respond_error(
struct wfp_request * request,
wf_status status);
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -0,0 +1,31 @@
#ifndef WFP_OPERATION_GETATTR_H
#define WFP_OPERATION_GETATTR_H
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include "webfuse/provider/api.h"
#ifdef __cplusplus
extern "C"
{
#endif
struct wfp_request;
typedef void wfp_getattr_fn(
struct wfp_request * request,
ino_t inode,
void * user_data);
extern WFP_API void wfp_respond_getattr(
struct wfp_request * request,
struct stat const * stat);
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -0,0 +1,32 @@
#ifndef WFP_OPERATION_LOOKUP_H
#define WFP_OPERATION_LOOKUP_H
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include "webfuse/provider/api.h"
#ifdef __cplusplus
extern "C"
{
#endif
struct wfp_request;
typedef void wfp_lookup_fn(
struct wfp_request * request,
ino_t parent,
char const * name,
void * user_data);
extern WFP_API void wfp_respond_lookup(
struct wfp_request * request,
struct stat const * stat);
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -0,0 +1,38 @@
#ifndef WFP_OPERATION_OPEN_H
#define WFP_OPERATION_OPEN_H
#ifndef __cplusplus
#include <inttypes.h>
#else
#include <cinttypes>
#endif
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include "webfuse/provider/api.h"
#ifdef __cplusplus
extern "C"
{
#endif
struct wfp_request;
typedef void wfp_open_fn(
struct wfp_request * request,
ino_t inode,
int flags,
void * user_data);
extern WFP_API void wfp_respond_open(
struct wfp_request * request,
uint32_t handle);
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -0,0 +1,44 @@
#ifndef WFP_OPERATION_READ_H
#define WFP_OPERATION_READ_H
#ifndef __cplusplus
#include <stddef.h>
#include <inttypes.h>
#else
#include <cstddef>
#include <cinttypes>
using std::size_t;
#endif
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include "webfuse/provider/api.h"
#ifdef __cplusplus
extern "C"
{
#endif
struct wfp_request;
typedef void wfp_read_fn(
struct wfp_request * request,
ino_t inode,
uint32_t handle,
size_t offset,
size_t length,
void * user_data);
extern WFP_API void wfp_respond_read(
struct wfp_request * request,
char const * data,
size_t length);
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -0,0 +1,31 @@
#ifndef WFP_OPERATION_READDIR_H
#define WFP_OPERATION_READDIR_H
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include "webfuse/provider/api.h"
#ifdef __cplusplus
extern "C"
{
#endif
struct wfp_dirbuffer;
struct wfp_request;
typedef void wfp_readdir_fn(
struct wfp_request * request,
ino_t directory,
void * user_data);
extern WFP_API void wfp_respond_readdir(
struct wfp_request * request,
struct wfp_dirbuffer * dirbuffer);
#ifdef __cplusplus
}
#endif
#endif