Add [todo] for functions that are obviously incomplete.
[jelmer/samba4-debian.git] / source / librpc / idl / dfs.idl
1 /*
2   dfs interface definition
3 */
4
5 import "misc.idl";
6
7 [ uuid("4fc742e0-4a10-11cf-8273-00aa004ae673"),
8   version(3.0),
9   pointer_default(unique),
10   helpstring("Settings for Microsoft Distributed File System"),
11   endpoint("ncacn_np:[\\pipe\\netdfs]", "ncacn_ip_tcp:", "ncalrpc:")
12 ] interface netdfs
13 {
14         /******************/
15         /* Function: 0x00 */
16         typedef [v1_enum] enum {
17                 DFS_MANAGER_VERSION_NT4         = 1,
18                 DFS_MANAGER_VERSION_W2K         = 2,
19                 DFS_MANAGER_VERSION_W2K3        = 4
20         } dfs_ManagerVersion;
21
22         [public] void dfs_GetManagerVersion(
23                 [out]           dfs_ManagerVersion *version
24                 );
25
26
27         /******************/
28         /* Function: 0x01 */
29         WERROR dfs_Add (
30                 [in]            [string,charset(UTF16)] uint16 *path,
31                 [in]            [string,charset(UTF16)] uint16 *server,
32                 [in,unique]     [string,charset(UTF16)] uint16 *share,
33                 [in,unique]     [string,charset(UTF16)] uint16 *comment,
34                 [in]            uint32 flags
35                 );
36
37         /******************/
38         /* Function: 0x02 */
39         WERROR dfs_Remove (
40                 [in]            [string,charset(UTF16)] uint16 *dfs_entry_path,
41                 [in,unique]     [string,charset(UTF16)] uint16 *servername,
42                 [in,unique]     [string,charset(UTF16)] uint16 *sharename
43                 );
44
45         /******************/
46         /* Function: 0x03 */
47
48         typedef struct {
49         } dfs_Info0;
50
51         typedef struct {
52                 [string,charset(UTF16)] uint16 *path;
53         } dfs_Info1;
54
55         typedef [public,bitmap32bit] bitmap {
56                 DFS_VOLUME_STATE_OK             = 0x1,
57                 DFS_VOLUME_STATE_INCONSISTENT   = 0x2,
58                 DFS_VOLUME_STATE_OFFLINE        = 0x3,
59                 DFS_VOLUME_STATE_ONLINE         = 0x4,
60                 DFS_VOLUME_STATE_STANDALONE     = DFS_VOLUME_FLAVOR_STANDALONE,
61                 DFS_VOLUME_STATE_AD_BLOB        = DFS_VOLUME_FLAVOR_AD_BLOB
62         } dfs_VolumeState;
63
64         typedef struct {
65                 [string,charset(UTF16)] uint16 *path;
66                 [string,charset(UTF16)] uint16 *comment;
67                 dfs_VolumeState state;
68                 uint32 num_stores;
69         } dfs_Info2;
70
71         const int DFS_STORAGE_STATES = 0xf;
72
73         /* yes, this is a bitmap */
74         typedef [public,bitmap32bit] bitmap {
75                 DFS_STORAGE_STATE_OFFLINE       = 1,
76                 DFS_STORAGE_STATE_ONLINE        = 2,
77                 DFS_STORAGE_STATE_ACTIVE        = 4
78         } dfs_StorageState;
79
80         typedef struct {
81                 dfs_StorageState state;
82                 [string,charset(UTF16)] uint16 *server;
83                 [string,charset(UTF16)] uint16 *share;
84         } dfs_StorageInfo;
85
86         typedef struct {
87                 [string,charset(UTF16)] uint16 *path;
88                 [string,charset(UTF16)] uint16 *comment;
89                 dfs_VolumeState state;
90                 uint32 num_stores;
91                 [size_is(num_stores)] dfs_StorageInfo *stores;
92         } dfs_Info3;
93
94         typedef struct {
95                 [string,charset(UTF16)] uint16 *path;
96                 [string,charset(UTF16)] uint16 *comment;
97                 dfs_VolumeState state;
98                 uint32 timeout;
99                 GUID   guid;
100                 uint32 num_stores;
101                 [size_is(num_stores)] dfs_StorageInfo *stores;
102         } dfs_Info4;
103
104         /* verified with dfsutil */
105         typedef [public,bitmap32bit] bitmap {
106                 DFS_PROPERTY_FLAG_INSITE_REFERRALS      = 0x01,
107                 DFS_PROPERTY_FLAG_ROOT_SCALABILITY      = 0x02,
108                 DFS_PROPERTY_FLAG_SITE_COSTING          = 0x04,
109                 DFS_PROPERTY_FLAG_TARGET_FAILBACK       = 0x08,
110                 DFS_PROPERTY_FLAG_CLUSTER_ENABLED       = 0x10  /* untested */
111         } dfs_PropertyFlags;
112
113         typedef struct {
114                 [string,charset(UTF16)] uint16 *path;
115                 [string,charset(UTF16)] uint16 *comment;
116                 dfs_VolumeState state;
117                 uint32 timeout;
118                 GUID   guid;
119                 dfs_PropertyFlags flags;
120                 uint32 pktsize;
121                 uint32 num_stores;
122         } dfs_Info5;
123
124         typedef [v1_enum] enum {
125                 DFS_INVALID_PRIORITY_CLASS              = -1,
126                 DFS_SITE_COST_NORMAL_PRIORITY_CLASS     = 0,
127                 DFS_GLOBAL_HIGH_PRIORITY_CLASS          = 1,
128                 DFS_SITE_COST_HIGH_PRIORITY_CLASS       = 2,
129                 DFS_SITE_COST_LOW_PRIORITY_CLASS        = 3,
130                 DFS_GLOBAL_LOW_PRIORITY_CLASS           = 4
131         } dfs_Target_PriorityClass;
132
133         typedef struct {
134                 dfs_Target_PriorityClass target_priority_class;
135                 uint16 target_priority_rank;
136                 uint16 reserved;
137         } dfs_Target_Priority;
138
139         typedef struct {
140                 dfs_StorageInfo info;
141                 dfs_Target_Priority target_priority;
142         } dfs_StorageInfo2;
143
144         typedef struct {
145                 [string,charset(UTF16)] uint16 *entry_path;
146                 [string,charset(UTF16)] uint16 *comment;
147                 dfs_VolumeState state;
148                 uint32 timeout;
149                 GUID   guid;
150                 dfs_PropertyFlags flags;
151                 uint32 pktsize;
152                 uint16 num_stores;
153                 [size_is(num_stores)] dfs_StorageInfo2 *stores;
154         } dfs_Info6;
155
156         typedef struct {
157                 GUID  generation_guid;
158         } dfs_Info7;
159
160         typedef struct {
161                 [string,charset(UTF16)] uint16 *comment;
162         } dfs_Info100;
163
164         typedef struct {
165                 dfs_StorageState state;
166         } dfs_Info101;
167
168         typedef struct {
169                 uint32 timeout;
170         } dfs_Info102;
171
172         typedef struct {
173                 dfs_PropertyFlags flags;
174         } dfs_Info103;
175
176         typedef struct {
177                 dfs_Target_Priority priority;
178         } dfs_Info104;
179
180         typedef struct {
181                 [string,charset(UTF16)] uint16 *comment;
182                 dfs_VolumeState state;
183                 uint32 timeout;
184                 uint32 property_flag_mask;
185                 uint32 property_flags;
186         } dfs_Info105;
187
188         typedef struct {
189                 dfs_StorageState state;
190                 dfs_Target_Priority priority;
191         } dfs_Info106;
192
193         typedef struct {
194                 [string,charset(UTF16)] uint16 *dom_root;
195         } dfs_Info200;
196
197         typedef enum {
198                 DFS_VOLUME_FLAVOR_STANDALONE = 0x100,
199                 DFS_VOLUME_FLAVOR_AD_BLOB = 0x200
200         } dfs_VolumeFlavor;
201
202         typedef struct {
203                 dfs_VolumeFlavor flavor;
204                 [string,charset(UTF16)] uint16 *dom_root;
205         } dfs_Info300;
206
207         typedef union {
208                 [case(0)]   dfs_Info0 *info0;
209                 [case(1)]   dfs_Info1 *info1;
210                 [case(2)]   dfs_Info2 *info2;
211                 [case(3)]   dfs_Info3 *info3;
212                 [case(4)]   dfs_Info4 *info4;
213                 [case(5)]   dfs_Info5 *info5;
214                 [case(6)]   dfs_Info6 *info6;
215                 [case(7)]   dfs_Info7 *info7;
216                 [case(100)] dfs_Info100 *info100;
217                 [case(101)] dfs_Info101 *info101;
218                 [case(102)] dfs_Info102 *info102;
219                 [case(103)] dfs_Info103 *info103;
220                 [case(104)] dfs_Info104 *info104;
221                 [case(105)] dfs_Info105 *info105;
222                 [case(106)] dfs_Info106 *info106;
223         } dfs_Info;
224
225         WERROR dfs_SetInfo (
226                 [in]            [string,charset(UTF16)] uint16 dfs_entry_path[],
227                 [in,unique]     [string,charset(UTF16)] uint16 *servername,
228                 [in,unique]     [string,charset(UTF16)] uint16 *sharename,
229                 [in]            uint32 level,
230                 [in,ref,switch_is(level)] dfs_Info *info
231                 );
232
233         /******************/
234         /* Function: 0x04 */
235         WERROR dfs_GetInfo (
236                 [in]            [string,charset(UTF16)] uint16 dfs_entry_path[],
237                 [in,unique]     [string,charset(UTF16)] uint16 *servername,
238                 [in,unique]     [string,charset(UTF16)] uint16 *sharename,
239                 [in]            uint32 level,
240                 [out,switch_is(level)] dfs_Info *info
241                 );
242
243         /******************/
244         /* Function: 0x05 */
245
246         typedef struct {
247                 uint32 count;
248                 [size_is(count)] dfs_Info1 *s;
249         } dfs_EnumArray1;
250
251         typedef struct {
252                 uint32 count;
253                 [size_is(count)] dfs_Info2 *s;
254         } dfs_EnumArray2;
255
256         typedef struct {
257                 uint32 count;
258                 [size_is(count)] dfs_Info3 *s;
259         } dfs_EnumArray3;
260
261         typedef struct {
262                 uint32 count;
263                 [size_is(count)] dfs_Info4 *s;
264         } dfs_EnumArray4;
265
266         typedef struct {
267                 uint32 count;
268                 [size_is(count)] dfs_Info5 *s;
269         } dfs_EnumArray5;
270
271         typedef struct {
272                 uint32 count;
273                 [size_is(count)] dfs_Info6 *s;
274         } dfs_EnumArray6;
275
276         typedef struct {
277                 uint32 count;
278                 [size_is(count)] dfs_Info200 *s;
279         } dfs_EnumArray200;
280
281         typedef struct {
282                 uint32 count;
283                 [size_is(count)] dfs_Info300 *s;
284         } dfs_EnumArray300;
285
286
287         typedef union {
288                 [case(1)] dfs_EnumArray1 *info1;
289                 [case(2)] dfs_EnumArray2 *info2;
290                 [case(3)] dfs_EnumArray3 *info3;
291                 [case(4)] dfs_EnumArray4 *info4;
292                 [case(5)] dfs_EnumArray5 *info5;
293                 [case(6)] dfs_EnumArray6 *info6;
294                 [case(200)] dfs_EnumArray200 *info200;
295                 [case(300)] dfs_EnumArray300 *info300;
296         } dfs_EnumInfo;
297
298         typedef struct {
299                 uint32 level;
300                 [switch_is(level)] dfs_EnumInfo e;
301         } dfs_EnumStruct;
302
303         WERROR dfs_Enum (
304                 [in]            uint32 level,
305                 [in]            uint32 bufsize,
306                 [in,out,unique] dfs_EnumStruct *info,
307                 [in,out,unique] uint32 *total
308                 );
309
310         /* Function 0x06 */
311         [todo] WERROR dfs_Rename();
312
313         /* Function 0x07 */
314         [todo] WERROR dfs_Move();
315
316         /* Function 0x08 */
317         [todo] WERROR dfs_ManagerGetConfigInfo();
318
319         /* Function 0x09 */
320         [todo] WERROR dfs_ManagerSendSiteInfo();
321
322         /* Function 0x0a */
323         typedef struct {
324                 uint32 unknown1;
325                 [string,charset(UTF16)] uint16 *unknown2;
326         } dfs_UnknownStruct;
327
328         WERROR dfs_AddFtRoot(
329                 [in]            [string,charset(UTF16)] uint16 servername[],
330                 [in]            [string,charset(UTF16)] uint16 dns_servername[],
331                 [in]            [string,charset(UTF16)] uint16 dfsname[],
332                 [in]            [string,charset(UTF16)] uint16 rootshare[],
333                 [in]            [string,charset(UTF16)] uint16 comment[],
334                 [in]            [string,charset(UTF16)] uint16 dfs_config_dn[],
335                 [in]            uint8 unknown1,
336                 [in]            uint32 flags,
337                 [in,out,unique] dfs_UnknownStruct **unknown2
338                 );
339
340         /* Function 0x0b */
341         WERROR dfs_RemoveFtRoot(
342                 [in]            [string,charset(UTF16)] uint16 servername[],
343                 [in]            [string,charset(UTF16)] uint16 dns_servername[],
344                 [in]            [string,charset(UTF16)] uint16 dfsname[],
345                 [in]            [string,charset(UTF16)] uint16 rootshare[],
346                 [in]            uint32 flags,
347                 [in,out,unique] dfs_UnknownStruct **unknown
348                 );
349
350         /* Function 0x0c */ 
351         WERROR dfs_AddStdRoot(
352                 [in]            [string,charset(UTF16)] uint16 servername[],
353                 [in]            [string,charset(UTF16)] uint16 rootshare[],
354                 [in]            [string,charset(UTF16)] uint16 comment[],
355                 [in]            uint32 flags
356                 );
357  
358         /* Function 0x0d */
359         WERROR dfs_RemoveStdRoot(
360                 [in]            [string,charset(UTF16)] uint16 servername[],
361                 [in]            [string,charset(UTF16)] uint16 rootshare[],
362                 [in]            uint32 flags
363                 );
364  
365         /* Function 0x0e */
366         WERROR dfs_ManagerInitialize(
367                 [in]            [string,charset(UTF16)] uint16 *servername,
368                 [in]            uint32 flags
369                 );
370
371         /* Function 0x0f */
372         WERROR dfs_AddStdRootForced(
373                 [in]            [string,charset(UTF16)] uint16 servername[],
374                 [in]            [string,charset(UTF16)] uint16 rootshare[],
375                 [in]            [string,charset(UTF16)] uint16 comment[],
376                 [in]            [string,charset(UTF16)] uint16 store[] /* C:\\whatever */
377                 );
378
379         /* Function 0x10 */
380         WERROR dfs_GetDcAddress(
381                 [in]            [string,charset(UTF16)] uint16 servername[],
382                 [in,out,ref]    [string,charset(UTF16)] uint16 **server_fullname,
383                 [in,out,ref]    boolean8 *is_root,
384                 [in,out,ref]    uint32 *ttl
385                 );
386
387         /* Function 0x11 */
388         WERROR dfs_SetDcAddress(
389                 [in]            [string,charset(UTF16)] uint16 servername[],
390                 [in]            [string,charset(UTF16)] uint16 server_fullname[],
391                 [in]            uint32  flags,
392                 [in]            uint32  ttl
393                 );
394
395         /* Function 0x12 */
396         WERROR dfs_FlushFtTable(
397                 [in]            [string,charset(UTF16)] uint16 servername[],
398                 [in]            [string,charset(UTF16)] uint16 rootshare[]
399                 );
400
401         /* Function 0x13 */
402         [todo] WERROR dfs_Add2();
403
404         /* Function 0x14 */
405         [todo] WERROR dfs_Remove2();
406
407         /* Function 0x15 */
408         [public] WERROR dfs_EnumEx(
409                 [in]            [string,charset(UTF16)] uint16 dfs_name[],
410                 [in]            uint32 level,
411                 [in]            uint32 bufsize,
412                 [in,out,unique] dfs_EnumStruct *info,
413                 [in,out,unique] uint32 *total
414         );
415
416         /* Function 0x16 */
417         [todo] WERROR dfs_SetInfo2();
418 }