s3: Plumb smb_filename through SMB_VFS_NTIMES
[sfrench/samba-autobuild/.git] / examples / VFS / skel_transparent.c
index f5562a5f444d9dabb01a9b8f0a615c8ff45f4c44..cce1d13d8de38960569e28c1ecd88a04182c350b 100644 (file)
@@ -46,9 +46,9 @@ static void skel_disconnect(vfs_handle_struct *handle)
        SMB_VFS_NEXT_DISCONNECT(handle);
 }
 
-static SMB_BIG_UINT skel_disk_free(vfs_handle_struct *handle,  const char *path,
-       bool small_query, SMB_BIG_UINT *bsize,
-       SMB_BIG_UINT *dfree, SMB_BIG_UINT *dsize)
+static uint64_t skel_disk_free(vfs_handle_struct *handle,  const char *path,
+       bool small_query, uint64_t *bsize,
+       uint64_t *dfree, uint64_t *dsize)
 {
        return SMB_VFS_NEXT_DISK_FREE(handle, path, small_query, bsize, 
                                         dfree, dsize);
@@ -79,9 +79,11 @@ static SMB_STRUCT_DIR *skel_opendir(vfs_handle_struct *handle,  const char *fnam
        return SMB_VFS_NEXT_OPENDIR(handle, fname, mask, attr);
 }
 
-static SMB_STRUCT_DIRENT *skel_readdir(vfs_handle_struct *handle,  SMB_STRUCT_DIR *dirp)
+static SMB_STRUCT_DIRENT *skel_readdir(vfs_handle_struct *handle,
+                                      SMB_STRUCT_DIR *dirp,
+                                      SMB_STRUCT_STAT *sbuf)
 {
-       return SMB_VFS_NEXT_READDIR(handle, dirp);
+       return SMB_VFS_NEXT_READDIR(handle, dirp, sbuf);
 }
 
 static void skel_seekdir(vfs_handle_struct *handle,  SMB_STRUCT_DIR *dirp, long offset)
@@ -114,9 +116,10 @@ static int skel_closedir(vfs_handle_struct *handle,  SMB_STRUCT_DIR *dir)
        return SMB_VFS_NEXT_CLOSEDIR(handle, dir);
 }
 
-static int skel_open(vfs_handle_struct *handle,  const char *fname, files_struct *fsp, int flags, mode_t mode)
+static int skel_open(vfs_handle_struct *handle, struct smb_filename *smb_fname,
+                    files_struct *fsp, int flags, mode_t mode)
 {
-       return SMB_VFS_NEXT_OPEN(handle, fname, fsp, flags, mode);
+       return SMB_VFS_NEXT_OPEN(handle, smb_fname, fsp, flags, mode);
 }
 
 static int skel_close(vfs_handle_struct *handle, files_struct *fsp)
@@ -159,9 +162,11 @@ static ssize_t skel_recvfile(vfs_handle_struct *handle, int fromfd, files_struct
        return SMB_VFS_NEXT_RECVFILE(handle, fromfd, tofsp, offset, n);
 }
 
-static int skel_rename(vfs_handle_struct *handle,  const char *oldname, const char *newname)
+static int skel_rename(vfs_handle_struct *handle,
+                      const smb_filename *smb_fname_src,
+                      const smb_filename *smb_fname_dst)
 {
-       return SMB_VFS_NEXT_RENAME(handle, oldname, newname);
+       return SMB_VFS_NEXT_RENAME(handle, smb_fname_src, smb_fname_dst);
 }
 
 static int skel_fsync(vfs_handle_struct *handle, files_struct *fsp)
@@ -169,9 +174,9 @@ static int skel_fsync(vfs_handle_struct *handle, files_struct *fsp)
        return SMB_VFS_NEXT_FSYNC(handle, fsp);
 }
 
-static int skel_stat(vfs_handle_struct *handle,  const char *fname, SMB_STRUCT_STAT *sbuf)
+static int skel_stat(vfs_handle_struct *handle, struct smb_filename *smb_fname)
 {
-       return SMB_VFS_NEXT_STAT(handle, fname, sbuf);
+       return SMB_VFS_NEXT_STAT(handle, smb_fname);
 }
 
 static int skel_fstat(vfs_handle_struct *handle, files_struct *fsp, SMB_STRUCT_STAT *sbuf)
@@ -179,14 +184,15 @@ static int skel_fstat(vfs_handle_struct *handle, files_struct *fsp, SMB_STRUCT_S
        return SMB_VFS_NEXT_FSTAT(handle, fsp, sbuf);
 }
 
-static int skel_lstat(vfs_handle_struct *handle,  const char *path, SMB_STRUCT_STAT *sbuf)
+static int skel_lstat(vfs_handle_struct *handle, struct smb_filename *smb_fname)
 {
-       return SMB_VFS_NEXT_LSTAT(handle, path, sbuf);
+       return SMB_VFS_NEXT_LSTAT(handle, smb_fname);
 }
 
-static int skel_unlink(vfs_handle_struct *handle,  const char *path)
+static int skel_unlink(vfs_handle_struct *handle,
+                      const struct smb_filename *smb_fname)
 {
-       return SMB_VFS_NEXT_UNLINK(handle, path);
+       return SMB_VFS_NEXT_UNLINK(handle, smb_fname);
 }
 
 static int skel_chmod(vfs_handle_struct *handle,  const char *path, mode_t mode)
@@ -224,9 +230,11 @@ static char *skel_getwd(vfs_handle_struct *handle,  char *buf)
        return SMB_VFS_NEXT_GETWD(handle, buf);
 }
 
-static int skel_ntimes(vfs_handle_struct *handle,  const char *path, struct smb_file_time *ft)
+static int skel_ntimes(vfs_handle_struct *handle,
+                      const struct smb_filename *smb_fname,
+                      struct smb_file_time *ft)
 {
-       return SMB_VFS_NEXT_NTIMES(handle, path, ft);
+       return SMB_VFS_NEXT_NTIMES(handle, smb_fname, ft);
 }
 
 static int skel_ftruncate(vfs_handle_struct *handle, files_struct *fsp, SMB_OFF_T offset)
@@ -284,9 +292,9 @@ static int skel_chflags(vfs_handle_struct *handle,  const char *path, uint flags
 }
 
 static struct file_id skel_file_id_create(vfs_handle_struct *handle,
-                                         SMB_DEV_T dev, SMB_INO_T inode)
+                                         const SMB_STRUCT_STAT *sbuf)
 {
-       return SMB_VFS_NEXT_FILE_ID_CREATE(handle, dev, inode);
+       return SMB_VFS_NEXT_FILE_ID_CREATE(handle, sbuf);
 }
 
 static NTSTATUS skel_fget_nt_acl(vfs_handle_struct *handle, files_struct *fsp,