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:
31
include/wsfs/provider/operation/close.h
Normal file
31
include/wsfs/provider/operation/close.h
Normal file
@@ -0,0 +1,31 @@
|
||||
#ifndef WSFSP_OPERATION_CLOSE_H
|
||||
#define WSFSP_OPERATION_CLOSE_H
|
||||
|
||||
#ifndef __cplusplus
|
||||
#include <inttypes.h>
|
||||
#else
|
||||
#include <cinttypes>
|
||||
#endif
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "wsfs/provider/api.h"
|
||||
|
||||
typedef void wsfsp_close_fn(
|
||||
ino_t inode,
|
||||
uint32_t handle,
|
||||
int flags,
|
||||
void * user_data);
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
21
include/wsfs/provider/operation/error.h
Normal file
21
include/wsfs/provider/operation/error.h
Normal file
@@ -0,0 +1,21 @@
|
||||
#ifndef WSFSP_OPERATION_ERROR_H
|
||||
#define WSFSP_OPERATION_ERROR_H
|
||||
|
||||
#include "wsfs/provider/api.h"
|
||||
|
||||
struct wsfsp_request;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
extern WSFSP_API void wsfsp_respond_error(
|
||||
struct wsfsp_request * request,
|
||||
int status);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
32
include/wsfs/provider/operation/getattr.h
Normal file
32
include/wsfs/provider/operation/getattr.h
Normal file
@@ -0,0 +1,32 @@
|
||||
#ifndef WSFSP_OPERATION_GETATTR_H
|
||||
#define WSFSP_OPERATION_GETATTR_H
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "wsfs/provider/api.h"
|
||||
|
||||
struct wsfsp_request;
|
||||
|
||||
typedef void wsfsp_getattr_fn(
|
||||
struct wsfsp_request * request,
|
||||
ino_t inode,
|
||||
void * user_data);
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
|
||||
extern WSFSP_API void wsfsp_respond_getattr(
|
||||
struct wsfsp_request * request,
|
||||
struct stat const * stat);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
32
include/wsfs/provider/operation/lookup.h
Normal file
32
include/wsfs/provider/operation/lookup.h
Normal file
@@ -0,0 +1,32 @@
|
||||
#ifndef WSFSP_OPERATION_LOOKUP_H
|
||||
#define WSFSP_OPERATION_LOOKUP_H
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "wsfs/provider/api.h"
|
||||
|
||||
struct wsfsp_request;
|
||||
|
||||
typedef void wsfsp_lookup_fn(
|
||||
struct wsfsp_request * request,
|
||||
ino_t parent,
|
||||
char const * name,
|
||||
void * user_data);
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
extern WSFSP_API void wsfsp_respond_lookup(
|
||||
struct wsfsp_request * request,
|
||||
struct stat const * stat);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
38
include/wsfs/provider/operation/open.h
Normal file
38
include/wsfs/provider/operation/open.h
Normal file
@@ -0,0 +1,38 @@
|
||||
#ifndef WSFSP_OPERATION_OPEN_H
|
||||
#define WSFSP_OPERATION_OPEN_H
|
||||
|
||||
#ifndef __cplusplus
|
||||
#include <inttypes.h>
|
||||
#else
|
||||
#include <cinttypes>
|
||||
#endif
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "wsfs/provider/api.h"
|
||||
|
||||
struct wsfsp_request;
|
||||
|
||||
typedef void wsfsp_open_fn(
|
||||
struct wsfsp_request * request,
|
||||
ino_t inode,
|
||||
int flags,
|
||||
void * user_data);
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
extern WSFSP_API void wsfsp_respond_open(
|
||||
struct wsfsp_request * request,
|
||||
uint32_t handle);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
44
include/wsfs/provider/operation/read.h
Normal file
44
include/wsfs/provider/operation/read.h
Normal file
@@ -0,0 +1,44 @@
|
||||
#ifndef WSFSP_OPERATION_READ_H
|
||||
#define WSFSP_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 "wsfs/provider/api.h"
|
||||
|
||||
struct wsfsp_request;
|
||||
|
||||
typedef void wsfsp_read_fn(
|
||||
struct wsfsp_request * request,
|
||||
ino_t inode,
|
||||
uint32_t handle,
|
||||
size_t offset,
|
||||
size_t length,
|
||||
void * user_data);
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
extern WSFSP_API void wsfsp_respond_read(
|
||||
struct wsfsp_request * request,
|
||||
char const * data,
|
||||
size_t length);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
32
include/wsfs/provider/operation/readdir.h
Normal file
32
include/wsfs/provider/operation/readdir.h
Normal file
@@ -0,0 +1,32 @@
|
||||
#ifndef WSFSP_OPERATION_READDIR_H
|
||||
#define WSFSP_OPERATION_READDIR_H
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "wsfs/provider/api.h"
|
||||
|
||||
struct wsfsp_dirbuffer;
|
||||
struct wsfsp_request;
|
||||
|
||||
typedef void wsfsp_readdir_fn(
|
||||
struct wsfsp_request * request,
|
||||
ino_t directory,
|
||||
void * user_data);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
extern WSFSP_API void wsfsp_respond_readdir(
|
||||
struct wsfsp_request * request,
|
||||
struct wsfsp_dirbuffer * dirbuffer);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user