Add SetPrinterData, DeletePrinterData.
[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                 uint32 flags;
62                 [relative] nstring *name;
63                 uint32 width;
64                 uint32 length;
65                 uint32 left;
66                 uint32 top;
67                 uint32 right;
68                 uint32 bottom;
69         } spoolss_FormInfo1;
70
71         typedef struct {
72                 [relative] nstring *servername;
73                 [relative] nstring *printername;
74                 [relative] nstring *sharename;
75                 [relative] nstring *portname;
76                 [relative] nstring *drivername;
77                 [relative] nstring *comment;
78                 [relative] nstring *location;
79                 [relative] spoolss_DeviceMode *devmode;
80                 [relative] nstring *sepfile;
81                 [relative] nstring *printprocessor;
82                 [relative] nstring *datatype;
83                 [relative] nstring *parameters;
84                 [relative] security_descriptor *secdesc;
85                 uint32 attributes;
86                 uint32 priority;
87                 uint32 defaultpriority;
88                 uint32 starttime;
89                 uint32 untiltime;
90                 uint32 status;
91                 uint32 cjobs;
92                 uint32 averageppm;
93         } spoolss_PrinterInfo2;
94
95         typedef struct {
96                 uint32 flags;
97                 security_descriptor secdesc;
98         } spoolss_PrinterInfo3;
99
100         typedef struct {
101                 [relative] nstring *printername;
102                 [relative] nstring *servername;
103                 uint32 attributes;
104         } spoolss_PrinterInfo4;
105
106         typedef struct {
107                 [relative] nstring *printername;
108                 [relative] nstring *portname;
109                 uint32 attributes;
110                 uint32 device_not_selected_timeout;
111                 uint32 transmission_retry_timeout;
112         } spoolss_PrinterInfo5;
113
114         typedef struct {
115                 uint32 unknown;
116         } spoolss_PrinterInfo6;
117
118         typedef struct {
119                 [relative] nstring *guid; /* text form of printer guid */
120                 uint32 action;
121         } spoolss_PrinterInfo7;
122
123         typedef [nodiscriminant,public] union {
124                 [case(1)] spoolss_PrinterInfo1 info1;
125                 [case(2)] spoolss_PrinterInfo2 info2;
126                 [case(3)] spoolss_PrinterInfo3 info3;
127                 [case(4)] spoolss_PrinterInfo4 info4;
128                 [case(5)] spoolss_PrinterInfo5 info5;
129                 [case(6)] spoolss_PrinterInfo6 info6;
130                 [case(7)] spoolss_PrinterInfo7 info7;
131         } spoolss_PrinterInfo;
132
133         WERROR spoolss_EnumPrinters(
134                 [in]         uint32 flags,
135                 [in]         unistr *server,
136                 [in]         uint32 level,
137                 [in,out]     DATA_BLOB *buffer,
138                 [in,out,ref] uint32 *buf_size,
139                 [out]        uint32 count
140         );
141
142         /******************/
143         /* Function: 0x01 */
144         WERROR spoolss_OpenPrinter(
145                 [in]        unistr *server,
146                 [in]        unistr *printer,
147                 [in]        DATA_BLOB *buffer,
148                 [in]        uint32 access_mask,
149                 [out,ref]   policy_handle *handle
150         );
151
152         /******************/
153         /* Function: 0x02 */
154         WERROR spoolss_SetJob(
155                 [in,ref] policy_handle *handle,
156                 [in] uint32 job_id,
157                 [in] uint32 level,
158                 [in] uint32 command
159         );
160
161         /******************/
162         /* Function: 0x03 */
163         WERROR spoolss_GetJob(
164                 [in,ref] policy_handle *handle,
165                 [in] uint32 job_id,
166                 [in] uint32 level,
167                 [in] DATA_BLOB *buffer,
168                 [out,subcontext(4),switch_is(level)] spoolss_JobInfo *info,
169                 [in,out,ref] uint32 *buf_size
170         );
171
172         typedef struct {
173                 uint16 year;
174                 uint16 month;
175                 uint16 day_of_week;
176                 uint16 day;
177                 uint16 hour;
178                 uint16 minute;
179                 uint16 second;
180                 uint16 millisecond;
181         } spoolss_Time;
182
183         typedef struct {
184                 uint32 job_id;
185                 [relative] nstring printer_name;
186                 [relative] nstring server_name;
187                 [relative] nstring user_name;
188                 [relative] nstring document_name;
189                 [relative] nstring data_type;
190                 [relative] nstring text_status;
191                 uint32 status;
192                 uint32 priority;
193                 uint32 position;
194                 uint32 total_pages;
195                 uint32 pages_printed;
196                 spoolss_Time time;
197         } spoolss_JobInfo1;
198
199         typedef [nodiscriminant,public] union {
200                 [case(1)] spoolss_JobInfo1 info1;
201         } spoolss_JobInfo;
202
203         /******************/
204         /* Function: 0x04 */
205         WERROR spoolss_EnumJobs(
206                 [in,ref] policy_handle *handle,
207                 [in]     uint32 firstjob,
208                 [in]     uint32 numjobs,
209                 [in]     uint32 level,
210                 [in,out]     DATA_BLOB *buffer,
211                 [in,out,ref] uint32 *buf_size,
212                 [out]    uint32 count
213         );
214
215         /******************/
216         /* Function: 0x05 */
217         WERROR spoolss_05(
218         );
219
220         /******************/
221         /* Function: 0x06 */
222         WERROR spoolss_06(
223         );
224
225         /******************/
226         /* Function: 0x07 */
227         WERROR spoolss_07(
228         );
229
230         /******************/
231         /* Function: 0x08 */
232         WERROR spoolss_GetPrinter(
233                 [in,ref]     policy_handle *handle,
234                 [in]         uint32 level,
235                 [in]         DATA_BLOB *buffer,
236                 [out,subcontext(4),switch_is(level)] spoolss_PrinterInfo *info,
237                 [in,out,ref] uint32 *buf_size
238         );
239
240         /******************/
241         /* Function: 0x09 */
242         WERROR spoolss_09(
243         );
244
245         /******************/
246         /* Function: 0x0a */
247         WERROR spoolss_0a(
248         );
249
250         /******************/
251         /* Function: 0x0b */
252         WERROR spoolss_0b(
253         );
254
255         /******************/
256         /* Function: 0x0c */
257         WERROR spoolss_0c(
258         );
259
260         /******************/
261         /* Function: 0x0d */
262         WERROR spoolss_0d(
263         );
264
265         /******************/
266         /* Function: 0x0e */
267         WERROR spoolss_0e(
268         );
269
270         /******************/
271         /* Function: 0x0f */
272         WERROR spoolss_0f(
273         );
274
275         /******************/
276         /* Function: 0x10 */
277         WERROR spoolss_10(
278         );
279
280         /******************/
281         /* Function: 0x11 */
282         WERROR spoolss_11(
283         );
284
285         /******************/
286         /* Function: 0x12 */
287         WERROR spoolss_StartPagePrinter(
288                 [in,ref] policy_handle *handle          
289         );
290
291         /******************/
292         /* Function: 0x13 */
293         WERROR spoolss_13(
294         );
295
296         /******************/
297         /* Function: 0x14 */
298         WERROR spoolss_EndPagePrinter(
299                 [in,ref] policy_handle *handle          
300         );
301
302         /******************/
303         /* Function: 0x15 */
304         WERROR spoolss_15(
305         );
306
307         /******************/
308         /* Function: 0x16 */
309         WERROR spoolss_16(
310         );
311
312         /******************/
313         /* Function: 0x17 */
314         WERROR spoolss_EndDocPrinter(
315         );
316
317         /******************/
318         /* Function: 0x18 */
319         WERROR spoolss_18(
320         );
321
322         /******************/
323         /* Function: 0x19 */
324         WERROR spoolss_19(
325         );
326
327         /******************/
328         /* Function: 0x1a */
329         WERROR spoolss_GetPrinterData(
330                 [in,ref] policy_handle *handle,
331                 [in] unistr value_name,
332                 [out] uint32 type,
333                 [out] DATA_BLOB buffer,
334                 [in,out,ref] uint32 *buf_size
335         );
336
337         /******************/
338         /* Function: 0x1b */
339         WERROR spoolss_SetPrinterData(  
340                 [in,ref] policy_handle *handle,
341                 [in] unistr value_name,
342                 [in] uint32 type,
343                 [in] DATA_BLOB buffer,
344                 [in] uint32 real_len
345         );
346
347         /******************/
348         /* Function: 0x1c */
349         WERROR spoolss_1c(
350         );
351
352         /******************/
353         /* Function: 0x1d */
354         WERROR spoolss_ClosePrinter(
355                 [in,out,ref]     policy_handle *handle
356         );
357
358         typedef struct {
359                 uint32 flags;
360                 [relative] unistr *name;
361                 uint32 width;
362                 uint32 length;
363                 uint32 left;
364                 uint32 top;
365                 uint32 right;
366                 uint32 bottom;
367         } spoolss_AddFormInfo1;
368
369         typedef union {
370                 [case(1)] spoolss_AddFormInfo1 *info1;
371         } spoolss_AddFormInfo;
372
373         /******************/
374         /* Function: 0x1e */
375         WERROR spoolss_AddForm(
376                 [in,ref] policy_handle *handle,
377                 [in] uint32 level,
378                 [in,switch_is(level)] spoolss_AddFormInfo info
379         );
380
381         /******************/
382         /* Function: 0x1f */
383         WERROR spoolss_DeleteForm(
384                 [in,ref] policy_handle *handle,
385                 [in] unistr formname
386         );
387
388         /******************/
389         /* Function: 0x20 */
390         WERROR spoolss_GetForm(
391                 [in,ref] policy_handle *handle,
392                 [in] unistr formname,
393                 [in] uint32 level,
394                 [in] DATA_BLOB *buffer,
395                 [out,subcontext(4),switch_is(level)] spoolss_FormInfo *info,
396                 [in,out,ref] uint32 *buf_size
397         );
398
399         /******************/
400         /* Function: 0x21 */
401         WERROR spoolss_SetForm(
402                 [in,ref] policy_handle *handle,
403                 [in] unistr form_name,
404                 [in] uint32 level,
405                 [in,switch_is(level)] spoolss_AddFormInfo info
406         );
407
408         typedef [nodiscriminant,public] union {
409                 [case(1)] spoolss_FormInfo1 info1;
410         } spoolss_FormInfo;
411
412         /******************/
413         /* Function: 0x22 */
414         WERROR spoolss_EnumForms(
415                 [in,ref] policy_handle *handle,
416                 [in] uint32 level,
417                 [in,out] DATA_BLOB *buffer,
418                 [in,out,ref] uint32 *buf_size,
419                 [out] uint32 count
420         );
421
422         /******************/
423         /* Function: 0x23 */
424         WERROR spoolss_23(
425         );
426
427         /******************/
428         /* Function: 0x24 */
429         WERROR spoolss_24(
430         );
431
432         /******************/
433         /* Function: 0x25 */
434         WERROR spoolss_25(
435         );
436
437         /******************/
438         /* Function: 0x26 */
439         WERROR spoolss_26(
440         );
441
442         /******************/
443         /* Function: 0x27 */
444         WERROR spoolss_27(
445         );
446
447         /******************/
448         /* Function: 0x28 */
449         WERROR spoolss_28(
450         );
451
452         /******************/
453         /* Function: 0x29 */
454         WERROR spoolss_29(
455         );
456
457         /******************/
458         /* Function: 0x2a */
459         WERROR spoolss_2a(
460         );
461
462         /******************/
463         /* Function: 0x2b */
464         WERROR spoolss_2b(
465         );
466
467         /******************/
468         /* Function: 0x2c */
469         WERROR spoolss_2c(
470         );
471
472         /******************/
473         /* Function: 0x2d */
474         WERROR spoolss_2d(
475         );
476
477         /******************/
478         /* Function: 0x2e */
479         WERROR spoolss_2e(
480         );
481
482         /******************/
483         /* Function: 0x2f */
484         WERROR spoolss_2f(
485         );
486
487         /******************/
488         /* Function: 0x30 */
489         WERROR spoolss_30(
490         );
491
492         /******************/
493         /* Function: 0x31 */
494         WERROR spoolss_31(
495         );
496
497         /******************/
498         /* Function: 0x32 */
499         WERROR spoolss_32(
500         );
501
502         /******************/
503         /* Function: 0x33 */
504         WERROR spoolss_33(
505         );
506
507         /******************/
508         /* Function: 0x34 */
509         WERROR spoolss_34(
510         );
511
512         /******************/
513         /* Function: 0x35 */
514         WERROR spoolss_35(
515         );
516
517         /******************/
518         /* Function: 0x36 */
519         WERROR spoolss_36(
520         );
521
522         /******************/
523         /* Function: 0x37 */
524         WERROR spoolss_37(
525         );
526
527         /******************/
528         /* Function: 0x38 */
529         WERROR spoolss_38(
530         );
531
532         /******************/
533         /* Function: 0x39 */
534         WERROR spoolss_39(
535         );
536
537         /******************/
538         /* Function: 0x3a */
539         WERROR spoolss_3a(
540         );
541
542         /******************/
543         /* Function: 0x3b */
544         WERROR spoolss_3b(
545         );
546
547         /******************/
548         /* Function: 0x3c */
549         WERROR spoolss_3c(
550         );
551
552         /******************/
553         /* Function: 0x3d */
554         WERROR spoolss_3d(
555         );
556
557         /******************/
558         /* Function: 0x3e */
559         WERROR spoolss_3e(
560         );
561
562         /******************/
563         /* Function: 0x3f */
564         WERROR spoolss_3f(
565         );
566
567         /******************/
568         /* Function: 0x40 */
569         WERROR spoolss_40(
570         );
571
572         /******************/
573         /* Function: 0x41 */
574         WERROR spoolss_41(
575         );
576
577         /******************/
578         /* Function: 0x42 */
579         WERROR spoolss_42(
580         );
581
582         /******************/
583         /* Function: 0x43 */
584         WERROR spoolss_43(
585         );
586
587         /******************/
588         /* Function: 0x44 */
589         WERROR spoolss_44(
590         );
591
592         typedef struct {
593                 uint32 foo;
594         } spoolss_Devmode;
595
596         typedef struct {
597                 uint32 size;
598                 spoolss_Devmode *devmode;
599         } spoolss_DevmodeContainer;
600
601         typedef struct {
602                 uint32 size;
603                 unistr *client;
604                 unistr *user;
605                 uint32 build;
606                 uint32 major;
607                 uint32 minor;
608                 uint32 processor;
609         } spoolss_UserLevel1;
610
611         typedef union {
612                 [case(1)]  spoolss_UserLevel1 *level1;
613         } spoolss_UserLevel;
614
615         /******************/
616         /* Function: 0x45 */
617         WERROR spoolss_OpenPrinterEx(
618                 [in]                  unistr *printername,
619                 [in]                  unistr *datatype,
620                 [in]                  spoolss_DevmodeContainer devmode_ctr,
621                 [in]                  uint32 access_required,
622                 [in]                  uint32 level,
623                 [in,switch_is(level)] spoolss_UserLevel userlevel,
624                 [out,ref]             policy_handle *handle
625         );
626
627         /******************/
628         /* Function: 0x46 */
629         WERROR spoolss_46(
630         );
631
632         /******************/
633         /* Function: 0x47 */
634         WERROR spoolss_47(
635         );
636
637         /******************/
638         /* Function: 0x48 */
639         WERROR spoolss_EnumPrinterData(
640                 [in,ref] policy_handle *handle,
641                 [in]     uint32 enum_index,
642                 [in]     uint32 value_offered,
643                 [out]    lstring value_name,
644                 [out]    uint32 value_needed,
645                 [out]    uint32 printerdata_type,
646                 [out]    DATA_BLOB data,
647                 [in,out,ref] uint32 *data_size
648         );
649
650         /******************/
651         /* Function: 0x49 */
652         WERROR spoolss_DeletePrinterData(
653                 [in,ref] policy_handle *handle,
654                 [in] unistr value_name
655         );
656
657         /******************/
658         /* Function: 0x4a */
659         WERROR spoolss_4a(
660         );
661
662         /******************/
663         /* Function: 0x4b */
664         WERROR spoolss_4b(
665         );
666
667         /******************/
668         /* Function: 0x4c */
669         WERROR spoolss_4c(
670         );
671
672         /******************/
673         /* Function: 0x4d */
674         WERROR spoolss_4d(
675         );
676
677         /******************/
678         /* Function: 0x4e */
679         WERROR spoolss_4e(
680         );
681
682         /******************/
683         /* Function: 0x4f */
684         WERROR spoolss_4f(
685         );
686
687         /******************/
688         /* Function: 0x50 */
689         WERROR spoolss_50(
690         );
691
692         /******************/
693         /* Function: 0x51 */
694         WERROR spoolss_51(
695         );
696
697         /******************/
698         /* Function: 0x52 */
699         WERROR spoolss_52(
700         );
701
702         /******************/
703         /* Function: 0x53 */
704         WERROR spoolss_53(
705         );
706
707         /******************/
708         /* Function: 0x54 */
709         WERROR spoolss_54(
710         );
711
712         /******************/
713         /* Function: 0x55 */
714         WERROR spoolss_55(
715         );
716
717         /******************/
718         /* Function: 0x56 */
719         WERROR spoolss_56(
720         );
721
722         /******************/
723         /* Function: 0x57 */
724         WERROR spoolss_57(
725         );
726
727         /******************/
728         /* Function: 0x58 */
729         WERROR spoolss_58(
730         );
731
732         /******************/
733         /* Function: 0x59 */
734         WERROR spoolss_59(
735         );
736
737         /******************/
738         /* Function: 0x5a */
739         WERROR spoolss_5a(
740         );
741
742         /******************/
743         /* Function: 0x5b */
744         WERROR spoolss_5b(
745         );
746
747         /******************/
748         /* Function: 0x5c */
749         WERROR spoolss_5c(
750         );
751
752         /******************/
753         /* Function: 0x5d */
754         WERROR spoolss_5d(
755         );
756
757         /******************/
758         /* Function: 0x5e */
759         WERROR spoolss_5e(
760         );
761
762         /******************/
763         /* Function: 0x5f */
764         WERROR spoolss_5f(
765         );
766 }