108 struct VFS_DIRIO { |
108 struct VFS_DIRIO { |
109 int (*readdir)(VFS_DIR dir, VFS_ENTRY *entry, int getstat); |
109 int (*readdir)(VFS_DIR dir, VFS_ENTRY *entry, int getstat); |
110 void (*close)(VFS_DIR dir); |
110 void (*close)(VFS_DIR dir); |
111 }; |
111 }; |
112 |
112 |
113 typedef VFS*(*vfs_create_func)(Session *sn, Request *rq, pblock *pb); |
113 typedef void*(*vfs_init_func)(ServerConfiguration *cfg, pool_handle_t *pool, WSConfigNode *config); |
|
114 typedef VFS*(*vfs_create_func)(Session *sn, Request *rq, pblock *pb, void *initData); |
114 |
115 |
115 /* |
116 /* |
116 * registers a new VFS |
117 * registers a new VFS |
117 */ |
118 */ |
118 int vfs_register_type(const char *name, vfs_create_func vfsCreate); |
119 int vfs_register_type(const char *name, vfs_init_func vfsInit, vfs_create_func vfsCreate); |
119 |
120 |
120 /* |
121 /* |
121 * Create a new VFS instance |
122 * Create a new VFS instance |
122 */ |
123 */ |
123 VFS* vfs_create(Session *sn, Request *rq, const char *vfs_class, pblock *pb); |
124 VFS* vfs_create(Session *sn, Request *rq, const char *vfs_class, pblock *pb, void *initData); |
124 |
125 |
125 /* |
126 /* |
126 * creates a VFSContext for a Request |
127 * creates a VFSContext for a Request |
127 * vfs calls will do ACL checks |
128 * vfs calls will do ACL checks |
128 */ |
129 */ |