Extend NTIMES to allow setting create_time
[metze/samba/wip.git] / examples / VFS / skel_opaque.c
index 5b196af5eb32dc384981f6a81d4f630032c5a06e..48b497922a594fa6e41d96c7d96e2c070adb59a4 100644 (file)
@@ -125,9 +125,9 @@ static int skel_open(vfs_handle_struct *handle,  const char *fname, files_struct
        return vfswrap_open(NULL,  fname, flags, mode);
 }
 
-static int skel_close(vfs_handle_struct *handle, files_struct *fsp, int fd)
+static int skel_close(vfs_handle_struct *handle, files_struct *fsp)
 {
-       return vfswrap_close(NULL, fsp, fd);
+       return vfswrap_close(NULL, fsp);
 }
 
 static ssize_t skel_read(vfs_handle_struct *handle, files_struct *fsp, void *data, size_t n)
@@ -231,9 +231,9 @@ static char *skel_getwd(vfs_handle_struct *handle,  char *buf)
        return vfswrap_getwd(NULL,  buf);
 }
 
-static int skel_ntimes(vfs_handle_struct *handle,  const char *path, const struct timespec ts[2])
+static int skel_ntimes(vfs_handle_struct *handle,  const char *path, struct smb_file_time *ft)
 {
-       return vfswrap_ntimes(NULL,  path, ts);
+       return vfswrap_ntimes(NULL,  path, ft);
 }
 
 static int skel_ftruncate(vfs_handle_struct *handle, files_struct *fsp, SMB_OFF_T offset)
@@ -307,7 +307,7 @@ static size_t skel_fget_nt_acl(vfs_handle_struct *handle, files_struct *fsp,
        return 0;
 }
 
-static size_t skel_get_nt_acl(vfs_handle_struct *handle, files_struct *fsp,
+static size_t skel_get_nt_acl(vfs_handle_struct *handle,
        const char *name, uint32 security_info, SEC_DESC **ppdesc)
 {
        errno = ENOSYS;
@@ -315,14 +315,7 @@ static size_t skel_get_nt_acl(vfs_handle_struct *handle, files_struct *fsp,
 }
 
 static NTSTATUS skel_fset_nt_acl(vfs_handle_struct *handle, files_struct *fsp,
-       uint32 security_info_sent, SEC_DESC *psd)
-{
-       errno = ENOSYS;
-       return NT_STATUS_NOT_IMPLEMENTED;
-}
-
-static NTSTATUS skel_set_nt_acl(vfs_handle_struct *handle, files_struct *fsp, const
-       char *name, uint32 security_info_sent, SEC_DESC *psd)
+       uint32 security_info_sent, const SEC_DESC *psd)
 {
        errno = ENOSYS;
        return NT_STATUS_NOT_IMPLEMENTED;
@@ -580,6 +573,21 @@ static int skel_aio_suspend(struct vfs_handle_struct *handle, struct files_struc
        return vfswrap_aio_suspend(NULL, fsp, aiocb, n, ts);
 }
 
+static bool skel_aio_force(struct vfs_handle_struct *handle, struct files_struct *fsp)
+{
+       return vfswrap_aio_force(NULL, fsp);
+}
+
+static bool skel_is_offline(struct vfs_handle_struct *handle, const char *path, SMB_STRUCT_STAT *sbuf)
+{
+       return vfswrap_is_offline(NULL, path, sbuf);
+}
+
+static int skel_set_offline(struct vfs_handle_struct *handle, const char *path)
+{
+       return vfswrap_set_offline(NULL, path);
+}
+
 /* VFS operations structure */
 
 static vfs_op_tuple skel_op_tuples[] = {
@@ -647,7 +655,6 @@ static vfs_op_tuple skel_op_tuples[] = {
        {SMB_VFS_OP(skel_fget_nt_acl),                  SMB_VFS_OP_FGET_NT_ACL,         SMB_VFS_LAYER_OPAQUE},
        {SMB_VFS_OP(skel_get_nt_acl),                   SMB_VFS_OP_GET_NT_ACL,          SMB_VFS_LAYER_OPAQUE},
        {SMB_VFS_OP(skel_fset_nt_acl),                  SMB_VFS_OP_FSET_NT_ACL,         SMB_VFS_LAYER_OPAQUE},
-       {SMB_VFS_OP(skel_set_nt_acl),                   SMB_VFS_OP_SET_NT_ACL,          SMB_VFS_LAYER_OPAQUE},
 
        /* POSIX ACL operations */
 
@@ -676,7 +683,7 @@ static vfs_op_tuple skel_op_tuples[] = {
        {SMB_VFS_OP(skel_sys_acl_free_text),            SMB_VFS_OP_SYS_ACL_FREE_TEXT,           SMB_VFS_LAYER_OPAQUE},
        {SMB_VFS_OP(skel_sys_acl_free_acl),             SMB_VFS_OP_SYS_ACL_FREE_ACL,            SMB_VFS_LAYER_OPAQUE},
        {SMB_VFS_OP(skel_sys_acl_free_qualifier),       SMB_VFS_OP_SYS_ACL_FREE_QUALIFIER,      SMB_VFS_LAYER_OPAQUE},
-       
+
        /* EA operations. */
        {SMB_VFS_OP(skel_getxattr),                     SMB_VFS_OP_GETXATTR,                    SMB_VFS_LAYER_OPAQUE},
        {SMB_VFS_OP(skel_lgetxattr),                    SMB_VFS_OP_LGETXATTR,                   SMB_VFS_LAYER_OPAQUE},
@@ -699,6 +706,11 @@ static vfs_op_tuple skel_op_tuples[] = {
        {SMB_VFS_OP(skel_aio_error),                    SMB_VFS_OP_AIO_ERROR,                   SMB_VFS_LAYER_OPAQUE},
        {SMB_VFS_OP(skel_aio_fsync),                    SMB_VFS_OP_AIO_FSYNC,                   SMB_VFS_LAYER_OPAQUE},
        {SMB_VFS_OP(skel_aio_suspend),                  SMB_VFS_OP_AIO_SUSPEND,                 SMB_VFS_LAYER_OPAQUE},
+       {SMB_VFS_OP(skel_aio_force),                    SMB_VFS_OP_AIO_FORCE,                   SMB_VFS_LAYER_OPAQUE},
+
+        /* offline operations */
+       {SMB_VFS_OP(skel_is_offline),                   SMB_VFS_OP_IS_OFFLINE,                  SMB_VFS_LAYER_OPAQUE},
+       {SMB_VFS_OP(skel_set_offline),                  SMB_VFS_OP_SET_OFFLINE,                 SMB_VFS_LAYER_OPAQUE},
 
        {NULL,                                          SMB_VFS_OP_NOOP,                        SMB_VFS_LAYER_NOOP}
 };