* fixed handling of relative subcontext unions
[samba.git] / source4 / librpc / idl / spoolss.idl
1 #include "idl_types.h"
2
3 /*
4   spoolss interface definitions
5 */
6
7 [ uuid(12345678-1234-abcd-ef00-0123456789ab),
8   version(1.0),
9   pointer_default(unique)
10 ] interface spoolss
11 {
12         /******************/
13         /* Function: 0x00 */
14
15         typedef struct {
16                 nstring devicename;
17                 uint16 specversion;
18                 uint16 driverversion;
19                 uint16 size;
20                 uint16 driverextra;
21                 uint32 fields;
22                 uint16 orientation;
23                 uint16 papersize;
24                 uint16 paperlength;
25                 uint16 paperwidth;
26                 uint16 scale;
27                 uint16 copies;
28                 uint16 defaultsource;
29                 uint16 printquality;
30                 uint16 color;
31                 uint16 duplex;
32                 uint16 yresolution;
33                 uint16 ttoption;
34                 uint16 collate;
35                 nstring formname;
36                 uint16 logpixels;
37                 uint32 bitsperpel;
38                 uint32 pelswidth;
39                 uint32 pelsheight;
40                 uint32 displayflags;
41                 uint32 displayfrequency;
42                 uint32 icmmethod;
43                 uint32 icmintent;
44                 uint32 mediatype;
45                 uint32 dithertype;
46                 uint32 reserved1;
47                 uint32 reserved2;
48                 uint32 panningwidth;
49                 uint32 panningheight;
50                 uint8  private[driverextra];
51         } spoolss_DeviceMode;
52
53         typedef struct {
54                 uint32 flags;
55                 [relative] nstring *name;
56                 [relative] nstring *description;
57                 [relative] nstring *comment;
58         } spoolss_PrinterInfo1;
59
60         typedef struct {
61                 [relative] nstring *servername;
62                 [relative] nstring *printername;
63                 [relative] nstring *sharename;
64                 [relative] nstring *portname;
65                 [relative] nstring *drivername;
66                 [relative] nstring *comment;
67                 [relative] nstring *location;
68                 [relative] spoolss_DeviceMode *devmode;
69                 [relative] nstring *sepfile;
70                 [relative] nstring *printprocessor;
71                 [relative] nstring *datatype;
72                 [relative] nstring *parameters;
73                 [relative] security_descriptor *secdesc;
74                 uint32 attributes;
75                 uint32 priority;
76                 uint32 defaultpriority;
77                 uint32 starttime;
78                 uint32 untiltime;
79                 uint32 status;
80                 uint32 cjobs;
81                 uint32 averageppm;
82         } spoolss_PrinterInfo2;
83
84         typedef struct {
85                 uint32 flags;
86                 security_descriptor secdesc;
87         } spoolss_PrinterInfo3;
88
89         typedef struct {
90                 [relative] nstring *printername;
91                 [relative] nstring *servername;
92                 uint32 attributes;
93         } spoolss_PrinterInfo4;
94
95         typedef struct {
96                 [relative] nstring *printername;
97                 [relative] nstring *portname;
98                 uint32 attributes;
99                 uint32 device_not_selected_timeout;
100                 uint32 transmission_retry_timeout;
101         } spoolss_PrinterInfo5;
102
103         typedef struct {
104                 uint32 unknown;
105         } spoolss_PrinterInfo6;
106
107         typedef struct {
108                 [relative] nstring *guid; /* text form of printer guid */
109                 uint32 action;
110         } spoolss_PrinterInfo7;
111
112         typedef [nodiscriminant,public] union {
113                 [case(1)] spoolss_PrinterInfo1 info1;
114                 [case(2)] spoolss_PrinterInfo2 info2;
115                 [case(3)] spoolss_PrinterInfo3 info3;
116                 [case(4)] spoolss_PrinterInfo4 info4;
117                 [case(5)] spoolss_PrinterInfo5 info5;
118                 [case(6)] spoolss_PrinterInfo6 info6;
119                 [case(7)] spoolss_PrinterInfo7 info7;
120         } spoolss_PrinterInfo;
121
122         WERROR spoolss_EnumPrinters(
123                 [in]         uint32 flags,
124                 [in]         unistr *server,
125                 [in]         uint32 level,
126                 [in,out]     DATA_BLOB *buffer,
127                 [in,out,ref] uint32 *buf_size,
128                 [out]        uint32 count
129                 );
130
131         /******************/
132         /* Function: 0x01 */
133         WERROR spoolss_OpenPrinter(
134                 [in]        unistr *server,
135                 [in]        unistr *printer,
136                 [in]        DATA_BLOB *buffer,
137                 [in]        uint32 access_mask,
138                 [out,ref]   policy_handle *handle
139                 );
140
141         /******************/
142         /* Function: 0x02 */
143         NTSTATUS spoolss_02(
144                 );
145
146         /******************/
147         /* Function: 0x03 */
148         NTSTATUS spoolss_03(
149                 );
150
151         /******************/
152         /* Function: 0x04 */
153         NTSTATUS spoolss_EnumJobs(
154                 [in,ref] policy_handle *handle,
155                 [in]     uint32 firstjob,
156                 [in]     uint32 numjobs,
157                 [in]     uint32 level,
158                 [in,out]     DATA_BLOB *buffer,
159                 [in,out,ref] uint32 *buf_size,
160                 [out]    uint32 numjobs
161                 );
162
163         /******************/
164         /* Function: 0x05 */
165         NTSTATUS spoolss_05(
166                 );
167
168         /******************/
169         /* Function: 0x06 */
170         NTSTATUS spoolss_06(
171                 );
172
173         /******************/
174         /* Function: 0x07 */
175         NTSTATUS spoolss_07(
176                 );
177
178         /******************/
179         /* Function: 0x08 */
180         WERROR spoolss_GetPrinter(
181                 [in,ref]     policy_handle *handle,
182                 [in]         uint32 level,
183                 [in]         DATA_BLOB *buffer,
184                 [out,subcontext(4),switch_is(level)] spoolss_PrinterInfo *info,
185                 [in,out,ref] uint32 *buf_size
186                 );
187
188         /******************/
189         /* Function: 0x09 */
190         NTSTATUS spoolss_09(
191                 );
192
193         /******************/
194         /* Function: 0x0a */
195         NTSTATUS spoolss_0a(
196                 );
197
198         /******************/
199         /* Function: 0x0b */
200         NTSTATUS spoolss_0b(
201                 );
202
203         /******************/
204         /* Function: 0x0c */
205         NTSTATUS spoolss_0c(
206                 );
207
208         /******************/
209         /* Function: 0x0d */
210         NTSTATUS spoolss_0d(
211                 );
212
213         /******************/
214         /* Function: 0x0e */
215         NTSTATUS spoolss_0e(
216                 );
217
218         /******************/
219         /* Function: 0x0f */
220         NTSTATUS spoolss_0f(
221                 );
222
223         /******************/
224         /* Function: 0x10 */
225         NTSTATUS spoolss_10(
226                 );
227
228         /******************/
229         /* Function: 0x11 */
230         NTSTATUS spoolss_11(
231                 );
232
233         /******************/
234         /* Function: 0x12 */
235         NTSTATUS spoolss_StartPagePrinter(
236                 [in,ref] policy_handle *handle          
237                 );
238
239         /******************/
240         /* Function: 0x13 */
241         NTSTATUS spoolss_13(
242                 );
243
244         /******************/
245         /* Function: 0x14 */
246         NTSTATUS spoolss_EndPagePrinter(
247                 [in,ref] policy_handle *handle          
248                 );
249
250         /******************/
251         /* Function: 0x15 */
252         NTSTATUS spoolss_15(
253                 );
254
255         /******************/
256         /* Function: 0x16 */
257         NTSTATUS spoolss_16(
258                 );
259
260         /******************/
261         /* Function: 0x17 */
262         NTSTATUS spoolss_EndDocPrinter(
263                 );
264
265         /******************/
266         /* Function: 0x18 */
267         NTSTATUS spoolss_18(
268                 );
269
270         /******************/
271         /* Function: 0x19 */
272         NTSTATUS spoolss_19(
273                 );
274
275         /******************/
276         /* Function: 0x1a */
277         NTSTATUS spoolss_1a(
278                 );
279
280         /******************/
281         /* Function: 0x1b */
282         NTSTATUS spoolss_1b(
283                 );
284
285         /******************/
286         /* Function: 0x1c */
287         NTSTATUS spoolss_1c(
288                 );
289
290         /******************/
291         /* Function: 0x1d */
292         WERROR spoolss_ClosePrinter(
293                 [in,out,ref]     policy_handle *handle
294                 );
295
296         /******************/
297         /* Function: 0x1e */
298         NTSTATUS spoolss_1e(
299                 );
300
301         /******************/
302         /* Function: 0x1f */
303         NTSTATUS spoolss_1f(
304                 );
305
306         /******************/
307         /* Function: 0x20 */
308         NTSTATUS spoolss_20(
309                 );
310
311         /******************/
312         /* Function: 0x21 */
313         NTSTATUS spoolss_21(
314                 );
315
316         /******************/
317         /* Function: 0x22 */
318         NTSTATUS spoolss_22(
319                 );
320
321         /******************/
322         /* Function: 0x23 */
323         NTSTATUS spoolss_23(
324                 );
325
326         /******************/
327         /* Function: 0x24 */
328         NTSTATUS spoolss_24(
329                 );
330
331         /******************/
332         /* Function: 0x25 */
333         NTSTATUS spoolss_25(
334                 );
335
336         /******************/
337         /* Function: 0x26 */
338         NTSTATUS spoolss_26(
339                 );
340
341         /******************/
342         /* Function: 0x27 */
343         NTSTATUS spoolss_27(
344                 );
345
346         /******************/
347         /* Function: 0x28 */
348         NTSTATUS spoolss_28(
349                 );
350
351         /******************/
352         /* Function: 0x29 */
353         NTSTATUS spoolss_29(
354                 );
355
356         /******************/
357         /* Function: 0x2a */
358         NTSTATUS spoolss_2a(
359                 );
360
361         /******************/
362         /* Function: 0x2b */
363         NTSTATUS spoolss_2b(
364                 );
365
366         /******************/
367         /* Function: 0x2c */
368         NTSTATUS spoolss_2c(
369                 );
370
371         /******************/
372         /* Function: 0x2d */
373         NTSTATUS spoolss_2d(
374                 );
375
376         /******************/
377         /* Function: 0x2e */
378         NTSTATUS spoolss_2e(
379                 );
380
381         /******************/
382         /* Function: 0x2f */
383         NTSTATUS spoolss_2f(
384                 );
385
386         /******************/
387         /* Function: 0x30 */
388         NTSTATUS spoolss_30(
389                 );
390
391         /******************/
392         /* Function: 0x31 */
393         NTSTATUS spoolss_31(
394                 );
395
396         /******************/
397         /* Function: 0x32 */
398         NTSTATUS spoolss_32(
399                 );
400
401         /******************/
402         /* Function: 0x33 */
403         NTSTATUS spoolss_33(
404                 );
405
406         /******************/
407         /* Function: 0x34 */
408         NTSTATUS spoolss_34(
409                 );
410
411         /******************/
412         /* Function: 0x35 */
413         NTSTATUS spoolss_35(
414                 );
415
416         /******************/
417         /* Function: 0x36 */
418         NTSTATUS spoolss_36(
419                 );
420
421         /******************/
422         /* Function: 0x37 */
423         NTSTATUS spoolss_37(
424                 );
425
426         /******************/
427         /* Function: 0x38 */
428         NTSTATUS spoolss_38(
429                 );
430
431         /******************/
432         /* Function: 0x39 */
433         NTSTATUS spoolss_39(
434                 );
435
436         /******************/
437         /* Function: 0x3a */
438         NTSTATUS spoolss_3a(
439                 );
440
441         /******************/
442         /* Function: 0x3b */
443         NTSTATUS spoolss_3b(
444                 );
445
446         /******************/
447         /* Function: 0x3c */
448         NTSTATUS spoolss_3c(
449                 );
450
451         /******************/
452         /* Function: 0x3d */
453         NTSTATUS spoolss_3d(
454                 );
455
456         /******************/
457         /* Function: 0x3e */
458         NTSTATUS spoolss_3e(
459                 );
460
461         /******************/
462         /* Function: 0x3f */
463         NTSTATUS spoolss_3f(
464                 );
465
466         /******************/
467         /* Function: 0x40 */
468         NTSTATUS spoolss_40(
469                 );
470
471         /******************/
472         /* Function: 0x41 */
473         NTSTATUS spoolss_41(
474                 );
475
476         /******************/
477         /* Function: 0x42 */
478         NTSTATUS spoolss_42(
479                 );
480
481         /******************/
482         /* Function: 0x43 */
483         NTSTATUS spoolss_43(
484                 );
485
486         /******************/
487         /* Function: 0x44 */
488         NTSTATUS spoolss_44(
489                 );
490
491         typedef struct {
492                 uint32 foo;
493         } spoolss_Devmode;
494
495         typedef struct {
496                 uint32 size;
497                 spoolss_Devmode *devmode;
498         } spoolss_DevmodeContainer;
499
500         typedef struct {
501                 uint32 size;
502                 unistr *client;
503                 unistr *user;
504                 uint32 build;
505                 uint32 major;
506                 uint32 minor;
507                 uint32 processor;
508         } spoolss_UserLevel1;
509
510         typedef union {
511                 [case(1)]  spoolss_UserLevel1 *level1;
512         } spoolss_UserLevel;
513
514         /******************/
515         /* Function: 0x45 */
516         WERROR spoolss_OpenPrinterEx(
517                 [in]                  unistr *printername,
518                 [in]                  unistr *datatype,
519                 [in]                  spoolss_DevmodeContainer devmode_ctr,
520                 [in]                  uint32 access_required,
521                 [in]                  uint32 level,
522                 [in,switch_is(level)] spoolss_UserLevel userlevel,
523                 [out,ref]             policy_handle *handle
524                 );
525
526         /******************/
527         /* Function: 0x46 */
528         NTSTATUS spoolss_46(
529                 );
530
531         /******************/
532         /* Function: 0x47 */
533         NTSTATUS spoolss_47(
534                 );
535
536         /******************/
537         /* Function: 0x48 */
538         WERROR spoolss_EnumPrinterData(
539                 [in,ref] policy_handle *handle,
540                 [in]     uint32 enum_index,
541                 [in]     uint32 value_offered,
542                 [out]    lstring value,
543                 [out]    uint32 value_needed,
544                 [out]    uint32 printerdata_type,
545                 [out]    DATA_BLOB data,
546                 [in,out,ref] uint32 *data_size
547                 );
548
549         /******************/
550         /* Function: 0x49 */
551         NTSTATUS spoolss_49(
552                 );
553
554         /******************/
555         /* Function: 0x4a */
556         NTSTATUS spoolss_4a(
557                 );
558
559         /******************/
560         /* Function: 0x4b */
561         NTSTATUS spoolss_4b(
562                 );
563
564         /******************/
565         /* Function: 0x4c */
566         NTSTATUS spoolss_4c(
567                 );
568
569         /******************/
570         /* Function: 0x4d */
571         NTSTATUS spoolss_4d(
572                 );
573
574         /******************/
575         /* Function: 0x4e */
576         NTSTATUS spoolss_4e(
577                 );
578
579         /******************/
580         /* Function: 0x4f */
581         NTSTATUS spoolss_4f(
582                 );
583
584         /******************/
585         /* Function: 0x50 */
586         NTSTATUS spoolss_50(
587                 );
588
589         /******************/
590         /* Function: 0x51 */
591         NTSTATUS spoolss_51(
592                 );
593
594         /******************/
595         /* Function: 0x52 */
596         NTSTATUS spoolss_52(
597                 );
598
599         /******************/
600         /* Function: 0x53 */
601         NTSTATUS spoolss_53(
602                 );
603
604         /******************/
605         /* Function: 0x54 */
606         NTSTATUS spoolss_54(
607                 );
608
609         /******************/
610         /* Function: 0x55 */
611         NTSTATUS spoolss_55(
612                 );
613
614         /******************/
615         /* Function: 0x56 */
616         NTSTATUS spoolss_56(
617                 );
618
619         /******************/
620         /* Function: 0x57 */
621         NTSTATUS spoolss_57(
622                 );
623
624         /******************/
625         /* Function: 0x58 */
626         NTSTATUS spoolss_58(
627                 );
628
629         /******************/
630         /* Function: 0x59 */
631         NTSTATUS spoolss_59(
632                 );
633
634         /******************/
635         /* Function: 0x5a */
636         NTSTATUS spoolss_5a(
637                 );
638
639         /******************/
640         /* Function: 0x5b */
641         NTSTATUS spoolss_5b(
642                 );
643
644         /******************/
645         /* Function: 0x5c */
646         NTSTATUS spoolss_5c(
647                 );
648
649         /******************/
650         /* Function: 0x5d */
651         NTSTATUS spoolss_5d(
652                 );
653
654         /******************/
655         /* Function: 0x5e */
656         NTSTATUS spoolss_5e(
657                 );
658
659         /******************/
660         /* Function: 0x5f */
661         NTSTATUS spoolss_5f(
662                 );
663
664 }