Use ntvfs session close to close downstream session
[Samba/vfs_proxy.git] / source4 / librpc / idl / proxy.idl
blob641db73769c7af724ee7fa49f3d401417ea59d12
3 uuid("bf25facd-cc1a-4067-9a23-2e20b26816e5"),
4 endpoint("ncacn_np:[\\pipe\\rpcproxy]", "ncacn_ip_tcp:", "ncalrpc:"),
5 pointer_default(unique),
6 version(1.0),
7 helpstring("Caching Proxy")
9 interface rpcproxy
11 NTSTATUS proxy_Read(
12 [in] uint32 fnum, /* file number as supplied by remote device */
13 [in] uint32 mincnt,
14 [in] uint32 maxcnt,
15 [in] uint32 remaining,
16 [in] hyper offset,
17 [in] uint8 read_for_execute,
18 [in,out] uint8 flags, /* read_for_execute, zlib, md5 etc */
19 [in] [switch_is(flags & PROXY_USE_CACHE)] digest_ digest,
20 [out] uint32 nread,
21 [out] sws cache_name,
22 [out] [switch_is(flags)] Read_data response
25 NTSTATUS proxy_Write(
26 [in] uint32 fnum, /* file number as supplied by remote device */
27 [in] hyper offset,
28 [in] uint32 count, /* the uncompressed count */
29 [in] uint16 mode,
30 [in] uint8 flags, /* read_for_execute, zlib, md5 etc */
31 [in] [switch_is(flags)] Write_data data,
32 [out] uint32 nwritten,
33 [out] uint32 remaining
36 typedef enum {
37 PROXY_USE_CACHE = 1,
38 PROXY_USE_ZLIB = 2,
39 /* if cache is not valid, fall back to mincnt */
40 PROXY_VALIDATE = 4,
41 PROXY_RSYNC = 8
42 } proxy_Read_flags;
44 typedef struct digest {
45 uint8 data[16];
46 } digest;
48 typedef [/*nodiscriminant,*/switch_type(uint8)] union {
49 [case(PROXY_USE_CACHE)] uint8 digest[16];
50 [default];
51 } digest_;
53 typedef struct {
54 uint32 count;
55 [/*nodiscriminant,*/size_is(count)] uint8 data[];
56 } Read_data_generic;
58 typedef [/*nodiscriminant,*/switch_type(uint8)] union {
59 [case(0)] Read_data_generic generic;
60 [case(PROXY_USE_ZLIB)] Read_data_generic compress;
61 [default];
62 } Read_data;
64 typedef struct {
65 uint32 count;
66 [/*nodiscriminant,*/size_is(count)] uint8 data[];
67 } Write_data_generic;
69 typedef [/*nodiscriminant,*/switch_type(uint8)] union {
70 [case(0)] Write_data_generic generic;
71 [case(PROXY_USE_ZLIB)] Write_data_generic compress;
72 [default];
73 } Write_data;
75 /* proxy info as a merge of query_file_info and query_path_info2
76 that return ALL the info available, and can do more than one
77 at a time */
78 NTSTATUS proxy_GetInfo(
79 [in,out] uint32 count,
80 [in] [size_is(count)] info_tags info_tags[],
81 [out] [size_is(count)] info_data info_data[]
84 typedef struct {
85 uint32 count;
86 [size_is(count)] char s[];
87 } sws;
89 typedef enum {
90 TAG_TYPE_PATH_INFO,
91 TAG_TYPE_FILE_INFO
92 } info_tag_type;
94 typedef [switch_type(info_tag_type)] union {
95 [case(TAG_TYPE_PATH_INFO)] sws path;
96 [case(TAG_TYPE_FILE_INFO)] uint16 fnum;
97 } info_tag;
99 typedef struct {
100 info_tag_type tag_type;
101 [switch_is(tag_type)] info_tag info_tag;
102 } info_tags;
104 typedef struct {
105 uint8 flags;
106 sws name;
107 DATA_BLOB value;
108 } info_ea;
110 typedef struct {
111 hyper size;
112 hyper alloc_size;
113 sws stream_name;
114 } info_stream;
116 /* based on smb_fileinfo.generic */
117 typedef struct {
118 NTSTATUS status;
119 NTSTATUS status_RAW_FILEINFO_BASIC_INFORMATION;
120 uint32 attrib; /* RAW_FILEINFO_ALL_INFO */
121 NTTIME create_time; /* RAW_FILEINFO_ALL_INFO */
122 NTTIME access_time; /* RAW_FILEINFO_ALL_INFO */
123 NTTIME write_time; /* RAW_FILEINFO_ALL_INFO */
124 NTTIME change_time; /* RAW_FILEINFO_ALL_INFO */
125 NTSTATUS status_RAW_FILEINFO_ALL_INFO;
126 uint32 ea_size; /* RAW_FILEINFO_ALL_INFO */
127 //uint32 num_eas; /* RAW_FILEINFO_ALL_EAS */
128 //[size_is(num_eas)] info_ea eas[]; /* RAW_FILEINFO_ALL_EAS */
129 hyper alloc_size; /* RAW_FILEINFO_ALL_INFO */
130 hyper size; /* RAW_FILEINFO_ALL_INFO */
131 uint32 nlink; /* RAW_FILEINFO_ALL_INFO */
132 sws fname; /* RAW_FILEINFO_ALL_INFO */
133 //sws alt_fname; Who provides this? */
134 uint8 delete_pending; /* RAW_FILEINFO_ALL_INFO */
135 uint8 directory; /* RAW_FILEINFO_ALL_INFO */
136 NTSTATUS status_RAW_FILEINFO_COMPRESSION_INFO;
137 hyper compressed_size; /* RAW_FILEINFO_COMPRESSION_INFO */
138 uint16 format; /* RAW_FILEINFO_COMPRESSION_INFO */
139 uint8 unit_shift; /* RAW_FILEINFO_COMPRESSION_INFO */
140 uint8 chunk_shift; /* RAW_FILEINFO_COMPRESSION_INFO */
141 uint8 cluster_shift; /* RAW_FILEINFO_COMPRESSION_INFO */
142 NTSTATUS status_RAW_FILEINFO_INTERNAL_INFORMATION;
143 hyper file_id; /* RAW_FILEINFO_INTERNAL_INFORMATION */
144 NTSTATUS status_RAW_FILEINFO_ACCESS_INFORMATION;
145 uint32 access_flags; /* RAW_FILEINFO_ACCESS_INFORMATION */ /* seen 0x001f01ff from w2k3 */
146 NTSTATUS status_RAW_FILEINFO_POSITION_INFORMATION;
147 hyper position; /* RAW_FILEINFO_POSITION_INFORMATION */
148 NTSTATUS status_RAW_FILEINFO_MODE_INFORMATION;
149 uint32 mode; /* RAW_FILEINFO_MODE_INFORMATION */
150 NTSTATUS status_RAW_FILEINFO_ALIGNMENT_INFORMATION;
151 uint32 alignment_requirement; /* RAW_FILEINFO_ALIGNMENT_INFORMATION */
152 NTSTATUS status_RAW_FILEINFO_ATTRIBUTE_TAG_INFORMATION;
153 uint32 reparse_tag; /* RAW_FILEINFO_ATTRIBUTE_TAG_INFORMATION */
154 uint32 reparse_attrib; /* RAW_FILEINFO_ATTRIBUTE_TAG_INFORMATION */
155 NTSTATUS status_RAW_FILEINFO_STREAM_INFO;
156 uint32 num_streams; /* RAW_FILEINFO_STREAM_INFO */
157 [size_is(num_streams)] info_stream streams[]; /* RAW_FILEINFO_STREAM_INFO */
158 } info_data;