#ifndef _VFS_H
#define _VFS_H
#ifdef vfs_ops
#undef vfs_ops
#endif
#define SMB_VFS_INTERFACE_VERSION 2
struct connection_struct;
struct files_struct;
struct security_descriptor_info;
struct vfs_ops {
int (*connect)(struct connection_struct *conn, char *service, char *user);
void (*disconnect)(struct connection_struct *conn);
SMB_BIG_UINT (*disk_free)(struct connection_struct *conn, char *path, BOOL small_query, SMB_BIG_UINT *bsize,
SMB_BIG_UINT *dfree, SMB_BIG_UINT *dsize);
DIR *(*opendir)(struct connection_struct *conn, char *fname);
struct dirent *(*readdir)(struct connection_struct *conn, DIR *dirp);
int (*mkdir)(struct connection_struct *conn, char *path, mode_t mode);
int (*rmdir)(struct connection_struct *conn, char *path);
int (*closedir)(struct connection_struct *conn, DIR *dir);
int (*open)(struct connection_struct *conn, char *fname, int flags, mode_t mode);
int (*close)(struct files_struct *fsp, int fd);
ssize_t (*read)(struct files_struct *fsp, int fd, void *data, size_t n);
ssize_t (*write)(struct files_struct *fsp, int fd, const void *data, size_t n);
SMB_OFF_T (*lseek)(struct files_struct *fsp, int filedes, SMB_OFF_T offset, int whence);
int (*rename)(struct connection_struct *conn, char *old, char *new);
int (*fsync)(struct files_struct *fsp, int fd);
int (*stat)(struct connection_struct *conn, char *fname, SMB_STRUCT_STAT *sbuf);
int (*fstat)(struct files_struct *fsp, int fd, SMB_STRUCT_STAT *sbuf);
int (*lstat)(struct connection_struct *conn, char *path, SMB_STRUCT_STAT *sbuf);
int (*unlink)(struct connection_struct *conn, char *path);
int (*chmod)(struct connection_struct *conn, char *path, mode_t mode);
int (*fchmod)(struct files_struct *fsp, int fd, mode_t mode);
int (*chown)(struct connection_struct *conn, char *path, uid_t uid, gid_t gid);
int (*fchown)(struct files_struct *fsp, int fd, uid_t uid, gid_t gid);
int (*chdir)(struct connection_struct *conn, char *path);
char *(*getwd)(struct connection_struct *conn, char *buf);
int (*utime)(struct connection_struct *conn, char *path, struct utimbuf *times);
int (*ftruncate)(struct files_struct *fsp, int fd, SMB_OFF_T offset);
BOOL (*lock)(struct files_struct *fsp, int fd, int op, SMB_OFF_T offset, SMB_OFF_T count, int type);
int (*symlink)(struct connection_struct *conn, const char *oldpath, const char *newpath);
int (*readlink)(struct connection_struct *conn, const char *path, char *buf, size_t bufsiz);
int (*link)(struct connection_struct *conn, const char *oldpath, const char *newpath);
int (*mknod)(struct connection_struct *conn, const char *path, mode_t mode, SMB_DEV_T dev);
char *(*realpath)(struct connection_struct *conn, const char *path, char *resolved_path);
size_t (*fget_nt_acl)(struct files_struct *fsp, int fd, struct security_descriptor_info **ppdesc);
size_t (*get_nt_acl)(struct files_struct *fsp, char *name, struct security_descriptor_info **ppdesc);
BOOL (*fset_nt_acl)(struct files_struct *fsp, int fd, uint32 security_info_sent, struct security_descriptor_info *psd);
BOOL (*set_nt_acl)(struct files_struct *fsp, char *name, uint32 security_info_sent, struct security_descriptor_info *psd);
int (*chmod_acl)(struct connection_struct *conn, char *name, mode_t mode);
int (*fchmod_acl)(struct files_struct *fsp, int fd, mode_t mode);
};
struct vfs_options {
struct vfs_options *prev, *next;
char *name;
char *value;
};
#endif