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