1
0
mirror of https://github.com/falk-werner/webfuse-provider synced 2024-10-27 20:44:10 +00:00
falk-werner_webfuse-provider/src/wsfs/operations.h

94 lines
1.8 KiB
C
Raw Normal View History

2019-01-27 02:45:03 +00:00
#ifndef _WSFS_OPERATIONS
#define _WSFS_OPERATIONS
#include "wsfs/fuse_wrapper.h"
2019-01-27 02:45:03 +00:00
2019-02-02 08:37:18 +00:00
struct wsfs_jsonrpc;
struct wsfs_operations_context
{
struct wsfs_jsonrpc * rpc;
double timeout;
};
#ifdef __cplusplus
extern "C" {
#endif
2019-02-02 08:37:18 +00:00
extern int wsfs_operations_loop(
char * mount_point,
struct wsfs_jsonrpc * rpc);
2019-01-27 02:45:03 +00:00
2019-01-29 22:11:46 +00:00
extern int wsfs_operation_readdir(
char const * path,
void * buffer,
fuse_fill_dir_t filler,
off_t offset,
struct fuse_file_info * file_info,
enum fuse_readdir_flags flags);
extern int wsfs_operation_getattr(
char const * path,
struct stat * buffer,
struct fuse_file_info * file_info);
extern int wsfs_operation_open(
char const *path,
struct fuse_file_info * file_info);
2019-01-29 22:47:08 +00:00
extern int wsfs_operation_close(
char const *path,
struct fuse_file_info * file_info);
2019-01-29 22:11:46 +00:00
extern int wsfs_operation_read(
const char * path,
char * buffer,
size_t buffer_size,
off_t offset,
struct fuse_file_info * file_info);
2019-02-02 10:45:38 +00:00
// low level operations
extern int wsfs_operations_loop_ll(
char * mount_point,
struct wsfs_jsonrpc * rpc);
extern void wsfs_operation_ll_lookup (
fuse_req_t req,
fuse_ino_t parent,
char const * name);
extern void wsfs_operation_ll_getattr (
fuse_req_t request,
fuse_ino_t inode,
struct fuse_file_info *file_info);
extern void wsfs_operation_ll_readdir (
fuse_req_t request,
fuse_ino_t inode,
size_t size,
off_t offset,
struct fuse_file_info *file_info);
extern void wsfs_operation_ll_open(
fuse_req_t request,
fuse_ino_t inode,
struct fuse_file_info * file_info);
extern void wsfs_operation_ll_close(
fuse_req_t request,
fuse_ino_t inode,
struct fuse_file_info * file_info);
extern void wsfs_operation_ll_read(
fuse_req_t request,
fuse_ino_t ino, size_t size, off_t off,
struct fuse_file_info *fi);
#ifdef __cplusplus
}
#endif
2019-01-29 22:11:46 +00:00
2019-01-27 02:45:03 +00:00
#endif