s4:kdc: Implement KDC plugin hardware authentication policy
[samba.git] / librpc / idl / winspool.idl
1 #include "idl_types.h"
2
3 /*
4  * IRemoteWinspool interface definitions
5  *
6  * This IDL defines the "Print System Asynchronous Remote Protocol" MS-PAR
7  * interface.
8  *
9  * Currently only eight functions in this interface have no matching functions
10  * in the "spoolss" interface. All other functions have a 1-to-1 match but
11  * different opcodes than the spoolss interface.
12  *
13  * Every request on this interface requires a object uuid of
14  * "9940CA8E-512F-4C58-88A9-61098D6896BD" to be sent along with the DCE/RPC
15  * header.
16  *
17  * On Windows, this interface uses [ncacn_ip_tcp] transport and requires
18  * DCERPC_AUTH_TYPE_SPNEGO and at least DCERPC_AUTH_LEVEL_PACKET authentication.
19  *
20  *
21  */
22
23 import "misc.idl", "security.idl", "winreg.idl", "spoolss.idl";
24
25 [
26         uuid("76f03f96-cdfd-44fc-a22c-64950A001209"),
27         version(1.0),
28         endpoint("ncacn_ip_tcp:"),
29         pointer_default(unique),
30         helpstring("IRemoteWinspool SubSystem")
31 ]
32         interface iremotewinspool
33 {
34 #if 0
35         /*
36          * pidl does not yet have a real [context_handle] implementation, so we
37          * just use some defines here.
38          */
39
40         typedef [context_handle] void *GDI_HANDLE;
41         typedef [context_handle] void *PRINTER_HANDLE;
42         typedef [context_handle] void *RMTNTFY_HANDLE;
43 #else
44 #define GDI_HANDLE policy_handle
45 #define PRINTER_HANDLE policy_handle
46 #define RMTNTFY_HANDLE policy_handle
47 #endif
48
49         const string IREMOTEWINSPOOL_OBJECT_GUID = "9940CA8E-512F-4C58-88A9-61098D6896BD";
50
51         /******************/
52         /* Function: 0x00 */
53
54         typedef struct {
55                 spoolss_NotifyInfo *pInfo;
56         } winspool_NOTIFY_REPLY_CONTAINER;
57
58         typedef struct {
59                 spoolss_NotifyOption *pOptions;
60         } winspool_NOTIFY_OPTIONS_CONTAINER;
61
62         [public] WERROR winspool_AsyncOpenPrinter(
63                 [in,unique] [string,charset(UTF16)] uint16 *pPrinterName,
64                 [out] PRINTER_HANDLE *pHandle,
65                 [in,unique] [string,charset(UTF16)] uint16 *pDatatype,
66                 [in] spoolss_DevmodeContainer *pDevModeContainer,
67                 [in] uint32 AccessRequired,
68                 [in] spoolss_UserLevelCtr *pClientInfo
69         );
70
71         /******************/
72         /* Function: 0x01 */
73
74         WERROR winspool_AsyncAddPrinter(
75                 [in,unique] [string,charset(UTF16)] uint16 *pName,
76                 [in] spoolss_SetPrinterInfoCtr *pPrinterContainer,
77                 [in] spoolss_DevmodeContainer *pDevModeContainer,
78                 [in] sec_desc_buf *pSecurityContainer,
79                 [in] spoolss_UserLevelCtr *pClientInfo,
80                 [out] PRINTER_HANDLE *pHandle
81         );
82
83         /******************/
84         /* Function: 0x02 */
85
86         WERROR winspool_AsyncSetJob(
87                 [in] PRINTER_HANDLE hPrinter,
88                 [in] uint32 JobId,
89                 [in, unique] spoolss_JobInfoContainer *pJobContainer,
90                 [in] uint32 Command
91         );
92
93         /******************/
94         /* Function: 0x03 */
95
96         WERROR winspool_AsyncGetJob(
97                 [in] PRINTER_HANDLE hPrinter,
98                 [in] uint32 JobId,
99                 [in] uint32 Level,
100                 [in, out, unique, size_is(cbBuf)] uint8 *pJob,
101                 [in] uint32 cbBuf,
102                 [out] uint32 *pcbNeeded
103         );
104
105         /******************/
106         /* Function: 0x04 */
107
108         WERROR winspool_AsyncEnumJobs(
109                 [in] PRINTER_HANDLE hPrinter,
110                 [in] uint32 FirstJob,
111                 [in] uint32 NoJobs,
112                 [in] uint32 Level,
113                 [in, out, unique, size_is(cbBuf)] uint8 *pJob,
114                 [in] uint32 cbBuf,
115                 [out] uint32 *pcbNeeded,
116                 [out] uint32 *pcReturned
117         );
118
119         /******************/
120         /* Function: 0x05 */
121
122         WERROR winspool_AsyncAddJob(
123                 [in] PRINTER_HANDLE hPrinter,
124                 [in] uint32 Level,
125                 [in, out, unique, size_is(cbBuf)] uint8 *pAddJob,
126                 [in] uint32 cbBuf,
127                 [out] uint32 *pcbNeeded
128         );
129
130         /******************/
131         /* Function: 0x06 */
132
133         WERROR winspool_AsyncScheduleJob(
134                 [in] PRINTER_HANDLE hPrinter,
135                 [in] uint32 JobId
136         );
137
138         /******************/
139         /* Function: 0x07 */
140
141         WERROR winspool_AsyncDeletePrinter(
142                 [in] PRINTER_HANDLE hPrinter
143         );
144
145         /******************/
146         /* Function: 0x08 */
147
148         [public] WERROR winspool_AsyncSetPrinter(
149                 [in] PRINTER_HANDLE hPrinter,
150                 [in] spoolss_SetPrinterInfoCtr *pPrinterContainer,
151                 [in] spoolss_DevmodeContainer *pDevModeContainer,
152                 [in] sec_desc_buf *pSecurityContainer,
153                 [in] uint32 Command
154         );
155
156         /******************/
157         /* Function: 0x09 */
158
159         [public] WERROR winspool_AsyncGetPrinter(
160                 [in] PRINTER_HANDLE hPrinter,
161                 [in] uint32 Level,
162                 [in, out, unique, size_is(cbBuf)] uint8 *pPrinter,
163                 [in] uint32 cbBuf,
164                 [out] uint32 *pcbNeeded
165         );
166
167         /******************/
168         /* Function: 0x0a */
169
170         WERROR winspool_AsyncStartDocPrinter(
171                 [in] PRINTER_HANDLE hPrinter,
172                 [in] spoolss_DocumentInfoCtr *pDocInfoContainer,
173                 [out] uint32 *pJobId
174         );
175
176         /******************/
177         /* Function: 0x0b */
178
179         WERROR winspool_AsyncStartPagePrinter(
180                 [in] PRINTER_HANDLE hPrinter
181         );
182
183         /******************/
184         /* Function: 0x0c */
185
186         WERROR winspool_AsyncWritePrinter(
187                 [in] PRINTER_HANDLE hPrinter,
188                 [in, size_is(cbBuf)] uint8 *pBuf,
189                 [in] uint32 cbBuf,
190                 [out] uint32 *pcWritten
191         );
192
193         /******************/
194         /* Function: 0x0d */
195
196         WERROR winspool_AsyncEndPagePrinter(
197                 [in] PRINTER_HANDLE hPrinter
198         );
199
200         /******************/
201         /* Function: 0x0e */
202
203         WERROR winspool_AsyncEndDocPrinter(
204                 [in] PRINTER_HANDLE hPrinter
205         );
206
207         /******************/
208         /* Function: 0x0f */
209
210         WERROR winspool_AsyncAbortPrinter(
211                 [in] PRINTER_HANDLE hPrinter
212         );
213
214         /******************/
215         /* Function: 0x10 */
216
217         [public] WERROR winspool_AsyncGetPrinterData(
218                 [in] PRINTER_HANDLE hPrinter,
219                 [in] [string,charset(UTF16)] uint16 *pValueName,
220                 [out] uint32 *pType,
221                 [out, size_is(nSize)] uint8 *pData,
222                 [in] uint32 nSize,
223                 [out] uint32 *pcbNeeded
224         );
225
226         /******************/
227         /* Function: 0x11 */
228
229         WERROR winspool_AsyncGetPrinterDataEx(
230                 [in] PRINTER_HANDLE hPrinter,
231                 [in] [string,charset(UTF16)] uint16 *pKeyName,
232                 [in] [string,charset(UTF16)] uint16 *pValueName,
233                 [out] uint32 *pType,
234                 [out, size_is(nSize)] uint8 *pData,
235                 [in] uint32 nSize,
236                 [out] uint32 *pcbNeeded
237         );
238
239         /******************/
240         /* Function: 0x12 */
241
242         WERROR winspool_AsyncSetPrinterData(
243                 [in] PRINTER_HANDLE hPrinter,
244                 [in] [string,charset(UTF16)] uint16 *pValueName,
245                 [in] uint32 Type,
246                 [in, size_is(cbData)] uint8 *pData,
247                 [in] uint32 cbData
248         );
249
250         /******************/
251         /* Function: 0x13 */
252
253         WERROR winspool_AsyncSetPrinterDataEx(
254                 [in] PRINTER_HANDLE hPrinter,
255                 [in] [string,charset(UTF16)] uint16 *pKeyName,
256                 [in] [string,charset(UTF16)] uint16 *pValueName,
257                 [in] uint32 Type,
258                 [in, size_is(cbData)] uint8 *pData,
259                 [in] uint32 cbData
260         );
261
262         /******************/
263         /* Function: 0x14 */
264
265         [public] WERROR winspool_AsyncClosePrinter(
266                 [in, out] PRINTER_HANDLE *phPrinter
267         );
268
269         /******************/
270         /* Function: 0x15 */
271
272         WERROR winspool_AsyncAddForm(
273                 [in] PRINTER_HANDLE hPrinter,
274                 [in] spoolss_AddFormInfoCtr *pFormInfoContainer
275         );
276
277         /******************/
278         /* Function: 0x16 */
279
280         WERROR winspool_AsyncDeleteForm(
281                 [in] PRINTER_HANDLE hPrinter,
282                 [in] [string,charset(UTF16)] uint16 *pFormName
283         );
284
285         /******************/
286         /* Function: 0x17 */
287
288         WERROR winspool_AsyncGetForm(
289                 [in] PRINTER_HANDLE hPrinter,
290                 [in] [string,charset(UTF16)] uint16 *pFormName,
291                 [in] uint32 Level,
292                 [in, out, unique, size_is(cbBuf)] uint8 *pForm,
293                 [in] uint32 cbBuf,
294                 [out] uint32 *pcbNeeded
295         );
296
297         /******************/
298         /* Function: 0x18 */
299
300         WERROR winspool_AsyncSetForm(
301                 [in] PRINTER_HANDLE hPrinter,
302                 [in] [string,charset(UTF16)] uint16 *pFormName,
303                 [in] spoolss_AddFormInfoCtr *pFormInfoContainer
304         );
305
306         /******************/
307         /* Function: 0x19 */
308
309         [public] WERROR winspool_AsyncEnumForms(
310                 [in] PRINTER_HANDLE hPrinter,
311                 [in] uint32 Level,
312                 [in, out, unique, size_is(cbBuf)] uint8 *pForm,
313                 [in]  uint32 cbBuf,
314                 [out] uint32 *pcbNeeded,
315                 [out] uint32 *pcReturned
316         );
317
318         /******************/
319         /* Function: 0x1a */
320
321         [public] WERROR winspool_AsyncGetPrinterDriver(
322                 [in] PRINTER_HANDLE hPrinter,
323                 [in,unique] [string,charset(UTF16)] uint16 *pEnvironment,
324                 [in] uint32 Level,
325                 [in, out, unique, size_is(cbBuf)] uint8 *pDriver,
326                 [in] uint32 cbBuf,
327                 [out] uint32 *pcbNeeded,
328                 [in] uint32 dwClientMajorVersion,
329                 [in] uint32 dwClientMinorVersion,
330                 [out] uint32 *pdwServerMaxVersion,
331                 [out] uint32 *pdwServerMinVersion
332         );
333
334         /******************/
335         /* Function: 0x1b */
336
337         WERROR winspool_AsyncEnumPrinterData(
338                 [in] PRINTER_HANDLE hPrinter,
339                 [in] uint32 dwIndex,
340                 [out, size_is(cbValueName/2)] uint16 *pValueName,
341                 [in]  uint32 cbValueName,
342                 [out] uint32 *pcbValueName,
343                 [out] uint32 *pType,
344                 [out, size_is(cbData)] uint8 *pData,
345                 [in]  uint32 cbData,
346                 [out] uint32 *pcbData
347         );
348
349         /******************/
350         /* Function: 0x1c */
351
352         [public] WERROR winspool_AsyncEnumPrinterDataEx(
353                 [in]  PRINTER_HANDLE hPrinter,
354                 [in] [string,charset(UTF16)] uint16 *pKeyName,
355                 [out, size_is(cbEnumValues)] uint8 *pEnumValues,
356                 [in]  uint32 cbEnumValues,
357                 [out] uint32 *pcbEnumValues,
358                 [out] uint32 *pnEnumValues
359         );
360
361         /******************/
362         /* Function: 0x1d */
363
364         [public] WERROR winspool_AsyncEnumPrinterKey(
365                 [in] PRINTER_HANDLE hPrinter,
366                 [in] [string,charset(UTF16)] uint16 *pKeyName,
367                 [out, size_is(cbSubkey/2)] uint16 *pSubkey,
368                 [in]  uint32 cbSubkey,
369                 [out] uint32 *pcbSubkey
370         );
371
372         /******************/
373         /* Function: 0x1e */
374
375         WERROR winspool_AsyncDeletePrinterData(
376                 [in] PRINTER_HANDLE hPrinter,
377                 [in] [string,charset(UTF16)] uint16 *pValueName
378         );
379
380         /******************/
381         /* Function: 0x1f */
382
383         WERROR winspool_AsyncDeletePrinterDataEx(
384                 [in] PRINTER_HANDLE hPrinter,
385                 [in] [string,charset(UTF16)] uint16 *pKeyName,
386                 [in] [string,charset(UTF16)] uint16 *pValueName
387         );
388
389         /******************/
390         /* Function: 0x20 */
391
392         WERROR winspool_AsyncDeletePrinterKey(
393                 [in] PRINTER_HANDLE hPrinter,
394                 [in] [string,charset(UTF16)] uint16 *pKeyName
395         );
396
397         /******************/
398         /* Function: 0x21 */
399
400         WERROR winspool_AsyncXcvData(
401                 [in] PRINTER_HANDLE hXcv,
402                 [in] [string,charset(UTF16)] uint16 *pszDataName,
403                 [in, size_is(cbInputData)] uint8 *pInputData,
404                 [in] uint32 cbInputData,
405                 [out, size_is(cbOutputData)] uint8 *pOutputData,
406                 [in] uint32 cbOutputData,
407                 [out] uint32 *pcbOutputNeeded,
408                 [in, out] uint32 *pdwStatus
409         );
410
411         /******************/
412         /* Function: 0x22 */
413
414         WERROR winspool_AsyncSendRecvBidiData (
415                 [in] PRINTER_HANDLE hPrinter,
416                 [in,unique] [string,charset(UTF16)] uint16 *pAction,
417                 [in] RPC_BIDI_REQUEST_CONTAINER* pReqData,
418                 [out] RPC_BIDI_RESPONSE_CONTAINER** ppRespData
419         );
420
421         /******************/
422         /* Function: 0x23 */
423
424         WERROR winspool_AsyncCreatePrinterIC(
425                 [in] PRINTER_HANDLE hPrinter,
426                 [out] GDI_HANDLE *pHandle,
427                 [in] spoolss_DevmodeContainer *pDevModeContainer
428         );
429
430         /******************/
431         /* Function: 0x24 */
432
433         WERROR winspool_AsyncPlayGdiScriptOnPrinterIC(
434                 [in] GDI_HANDLE hPrinterIC,
435                 [in, size_is(cIn)] uint8 *pIn,
436                 [in] uint32 cIn,
437                 [out, size_is(cOut)] uint8 *pOut,
438                 [in] uint32 cOut,
439                 [in] uint32 ul
440         );
441
442         /******************/
443         /* Function: 0x25 */
444
445         WERROR winspool_AsyncDeletePrinterIC(
446                 [in, out] GDI_HANDLE *phPrinterIC
447         );
448
449         /******************/
450         /* Function: 0x26 */
451
452         WERROR winspool_AsyncEnumPrinters(
453                 [in] uint32 Flags,
454                 [in,unique] [string,charset(UTF16)] uint16 *pName,
455                 [in] uint32 Level,
456                 [in, out, unique, size_is(cbBuf)] uint8 *pPrinterEnum,
457                 [in]  uint32 cbBuf,
458                 [out] uint32 *pcbNeeded,
459                 [out] uint32 *pcReturned
460         );
461
462         /******************/
463         /* Function: 0x27 */
464
465         [public] WERROR winspool_AsyncAddPrinterDriver(
466                 [in,unique] [string,charset(UTF16)] uint16 *pName,
467                 [in] spoolss_AddDriverInfoCtr *pDriverContainer,
468                 [in] uint32 dwFileCopyFlags
469         );
470
471         /******************/
472         /* Function: 0x28 */
473
474         WERROR winspool_AsyncEnumPrinterDrivers(
475                 [in,unique] [string,charset(UTF16)] uint16 *pName,
476                 [in,unique] [string,charset(UTF16)] uint16 *pEnvironment,
477                 [in] uint32 Level,
478                 [in, out, unique, size_is(cbBuf)] uint8 *pDrivers,
479                 [in] uint32 cbBuf,
480                 [out] uint32 *pcbNeeded,
481                 [out] uint32 *pcReturned
482         );
483
484         /******************/
485         /* Function: 0x29 */
486
487         [public] WERROR winspool_AsyncGetPrinterDriverDirectory(
488                 [in,unique] [string,charset(UTF16)] uint16 *pName,
489                 [in,unique] [string,charset(UTF16)] uint16 *pEnvironment,
490                 [in] uint32 Level,
491                 [in, out, unique, size_is(cbBuf)] uint8 *pDriverDirectory,
492                 [in] uint32 cbBuf,
493                 [out] uint32 *pcbNeeded
494         );
495
496         /******************/
497         /* Function: 0x2a */
498
499         WERROR winspool_AsyncDeletePrinterDriver(
500                 [in,unique] [string,charset(UTF16)] uint16 *pName,
501                 [in] [string,charset(UTF16)] uint16 *pEnvironment,
502                 [in] [string,charset(UTF16)] uint16 *pDriverName
503         );
504
505         /******************/
506         /* Function: 0x2b */
507
508         WERROR winspool_AsyncDeletePrinterDriverEx(
509                 [in,unique] [string,charset(UTF16)] uint16 *pName,
510                 [in] [string,charset(UTF16)] uint16 *pEnvironment,
511                 [in] [string,charset(UTF16)] uint16 *pDriverName,
512                 [in] uint32 dwDeleteFlag,
513                 [in] uint32 dwVersionNum
514         );
515
516         /******************/
517         /* Function: 0x2c */
518
519         WERROR winspool_AsyncAddPrintProcessor(
520                 [in,unique] [string,charset(UTF16)] uint16 *pName,
521                 [in] [string,charset(UTF16)] uint16 *pEnvironment,
522                 [in] [string,charset(UTF16)] uint16 *pPathName,
523                 [in] [string,charset(UTF16)] uint16 *pPrintProcessorName
524         );
525
526         /******************/
527         /* Function: 0x2d */
528
529         WERROR winspool_AsyncEnumPrintProcessors(
530                 [in,unique] [string,charset(UTF16)] uint16 *pName,
531                 [in,unique] [string,charset(UTF16)] uint16 *pEnvironment,
532                 [in] uint32 Level,
533                 [in, out, unique, size_is(cbBuf)] uint8 *pPrintProcessorInfo,
534                 [in] uint32 cbBuf,
535                 [out] uint32 *pcbNeeded,
536                 [out] uint32 *pcReturned
537         );
538
539         /******************/
540         /* Function: 0x2e */
541
542         WERROR winspool_AsyncGetPrintProcessorDirectory(
543                 [in,unique] [string,charset(UTF16)] uint16 *pName,
544                 [in,unique] [string,charset(UTF16)] uint16 *pEnvironment,
545                 [in] uint32 Level,
546                 [in, out, unique, size_is(cbBuf)] uint8 *pPrintProcessorDirectory,
547                 [in] uint32 cbBuf,
548                 [out] uint32 *pcbNeeded
549         );
550
551         /******************/
552         /* Function: 0x2f */
553
554         WERROR winspool_AsyncEnumPorts(
555                 [in,unique] [string,charset(UTF16)] uint16 *pName,
556                 [in] uint32 Level,
557                 [in, out, unique, size_is(cbBuf)] uint8 *pPort,
558                 [in]  uint32 cbBuf,
559                 [out] uint32 *pcbNeeded,
560                 [out] uint32 *pcReturned
561         );
562
563         /******************/
564         /* Function: 0x30 */
565
566         WERROR winspool_AsyncEnumMonitors(
567                 [in,unique] [string,charset(UTF16)] uint16 *pName,
568                 [in] uint32 Level,
569                 [in, out, unique, size_is(cbBuf)] uint8 *pMonitor,
570                 [in]  uint32 cbBuf,
571                 [out] uint32 *pcbNeeded,
572                 [out] uint32 *pcReturned
573         );
574
575         /******************/
576         /* Function: 0x31 */
577
578         WERROR winspool_AsyncAddPort(
579                 [in,unique] [string,charset(UTF16)] uint16 *pName,
580                 [in] spoolss_SetPortInfoContainer *pPortContainer,
581                 [in] spoolss_PortVarContainer *pPortVarContainer,
582                 [in] [string,charset(UTF16)] uint16 *pMonitorName
583         );
584
585         /******************/
586         /* Function: 0x32 */
587
588         WERROR winspool_AsyncSetPort(
589                 [in,unique] [string,charset(UTF16)] uint16 *pName,
590                 [in,unique] [string,charset(UTF16)] uint16 *pPortName,
591                 [in] spoolss_SetPortInfoContainer *pPortContainer
592         );
593
594         /******************/
595         /* Function: 0x33 */
596
597         WERROR winspool_AsyncAddMonitor(
598                 [in,unique] [string,charset(UTF16)] uint16 *Name,
599                 [in] spoolss_MonitorContainer *pMonitorContainer
600         );
601
602         /******************/
603         /* Function: 0x34 */
604
605         WERROR winspool_AsyncDeleteMonitor(
606                 [in,unique] [string,charset(UTF16)] uint16 *Name,
607                 [in,unique] [string,charset(UTF16)] uint16 *pEnvironment,
608                 [in] [string,charset(UTF16)] uint16 *pMonitorName
609         );
610
611         /******************/
612         /* Function: 0x35 */
613
614         WERROR winspool_AsyncDeletePrintProcessor(
615                 [in,unique] [string,charset(UTF16)] uint16 *Name,
616                 [in,unique] [string,charset(UTF16)] uint16 *pEnvironment,
617                 [in] [string,charset(UTF16)] uint16 *pPrintProcessorName
618         );
619
620         /******************/
621         /* Function: 0x36 */
622
623         WERROR winspool_AsyncEnumPrintProcessorDatatypes(
624                 [in,unique] [string,charset(UTF16)] uint16 *pName,
625                 [in,unique] [string,charset(UTF16)] uint16 *pPrintProcessorName,
626                 [in] uint32 Level,
627                 [in, out, unique, size_is(cbBuf)] uint8 *pDatatypes,
628                 [in]  uint32 cbBuf,
629                 [out] uint32 *pcbNeeded,
630                 [out] uint32 *pcReturned
631         );
632
633         /******************/
634         /* Function: 0x37 */
635
636         WERROR winspool_AsyncAddPerMachineConnection(
637                 [in,unique] [string,charset(UTF16)] uint16 *pServer,
638                 [in] [string,charset(UTF16)] uint16 *pPrinterName,
639                 [in] [string,charset(UTF16)] uint16 *pPrintServer,
640                 [in] [string,charset(UTF16)] uint16 *pProvider
641         );
642
643         /******************/
644         /* Function: 0x38 */
645
646         WERROR winspool_AsyncDeletePerMachineConnection(
647                 [in,unique] [string,charset(UTF16)] uint16 *pServer,
648                 [in] [string,charset(UTF16)] uint16 *pPrinterName
649         );
650
651         /******************/
652         /* Function: 0x39 */
653
654         WERROR winspool_AsyncEnumPerMachineConnections(
655                 [in,unique] [string,charset(UTF16)] uint16 *pServer,
656                 [in, out, unique, size_is(cbBuf)] uint8 *pPrinterEnum,
657                 [in]  uint32 cbBuf,
658                 [out] uint32 *pcbNeeded,
659                 [out] uint32 *pcReturned
660         );
661
662         /******************/
663         /* Function: 0x3a */
664
665         typedef enum {
666                 winspool_PropertyTypeString = 1,
667                 winspool_PropertyTypeInt32 = 2,
668                 winspool_PropertyTypeInt64 = 3,
669                 winspool_PropertyTypeByte = 4,
670                 winspool_PropertyTypeTime = 5,
671                 winspool_PropertyTypeDevMode = 6,
672                 winspool_PropertyTypeSD = 7,
673                 winspool_PropertyTypeNotificationReply = 8,
674                 winspool_PropertyTypeNotificationOptions = 9
675         } winspool_PrintPropertyType;
676
677         typedef [ms_union,switch_type(winspool_PrintPropertyType)] union {
678                 [case(winspool_PropertyTypeString)]     [string,charset(UTF16)] uint16 *propertyString;
679                 [case(winspool_PropertyTypeInt32)]      uint32 propertyInt32;
680                 [case(winspool_PropertyTypeInt64)]      hyper propertyInt64;
681                 [case(winspool_PropertyTypeByte)]       uint8 propertyByte;
682                 [case(winspool_PropertyTypeTime)]       spoolss_TimeCtr propertyTimeContainer;
683                 [case(winspool_PropertyTypeDevMode)]    spoolss_DevmodeContainer propertyDevModeContainer;
684                 [case(winspool_PropertyTypeSD)]         sec_desc_buf propertySDContainer;
685                 [case(winspool_PropertyTypeNotificationReply)]  winspool_NOTIFY_REPLY_CONTAINER propertyReplyContainer;
686                 [case(winspool_PropertyTypeNotificationOptions)] winspool_NOTIFY_OPTIONS_CONTAINER propertyOptionsContainer;
687         } winspool_PrintPropertyValueUnion;
688
689         typedef struct {
690                 winspool_PrintPropertyType PropertyType;
691                 [switch_is(PropertyType)] winspool_PrintPropertyValueUnion value;
692         } winspool_PrintPropertyValue;
693
694         typedef struct {
695                 [string,charset(UTF16)] uint16 *propertyName;
696                 winspool_PrintPropertyValue propertyValue;
697         } winspool_PrintNamedProperty;
698
699         typedef struct {
700                 [range(0,50)] uint32 numberOfProperties;
701                 [size_is(numberOfProperties), unique] winspool_PrintNamedProperty *propertiesCollection;
702         } winspool_PrintPropertiesCollection;
703
704         [public] HRESULT winspool_SyncRegisterForRemoteNotifications(
705                 [in]    PRINTER_HANDLE                  hPrinter,
706                 [in]    winspool_PrintPropertiesCollection *pNotifyFilter,
707                 [out]   RMTNTFY_HANDLE                 *phRpcHandle
708         );
709
710         /******************/
711         /* Function: 0x3b */
712
713         HRESULT winspool_SyncUnRegisterForRemoteNotifications(
714                 [in, out]   RMTNTFY_HANDLE             *phRpcHandle
715         );
716
717         /******************/
718         /* Function: 0x3c */
719
720         HRESULT winspool_SyncRefreshRemoteNotifications(
721                 [in]    RMTNTFY_HANDLE                  hRpcHandle,
722                 [in]    winspool_PrintPropertiesCollection *pNotifyFilter,
723                 [out]   winspool_PrintPropertiesCollection **ppNotifyData
724         );
725
726         /******************/
727         /* Function: 0x3d */
728
729         HRESULT winspool_AsyncGetRemoteNotifications(
730                 [in]    RMTNTFY_HANDLE                  hRpcHandle,
731                 [out]   winspool_PrintPropertiesCollection **ppNotifyData
732         );
733
734         /******************/
735         /* Function: 0x3e */
736
737         typedef [bitmap32bit] bitmap {
738                 IPDFP_FLAG_NONE                 = 0x00000000,
739                 IPDFP_COPY_ALL_FILES            = 0x00000001
740         } winspool_InstallPrinterDriverFromPackageFlags;
741
742         HRESULT winspool_AsyncInstallPrinterDriverFromPackage(
743                 [in,unique] [string,charset(UTF16)] uint16 *pszServer,
744                 [in,unique] [string,charset(UTF16)] uint16 *pszInfPath,
745                 [in] [string,charset(UTF16)] uint16 *pszDriverName,
746                 [in] [string,charset(UTF16)] uint16 *pszEnvironment,
747                 [in] winspool_InstallPrinterDriverFromPackageFlags dwFlags
748         );
749
750         /******************/
751         /* Function: 0x3f */
752
753         typedef [bitmap32bit] bitmap {
754                 UPDP_FLAG_NONE          = 0x00000000,
755                 UPDP_UPLOAD_ALWAYS      = 0x00000002,
756                 UPDP_CHECK_DRIVERSTORE  = 0x00000004
757         } winspool_UploadPrinterDriverPackageFlags;
758
759         HRESULT winspool_AsyncUploadPrinterDriverPackage(
760                 [in,unique] [string,charset(UTF16)] uint16 *pszServer,
761                 [in] [string,charset(UTF16)] uint16 *pszInfPath,
762                 [in] [string,charset(UTF16)] uint16 *pszEnvironment,
763                 [in] winspool_UploadPrinterDriverPackageFlags dwFlags,
764                 [in, out, unique, size_is(*pcchDestInfPath)] [charset(UTF16)] uint16 *pszDestInfPath,
765                 [in, out]                  uint32 *pcchDestInfPath
766         );
767
768         /******************/
769         /* Function: 0x40 */
770
771         [public] HRESULT winspool_AsyncGetCorePrinterDrivers(
772                 [in,unique] [string,charset(UTF16)] uint16 *pszServer,
773                 [in] [string,charset(UTF16)] uint16 *pszEnvironment,
774                 [in]                       uint32     cchCoreDrivers,
775                 [in, size_is(cchCoreDrivers)]  uint16 *pszzCoreDriverDependencies,
776                 [in]                       uint32     cCorePrinterDrivers,
777                 [out, size_is(cCorePrinterDrivers)]  spoolss_CorePrinterDriver *pCorePrinterDrivers
778         );
779
780         /******************/
781         /* Function: 0x41 */
782
783         HRESULT winspool_AsyncCorePrinterDriverInstalled(
784                 [in,unique] [string,charset(UTF16)] uint16 *pszServer,
785                 [in] [string,charset(UTF16)] uint16 *pszEnvironment,
786                 [in]                       GUID      CoreDriverGUID,
787                 [in]                       NTTIME  ftDriverDate,
788                 [in]                       hyper dwlDriverVersion,
789                 [out]       int *pbDriverInstalled
790         );
791
792         /******************/
793         /* Function: 0x42 */
794
795         HRESULT winspool_AsyncGetPrinterDriverPackagePath(
796                 [in,unique] [string,charset(UTF16)] uint16 *pszServer,
797                 [in] [string,charset(UTF16)] uint16 *pszEnvironment,
798                 [in,unique] [string,charset(UTF16)] uint16 *pszLanguage,
799                 [in] [string,charset(UTF16)] uint16 *pszPackageID,
800                 [in, out, unique, size_is(cchDriverPackageCab)]  uint16 *pszDriverPackageCab,
801                 [in]                       uint32  cchDriverPackageCab,
802                 [out]                      uint32 *pcchRequiredSize
803         );
804
805         /******************/
806         /* Function: 0x43 */
807
808         HRESULT winspool_AsyncDeletePrinterDriverPackage(
809                 [in,unique] [string,charset(UTF16)] uint16 *pszServer,
810                 [in] [string,charset(UTF16)] uint16 *pszInfPath,
811                 [in] [string,charset(UTF16)] uint16 *pszEnvironment
812         );
813
814         /******************/
815         /* Function: 0x44 */
816
817         WERROR winspool_AsyncReadPrinter(
818                 [in]                    PRINTER_HANDLE  hPrinter,
819                 [out, size_is(cbBuf)]   uint8 *pBuf,
820                 [in]                    uint32           cbBuf,
821                 [out]                   uint32 *pcNoBytesRead
822         );
823
824         /******************/
825         /* Function: 0x45 */
826
827         WERROR winspool_AsyncResetPrinter(
828                 [in]                    PRINTER_HANDLE     hPrinter,
829                 [in,unique] [string,charset(UTF16)] uint16 *pDatatype,
830                 [in]                    spoolss_DevmodeContainer *pDevModeContainer
831         );
832
833         /******************/
834         /* Function: 0x46 */
835
836         WERROR winspool_AsyncGetJobNamedPropertyValue(
837                 [in] PRINTER_HANDLE hPrinter,
838                 [in] uint32 JobId,
839                 [in] [string,charset(UTF16)] uint16 *pszName,
840                 [out] spoolss_PrintPropertyValue *pValue
841         );
842
843         /******************/
844         /* Function: 0x47 */
845
846         [public] WERROR winspool_AsyncSetJobNamedProperty(
847                 [in] PRINTER_HANDLE hPrinter,
848                 [in] uint32 JobId,
849                 [in] spoolss_PrintNamedProperty *pProperty
850         );
851
852         /******************/
853         /* Function: 0x48 */
854
855         WERROR winspool_AsyncDeleteJobNamedProperty(
856                 [in] PRINTER_HANDLE hPrinter,
857                 [in] uint32 JobId,
858                 [in] [string,charset(UTF16)] uint16 *pszName
859         );
860
861         /******************/
862         /* Function: 0x49 */
863
864         WERROR winspool_AsyncEnumJobNamedProperties(
865                 [in] PRINTER_HANDLE hPrinter,
866                 [in] uint32 JobId,
867                 [out] uint32 *pcProperties,
868                 [out, size_is(,*pcProperties)] spoolss_PrintNamedProperty **ppProperties
869         );
870
871         /******************/
872         /* Function: 0x4a */
873
874         WERROR winspool_AsyncLogJobInfoForBranchOffice(
875                 [in] PRINTER_HANDLE hPrinter,
876                 [in,ref] spoolss_BranchOfficeJobDataContainer *pBranchOfficeJobDataContainer
877         );
878 }