r6194: - fix some spoolss_*Form names and types
[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                 [value(r->driverextra_data.length)] uint16 __driverextra_length;
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                 [subcontext_size(r->__driverextra_length),subcontext(0),flag(NDR_REMAINING)] DATA_BLOB driverextra_data;
94         } spoolss_DeviceMode;
95
96         typedef [public] 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                 [default];
247         } spoolss_PrinterInfo;
248
249         /******************/
250         /* Function: 0x00 */
251         [noprint,nopull,nopush] WERROR spoolss_EnumPrinters(
252                 [in] spoolss_EnumPrinterFlags flags,
253                 [in] unistr *server,
254                 [in] uint32 level,
255                 [in] DATA_BLOB *buffer,
256                 /* [out,subcontext(4),switch_is(level)] spoolss_PrinterInfo *info[count],*/
257                 [out,subcontext(4),switch_is(level)] spoolss_PrinterInfo **info,
258                 [in,out,ref] uint32 *buf_size,
259                 [out] uint32 count
260         );
261
262         /******************/
263         /* Function: 0x01 */
264         typedef struct {
265                 uint32 foo;
266         } spoolss_Devmode;
267
268         typedef struct {
269                 uint32 size;
270                 spoolss_Devmode *devmode;
271         } spoolss_DevmodeContainer;
272
273         WERROR spoolss_OpenPrinter(
274                 [in] unistr *printername,
275                 [in] unistr *datatype,
276                 [in] spoolss_DevmodeContainer devmode_ctr,
277                 [in] uint32 access_mask,
278                 [out,ref] policy_handle *handle
279         );
280
281         /******************/
282         /* Function: 0x02 */
283         WERROR spoolss_SetJob(
284                 [in,ref] policy_handle *handle,
285                 [in] uint32 job_id,
286                 [in] uint32 level,
287                 [in] uint32 command
288         );
289
290         /******************/
291         /* Function: 0x03 */
292         WERROR spoolss_GetJob(
293                 [in,ref] policy_handle *handle,
294                 [in] uint32 job_id,
295                 [in] uint32 level,
296                 [in] DATA_BLOB *buffer,
297                 [out,subcontext(4),switch_is(level)] spoolss_JobInfo *info,
298                 [in,out,ref] uint32 *buf_size
299         );
300
301         typedef struct {
302                 uint32 job_id;
303                 [relative] nstring *printer_name;
304                 [relative] nstring *server_name;
305                 [relative] nstring *user_name;
306                 [relative] nstring *document_name;
307                 [relative] nstring *data_type;
308                 [relative] nstring *text_status;
309                 uint32 status;
310                 uint32 priority;
311                 uint32 position;
312                 uint32 total_pages;
313                 uint32 pages_printed;
314                 spoolss_Time time;
315         } spoolss_JobInfo1;
316
317         typedef [nodiscriminant,public] union {
318                 [case(1)] spoolss_JobInfo1 info1;
319                 [case(2)]; /* TODO */
320                 [case(3)]; /* TODO */
321                 [default];
322         } spoolss_JobInfo;
323
324         /******************/
325         /* Function: 0x04 */
326         [noprint,nopull,nopush] WERROR spoolss_EnumJobs(
327                 [in,ref] policy_handle *handle,
328                 [in]     uint32 firstjob,
329                 [in]     uint32 numjobs,
330                 [in]     uint32 level,
331                 [in]     DATA_BLOB *buffer,
332                 /* [out,subcontext(4),switch_is(level)] spoolss_JobInfo *info[count],*/
333                 [out,subcontext(4),switch_is(level)] spoolss_JobInfo **info,
334                 [in,out,ref] uint32 *buf_size,
335                 [out]    uint32 count
336         );
337
338         /******************/
339         /* Function: 0x05 */
340         WERROR spoolss_AddPrinter(
341                 /* This function is not implemented in Samba 3 as no
342                    clients have been observed using it. */
343         );
344
345         /******************/
346         /* Function: 0x06 */
347         WERROR spoolss_DeletePrinter(
348         );
349
350         typedef [v1_enum] enum {
351                 SPOOLSS_PRINTER_CONTROL_UNPAUSE    = 0,
352                 SPOOLSS_PRINTER_CONTROL_PAUSE      = 1,
353                 SPOOLSS_PRINTER_CONTROL_RESUME     = 2,
354                 SPOOLSS_PRINTER_CONTROL_PURGE      = 3,
355                 SPOOLSS_PRINTER_CONTROL_SET_STATUS = 4
356         } spoolss_PrinterControl;
357
358         /******************/
359         /* Function: 0x07 */
360         WERROR spoolss_SetPrinter(
361                 [in,ref] policy_handle *handle,
362                 [in]     uint32 level,
363                 [in,subcontext(4),switch_is(level)] spoolss_PrinterInfo *info,
364                 [in]     spoolss_DevmodeContainer devmode_ctr,
365                 [in,relative,subcontext(0)] security_descriptor *secdesc,
366                 [in]     spoolss_PrinterControl command
367         );
368
369         /******************/
370         /* Function: 0x08 */
371         WERROR spoolss_GetPrinter(
372                 [in,ref]     policy_handle *handle,
373                 [in]         uint32 level,
374                 [in]         DATA_BLOB *buffer,
375                 [out,subcontext(4),switch_is(level)] spoolss_PrinterInfo *info,
376                 [in,out,ref] uint32 *buf_size
377         );
378
379         /******************/
380         /* Function: 0x09 */
381         WERROR spoolss_AddPrinterDriver(
382         );
383
384         typedef struct {
385                 [relative] nstring *driver_name;
386         } spoolss_DriverInfo1;
387
388         typedef [v1_enum] enum {
389                 SPOOLSS_DRIVER_VERSION_9X       = 0,
390                 SPOOLSS_DRIVER_VERSION_NT35     = 1,
391                 SPOOLSS_DRIVER_VERSION_NT4      = 2,
392                 SPOOLSS_DRIVER_VERSION_200X     = 3
393         } spoolss_DriverOSVersion;
394
395         typedef struct {
396                 spoolss_DriverOSVersion version;
397                 [relative] nstring *driver_name;
398                 [relative] nstring *architecture;
399                 [relative] nstring *driver_path;
400                 [relative] nstring *data_file;
401                 [relative] nstring *config_file;
402         } spoolss_DriverInfo2;
403
404         typedef struct {
405                 spoolss_DriverOSVersion version;
406                 [relative] nstring *driver_name;
407                 [relative] nstring *architecture;
408                 [relative] nstring *driver_path;
409                 [relative] nstring *data_file;
410                 [relative] nstring *config_file;
411                 [relative] nstring *help_file;
412                 [relative] nstring *dependent_files; /* array */
413                 [relative] nstring *monitor_name;
414                 [relative] nstring *default_datatype;
415         } spoolss_DriverInfo3;
416
417         typedef struct {
418                 spoolss_DriverOSVersion version;
419                 [relative] nstring *driver_name;
420                 [relative] nstring *architecture;
421                 [relative] nstring *driver_path;
422                 [relative] nstring *data_file;
423                 [relative] nstring *config_file;
424                 [relative] nstring *help_file;
425                 [relative] nstring *dependent_files; /* array */
426                 [relative] nstring *monitor_name;
427                 [relative] nstring *default_datatype;
428                 [relative] nstring *previous_names; /* array */
429         } spoolss_DriverInfo4;
430
431         typedef struct {
432                 spoolss_DriverOSVersion version;
433                 [relative] nstring *driver_name;
434                 [relative] nstring *architecture;
435                 [relative] nstring *driver_path;
436                 [relative] nstring *data_file;
437                 [relative] nstring *config_file;
438                 uint32 driver_attributes;
439                 uint32 config_version;
440                 uint32 driver_version;
441         } spoolss_DriverInfo5;
442
443         typedef struct {
444                 spoolss_DriverOSVersion version;
445                 [relative] nstring *driver_name;
446                 [relative] nstring *architecture;
447                 [relative] nstring *driver_path;
448                 [relative] nstring *data_file;
449                 [relative] nstring *config_file;
450                 [relative] nstring *help_file;
451                 [relative] nstring *dependent_files; /* array */
452                 [relative] nstring *monitor_name;
453                 [relative] nstring *default_datatype;
454                 [relative] nstring *previous_names; /* array */
455                 NTTIME driver_data;
456                 hyper driver_version;
457                 [relative] nstring *manufacturer_name;
458                 [relative] nstring *manufacturer_url;
459                 [relative] nstring *hardware_id;
460                 [relative] nstring *provider;
461         } spoolss_DriverInfo6;
462
463         typedef [nodiscriminant,public] union {
464                 [case(1)] spoolss_DriverInfo1 info1;
465                 [case(2)] spoolss_DriverInfo2 info2;
466                 [case(3)] spoolss_DriverInfo3 info3;
467                 [case(4)] spoolss_DriverInfo4 info4;
468                 [case(5)] spoolss_DriverInfo5 info5;
469                 [case(6)] spoolss_DriverInfo6 info6;
470                 [default];
471         } spoolss_DriverInfo;
472
473         /******************/
474         /* Function: 0x0a */
475         [noprint,nopull,nopush] WERROR spoolss_EnumPrinterDrivers(
476                 [in] unistr *server,
477                 [in] unistr *environment,
478                 [in] uint32 level,
479                 [in] DATA_BLOB *buffer,
480                 /* [out,subcontext(4),switch_is(level)] spoolss_DriverInfo *info[count],*/
481                 [out,subcontext(4),switch_is(level)] spoolss_DriverInfo **info,
482                 [in,out,ref] uint32 *buf_size,
483                 [out] uint32 count
484         );
485
486         /******************/
487         /* Function: 0x0b */
488         WERROR spoolss_GetPrinterDriver(
489         );
490
491         /******************/
492         /* Function: 0x0c */
493         WERROR spoolss_GetPrinterDriverDirectory(
494         );
495
496         /******************/
497         /* Function: 0x0d */
498         WERROR spoolss_DeletePrinterDriver(
499                 [in,ref] policy_handle *handle,
500                 [in] unistr *server,
501                 [in] unistr architecture,
502                 [in] unistr driver
503         );
504
505         /******************/
506         /* Function: 0x0e */
507         WERROR spoolss_AddPrintProcessor(
508         );
509
510         /******************/
511         /* Function: 0x0f */
512         typedef struct {
513                 [relative] nstring *print_processor_name;
514         } spoolss_PrintProcessorInfo1;
515
516         typedef [nodiscriminant,public] union {
517                 [case(1)] spoolss_PrintProcessorInfo1 info1;
518                 [default];
519         } spoolss_PrintProcessorInfo;
520
521         [noprint,nopull,nopush] WERROR spoolss_EnumPrintProcessors(
522                 [in] unistr *servername,
523                 [in] unistr *environment,
524                 [in] uint32 level,
525                 [in] DATA_BLOB *buffer,
526                 /* [out,subcontext(4),switch_is(level)] spoolss_PrintProcessorInfo *info[count],*/
527                 [out,subcontext(4),switch_is(level)]  spoolss_PrintProcessorInfo **info,
528                 /* [out,subcontext(4),flag(NDR_REMAINING)] DATA_BLOB *info,*/
529                 [in,out,ref] uint32 *buf_size,
530                 [out] uint32 count
531         );
532
533         /******************/
534         /* Function: 0x10 */
535         WERROR spoolss_GetPrintProcessorDirectory(
536         );
537
538         /******************/
539         /* Function: 0x11 */
540         WERROR spoolss_StartDocPrinter(
541         );
542
543         /******************/
544         /* Function: 0x12 */
545         WERROR spoolss_StartPagePrinter(
546                 [in,ref] policy_handle *handle          
547         );
548
549         /******************/
550         /* Function: 0x13 */
551         WERROR spoolss_WritePrinter(
552         );
553
554         /******************/
555         /* Function: 0x14 */
556         WERROR spoolss_EndPagePrinter(
557                 [in,ref] policy_handle *handle          
558         );
559
560         /******************/
561         /* Function: 0x15 */
562         WERROR spoolss_AbortPrinter(
563         );
564
565         /******************/
566         /* Function: 0x16 */
567         WERROR spoolss_ReadPrinter(
568         );
569
570         /******************/
571         /* Function: 0x17 */
572         WERROR spoolss_EndDocPrinter(
573         );
574
575         /******************/
576         /* Function: 0x18 */
577         WERROR spoolss_AddJob(
578         );
579
580         /******************/
581         /* Function: 0x19 */
582         WERROR spoolss_ScheduleJob(
583         );
584
585         /******************/
586         /* Function: 0x1a */
587         const string SPOOLSS_ARCHITECTURE_NT_X86                = "Windows NT x86";
588
589         typedef [v1_enum] enum {
590                 SPOOLSS_PRINTER_DATA_TYPE_NULL = 0,
591                 SPOOLSS_PRINTER_DATA_TYPE_STRING = 1,
592                 SPOOLSS_PRINTER_DATA_TYPE_UINT32 = 4
593         } spoolss_PrinterDataType;
594
595         typedef [nodiscriminant,gensize] union {
596                 [case(SPOOLSS_PRINTER_DATA_TYPE_NULL)];
597                 [case(SPOOLSS_PRINTER_DATA_TYPE_STRING)] nstring string;
598                 [case(SPOOLSS_PRINTER_DATA_TYPE_UINT32)] uint32 value;
599                 [default,flag(NDR_REMAINING)] DATA_BLOB data;
600         } spoolss_PrinterData;
601
602         WERROR spoolss_GetPrinterData(
603                 [in,ref] policy_handle *handle,
604                 [in] unistr value_name,
605                 [out] spoolss_PrinterDataType type,
606                 [out,subcontext(4),switch_is(type)] spoolss_PrinterData data,
607                 [in,out,ref] uint32 *buf_size
608         );
609
610         /******************/
611         /* Function: 0x1b */
612         WERROR spoolss_SetPrinterData(  
613                 [in,ref] policy_handle *handle,
614                 [in] unistr value_name,
615                 [in] uint32 type,
616                 [in] DATA_BLOB buffer,
617                 [in] uint32 real_len
618         );
619
620         /******************/
621         /* Function: 0x1c */
622         WERROR spoolss_WaitForPrinterChange(
623         );
624
625         /******************/
626         /* Function: 0x1d */
627         WERROR spoolss_ClosePrinter(
628                 [in,out,ref]     policy_handle *handle
629         );
630
631         /******************/
632         /* Function: 0x1e */
633         typedef [v1_enum] enum {
634                 SPOOLSS_FORM_USER       = 0,
635                 SPOOLSS_FORM_BUILTIN    = 1,
636                 SPOOLSS_FORM_PRINTER    = 2
637         } spoolss_FormFlags;
638
639         typedef struct {
640                 uint32 width;
641                 uint32 height;
642         } spoolss_FormSize;
643
644         typedef struct {
645                 uint32 left;
646                 uint32 top;
647                 uint32 right;
648                 uint32 bottom;
649         } spoolss_FormArea;
650
651         typedef struct {
652                 spoolss_FormFlags flags;
653                 [relative] unistr *form_name;
654                 spoolss_FormSize size;
655                 spoolss_FormArea area;
656         } spoolss_AddFormInfo1;
657
658         typedef union {
659                 [case(1)] spoolss_AddFormInfo1 *info1;
660         } spoolss_AddFormInfo;
661
662         WERROR spoolss_AddForm(
663                 [in,ref] policy_handle *handle,
664                 [in] uint32 level,
665                 [in,switch_is(level)] spoolss_AddFormInfo info
666         );
667
668         /******************/
669         /* Function: 0x1f */
670         WERROR spoolss_DeleteForm(
671                 [in,ref] policy_handle *handle,
672                 [in] unistr form_name
673         );
674
675         /******************/
676         /* Function: 0x20 */
677         typedef struct {
678                 spoolss_FormFlags flags;
679                 [relative] nstring *form_name;
680                 spoolss_FormSize size;
681                 spoolss_FormArea area;
682         } spoolss_FormInfo1;
683
684         WERROR spoolss_GetForm(
685                 [in,ref] policy_handle *handle,
686                 [in] unistr form_name,
687                 [in] uint32 level,
688                 [in] DATA_BLOB *buffer,
689                 [out,subcontext(4),switch_is(level)] spoolss_FormInfo *info,
690                 [in,out,ref] uint32 *buf_size
691         );
692
693         typedef struct {
694                 spoolss_FormFlags flags;
695                 unistr *form_name;
696                 spoolss_FormSize size;
697                 spoolss_FormArea area;
698         } spoolss_SetFormInfo1;
699
700         typedef union {
701                 [case(1)] spoolss_SetFormInfo1 *info1;
702         } spoolss_SetFormInfo;
703
704         /******************/
705         /* Function: 0x21 */
706         WERROR spoolss_SetForm(
707                 [in,ref] policy_handle *handle,
708                 [in] unistr form_name,
709                 [in] uint32 level,
710                 [in,switch_is(level)] spoolss_SetFormInfo info
711         );
712
713         typedef [nodiscriminant,public] union {
714                 [case(1)] spoolss_FormInfo1 info1;
715                 [default];
716         } spoolss_FormInfo;
717
718         /******************/
719         /* Function: 0x22 */
720         [noprint,nopull,nopush] WERROR spoolss_EnumForms(
721                 [in,ref] policy_handle *handle,
722                 [in] uint32 level,
723                 [in] DATA_BLOB *buffer,
724                 /* [out,subcontext(4),switch_is(level)] spoolss_FormInfo *info[count],*/
725                 [out,subcontext(4),switch_is(level)] spoolss_FormInfo **info,
726                 [in,out,ref] uint32 *buf_size,
727                 [out] uint32 count
728         );
729
730         typedef [flag(RELATIVE_CURRENT)] struct {
731                 [relative] nstring *port_name;
732         } spoolss_PortInfo1;
733
734         typedef bitmap {
735                 SPOOLSS_PORT_TYPE_WRITE         = 0x00000001,
736                 SPOOLSS_PORT_TYPE_READ          = 0x00000002,
737                 SPOOLSS_PORT_TYPE_REDIRECTED    = 0x00000004,
738                 SPOOLSS_PORT_TYPE_NET_ATTACHED  = 0x00000008
739         } spoolss_PortType;
740
741         typedef struct {
742                 [relative] nstring *port_name;
743                 [relative] nstring *monitor_name;
744                 [relative] nstring *description;
745                 spoolss_PortType port_type;
746                 uint32 reserved;
747         } spoolss_PortInfo2;
748
749         typedef [nodiscriminant,public] union {
750                 [case(1)] spoolss_PortInfo1 info1;
751                 [case(2)] spoolss_PortInfo2 info2;
752                 [case(3)]; /* TODO */
753                 [default];
754         } spoolss_PortInfo;
755
756         /******************/
757         /* Function: 0x23 */
758         [noprint,nopull,nopush] WERROR spoolss_EnumPorts(
759                 [in] unistr *servername,
760                 [in] uint32 level,
761                 [in] DATA_BLOB *buffer,
762                 /* [out,subcontext(4),switch_is(level)] spoolss_PortInfo *info[count], */
763                 [out,subcontext(4),switch_is(level)] spoolss_PortInfo **info,
764                 [in,out,ref] uint32 *buf_size,
765                 [out] uint32 count
766         );
767
768         /******************/
769         /* Function: 0x24 */
770         typedef struct {
771                 [relative] nstring *monitor_name;
772         } spoolss_MonitorInfo1;
773
774         typedef struct {
775                 [relative] nstring *monitor_name;
776                 [relative] nstring *environment;
777                 [relative] nstring *dll_name;
778         } spoolss_MonitorInfo2;
779
780         typedef [nodiscriminant,public] union {
781                 [case(1)] spoolss_MonitorInfo1 info1;
782                 [case(2)] spoolss_MonitorInfo2 info2;
783                 [default];
784         } spoolss_MonitorInfo;
785
786         [noprint,nopull,nopush] WERROR spoolss_EnumMonitors(
787                 [in] unistr *servername,
788                 [in] uint32 level,
789                 [in] DATA_BLOB *buffer,
790                 /* [out,subcontext(4),switch_is(level)] spoolss_MonitorInfo *info[count], */
791                 [out,subcontext(4),switch_is(level)] spoolss_MonitorInfo **info,
792                 /* [out,subcontext(4),flag(NDR_REMAINING)] DATA_BLOB *info,*/
793                 [in,out,ref] uint32 *buf_size,
794                 [out] uint32 count
795         );
796
797         /******************/
798         /* Function: 0x25 */
799         WERROR spoolss_AddPort(
800                [in] unistr *server_name,
801                [in] uint32 unknown,
802                [in] unistr monitor_name
803         );
804
805         /******************/
806         /* Function: 0x26 */
807         WERROR spoolss_ConfigurePort(
808         );
809
810         /******************/
811         /* Function: 0x27 */
812         WERROR spoolss_DeletePort(
813         );
814
815         /******************/
816         /* Function: 0x28 */
817         WERROR spoolss_CreatePrinterIC(
818         );
819
820         /******************/
821         /* Function: 0x29 */
822         WERROR spoolss_PlayGDIScriptOnPrinterIC(
823         );
824
825         /******************/
826         /* Function: 0x2a */
827         WERROR spoolss_DeletePrinterIC(
828         );
829
830         /******************/
831         /* Function: 0x2b */
832         WERROR spoolss_AddPrinterConnection(
833         );
834
835         /******************/
836         /* Function: 0x2c */
837         WERROR spoolss_DeletePrinterConnection(
838         );
839
840         /******************/
841         /* Function: 0x2d */
842         WERROR spoolss_PrinterMessageBox(
843                 /* Marked as obsolete in MSDN.  "Not necessary and has
844                    no effect". */
845         );
846
847         /******************/
848         /* Function: 0x2e */
849         WERROR spoolss_AddMonitor(
850         );
851
852         /******************/
853         /* Function: 0x2f */
854         WERROR spoolss_DeleteMonitor(
855         );
856
857         /******************/
858         /* Function: 0x30 */
859         WERROR spoolss_DeletePrintProcessor(
860         );
861
862         /******************/
863         /* Function: 0x31 */
864         WERROR spoolss_AddPrintProvidor(
865         );
866
867         /******************/
868         /* Function: 0x32 */
869         WERROR spoolss_DeletePrintProvidor(
870         );
871
872         /******************/
873         /* Function: 0x33 */
874         WERROR spoolss_EnumPrintProcDataTypes(
875         );
876
877         /******************/
878         /* Function: 0x34 */
879         WERROR spoolss_ResetPrinter(
880         );
881
882         /******************/
883         /* Function: 0x35 */
884         WERROR spoolss_GetPrinterDriver2(
885                 [in,ref] policy_handle *handle,
886                 [in] unistr *architecture,
887                 [in] uint32 level,
888                 [in,out] DATA_BLOB *buffer,
889                 [in,out,ref] uint32 *buf_size,
890                 [in] uint32 client_major_version,
891                 [in] uint32 client_minor_version,
892                 [out] uint32 server_major_version,
893                 [out] uint32 server_minor_version
894         );
895
896         /******************/
897         /* Function: 0x36 */
898         WERROR spoolss_FindFirstPrinterChangeNotification(
899         );
900
901         /******************/
902         /* Function: 0x37 */
903         WERROR spoolss_FindNextPrinterChangeNotification(
904         );
905
906         /******************/
907         /* Function: 0x38 */
908         WERROR spoolss_FindClosePrinterNotify(
909         );
910
911         /******************/
912         /* Function: 0x39 */
913         WERROR spoolss_RouterFindFirstPrinterChangeNotificationOld(
914         );
915
916         /******************/
917         /* Function: 0x3a */
918         WERROR spoolss_ReplyOpenPrinter(
919         );
920
921         /******************/
922         /* Function: 0x3b */
923         WERROR spoolss_RouterReplyPrinter(
924         );
925
926         /******************/
927         /* Function: 0x3c */
928         WERROR spoolss_ReplyClosePrinter(
929         );
930
931         /******************/
932         /* Function: 0x3d */
933         WERROR spoolss_AddPortEx(
934         );
935
936         /******************/
937         /* Function: 0x3e */
938         WERROR spoolss_RouterFindFirstPrinterChangeNotification(
939         );
940
941         /******************/
942         /* Function: 0x3f */
943         WERROR spoolss_SpoolerInit(
944         );
945
946         /******************/
947         /* Function: 0x40 */
948         WERROR spoolss_ResetPrinterEx(
949         );
950
951         /******************/
952         /* Function: 0x41 */
953         typedef [flag(NDR_PAHEX)] struct {
954                 uint16 u1;
955                 uint16 u2;
956                 uint32 u3;
957                 uint32 u4;
958                 uint32 count;
959                 [size_is(count)] uint16 *array[];
960         } spoolss_RemoteFindFirstPrinterChangeNotifyEx_t2;
961
962         typedef struct {
963                 uint32 u1;
964                 uint32 u2;
965                 uint32 count;
966                 [size_is(count)] spoolss_RemoteFindFirstPrinterChangeNotifyEx_t2 *t2[];
967         } spoolss_RemoteFindFirstPrinterChangeNotifyEx_t1;
968
969         WERROR spoolss_RemoteFindFirstPrinterChangeNotifyEx(
970                 [in,ref] policy_handle *handle,
971                 [in] uint32 u1,
972                 [in] uint32 u2,
973                 [in] unistr *str,
974                 [in] uint32 u3,
975                 [in] spoolss_RemoteFindFirstPrinterChangeNotifyEx_t1 *t1
976         );
977
978         /******************/
979         /* Function: 0x42 */
980         WERROR spoolss_RouterRefreshPrinterChangeNotification(
981         );
982
983         /******************/
984         /* Function: 0x43 */
985         WERROR spoolss_RemoteFindNextPrinterChangeNotifyEx(
986         );
987
988         /******************/
989         /* Function: 0x44 */
990         WERROR spoolss_44(
991         );
992
993         typedef struct {
994                 uint32 size;
995                 unistr *client;
996                 unistr *user;
997                 uint32 build;
998                 uint32 major;
999                 uint32 minor;
1000                 uint32 processor;
1001         } spoolss_UserLevel1;
1002
1003         typedef union {
1004                 [case(1)]  spoolss_UserLevel1 *level1;
1005         } spoolss_UserLevel;
1006
1007         /******************/
1008         /* Function: 0x45 */
1009         WERROR spoolss_OpenPrinterEx(
1010                 [in]                  unistr *printername,
1011                 [in]                  unistr *datatype,
1012                 [in]                  spoolss_DevmodeContainer devmode_ctr,
1013                 [in]                  uint32 access_mask,
1014                 [in]                  uint32 level,
1015                 [in,switch_is(level)] spoolss_UserLevel userlevel,
1016                 [out,ref]             policy_handle *handle
1017         );
1018
1019         /******************/
1020         /* Function: 0x46 */
1021         WERROR spoolss_AddPrinterEx(
1022                 [in] unistr *server,
1023                 [in] uint32 level,
1024                 [in,switch_is(level)] spoolss_PrinterInfo *info,
1025                 [in] spoolss_DevmodeContainer devmode_ctr,
1026                 [in] security_descriptor *secdesc,
1027                 [in] uint32 ulevel,
1028                 [in,switch_is(ulevel)] spoolss_UserLevel userlevel
1029         );
1030
1031         /******************/
1032         /* Function: 0x47 */
1033         WERROR spoolss_47(
1034         );
1035
1036         /******************/
1037         /* Function: 0x48 */
1038         WERROR spoolss_EnumPrinterData(
1039                 [in,ref] policy_handle *handle,
1040                 [in]     uint32 enum_index,
1041                 [in]     uint32 value_offered,
1042                 [out]    lstring value_name,
1043                 [out]    uint32 value_needed,
1044                 [out]    uint32 printerdata_type,
1045                 [out]    DATA_BLOB buffer,
1046                 [in,out,ref] uint32 *data_size
1047         );
1048
1049         /******************/
1050         /* Function: 0x49 */
1051         WERROR spoolss_DeletePrinterData(
1052                 [in,ref] policy_handle *handle,
1053                 [in] unistr value_name
1054         );
1055
1056         /******************/
1057         /* Function: 0x4a */
1058         WERROR spoolss_4a(
1059         );
1060
1061         /******************/
1062         /* Function: 0x4b */
1063         WERROR spoolss_4b(
1064         );
1065
1066         /******************/
1067         /* Function: 0x4c */
1068         WERROR spoolss_4c(
1069         );
1070
1071         /******************/
1072         /* Function: 0x4d */
1073         WERROR spoolss_SetPrinterDataEx(
1074                 [in,ref] policy_handle *handle,
1075                 [in] unistr key_name,
1076                 [in] unistr value_name,
1077                 [in] uint32 type,
1078                 [in] DATA_BLOB buffer,
1079                 [in,out,ref] uint32 *buf_size
1080         );
1081
1082         /******************/
1083         /* Function: 0x4e */
1084         WERROR spoolss_GetPrinterDataEx(
1085                 [in,ref] policy_handle *handle,
1086                 [in] unistr key_name,
1087                 [in] unistr value_name,
1088                 [out] uint32 type,
1089                 [out] DATA_BLOB buffer,
1090                 [in,out,ref] uint32 *buf_size
1091         );
1092
1093         /******************/
1094         /* Function: 0x4f */
1095         WERROR spoolss_EnumPrinterDataEx(
1096                 [in,ref] policy_handle *handle,
1097                 [in] unistr key_name,
1098                 [out] DATA_BLOB buffer,
1099                 [in,out] uint32 buf_size,
1100                 [out] uint32 count
1101         );
1102
1103         /******************/
1104         /* Function: 0x50 */
1105         WERROR spoolss_EnumPrinterKey(
1106         );
1107
1108         /******************/
1109         /* Function: 0x51 */
1110         WERROR spoolss_DeletePrinterDataEx(
1111                 [in,ref] policy_handle *handle,
1112                 [in] unistr key_name,
1113                 [in] unistr value_name
1114         );
1115
1116         /******************/
1117         /* Function: 0x52 */
1118         WERROR spoolss_DeletePrinterKey(
1119         );
1120
1121         /******************/
1122         /* Function: 0x53 */
1123         WERROR spoolss_53(
1124         );
1125
1126         /******************/
1127         /* Function: 0x54 */
1128         WERROR spoolss_DeletePrinterDriverEx(
1129         );
1130
1131         /******************/
1132         /* Function: 0x55 */
1133         WERROR spoolss_55(
1134         );
1135
1136         /******************/
1137         /* Function: 0x56 */
1138         WERROR spoolss_56(
1139         );
1140
1141         /******************/
1142         /* Function: 0x57 */
1143         WERROR spoolss_57(
1144         );
1145
1146         /******************/
1147         /* Function: 0x58 */
1148         WERROR spoolss_58(
1149         );
1150
1151         /******************/
1152         /* Function: 0x59 */
1153         WERROR spoolss_AddPrinterDriverEx(
1154         );
1155
1156         /******************/
1157         /* Function: 0x5a */
1158         WERROR spoolss_5a(
1159         );
1160
1161         /******************/
1162         /* Function: 0x5b */
1163         WERROR spoolss_5b(
1164         );
1165
1166         /******************/
1167         /* Function: 0x5c */
1168         WERROR spoolss_5c(
1169         );
1170
1171         /******************/
1172         /* Function: 0x5d */
1173         WERROR spoolss_5d(
1174         );
1175
1176         /******************/
1177         /* Function: 0x5e */
1178         WERROR spoolss_5e(
1179         );
1180
1181         /******************/
1182         /* Function: 0x5f */
1183         WERROR spoolss_5f(
1184         );
1185 }