* changed the way strings are handled in pidl to a much more general
[bbaumbach/samba-autobuild/.git] / source4 / librpc / idl / srvsvc.idl
1 #include "idl_types.h"
2
3 /*
4   srvsvc interface definitions
5 */
6
7 [ uuid(4b324fc8-1670-01d3-1278-5a47bf6ee188),
8   version(3.0),
9   pointer_default(unique)
10 ] interface srvsvc
11 {
12         /******************/
13         /* Function: 0x00 */
14         NTSTATUS srvsvc_00(
15                 );
16
17         /******************/
18         /* Function: 0x01 */
19         NTSTATUS srvsvc_01(
20                 );
21
22         /******************/
23         /* Function: 0x02 */
24         NTSTATUS srvsvc_02(
25                 );
26
27         /******************/
28         /* Function: 0x03 */
29         NTSTATUS srvsvc_03(
30                 );
31
32         /******************/
33         /* Function: 0x04 */
34         NTSTATUS srvsvc_04(
35                 );
36
37         /******************/
38         /* Function: 0x05 */
39         NTSTATUS srvsvc_05(
40                 );
41
42         /******************/
43         /* Function: 0x06 */
44         NTSTATUS srvsvc_06(
45                 );
46
47         /******************/
48         /* Function: 0x07 */
49         NTSTATUS srvsvc_07(
50                 );
51
52         /******************/
53         /* Function: 0x08 */
54
55         typedef struct {
56                 uint32 conn_id;
57         } srvsvc_NetConn0;
58
59         typedef struct {
60                 uint32 count;
61                 [size_is(count)] srvsvc_NetConn0 *array;
62         } srvsvc_NetConnCtr0;
63
64         typedef struct {
65                 uint32 conn_id;
66                 uint32 conn_type;
67                 uint32 num_open;
68                 uint32 num_users;
69                 uint32 conn_time;
70                 unistr *user;
71                 unistr *client;
72         } srvsvc_NetConn1;
73
74         typedef struct {
75                 uint32 count;
76                 [size_is(count)] srvsvc_NetConn1 *array;
77         } srvsvc_NetConnCtr1;
78
79         typedef union {
80                 [case(0)] srvsvc_NetConnCtr0 *ctr0;
81                 [case(1)] srvsvc_NetConnCtr1 *ctr1;
82                 [default] ;
83         } srvsvc_NetConnCtr;
84
85         WERROR srvsvc_NetConnEnum(
86                 [in]   unistr *server_unc,
87                 [in]   unistr *path,
88                 [in,out]   uint32 level,
89                 [in,out,switch_is(level)]   srvsvc_NetConnCtr ctr,
90                 [in]   uint32 preferred_len,
91                 [out]   uint32 total,
92                 [in,out]   uint32 *resume_handle
93                 );
94
95         /******************/
96         /* Function: 0x09 */
97
98         typedef struct {
99                 uint32 fid;
100         } srvsvc_NetFile2;
101
102         typedef struct {
103                 uint32 count;
104                 [size_is(count)] srvsvc_NetFile2 *array;
105         } srvsvc_NetFileCtr2;
106
107         typedef struct {
108                 uint32 fid;
109                 uint32 permissions;
110                 uint32 num_locks;
111                 unistr *path;
112                 unistr *user;
113         } srvsvc_NetFile3;
114
115         typedef struct {
116                 uint32 count;
117                 [size_is(count)] srvsvc_NetFile3 *array;
118         } srvsvc_NetFileCtr3;
119
120         typedef union {
121                 [case(2)] srvsvc_NetFileCtr2 *ctr2;
122                 [case(3)] srvsvc_NetFileCtr3 *ctr3;
123                 [default] ;
124         } srvsvc_NetFileCtr;
125
126         WERROR srvsvc_NetFileEnum(
127                 [in]   unistr *server_unc,
128                 [in]   unistr *path,
129                 [in]   unistr *user,
130                 [in,out] uint32 level,
131                 [in,out,switch_is(level)]   srvsvc_NetFileCtr ctr,
132                 [in]   uint32 preferred_len,
133                 [out]   uint32 total,
134                 [in,out]   uint32 *resume_handle
135                 );
136
137         /******************/
138         /* Function: 0x0a */
139         NTSTATUS srvsvc_0a(
140                 );
141
142         /******************/
143         /* Function: 0x0b */
144         NTSTATUS srvsvc_NET_FILE_CLOSE(
145                 );
146
147         /******************/
148         /* Function: 0x0c */
149
150         typedef struct {
151                 unistr *client;
152         } srvsvc_NetSess0;
153
154         typedef struct {
155                 uint32 count;
156                 [size_is(count)] srvsvc_NetSess0 *array;
157         } srvsvc_NetSessCtr0;
158
159         typedef struct {
160                 unistr *client;
161                 unistr *user;
162                 uint32 num_open;
163                 uint32 time;
164                 uint32 idle_time;
165                 uint32 user_flags;
166         } srvsvc_NetSess1;
167
168         typedef struct {
169                 uint32 count;
170                 [size_is(count)] srvsvc_NetSess1 *array;
171         } srvsvc_NetSessCtr1;
172
173         typedef struct {
174                 unistr *client;
175                 unistr *user;
176                 uint32 num_open;
177                 uint32 time;
178                 uint32 idle_time;
179                 uint32 user_flags;
180                 unistr *client_type;
181         } srvsvc_NetSess2;
182
183         typedef struct {
184                 uint32 count;
185                 [size_is(count)] srvsvc_NetSess2 *array;
186         } srvsvc_NetSessCtr2;
187
188         typedef struct {
189                 unistr *client;
190                 unistr *user;
191                 uint32 time;
192                 uint32 idle_time;
193         } srvsvc_NetSess10;
194
195         typedef struct {
196                 uint32 count;
197                 [size_is(count)] srvsvc_NetSess10 *array;
198         } srvsvc_NetSessCtr10;
199
200         typedef struct {
201                 unistr *client;
202                 unistr *user;
203                 uint32 num_open;
204                 uint32 time;
205                 uint32 idle_time;
206                 uint32 user_flags;
207                 unistr *client_type;
208                 unistr *transport;
209         } srvsvc_NetSess502;
210
211         typedef struct {
212                 uint32 count;
213                 [size_is(count)] srvsvc_NetSess502 *array;
214         } srvsvc_NetSessCtr502;
215
216         typedef union {
217                 [case(0)] srvsvc_NetSessCtr0 *ctr0;
218                 [case(1)] srvsvc_NetSessCtr1 *ctr1;
219                 [case(2)] srvsvc_NetSessCtr2 *ctr2;
220                 [case(10)] srvsvc_NetSessCtr10 *ctr10;
221                 [case(502)] srvsvc_NetSessCtr502 *ctr502;
222                 [default] ;
223         } srvsvc_NetSessCtr;
224
225         WERROR srvsvc_NetSessEnum(
226                 [in]   unistr *server_unc,
227                 [in]   unistr *client,
228                 [in]   unistr *user,
229                 [in,out]   uint32 level,
230                 [in,out,switch_is(level)]   srvsvc_NetSessCtr ctr,
231                 [in]   uint32 preferred_len,
232                 [out]   uint32 total,
233                 [in,out]   uint32 *resume_handle
234                 );
235
236         /******************/
237         /* Function: 0x0d */
238         NTSTATUS srvsvc_0d(
239                 );
240
241         /******************/
242         /* Function: 0x0e */
243         NTSTATUS srvsvc_NET_SHARE_ADD(
244                 );
245
246         /******************/
247         /* Function: 0x0f */
248
249         typedef struct {
250                 unistr *name;
251         } srvsvc_NetShare0;
252
253         typedef struct {
254                 uint32 count;
255                 [size_is(count)] srvsvc_NetShare0 *array;
256         } srvsvc_NetShareCtr0;
257
258         typedef struct {
259                 unistr *name;
260                 uint32 type;
261                 unistr *comment;
262         } srvsvc_NetShare1;
263
264         typedef struct {
265                 uint32 count;
266                 [size_is(count)] srvsvc_NetShare1 *array;
267         } srvsvc_NetShareCtr1;
268
269         typedef struct {
270                 unistr *name;
271                 uint32 type;
272                 unistr *comment;
273                 uint32 permissions;
274                 uint32 max_users;
275                 uint32 current_users;
276                 unistr *path;
277                 uint32 *password;
278         } srvsvc_NetShare2;
279
280         typedef struct {
281                 uint32 count;
282                 [size_is(count)] srvsvc_NetShare2 *array;
283         } srvsvc_NetShareCtr2;
284
285         typedef struct {
286                 unistr *name;
287                 uint32 type;
288                 unistr *comment;
289                 uint32 csc_policy;
290         } srvsvc_NetShare501;
291
292         typedef struct {
293                 uint32 count;
294                 [size_is(count)] srvsvc_NetShare501 *array;
295         } srvsvc_NetShareCtr501;
296
297         typedef struct {
298                 unistr *name;
299                 uint32 type;
300                 unistr *comment;
301                 uint32 permissions;
302                 uint32 max_users;
303                 uint32 current_users;
304                 unistr *path;
305                 uint32 *password;
306                 uint32 unknown;
307                 [subcontext(4)] security_descriptor *sd;
308         } srvsvc_NetShare502;
309
310         typedef struct {
311                 uint32 count;
312                 [size_is(count)] srvsvc_NetShare502 *array;
313         } srvsvc_NetShareCtr502;
314
315         typedef struct {
316                 unistr *comment;
317         } srvsvc_NetShare1004;
318
319         typedef union {
320                 [case(0)] srvsvc_NetShareCtr0 *ctr0;
321                 [case(1)] srvsvc_NetShareCtr1 *ctr1;
322                 [case(2)] srvsvc_NetShareCtr2 *ctr2;
323                 [case(501)] srvsvc_NetShareCtr501 *ctr501;
324                 [case(502)] srvsvc_NetShareCtr502 *ctr502;
325                 [default] ;
326         } srvsvc_NetShareUnion;
327
328         WERROR srvsvc_NetShareEnumAll (
329                 [in]         unistr *server_unc,
330                 [in,out]     uint32 level,
331                 [in,out,switch_is(level)] srvsvc_NetShareUnion ctr,
332                 [in]         uint32 max_buffer,
333                 [out]        uint32 totalentries,
334                 [in,out]     uint32 *resume_handle
335                 );
336
337         /******************/
338         /* Function: 0x10 */
339         NTSTATUS srvsvc_NET_SHARE_GET_INFO(
340                 );
341
342         /******************/
343         /* Function: 0x11 */
344         NTSTATUS srvsvc_NET_SHARE_SET_INFO(
345                 );
346
347         /******************/
348         /* Function: 0x12 */
349         NTSTATUS srvsvc_NET_SHARE_DEL(
350                 );
351
352         /******************/
353         /* Function: 0x13 */
354         NTSTATUS srvsvc_NET_SHARE_DEL_STICKY(
355                 );
356         
357         /******************/
358         /* Function: 0x14 */
359         NTSTATUS srvsvc_14(
360                 );
361
362         /******************/
363         /* Function: 0x15 */
364         NTSTATUS srvsvc_NET_SRV_GET_INFO(
365                 );
366
367         /******************/
368         /* Function: 0x16 */
369         NTSTATUS srvsvc_NET_SRV_SET_INFO(
370                 );
371
372         /******************/
373         /* Function: 0x17 */
374
375         typedef struct {
376                 uint32 unknown;
377                 uint32 size;
378                 [size_is(size)] uint8 *disk;
379         } srvsvc_NetDisk0;
380
381         typedef struct {
382                 uint32 count;
383                 uint32 unknown1;
384                 uint32 unknown2;
385                 [size_is(count)] srvsvc_NetDisk0 *array;
386         } srvsvc_NetDiskCtr0;
387
388         typedef struct {
389                 uint32 dummy;
390         } srvsvc_NetDisk1;
391
392         typedef struct {
393                 uint32 count;
394                 [size_is(count)] srvsvc_NetDisk1 *array;
395         } srvsvc_NetDiskCtr1;
396
397         typedef struct {
398                 uint32 dummy;
399         } srvsvc_NetDisk2;
400
401         typedef struct {
402                 uint32 count;
403                 [size_is(count)] srvsvc_NetDisk2 *array;
404         } srvsvc_NetDiskCtr2;
405
406         typedef struct {
407                 uint32 dummy;
408         } srvsvc_NetDisk3;
409
410         typedef struct {
411                 uint32 count;
412                 [size_is(count)] srvsvc_NetDisk3 *array;
413         } srvsvc_NetDiskCtr3;
414
415         typedef union {
416                 [case(0)] srvsvc_NetDiskCtr0 ctr0;
417                 [case(1)] srvsvc_NetDiskCtr1 ctr1;
418                 [case(2)] srvsvc_NetDiskCtr2 ctr2;
419                 [case(3)] srvsvc_NetDiskCtr3 ctr3;
420                 [default] ;
421         } srvsvc_NetDiskSubCtr;
422
423         typedef struct {
424                 uint32 num1;
425                 srvsvc_NetDiskCtr0 *ctr0;
426         } srvsvc_NetDiskCtr;
427
428         WERROR srvsvc_NetDiskEnum(
429                 [in]   unistr *server_unc,
430                 [in]   uint32 level,
431                 [in]   uint32 unknown1,
432                 [in]   uint32 unknown2,
433                 [in]   uint32 preferred_len,
434                 [out]   srvsvc_NetDiskCtr ctr,
435                 [out]   uint32 total,
436                 [in,out]   uint32 *resume_handle
437                 );
438
439         /******************/
440         /* Function: 0x18 */
441         NTSTATUS srvsvc_18(
442                 );
443
444         /******************/
445         /* Function: 0x19 */
446         NTSTATUS srvsvc_19(
447                 );
448                 
449         /******************/
450         /* Function: 0x1a */
451
452         typedef struct {
453                 uint32 count;
454                 [size_is(count)] uint8 *addr;
455         } srvsvc_TransportAddress;
456
457         typedef struct {
458                 uint32 vcs;
459                 unistr *name;
460                 srvsvc_TransportAddress *addr;
461                 uint32 addr_len;
462                 unistr *net_addr;
463         } srvsvc_NetTransport0;
464
465         typedef struct {
466                 uint32 count;
467                 [size_is(count)] srvsvc_NetTransport0 *array;
468         } srvsvc_NetTransportCtr0;
469
470         typedef struct {
471                 uint32 vcs;
472                 unistr *name;
473                 srvsvc_TransportAddress *addr;
474                 uint32 addr_len;
475                 unistr *net_addr;
476                 unistr *domain;
477         } srvsvc_NetTransport1;
478
479         typedef struct {
480                 uint32 count;
481                 [size_is(count)] srvsvc_NetTransport1 *array;
482         } srvsvc_NetTransportCtr1;
483
484         typedef struct {
485                 uint32 dummy;
486         } srvsvc_NetTransport2;
487
488         typedef struct {
489                 uint32 count;
490                 [size_is(count)] srvsvc_NetTransport2 *array;
491         } srvsvc_NetTransportCtr2;
492
493         typedef union {
494                 [case(0)] srvsvc_NetTransportCtr0 *ctr0;
495                 [case(1)] srvsvc_NetTransportCtr1 *ctr1;
496                 [case(2)] srvsvc_NetTransportCtr2 *ctr2;
497         } srvsvc_NetTransportCtr;
498
499         WERROR srvsvc_NetTransportEnum(
500                 [in]   unistr *server_unc,
501                 [in,out] uint32 level,
502                 [in,out,switch_is(level)]   srvsvc_NetTransportCtr ctr,
503                 [in]   uint32 preferred_len,
504                 [out]   uint32 total,
505                 [in,out]   uint32 *resume_handle
506                 );
507
508         /******************/
509         /* Function: 0x1b */
510         NTSTATUS srvsvc_1b(
511                 );
512
513         /******************/
514         /* Function: 0x1c */
515         NTSTATUS srvsvc_NET_REMOTE_TOD(
516                 );
517
518         /******************/
519         /* Function: 0x1d */
520         NTSTATUS srvsvc_1d(
521                 );
522
523         /******************/
524         /* Function: 0x1e */
525         NTSTATUS srvsvc_1e(
526                 );
527
528         /******************/
529         /* Function: 0x1f */
530         NTSTATUS srvsvc_1f(
531                 );
532
533         /******************/
534         /* Function: 0x20 */
535         NTSTATUS srvsvc_20(
536                 );
537
538         /******************/
539         /* Function: 0x21 */
540         NTSTATUS srvsvc_NET_NAME_VALIDATE(
541                 );
542
543         /******************/
544         /* Function: 0x22 */
545         NTSTATUS srvsvc_22(
546                 );
547
548         /******************/
549         /* Function: 0x23 */
550         NTSTATUS srvsvc_23(
551                 );
552
553         /******************/
554         /* Function: 0x24 */
555         /* Note, there must be some way to return entries read vs 
556            total entries ... */
557         WERROR srvsvc_NetShareEnum(
558                 [in]       unistr *server_unc,
559                 [in,out]           uint32 level,
560                 [in,out,switch_is(level)]   srvsvc_NetShareUnion ctr,
561                 [in]       uint32 preferred_len,
562                 [out]      uint32 totalentries,
563                 [in,out]   uint32 *resume_handle
564                 );
565
566         /******************/
567         /* Function: 0x25 */
568         NTSTATUS srvsvc_25(
569                 );
570
571         /******************/
572         /* Function: 0x26 */
573         NTSTATUS srvsvc_26(
574                 );
575
576         /******************/
577         /* Function: 0x27 */
578         NTSTATUS srvsvc_NET_FILE_QUERY_SECDESC(
579                 );
580
581         /******************/
582         /* Function: 0x28 */
583         NTSTATUS srvsvc_NET_FILE_SET_SECDESC(
584                 );
585 }