src/server/daemon/vfs.h

branch
webdav
changeset 366
47bc686fafe4
parent 289
285d483db2fb
child 415
d938228c382e
equal deleted inserted replaced
361:570026d3a685 366:47bc686fafe4
30 #define VFS_H 30 #define VFS_H
31 31
32 #include "../public/vfs.h" 32 #include "../public/vfs.h"
33 #include "acl.h" 33 #include "acl.h"
34 34
35 #include <ucx/string.h>
36
35 #ifdef __cplusplus 37 #ifdef __cplusplus
36 extern "C" { 38 extern "C" {
37 #endif 39 #endif
38 40
41 typedef struct VfsType {
42 vfs_init_func init;
43 vfs_create_func create;
44 } VfsType;
45
39 typedef struct SysVFSDir { 46 typedef struct SysVFSDir {
40 DIR *dir; 47 DIR *dir;
41 struct dirent *cur; 48 struct dirent *cur;
42 } SysVFSDir; 49 } SysVFSDir;
43 50
46 VFS_AIO_WRITE 53 VFS_AIO_WRITE
47 }; 54 };
48 typedef enum VFSAioOp VFSAioOp; 55 typedef enum VFSAioOp VFSAioOp;
49 56
50 int vfs_init(void); 57 int vfs_init(void);
58 VfsType* vfs_get_type(scstr_t vfs_class);
59
60 void* vfs_init_backend(ServerConfiguration *cfg, pool_handle_t *pool, VfsType *vfs_class, WSConfigNode *config, int *error);
51 61
52 typedef int(*vfs_op_f)(VFSContext *, const char *); 62 typedef int(*vfs_op_f)(VFSContext *, const char *);
53 typedef int(*sys_op_f)(VFSContext *, const char *, SysACL *); 63 typedef int(*sys_op_f)(VFSContext *, const char *, SysACL *);
54 int vfs_path_op(VFSContext *ctx, const char *path, vfs_op_f op, uint32_t access); 64 int vfs_path_op(VFSContext *ctx, const char *path, vfs_op_f op, uint32_t access);
55 65

mercurial