s3:open_files.idl: add stat-info to vfs_default_durable_cookie.
[kai/samba.git] / source3 / librpc / idl / open_files.idl
1 #include "idl_types.h"
2
3 import "server_id.idl";
4 import "security.idl";
5 import "file_id.idl";
6
7 [
8         pointer_default(unique)
9 ]
10
11 interface open_files
12 {
13         typedef [public] struct {
14                 server_id       pid;
15                 hyper           op_mid;
16                 uint16          op_type;
17                 uint32          access_mask;
18                 uint32          share_access;
19                 uint32          private_options;
20                 timeval         time;
21                 file_id         id;
22                 udlong          share_file_id;
23                 uint32          uid;
24                 uint16          flags;
25                 uint32          name_hash;
26         } share_mode_entry;
27
28         typedef [public] struct {
29                 uint32          name_hash;
30                 security_token *delete_nt_token;
31                 security_unix_token *delete_token;
32         } delete_token;
33
34         typedef [public] struct {
35                 [string,charset(UTF8)] char *servicepath;
36                 [string,charset(UTF8)] char *base_name;
37                 [string,charset(UTF8)] char *stream_name;
38                 file_id id;
39                 uint32 num_share_modes;
40                 [size_is(num_share_modes)] share_mode_entry share_modes[];
41                 uint32 num_delete_tokens;
42                 [size_is(num_delete_tokens)] delete_token delete_tokens[];
43                 timespec old_write_time;
44                 timespec changed_write_time;
45                 uint8 fresh;
46                 uint8 modified;
47                 [ignore] db_record *record;
48         } share_mode_data;
49
50         /* these are 0x30 (48) characters */
51         const string VFS_DEFAULT_DURABLE_COOKIE_MAGIC =
52                 "VFS_DEFAULT_DURABLE_COOKIE_MAGIC                ";
53         const uint32 VFS_DEFAULT_DURABLE_COOKIE_VERSION = 0;
54
55         /* this corresponds to struct stat_ex (SMB_STRUCT_STAT) */
56         typedef struct {
57                 hyper           st_ex_dev;
58                 hyper           st_ex_ino;
59                 hyper           st_ex_mode;
60                 hyper           st_ex_nlink;
61                 hyper           st_ex_uid;
62                 hyper           st_ex_gid;
63                 hyper           st_ex_rdev;
64                 hyper           st_ex_size;
65                 timespec        st_ex_atime;
66                 timespec        st_ex_mtime;
67                 timespec        st_ex_ctime;
68                 timespec        st_ex_btime;
69                 boolean8        st_ex_calculated_birthtime;
70                 hyper           st_ex_blksize;
71                 hyper           st_ex_blocks;
72                 uint32          st_ex_flags;
73                 uint32          st_ex_mask;
74                 hyper           vfs_private;
75         } vfs_default_durable_stat;
76
77         typedef [public] struct {
78                 [value(VFS_DEFAULT_DURABLE_COOKIE_MAGIC),charset(DOS)] uint8 magic[0x30];
79                 [value(VFS_DEFAULT_DURABLE_COOKIE_VERSION)] uint32 version;
80                 boolean8 allow_reconnect;
81                 file_id id;
82                 [string,charset(UTF8)] char *servicepath;
83                 [string,charset(UTF8)] char *base_name;
84                 hyper initial_allocation_size;
85                 hyper position_information;
86                 boolean8 update_write_time_triggered;
87                 boolean8 update_write_time_on_close;
88                 boolean8 write_time_forced;
89                 timespec close_write_time;
90                 vfs_default_durable_stat stat_info;
91         } vfs_default_durable_cookie;
92 }