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