r1206: Give the spoolss pipe an endpoint.
[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   endpoints(spoolss),
10   pointer_default(unique)
11 ] interface spoolss
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 [public] struct {
52                 uint32 flags;
53                 [relative] nstring *name;
54                 [relative] nstring *description;
55                 [relative] nstring *comment;
56         } spoolss_PrinterInfo1;
57
58         typedef struct {
59                 uint32 flags;
60                 [relative] nstring *name;
61                 uint32 width;
62                 uint32 length;
63                 uint32 left;
64                 uint32 top;
65                 uint32 right;
66                 uint32 bottom;
67         } spoolss_FormInfo1;
68
69         typedef struct {
70                 [relative] nstring *servername;
71                 [relative] nstring *printername;
72                 [relative] nstring *sharename;
73                 [relative] nstring *portname;
74                 [relative] nstring *drivername;
75                 [relative] nstring *comment;
76                 [relative] nstring *location;
77                 [relative] spoolss_DeviceMode *devmode;
78                 [relative] nstring *sepfile;
79                 [relative] nstring *printprocessor;
80                 [relative] nstring *datatype;
81                 [relative] nstring *parameters;
82                 [relative] security_descriptor *secdesc;
83                 uint32 attributes;
84                 uint32 priority;
85                 uint32 defaultpriority;
86                 uint32 starttime;
87                 uint32 untiltime;
88                 uint32 status;
89                 uint32 cjobs;
90                 uint32 averageppm;
91         } spoolss_PrinterInfo2;
92
93         typedef struct {
94                 uint32 flags;
95                 security_descriptor secdesc;
96         } spoolss_PrinterInfo3;
97
98         typedef struct {
99                 [relative] nstring *printername;
100                 [relative] nstring *servername;
101                 uint32 attributes;
102         } spoolss_PrinterInfo4;
103
104         typedef struct {
105                 [relative] nstring *printername;
106                 [relative] nstring *portname;
107                 uint32 attributes;
108                 uint32 device_not_selected_timeout;
109                 uint32 transmission_retry_timeout;
110         } spoolss_PrinterInfo5;
111
112         typedef struct {
113                 uint32 unknown;
114         } spoolss_PrinterInfo6;
115
116         typedef struct {
117                 [relative] nstring *guid; /* text form of printer guid */
118                 uint32 action;
119         } spoolss_PrinterInfo7;
120
121         typedef [nodiscriminant,public] union {
122                 [case(1)] spoolss_PrinterInfo1 info1;
123                 [case(2)] spoolss_PrinterInfo2 info2;
124                 [case(3)] spoolss_PrinterInfo3 info3;
125                 [case(4)] spoolss_PrinterInfo4 info4;
126                 [case(5)] spoolss_PrinterInfo5 info5;
127                 [case(6)] spoolss_PrinterInfo6 info6;
128                 [case(7)] spoolss_PrinterInfo7 info7;
129         } spoolss_PrinterInfo;
130
131         /******************/
132         /* Function: 0x00 */
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_AddPrinter(
218                 /* This function is not implemented in Samba 3 as no
219                    clients have been observed using it. */
220         );
221
222         /******************/
223         /* Function: 0x06 */
224         WERROR spoolss_DeletePrinter(
225         );
226
227         /******************/
228         /* Function: 0x07 */
229         WERROR spoolss_SetPrinter(
230         );
231
232         /******************/
233         /* Function: 0x08 */
234         WERROR spoolss_GetPrinter(
235                 [in,ref]     policy_handle *handle,
236                 [in]         uint32 level,
237                 [in]         DATA_BLOB *buffer,
238                 [out,subcontext(4),switch_is(level)] spoolss_PrinterInfo *info,
239                 [in,out,ref] uint32 *buf_size
240         );
241
242         /******************/
243         /* Function: 0x09 */
244         WERROR spoolss_AddPrinterDriver(
245         );
246
247         typedef struct {
248                 [relative] nstring *driver_name;
249         } spoolss_DriverInfo1;
250
251         typedef struct {
252                 uint32 version;
253                 [relative] nstring *driver_name;
254                 [relative] nstring *architecture;
255                 [relative] nstring *driver_path;
256                 [relative] nstring *data_file;
257                 [relative] nstring *config_file;
258         } spoolss_DriverInfo2;
259
260         typedef struct {
261                 uint32 version;
262                 [relative] nstring *driver_name;
263                 [relative] nstring *architecture;
264                 [relative] nstring *driver_path;
265                 [relative] nstring *data_file;
266                 [relative] nstring *config_file;
267                 [relative] nstring *help_file;
268                 [relative] nstring *dependent_files; /* array */
269                 [relative] nstring *monitor_name;
270                 [relative] nstring *default_datatype;
271         } spoolss_DriverInfo3;
272
273         typedef [nodiscriminant,public] union {
274                 [case(1)] spoolss_DriverInfo1 info1;
275                 [case(2)] spoolss_DriverInfo2 info2;
276                 [case(3)] spoolss_DriverInfo3 info3;
277         } spoolss_DriverInfo;
278
279         /******************/
280         /* Function: 0x0a */
281         WERROR spoolss_EnumPrinterDrivers(
282                 [in] unistr *server,
283                 [in] unistr *environment,
284                 [in] uint32 level,
285                 [in,out] DATA_BLOB *buffer,
286                 [in,out,ref] uint32 *buf_size,
287                 [out] uint32 count
288         );
289
290         /******************/
291         /* Function: 0x0b */
292         WERROR spoolss_GetPrinterDriver(
293         );
294
295         /******************/
296         /* Function: 0x0c */
297         WERROR spoolss_GetPrinterDriverDirectory(
298         );
299
300         /******************/
301         /* Function: 0x0d */
302         WERROR spoolss_DeletePrinterDriver(
303                 [in,ref] policy_handle *handle,
304                 [in] unistr *server,
305                 [in] unistr architecture,
306                 [in] unistr driver
307         );
308
309         /******************/
310         /* Function: 0x0e */
311         WERROR spoolss_AddPrintProcessor(
312         );
313
314         /******************/
315         /* Function: 0x0f */
316         WERROR spoolss_EnumPrintProcessors(
317         );
318
319         /******************/
320         /* Function: 0x10 */
321         WERROR spoolss_GetPrintProcessorDirectory(
322         );
323
324         /******************/
325         /* Function: 0x11 */
326         WERROR spoolss_StartDocPrinter(
327         );
328
329         /******************/
330         /* Function: 0x12 */
331         WERROR spoolss_StartPagePrinter(
332                 [in,ref] policy_handle *handle          
333         );
334
335         /******************/
336         /* Function: 0x13 */
337         WERROR spoolss_WritePrinter(
338         );
339
340         /******************/
341         /* Function: 0x14 */
342         WERROR spoolss_EndPagePrinter(
343                 [in,ref] policy_handle *handle          
344         );
345
346         /******************/
347         /* Function: 0x15 */
348         WERROR spoolss_AbortPrinter(
349         );
350
351         /******************/
352         /* Function: 0x16 */
353         WERROR spoolss_ReadPrinter(
354         );
355
356         /******************/
357         /* Function: 0x17 */
358         WERROR spoolss_EndDocPrinter(
359         );
360
361         /******************/
362         /* Function: 0x18 */
363         WERROR spoolss_AddJob(
364         );
365
366         /******************/
367         /* Function: 0x19 */
368         WERROR spoolss_ScheduleJob(
369         );
370
371         /******************/
372         /* Function: 0x1a */
373         WERROR spoolss_GetPrinterData(
374                 [in,ref] policy_handle *handle,
375                 [in] unistr value_name,
376                 [out] uint32 type,
377                 [out] DATA_BLOB buffer,
378                 [in,out,ref] uint32 *buf_size
379         );
380
381         /******************/
382         /* Function: 0x1b */
383         WERROR spoolss_SetPrinterData(  
384                 [in,ref] policy_handle *handle,
385                 [in] unistr value_name,
386                 [in] uint32 type,
387                 [in] DATA_BLOB buffer,
388                 [in] uint32 real_len
389         );
390
391         /******************/
392         /* Function: 0x1c */
393         WERROR spoolss_WaitForPrinterChange(
394         );
395
396         /******************/
397         /* Function: 0x1d */
398         WERROR spoolss_ClosePrinter(
399                 [in,out,ref]     policy_handle *handle
400         );
401
402         typedef struct {
403                 uint32 flags;
404                 [relative] unistr *name;
405                 uint32 width;
406                 uint32 length;
407                 uint32 left;
408                 uint32 top;
409                 uint32 right;
410                 uint32 bottom;
411         } spoolss_AddFormInfo1;
412
413         typedef union {
414                 [case(1)] spoolss_AddFormInfo1 *info1;
415         } spoolss_AddFormInfo;
416
417         /******************/
418         /* Function: 0x1e */
419         WERROR spoolss_AddForm(
420                 [in,ref] policy_handle *handle,
421                 [in] uint32 level,
422                 [in,switch_is(level)] spoolss_AddFormInfo info
423         );
424
425         /******************/
426         /* Function: 0x1f */
427         WERROR spoolss_DeleteForm(
428                 [in,ref] policy_handle *handle,
429                 [in] unistr formname
430         );
431
432         /******************/
433         /* Function: 0x20 */
434         WERROR spoolss_GetForm(
435                 [in,ref] policy_handle *handle,
436                 [in] unistr formname,
437                 [in] uint32 level,
438                 [in] DATA_BLOB *buffer,
439                 [out,subcontext(4),switch_is(level)] spoolss_FormInfo *info,
440                 [in,out,ref] uint32 *buf_size
441         );
442
443         /******************/
444         /* Function: 0x21 */
445         WERROR spoolss_SetForm(
446                 [in,ref] policy_handle *handle,
447                 [in] unistr form_name,
448                 [in] uint32 level,
449                 [in,switch_is(level)] spoolss_AddFormInfo info
450         );
451
452         typedef [nodiscriminant,public] union {
453                 [case(1)] spoolss_FormInfo1 info1;
454         } spoolss_FormInfo;
455
456         /******************/
457         /* Function: 0x22 */
458         WERROR spoolss_EnumForms(
459                 [in,ref] policy_handle *handle,
460                 [in] uint32 level,
461                 [in,out] DATA_BLOB *buffer,
462                 [in,out,ref] uint32 *buf_size,
463                 [out] uint32 count
464         );
465
466         /******************/
467         /* Function: 0x23 */
468         WERROR spoolss_EnumPorts(
469         );
470
471         /******************/
472         /* Function: 0x24 */
473         WERROR spoolss_EnumMonitors(
474         );
475
476         /******************/
477         /* Function: 0x25 */
478         WERROR spoolss_AddPort(
479         );
480
481         /******************/
482         /* Function: 0x26 */
483         WERROR spoolss_ConfigurePort(
484         );
485
486         /******************/
487         /* Function: 0x27 */
488         WERROR spoolss_DeletePort(
489         );
490
491         /******************/
492         /* Function: 0x28 */
493         WERROR spoolss_CreatePrinterIC(
494         );
495
496         /******************/
497         /* Function: 0x29 */
498         WERROR spoolss_PlayGDIScriptOnPrinterIC(
499         );
500
501         /******************/
502         /* Function: 0x2a */
503         WERROR spoolss_DeletePrinterIC(
504         );
505
506         /******************/
507         /* Function: 0x2b */
508         WERROR spoolss_AddPrinterConnection(
509         );
510
511         /******************/
512         /* Function: 0x2c */
513         WERROR spoolss_DeletePrinterConnection(
514         );
515
516         /******************/
517         /* Function: 0x2d */
518         WERROR spoolss_PrinterMessageBox(
519                 /* Marked as obsolete in MSDN.  "Not necessary and has
520                    no effect". */
521         );
522
523         /******************/
524         /* Function: 0x2e */
525         WERROR spoolss_AddMonitor(
526         );
527
528         /******************/
529         /* Function: 0x2f */
530         WERROR spoolss_DeleteMonitor(
531         );
532
533         /******************/
534         /* Function: 0x30 */
535         WERROR spoolss_DeletePrintProcessor(
536         );
537
538         /******************/
539         /* Function: 0x31 */
540         WERROR spoolss_AddPrintProvidor(
541         );
542
543         /******************/
544         /* Function: 0x32 */
545         WERROR spoolss_DeletePrintProvidor(
546         );
547
548         /******************/
549         /* Function: 0x33 */
550         WERROR spoolss_EnumPrintProcDataTypes(
551         );
552
553         /******************/
554         /* Function: 0x34 */
555         WERROR spoolss_ResetPrinter(
556         );
557
558         /******************/
559         /* Function: 0x35 */
560         WERROR spoolss_GetPrinterDriver2(
561                 [in,ref] policy_handle *handle,
562                 [in] unistr *architecture,
563                 [in] uint32 level,
564                 [in,out] DATA_BLOB *buffer,
565                 [in,out,ref] uint32 *buf_size,
566                 [in] uint32 client_major_version,
567                 [in] uint32 client_minor_version,
568                 [out] uint32 server_major_version,
569                 [out] uint32 server_minor_version
570         );
571
572         /******************/
573         /* Function: 0x36 */
574         WERROR spoolss_FindFirstPrinterChangeNotification(
575         );
576
577         /******************/
578         /* Function: 0x37 */
579         WERROR spoolss_FindNextPrinterChangeNotification(
580         );
581
582         /******************/
583         /* Function: 0x38 */
584         WERROR spoolss_FindClosePrinterNotify(
585         );
586
587         /******************/
588         /* Function: 0x39 */
589         WERROR spoolss_RouterFindFirstPrinterChangeNotificationOld(
590         );
591
592         /******************/
593         /* Function: 0x3a */
594         WERROR spoolss_ReplyOpenPrinter(
595         );
596
597         /******************/
598         /* Function: 0x3b */
599         WERROR spoolss_RouterReplyPrinter(
600         );
601
602         /******************/
603         /* Function: 0x3c */
604         WERROR spoolss_ReplyClosePrinter(
605         );
606
607         /******************/
608         /* Function: 0x3d */
609         WERROR spoolss_AddPortEx(
610         );
611
612         /******************/
613         /* Function: 0x3e */
614         WERROR spoolss_RouterFindFirstPrinterChangeNotification(
615         );
616
617         /******************/
618         /* Function: 0x3f */
619         WERROR spoolss_SpoolerInit(
620         );
621
622         /******************/
623         /* Function: 0x40 */
624         WERROR spoolss_ResetPrinterEx(
625         );
626
627         /******************/
628         /* Function: 0x41 */
629         WERROR spoolss_RemoteFindFirstPrinterChangeNotifyEx(
630         );
631
632         /******************/
633         /* Function: 0x42 */
634         WERROR spoolss_RouterRefreshPrinterChangeNotification(
635         );
636
637         /******************/
638         /* Function: 0x43 */
639         WERROR spoolss_RemoteFindNextPrinterChangeNotifyEx(
640         );
641
642         /******************/
643         /* Function: 0x44 */
644         WERROR spoolss_44(
645         );
646
647         typedef struct {
648                 uint32 foo;
649         } spoolss_Devmode;
650
651         typedef struct {
652                 uint32 size;
653                 spoolss_Devmode *devmode;
654         } spoolss_DevmodeContainer;
655
656         typedef struct {
657                 uint32 size;
658                 unistr *client;
659                 unistr *user;
660                 uint32 build;
661                 uint32 major;
662                 uint32 minor;
663                 uint32 processor;
664         } spoolss_UserLevel1;
665
666         typedef union {
667                 [case(1)]  spoolss_UserLevel1 *level1;
668         } spoolss_UserLevel;
669
670         /******************/
671         /* Function: 0x45 */
672         WERROR spoolss_OpenPrinterEx(
673                 [in]                  unistr *printername,
674                 [in]                  unistr *datatype,
675                 [in]                  spoolss_DevmodeContainer devmode_ctr,
676                 [in]                  uint32 access_required,
677                 [in]                  uint32 level,
678                 [in,switch_is(level)] spoolss_UserLevel userlevel,
679                 [out,ref]             policy_handle *handle
680         );
681
682         /******************/
683         /* Function: 0x46 */
684         WERROR spoolss_AddPrinterEx(
685                 [in] unistr *server,
686                 [in] uint32 level,
687                 [in,switch_is(level)] spoolss_PrinterInfo *info,
688                 [in] spoolss_DevmodeContainer devmode_ctr,
689                 [in] security_descriptor *secdesc,
690                 [in] uint32 ulevel,
691                 [in,switch_is(ulevel)] spoolss_UserLevel userlevel
692         );
693
694         /******************/
695         /* Function: 0x47 */
696         WERROR spoolss_47(
697         );
698
699         /******************/
700         /* Function: 0x48 */
701         WERROR spoolss_EnumPrinterData(
702                 [in,ref] policy_handle *handle,
703                 [in]     uint32 enum_index,
704                 [in]     uint32 value_offered,
705                 [out]    lstring value_name,
706                 [out]    uint32 value_needed,
707                 [out]    uint32 printerdata_type,
708                 [out]    DATA_BLOB data,
709                 [in,out,ref] uint32 *data_size
710         );
711
712         /******************/
713         /* Function: 0x49 */
714         WERROR spoolss_DeletePrinterData(
715                 [in,ref] policy_handle *handle,
716                 [in] unistr value_name
717         );
718
719         /******************/
720         /* Function: 0x4a */
721         WERROR spoolss_4a(
722         );
723
724         /******************/
725         /* Function: 0x4b */
726         WERROR spoolss_4b(
727         );
728
729         /******************/
730         /* Function: 0x4c */
731         WERROR spoolss_4c(
732         );
733
734         /******************/
735         /* Function: 0x4d */
736         WERROR spoolss_SetPrinterDataEx(
737                 [in,ref] policy_handle *handle,
738                 [in] unistr key_name,
739                 [in] unistr value_name,
740                 [in] uint32 type,
741                 [in] DATA_BLOB buffer,
742                 [in,out,ref] uint32 *buf_size
743         );
744
745         /******************/
746         /* Function: 0x4e */
747         WERROR spoolss_GetPrinterDataEx(
748                 [in,ref] policy_handle *handle,
749                 [in] unistr key_name,
750                 [in] unistr value_name,
751                 [out] uint32 type,
752                 [out] DATA_BLOB buffer,
753                 [in,out,ref] uint32 *buf_size
754         );
755
756         /******************/
757         /* Function: 0x4f */
758         WERROR spoolss_EnumPrinterDataEx(
759                 [in,ref] policy_handle *handle
760         );
761
762         /******************/
763         /* Function: 0x50 */
764         WERROR spoolss_EnumPrinterKey(
765         );
766
767         /******************/
768         /* Function: 0x51 */
769         WERROR spoolss_DeletePrinterDataEx(
770                 [in,ref] policy_handle *handle,
771                 [in] unistr key_name,
772                 [in] unistr value_name
773         );
774
775         /******************/
776         /* Function: 0x52 */
777         WERROR spoolss_DeletePrinterKey(
778         );
779
780         /******************/
781         /* Function: 0x53 */
782         WERROR spoolss_53(
783         );
784
785         /******************/
786         /* Function: 0x54 */
787         WERROR spoolss_DeletePrinterDriverEx(
788         );
789
790         /******************/
791         /* Function: 0x55 */
792         WERROR spoolss_55(
793         );
794
795         /******************/
796         /* Function: 0x56 */
797         WERROR spoolss_56(
798         );
799
800         /******************/
801         /* Function: 0x57 */
802         WERROR spoolss_57(
803         );
804
805         /******************/
806         /* Function: 0x58 */
807         WERROR spoolss_58(
808         );
809
810         /******************/
811         /* Function: 0x59 */
812         WERROR spoolss_AddPrinterDriverEx(
813         );
814
815         /******************/
816         /* Function: 0x5a */
817         WERROR spoolss_5a(
818         );
819
820         /******************/
821         /* Function: 0x5b */
822         WERROR spoolss_5b(
823         );
824
825         /******************/
826         /* Function: 0x5c */
827         WERROR spoolss_5c(
828         );
829
830         /******************/
831         /* Function: 0x5d */
832         WERROR spoolss_5d(
833         );
834
835         /******************/
836         /* Function: 0x5e */
837         WERROR spoolss_5e(
838         );
839
840         /******************/
841         /* Function: 0x5f */
842         WERROR spoolss_5f(
843         );
844 }