r5554: Constants and untested IDL for spoolss_SetPrinter()
[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   endpoint("ncacn_np:[\\pipe\\spoolss]"),
10   pointer_default(unique),
11   helpstring("Spooler SubSystem"),
12   depends(security)
13 ] interface spoolss
14 {
15         typedef struct {
16                 uint16 year;
17                 uint16 month;
18                 uint16 day_of_week;
19                 uint16 day;
20                 uint16 hour;
21                 uint16 minute;
22                 uint16 second;
23                 uint16 millisecond;
24         } spoolss_Time;
25
26         typedef struct {
27                 [relative] nstring *printername;
28                 [relative] nstring *servername;
29                 uint32 cjobs;
30                 uint32 total_jobs;
31                 uint32 total_bytes;
32                 spoolss_Time time;              
33                 uint32 global_counter;
34                 uint32 total_pages;
35                 uint32 version;
36                 uint32 unknown10;
37                 uint32 unknown11;
38                 uint32 unknown12;
39                 uint32 session_counter;
40                 uint32 unknown14;
41                 uint32 printer_errors;
42                 uint32 unknown16;
43                 uint32 unknown17;
44                 uint32 unknown18;
45                 uint32 unknown19;
46                 uint32 change_id;
47                 uint32 unknown21;
48                 uint32 status;
49                 uint32 unknown23;
50                 uint32 c_setprinter;
51                 uint16 unknown25;
52                 uint16 unknown26;
53                 uint32 unknown27;
54                 uint32 unknown28;
55                 uint32 unknown29;
56         } spoolss_PrinterInfo0;
57
58         typedef struct {
59                 string32 devicename;
60                 uint16 specversion;
61                 uint16 driverversion;
62                 uint16 size;
63                 uint16 driverextra;
64                 uint32 fields;
65                 uint16 orientation;
66                 uint16 papersize;
67                 uint16 paperlength;
68                 uint16 paperwidth;
69                 uint16 scale;
70                 uint16 copies;
71                 uint16 defaultsource;
72                 uint16 printquality;
73                 uint16 color;
74                 uint16 duplex;
75                 uint16 yresolution;
76                 uint16 ttoption;
77                 uint16 collate;
78                 string32 formname;
79                 uint16 logpixels;
80                 uint32 bitsperpel;
81                 uint32 pelswidth;
82                 uint32 pelsheight;
83                 uint32 displayflags;
84                 uint32 displayfrequency;
85                 uint32 icmmethod;
86                 uint32 icmintent;
87                 uint32 mediatype;
88                 uint32 dithertype;
89                 uint32 reserved1;
90                 uint32 reserved2;
91                 uint32 panningwidth;
92                 uint32 panningheight;
93                 uint8  private[driverextra];
94         } spoolss_DeviceMode;
95
96         typedef bitmap {
97                 PRINTER_ENUM_DEFAULT     = 0x00000001,
98                 PRINTER_ENUM_LOCAL       = 0x00000002,
99                 PRINTER_ENUM_CONNECTIONS = 0x00000004,
100                 PRINTER_ENUM_FAVORITE    = 0x00000004,
101                 PRINTER_ENUM_NAME        = 0x00000008,
102                 PRINTER_ENUM_REMOTE      = 0x00000010,
103                 PRINTER_ENUM_SHARED      = 0x00000020,
104                 PRINTER_ENUM_NETWORK     = 0x00000040,
105                 PRINTER_ENUM_EXPAND      = 0x00004000,
106                 PRINTER_ENUM_CONTAINER   = 0x00008000,
107                 PRINTER_ENUM_ICON1       = 0x00010000,
108                 PRINTER_ENUM_ICON2       = 0x00020000,
109                 PRINTER_ENUM_ICON3       = 0x00040000,
110                 PRINTER_ENUM_ICON4       = 0x00080000,
111                 PRINTER_ENUM_ICON5       = 0x00100000,
112                 PRINTER_ENUM_ICON6       = 0x00200000,
113                 PRINTER_ENUM_ICON7       = 0x00400000,
114                 PRINTER_ENUM_ICON8       = 0x00800000,
115                 PRINTER_ENUM_HIDE        = 0x01000000
116         } spoolss_EnumPrinterFlags;
117
118         typedef struct {
119                 spoolss_EnumPrinterFlags flags;
120                 [relative] nstring *name;
121                 [relative] nstring *description;
122                 [relative] nstring *comment;
123         } spoolss_PrinterInfo1;
124
125         typedef bitmap {
126                 PRINTER_ATTRIBUTE_QUEUED                = 0x00000001,
127                 PRINTER_ATTRIBUTE_DIRECT                = 0x00000002,
128                 PRINTER_ATTRIBUTE_DEFAULT               = 0x00000004,
129                 PRINTER_ATTRIBUTE_SHARED                = 0x00000008,
130                 PRINTER_ATTRIBUTE_NETWORK               = 0x00000010,
131                 PRINTER_ATTRIBUTE_HIDDEN                = 0x00000020,
132                 PRINTER_ATTRIBUTE_LOCAL                 = 0x00000040,
133                 PRINTER_ATTRIBUTE_ENABLE_DEVQ           = 0x00000080,
134                 PRINTER_ATTRIBUTE_KEEPPRINTEDJOBS       = 0x00000100,
135                 PRINTER_ATTRIBUTE_DO_COMPLETE_FIRST     = 0x00000200,
136                 PRINTER_ATTRIBUTE_WORK_OFFLINE          = 0x00000400,
137                 PRINTER_ATTRIBUTE_ENABLE_BIDI           = 0x00000800,
138                 PRINTER_ATTRIBUTE_RAW_ONLY              = 0x00001000,
139                 PRINTER_ATTRIBUTE_PUBLISHED             = 0x00002000,
140                 PRINTER_ATTRIBUTE_FAX                   = 0x00004000,
141                 PRINTER_ATTRIBUTE_TS                    = 0x00008000
142         } spoolss_PrinterAttributes;
143
144         typedef bitmap {
145                 PRINTER_STATUS_PAUSED           = 0x00000001,
146                 PRINTER_STATUS_ERROR            = 0x00000002,
147                 PRINTER_STATUS_PENDING_DELETION = 0x00000004,
148                 PRINTER_STATUS_PAPER_JAM        = 0x00000008,
149                 PRINTER_STATUS_PAPER_OUT        = 0x00000010,
150                 PRINTER_STATUS_MANUAL_FEED      = 0x00000020,
151                 PRINTER_STATUS_PAPER_PROBLEM    = 0x00000040,
152                 PRINTER_STATUS_OFFLINE          = 0x00000080,
153                 PRINTER_STATUS_IO_ACTIVE        = 0x00000100,
154                 PRINTER_STATUS_BUSY             = 0x00000200,
155                 PRINTER_STATUS_PRINTING         = 0x00000400,
156                 PRINTER_STATUS_OUTPUT_BIN_FULL  = 0x00000800,
157                 PRINTER_STATUS_NOT_AVAILABLE    = 0x00001000,
158                 PRINTER_STATUS_WAITING          = 0x00002000,
159                 PRINTER_STATUS_PROCESSING       = 0x00004000,
160                 PRINTER_STATUS_INITIALIZING     = 0x00008000,
161                 PRINTER_STATUS_WARMING_UP       = 0x00010000,
162                 PRINTER_STATUS_TONER_LOW        = 0x00020000,
163                 PRINTER_STATUS_NO_TONER         = 0x00040000,
164                 PRINTER_STATUS_PAGE_PUNT        = 0x00080000,
165                 PRINTER_STATUS_USER_INTERVENTION= 0x00100000,
166                 PRINTER_STATUS_OUT_OF_MEMORY    = 0x00200000,
167                 PRINTER_STATUS_DOOR_OPEN        = 0x00400000,
168                 PRINTER_STATUS_SERVER_UNKNOWN   = 0x00800000,
169                 PRINTER_STATUS_POWER_SAVE       = 0x01000000
170         } spoolss_PrinterStatus;
171
172         typedef struct {
173                 [relative] nstring *servername;
174                 [relative] nstring *printername;
175                 [relative] nstring *sharename;
176                 [relative] nstring *portname;
177                 [relative] nstring *drivername;
178                 [relative] nstring *comment;
179                 [relative] nstring *location;
180                 [relative] spoolss_DeviceMode *devmode;
181                 [relative] nstring *sepfile;
182                 [relative] nstring *printprocessor;
183                 [relative] nstring *datatype;
184                 [relative] nstring *parameters;
185                 [relative,subcontext(0)] security_descriptor *secdesc;
186                 spoolss_PrinterAttributes attributes;
187                 uint32 priority;
188                 uint32 defaultpriority;
189                 uint32 starttime;
190                 uint32 untiltime;
191                 spoolss_PrinterStatus status;
192                 uint32 cjobs;
193                 uint32 averageppm;
194         } spoolss_PrinterInfo2;
195
196         typedef struct {
197                 [relative,subcontext(0)] security_descriptor *secdesc;
198         } spoolss_PrinterInfo3;
199
200         typedef struct {
201                 [relative] nstring *printername;
202                 [relative] nstring *servername;
203                 spoolss_PrinterAttributes attributes;
204         } spoolss_PrinterInfo4;
205
206         typedef struct {
207                 [relative] nstring *printername;
208                 [relative] nstring *portname;
209                 spoolss_PrinterAttributes attributes;
210                 uint32 device_not_selected_timeout;
211                 uint32 transmission_retry_timeout;
212         } spoolss_PrinterInfo5;
213
214         typedef struct {
215                 spoolss_PrinterStatus status;
216         } spoolss_PrinterInfo6;
217
218         typedef bitmap {
219                 DSPRINT_PUBLISH         = 0x00000001,
220                 DSPRINT_UPDATE          = 0x00000002,
221                 DSPRINT_UNPUBLISH       = 0x00000004,
222                 DSPRINT_REPUBLISH       = 0x00000008,
223                 DSPRINT_PENDING         = 0x80000000
224         } spoolss_DsPrintAction;
225
226         typedef struct {
227                 [relative] nstring *guid; /* text form of printer guid */
228                 spoolss_DsPrintAction action;
229         } spoolss_PrinterInfo7;
230
231         typedef struct {
232                 [relative] spoolss_DeviceMode *devmode;
233         } spoolss_DeviceModeInfo;
234
235         typedef [nodiscriminant,public] union {
236                 [case(0)] spoolss_PrinterInfo0 info0;
237                 [case(1)] spoolss_PrinterInfo1 info1;
238                 [case(2)] spoolss_PrinterInfo2 info2;
239                 [case(3)] spoolss_PrinterInfo3 info3;
240                 [case(4)] spoolss_PrinterInfo4 info4;
241                 [case(5)] spoolss_PrinterInfo5 info5;
242                 [case(6)] spoolss_PrinterInfo6 info6;
243                 [case(7)] spoolss_PrinterInfo7 info7;
244                 [case(8)] spoolss_DeviceModeInfo info8;
245                 [case(9)] spoolss_DeviceModeInfo info9;
246         } spoolss_PrinterInfo;
247
248         /******************/
249         /* Function: 0x00 */
250         [noprint,nopull,nopush] WERROR spoolss_EnumPrinters(
251                 [in] spoolss_EnumPrinterFlags flags,
252                 [in] unistr *server,
253                 [in] uint32 level,
254                 [in] DATA_BLOB *buffer,
255                 /* [out,subcontext(4),switch_is(level)] spoolss_PrinterInfo *info[count],*/
256                 [out,subcontext(4),switch_is(level)] spoolss_PrinterInfo **info,
257                 [in,out,ref] uint32 *buf_size,
258                 [out] uint32 count
259         );
260
261         /******************/
262         /* Function: 0x01 */
263         typedef struct {
264                 uint32 foo;
265         } spoolss_Devmode;
266
267         typedef struct {
268                 uint32 size;
269                 spoolss_Devmode *devmode;
270         } spoolss_DevmodeContainer;
271
272         WERROR spoolss_OpenPrinter(
273                 [in] unistr *printername,
274                 [in] unistr *datatype,
275                 [in] spoolss_DevmodeContainer devmode_ctr,
276                 [in] uint32 access_mask,
277                 [out,ref] policy_handle *handle
278         );
279
280         /******************/
281         /* Function: 0x02 */
282         WERROR spoolss_SetJob(
283                 [in,ref] policy_handle *handle,
284                 [in] uint32 job_id,
285                 [in] uint32 level,
286                 [in] uint32 command
287         );
288
289         /******************/
290         /* Function: 0x03 */
291         WERROR spoolss_GetJob(
292                 [in,ref] policy_handle *handle,
293                 [in] uint32 job_id,
294                 [in] uint32 level,
295                 [in] DATA_BLOB *buffer,
296                 [out,subcontext(4),switch_is(level)] spoolss_JobInfo *info,
297                 [in,out,ref] uint32 *buf_size
298         );
299
300         typedef struct {
301                 uint32 job_id;
302                 [relative] nstring *printer_name;
303                 [relative] nstring *server_name;
304                 [relative] nstring *user_name;
305                 [relative] nstring *document_name;
306                 [relative] nstring *data_type;
307                 [relative] nstring *text_status;
308                 uint32 status;
309                 uint32 priority;
310                 uint32 position;
311                 uint32 total_pages;
312                 uint32 pages_printed;
313                 spoolss_Time time;
314         } spoolss_JobInfo1;
315
316         typedef [nodiscriminant,public] union {
317                 [case(1)] spoolss_JobInfo1 info1;
318         } spoolss_JobInfo;
319
320         /******************/
321         /* Function: 0x04 */
322         [noprint,nopull,nopush] WERROR spoolss_EnumJobs(
323                 [in,ref] policy_handle *handle,
324                 [in]     uint32 firstjob,
325                 [in]     uint32 numjobs,
326                 [in]     uint32 level,
327                 [in]     DATA_BLOB *buffer,
328                 /* [out,subcontext(4),switch_is(level)] spoolss_JobInfo *info[count],*/
329                 [out,subcontext(4),switch_is(level)] spoolss_JobInfo **info,
330                 [in,out,ref] uint32 *buf_size,
331                 [out]    uint32 count
332         );
333
334         /******************/
335         /* Function: 0x05 */
336         WERROR spoolss_AddPrinter(
337                 /* This function is not implemented in Samba 3 as no
338                    clients have been observed using it. */
339         );
340
341         /******************/
342         /* Function: 0x06 */
343         WERROR spoolss_DeletePrinter(
344         );
345
346         typedef [v1_enum] enum {
347                 SPOOLSS_PRINTER_CONTROL_UNPAUSE    = 0,
348                 SPOOLSS_PRINTER_CONTROL_PAUSE      = 1,
349                 SPOOLSS_PRINTER_CONTROL_RESUME     = 2,
350                 SPOOLSS_PRINTER_CONTROL_PURGE      = 3,
351                 SPOOLSS_PRINTER_CONTROL_SET_STATUS = 4
352         } spoolss_PrinterControl;
353
354         /******************/
355         /* Function: 0x07 */
356         WERROR spoolss_SetPrinter(
357                 [in,ref] policy_handle *handle,
358                 [in]     uint32 level,
359                 [in,subcontext(4),switch_is(level)] spoolss_PrinterInfo *info,
360                 [in]     spoolss_DevmodeContainer devmode_ctr,
361                 [in,relative,subcontext(0)] security_descriptor *secdesc,
362                 [in]     spoolss_PrinterControl command
363         );
364
365         /******************/
366         /* Function: 0x08 */
367         WERROR spoolss_GetPrinter(
368                 [in,ref]     policy_handle *handle,
369                 [in]         uint32 level,
370                 [in]         DATA_BLOB *buffer,
371                 [out,subcontext(4),switch_is(level)] spoolss_PrinterInfo *info,
372                 [in,out,ref] uint32 *buf_size
373         );
374
375         /******************/
376         /* Function: 0x09 */
377         WERROR spoolss_AddPrinterDriver(
378         );
379
380         typedef struct {
381                 [relative] nstring *driver_name;
382         } spoolss_DriverInfo1;
383
384         typedef [v1_enum] enum {
385                 SPOOLSS_DRIVER_VERSION_9X       = 0,
386                 SPOOLSS_DRIVER_VERSION_NT35     = 1,
387                 SPOOLSS_DRIVER_VERSION_NT4      = 2,
388                 SPOOLSS_DRIVER_VERSION_200X     = 3
389         } spoolss_DriverOSVersion;
390
391         typedef struct {
392                 spoolss_DriverOSVersion version;
393                 [relative] nstring *driver_name;
394                 [relative] nstring *architecture;
395                 [relative] nstring *driver_path;
396                 [relative] nstring *data_file;
397                 [relative] nstring *config_file;
398         } spoolss_DriverInfo2;
399
400         typedef struct {
401                 spoolss_DriverOSVersion version;
402                 [relative] nstring *driver_name;
403                 [relative] nstring *architecture;
404                 [relative] nstring *driver_path;
405                 [relative] nstring *data_file;
406                 [relative] nstring *config_file;
407                 [relative] nstring *help_file;
408                 [relative] nstring *dependent_files; /* array */
409                 [relative] nstring *monitor_name;
410                 [relative] nstring *default_datatype;
411         } spoolss_DriverInfo3;
412
413         typedef struct {
414                 spoolss_DriverOSVersion version;
415                 [relative] nstring *driver_name;
416                 [relative] nstring *architecture;
417                 [relative] nstring *driver_path;
418                 [relative] nstring *data_file;
419                 [relative] nstring *config_file;
420                 [relative] nstring *help_file;
421                 [relative] nstring *dependent_files; /* array */
422                 [relative] nstring *monitor_name;
423                 [relative] nstring *default_datatype;
424                 [relative] nstring *previous_names; /* array */
425         } spoolss_DriverInfo4;
426
427         typedef struct {
428                 spoolss_DriverOSVersion version;
429                 [relative] nstring *driver_name;
430                 [relative] nstring *architecture;
431                 [relative] nstring *driver_path;
432                 [relative] nstring *data_file;
433                 [relative] nstring *config_file;
434                 uint32 driver_attributes;
435                 uint32 config_version;
436                 uint32 driver_version;
437         } spoolss_DriverInfo5;
438
439         typedef struct {
440                 spoolss_DriverOSVersion version;
441                 [relative] nstring *driver_name;
442                 [relative] nstring *architecture;
443                 [relative] nstring *driver_path;
444                 [relative] nstring *data_file;
445                 [relative] nstring *config_file;
446                 [relative] nstring *help_file;
447                 [relative] nstring *dependent_files; /* array */
448                 [relative] nstring *monitor_name;
449                 [relative] nstring *default_datatype;
450                 [relative] nstring *previous_names; /* array */
451                 NTTIME driver_data;
452                 hyper driver_version;
453                 [relative] nstring *manufacturer_name;
454                 [relative] nstring *manufacturer_url;
455                 [relative] nstring *hardware_id;
456                 [relative] nstring *provider;
457         } spoolss_DriverInfo6;
458
459         typedef [nodiscriminant,public] union {
460                 [case(1)] spoolss_DriverInfo1 info1;
461                 [case(2)] spoolss_DriverInfo2 info2;
462                 [case(3)] spoolss_DriverInfo3 info3;
463                 [case(4)] spoolss_DriverInfo4 info4;
464                 [case(5)] spoolss_DriverInfo5 info5;
465                 [case(6)] spoolss_DriverInfo6 info6;
466         } spoolss_DriverInfo;
467
468         /******************/
469         /* Function: 0x0a */
470         [noprint,nopull,nopush] WERROR spoolss_EnumPrinterDrivers(
471                 [in] unistr *server,
472                 [in] unistr *environment,
473                 [in] uint32 level,
474                 [in] DATA_BLOB *buffer,
475                 /* [out,subcontext(4),switch_is(level)] spoolss_DriverInfo *info[count],*/
476                 [out,subcontext(4),switch_is(level)] spoolss_DriverInfo **info,
477                 [in,out,ref] uint32 *buf_size,
478                 [out] uint32 count
479         );
480
481         /******************/
482         /* Function: 0x0b */
483         WERROR spoolss_GetPrinterDriver(
484         );
485
486         /******************/
487         /* Function: 0x0c */
488         WERROR spoolss_GetPrinterDriverDirectory(
489         );
490
491         /******************/
492         /* Function: 0x0d */
493         WERROR spoolss_DeletePrinterDriver(
494                 [in,ref] policy_handle *handle,
495                 [in] unistr *server,
496                 [in] unistr architecture,
497                 [in] unistr driver
498         );
499
500         /******************/
501         /* Function: 0x0e */
502         WERROR spoolss_AddPrintProcessor(
503         );
504
505         /******************/
506         /* Function: 0x0f */
507         WERROR spoolss_EnumPrintProcessors(
508         );
509
510         /******************/
511         /* Function: 0x10 */
512         WERROR spoolss_GetPrintProcessorDirectory(
513         );
514
515         /******************/
516         /* Function: 0x11 */
517         WERROR spoolss_StartDocPrinter(
518         );
519
520         /******************/
521         /* Function: 0x12 */
522         WERROR spoolss_StartPagePrinter(
523                 [in,ref] policy_handle *handle          
524         );
525
526         /******************/
527         /* Function: 0x13 */
528         WERROR spoolss_WritePrinter(
529         );
530
531         /******************/
532         /* Function: 0x14 */
533         WERROR spoolss_EndPagePrinter(
534                 [in,ref] policy_handle *handle          
535         );
536
537         /******************/
538         /* Function: 0x15 */
539         WERROR spoolss_AbortPrinter(
540         );
541
542         /******************/
543         /* Function: 0x16 */
544         WERROR spoolss_ReadPrinter(
545         );
546
547         /******************/
548         /* Function: 0x17 */
549         WERROR spoolss_EndDocPrinter(
550         );
551
552         /******************/
553         /* Function: 0x18 */
554         WERROR spoolss_AddJob(
555         );
556
557         /******************/
558         /* Function: 0x19 */
559         WERROR spoolss_ScheduleJob(
560         );
561
562         /******************/
563         /* Function: 0x1a */
564         WERROR spoolss_GetPrinterData(
565                 [in,ref] policy_handle *handle,
566                 [in] unistr value_name,
567                 [out] uint32 type,
568                 [out] DATA_BLOB buffer,
569                 [in,out,ref] uint32 *buf_size
570         );
571
572         /******************/
573         /* Function: 0x1b */
574         WERROR spoolss_SetPrinterData(  
575                 [in,ref] policy_handle *handle,
576                 [in] unistr value_name,
577                 [in] uint32 type,
578                 [in] DATA_BLOB buffer,
579                 [in] uint32 real_len
580         );
581
582         /******************/
583         /* Function: 0x1c */
584         WERROR spoolss_WaitForPrinterChange(
585         );
586
587         /******************/
588         /* Function: 0x1d */
589         WERROR spoolss_ClosePrinter(
590                 [in,out,ref]     policy_handle *handle
591         );
592
593         typedef struct {
594                 uint32 flags;
595                 [relative] unistr *formname;
596                 uint32 width;
597                 uint32 length;
598                 uint32 left;
599                 uint32 top;
600                 uint32 right;
601                 uint32 bottom;
602         } spoolss_AddFormInfo1;
603
604         typedef union {
605                 [case(1)] spoolss_AddFormInfo1 *info1;
606         } spoolss_AddFormInfo;
607
608         /******************/
609         /* Function: 0x1e */
610         WERROR spoolss_AddForm(
611                 [in,ref] policy_handle *handle,
612                 [in] uint32 level,
613                 [in,switch_is(level)] spoolss_AddFormInfo info
614         );
615
616         /******************/
617         /* Function: 0x1f */
618         WERROR spoolss_DeleteForm(
619                 [in,ref] policy_handle *handle,
620                 [in] unistr formname
621         );
622
623         /******************/
624         /* Function: 0x20 */
625         typedef struct {
626                 uint32 flags;
627                 [relative] nstring *formname;
628                 uint32 width;
629                 uint32 length;
630                 uint32 left;
631                 uint32 top;
632                 uint32 right;
633                 uint32 bottom;
634         } spoolss_FormInfo1;
635
636         WERROR spoolss_GetForm(
637                 [in,ref] policy_handle *handle,
638                 [in] unistr formname,
639                 [in] uint32 level,
640                 [in] DATA_BLOB *buffer,
641                 [out,subcontext(4),switch_is(level)] spoolss_FormInfo *info,
642                 [in,out,ref] uint32 *buf_size
643         );
644
645         typedef struct {
646                 uint32 flags;
647                 unistr *formname;
648                 uint32 width;
649                 uint32 length;
650                 uint32 left;
651                 uint32 top;
652                 uint32 right;
653                 uint32 bottom;
654         } spoolss_SetFormInfo1;
655
656         typedef union {
657                 [case(1)] spoolss_AddFormInfo1 *info1;
658         } spoolss_SetFormInfo;
659
660         /******************/
661         /* Function: 0x21 */
662         WERROR spoolss_SetForm(
663                 [in,ref] policy_handle *handle,
664                 [in] unistr formname,
665                 [in] uint32 level,
666                 [in,switch_is(level)] spoolss_SetFormInfo info
667         );
668
669         typedef [nodiscriminant,public] union {
670                 [case(1)] spoolss_FormInfo1 info1;
671         } spoolss_FormInfo;
672
673         /******************/
674         /* Function: 0x22 */
675         [noprint,nopull,nopush] WERROR spoolss_EnumForms(
676                 [in,ref] policy_handle *handle,
677                 [in] uint32 level,
678                 [in] DATA_BLOB *buffer,
679                 /* [out,subcontext(4),switch_is(level)] spoolss_FormInfo *info[count],*/
680                 [out,subcontext(4),switch_is(level)] spoolss_FormInfo **info,
681                 [in,out,ref] uint32 *buf_size,
682                 [out] uint32 count
683         );
684
685         typedef [flag(RELATIVE_CURRENT)] struct {
686                 [relative] nstring *port_name;
687         } spoolss_PortInfo1;
688
689         typedef bitmap {
690                 SPOOLSS_PORT_TYPE_WRITE         = 0x00000001,
691                 SPOOLSS_PORT_TYPE_READ          = 0x00000002,
692                 SPOOLSS_PORT_TYPE_REDIRECTED    = 0x00000004,
693                 SPOOLSS_PORT_TYPE_NET_ATTACHED  = 0x00000008
694         } spoolss_PortType;
695
696         typedef struct {
697                 [relative] nstring *port_name;
698                 [relative] nstring *monitor_name;
699                 [relative] nstring *description;
700                 spoolss_PortType port_type;
701                 uint32 reserved;
702         } spoolss_PortInfo2;
703
704         typedef [nondiscriminant,public] union {
705                 [case(1)] spoolss_PortInfo1 info1;
706                 [case(2)] spoolss_PortInfo2 info2;
707         } spoolss_PortInfo;
708
709         /******************/
710         /* Function: 0x23 */
711         [noprint,nopull,nopush] WERROR spoolss_EnumPorts(
712                 [in] unistr *servername,
713                 [in] uint32 level,
714                 [in] DATA_BLOB *buffer,
715                 /* [out,subcontext(4),switch_is(level)] spoolss_PortInfo *info[count], */
716                 [out,subcontext(4),switch_is(level)] spoolss_PortInfo **info,
717                 [in,out,ref] uint32 *buf_size,
718                 [out] uint32 count
719         );
720
721         /******************/
722         /* Function: 0x24 */
723         WERROR spoolss_EnumMonitors(
724         );
725
726         /******************/
727         /* Function: 0x25 */
728         WERROR spoolss_AddPort(
729                [in] unistr *server_name,
730                [in] uint32 unknown,
731                [in] unistr monitor_name
732         );
733
734         /******************/
735         /* Function: 0x26 */
736         WERROR spoolss_ConfigurePort(
737         );
738
739         /******************/
740         /* Function: 0x27 */
741         WERROR spoolss_DeletePort(
742         );
743
744         /******************/
745         /* Function: 0x28 */
746         WERROR spoolss_CreatePrinterIC(
747         );
748
749         /******************/
750         /* Function: 0x29 */
751         WERROR spoolss_PlayGDIScriptOnPrinterIC(
752         );
753
754         /******************/
755         /* Function: 0x2a */
756         WERROR spoolss_DeletePrinterIC(
757         );
758
759         /******************/
760         /* Function: 0x2b */
761         WERROR spoolss_AddPrinterConnection(
762         );
763
764         /******************/
765         /* Function: 0x2c */
766         WERROR spoolss_DeletePrinterConnection(
767         );
768
769         /******************/
770         /* Function: 0x2d */
771         WERROR spoolss_PrinterMessageBox(
772                 /* Marked as obsolete in MSDN.  "Not necessary and has
773                    no effect". */
774         );
775
776         /******************/
777         /* Function: 0x2e */
778         WERROR spoolss_AddMonitor(
779         );
780
781         /******************/
782         /* Function: 0x2f */
783         WERROR spoolss_DeleteMonitor(
784         );
785
786         /******************/
787         /* Function: 0x30 */
788         WERROR spoolss_DeletePrintProcessor(
789         );
790
791         /******************/
792         /* Function: 0x31 */
793         WERROR spoolss_AddPrintProvidor(
794         );
795
796         /******************/
797         /* Function: 0x32 */
798         WERROR spoolss_DeletePrintProvidor(
799         );
800
801         /******************/
802         /* Function: 0x33 */
803         WERROR spoolss_EnumPrintProcDataTypes(
804         );
805
806         /******************/
807         /* Function: 0x34 */
808         WERROR spoolss_ResetPrinter(
809         );
810
811         /******************/
812         /* Function: 0x35 */
813         WERROR spoolss_GetPrinterDriver2(
814                 [in,ref] policy_handle *handle,
815                 [in] unistr *architecture,
816                 [in] uint32 level,
817                 [in,out] DATA_BLOB *buffer,
818                 [in,out,ref] uint32 *buf_size,
819                 [in] uint32 client_major_version,
820                 [in] uint32 client_minor_version,
821                 [out] uint32 server_major_version,
822                 [out] uint32 server_minor_version
823         );
824
825         /******************/
826         /* Function: 0x36 */
827         WERROR spoolss_FindFirstPrinterChangeNotification(
828         );
829
830         /******************/
831         /* Function: 0x37 */
832         WERROR spoolss_FindNextPrinterChangeNotification(
833         );
834
835         /******************/
836         /* Function: 0x38 */
837         WERROR spoolss_FindClosePrinterNotify(
838         );
839
840         /******************/
841         /* Function: 0x39 */
842         WERROR spoolss_RouterFindFirstPrinterChangeNotificationOld(
843         );
844
845         /******************/
846         /* Function: 0x3a */
847         WERROR spoolss_ReplyOpenPrinter(
848         );
849
850         /******************/
851         /* Function: 0x3b */
852         WERROR spoolss_RouterReplyPrinter(
853         );
854
855         /******************/
856         /* Function: 0x3c */
857         WERROR spoolss_ReplyClosePrinter(
858         );
859
860         /******************/
861         /* Function: 0x3d */
862         WERROR spoolss_AddPortEx(
863         );
864
865         /******************/
866         /* Function: 0x3e */
867         WERROR spoolss_RouterFindFirstPrinterChangeNotification(
868         );
869
870         /******************/
871         /* Function: 0x3f */
872         WERROR spoolss_SpoolerInit(
873         );
874
875         /******************/
876         /* Function: 0x40 */
877         WERROR spoolss_ResetPrinterEx(
878         );
879
880         /******************/
881         /* Function: 0x41 */
882         WERROR spoolss_RemoteFindFirstPrinterChangeNotifyEx(
883         );
884
885         /******************/
886         /* Function: 0x42 */
887         WERROR spoolss_RouterRefreshPrinterChangeNotification(
888         );
889
890         /******************/
891         /* Function: 0x43 */
892         WERROR spoolss_RemoteFindNextPrinterChangeNotifyEx(
893         );
894
895         /******************/
896         /* Function: 0x44 */
897         WERROR spoolss_44(
898         );
899
900         typedef struct {
901                 uint32 size;
902                 unistr *client;
903                 unistr *user;
904                 uint32 build;
905                 uint32 major;
906                 uint32 minor;
907                 uint32 processor;
908         } spoolss_UserLevel1;
909
910         typedef union {
911                 [case(1)]  spoolss_UserLevel1 *level1;
912         } spoolss_UserLevel;
913
914         /******************/
915         /* Function: 0x45 */
916         WERROR spoolss_OpenPrinterEx(
917                 [in]                  unistr *printername,
918                 [in]                  unistr *datatype,
919                 [in]                  spoolss_DevmodeContainer devmode_ctr,
920                 [in]                  uint32 access_mask,
921                 [in]                  uint32 level,
922                 [in,switch_is(level)] spoolss_UserLevel userlevel,
923                 [out,ref]             policy_handle *handle
924         );
925
926         /******************/
927         /* Function: 0x46 */
928         WERROR spoolss_AddPrinterEx(
929                 [in] unistr *server,
930                 [in] uint32 level,
931                 [in,switch_is(level)] spoolss_PrinterInfo *info,
932                 [in] spoolss_DevmodeContainer devmode_ctr,
933                 [in] security_descriptor *secdesc,
934                 [in] uint32 ulevel,
935                 [in,switch_is(ulevel)] spoolss_UserLevel userlevel
936         );
937
938         /******************/
939         /* Function: 0x47 */
940         WERROR spoolss_47(
941         );
942
943         /******************/
944         /* Function: 0x48 */
945         WERROR spoolss_EnumPrinterData(
946                 [in,ref] policy_handle *handle,
947                 [in]     uint32 enum_index,
948                 [in]     uint32 value_offered,
949                 [out]    lstring value_name,
950                 [out]    uint32 value_needed,
951                 [out]    uint32 printerdata_type,
952                 [out]    DATA_BLOB buffer,
953                 [in,out,ref] uint32 *data_size
954         );
955
956         /******************/
957         /* Function: 0x49 */
958         WERROR spoolss_DeletePrinterData(
959                 [in,ref] policy_handle *handle,
960                 [in] unistr value_name
961         );
962
963         /******************/
964         /* Function: 0x4a */
965         WERROR spoolss_4a(
966         );
967
968         /******************/
969         /* Function: 0x4b */
970         WERROR spoolss_4b(
971         );
972
973         /******************/
974         /* Function: 0x4c */
975         WERROR spoolss_4c(
976         );
977
978         /******************/
979         /* Function: 0x4d */
980         WERROR spoolss_SetPrinterDataEx(
981                 [in,ref] policy_handle *handle,
982                 [in] unistr key_name,
983                 [in] unistr value_name,
984                 [in] uint32 type,
985                 [in] DATA_BLOB buffer,
986                 [in,out,ref] uint32 *buf_size
987         );
988
989         /******************/
990         /* Function: 0x4e */
991         WERROR spoolss_GetPrinterDataEx(
992                 [in,ref] policy_handle *handle,
993                 [in] unistr key_name,
994                 [in] unistr value_name,
995                 [out] uint32 type,
996                 [out] DATA_BLOB buffer,
997                 [in,out,ref] uint32 *buf_size
998         );
999
1000         /******************/
1001         /* Function: 0x4f */
1002         WERROR spoolss_EnumPrinterDataEx(
1003                 [in,ref] policy_handle *handle,
1004                 [in] unistr key_name,
1005                 [out] DATA_BLOB buffer,
1006                 [in,out] uint32 buf_size,
1007                 [out] uint32 count
1008         );
1009
1010         /******************/
1011         /* Function: 0x50 */
1012         WERROR spoolss_EnumPrinterKey(
1013         );
1014
1015         /******************/
1016         /* Function: 0x51 */
1017         WERROR spoolss_DeletePrinterDataEx(
1018                 [in,ref] policy_handle *handle,
1019                 [in] unistr key_name,
1020                 [in] unistr value_name
1021         );
1022
1023         /******************/
1024         /* Function: 0x52 */
1025         WERROR spoolss_DeletePrinterKey(
1026         );
1027
1028         /******************/
1029         /* Function: 0x53 */
1030         WERROR spoolss_53(
1031         );
1032
1033         /******************/
1034         /* Function: 0x54 */
1035         WERROR spoolss_DeletePrinterDriverEx(
1036         );
1037
1038         /******************/
1039         /* Function: 0x55 */
1040         WERROR spoolss_55(
1041         );
1042
1043         /******************/
1044         /* Function: 0x56 */
1045         WERROR spoolss_56(
1046         );
1047
1048         /******************/
1049         /* Function: 0x57 */
1050         WERROR spoolss_57(
1051         );
1052
1053         /******************/
1054         /* Function: 0x58 */
1055         WERROR spoolss_58(
1056         );
1057
1058         /******************/
1059         /* Function: 0x59 */
1060         WERROR spoolss_AddPrinterDriverEx(
1061         );
1062
1063         /******************/
1064         /* Function: 0x5a */
1065         WERROR spoolss_5a(
1066         );
1067
1068         /******************/
1069         /* Function: 0x5b */
1070         WERROR spoolss_5b(
1071         );
1072
1073         /******************/
1074         /* Function: 0x5c */
1075         WERROR spoolss_5c(
1076         );
1077
1078         /******************/
1079         /* Function: 0x5d */
1080         WERROR spoolss_5d(
1081         );
1082
1083         /******************/
1084         /* Function: 0x5e */
1085         WERROR spoolss_5e(
1086         );
1087
1088         /******************/
1089         /* Function: 0x5f */
1090         WERROR spoolss_5f(
1091         );
1092 }