source: trunk/src/winspool/oslibspl.h@ 22012

Last change on this file since 22012 was 21305, checked in by ydario, 16 years ago

winspool updates.

File size: 3.8 KB
Line 
1#ifndef __OSLIBSPL_H__
2#define __OSLIBSPL_H__
3
4
5/*******************************************************************************
6* Structures and Typedefs *
7*******************************************************************************/
8typedef struct
9{
10 ULONG flType;
11 LPSTR pszComputerName;
12 LPSTR pszPrintDestinationName;
13 LPSTR pszDescription;
14 LPSTR pszLocalName;
15} OSLIB_PRINTERINFO, *POSLIB_PRINTERINFO;
16
17typedef struct
18{
19 LONG cb;
20 LONG lVersion;
21 CHAR szDeviceName[32];
22 CHAR abGeneralData[1];
23} OSLIB_DRIVDATA;
24
25typedef struct
26{
27 LPSTR pszName;
28 USHORT uPriority;
29 USHORT uStartTime;
30 USHORT uUntilTime;
31 USHORT fsType;
32 LPSTR pszSepFile;
33 LPSTR pszPrProc;
34 LPSTR pszParms;
35 LPSTR pszComment;
36 USHORT fsStatus;
37 USHORT cJobs;
38 LPSTR pszPrinters;
39 LPSTR pszDriverName;
40 OSLIB_DRIVDATA *pDriverData;
41} OSLIB_PRQINFO3, *POSLIB_PRQINFO3;
42
43typedef struct {
44 LPSTR pszPrinterName; /* Print device name. */
45 LPSTR pszUserName; /* User who submitted job. */
46 LPSTR pszLogAddr; /* Logical address (for example LPT1). */
47 USHORT uJobId; /* Identity of current job. */
48 USHORT fsStatus; /* Print destination status. */
49 LPSTR pszStatus; /* Print device comment while printing. */
50 LPSTR pszComment; /* Print device description. */
51 LPSTR pszDrivers; /* Drivers supported by print device. */
52 USHORT time; /* Time job has been printing (minutes) */
53 USHORT usTimeOut; /* Device timeout (seconds) */
54} OSLIB_PRDINFO3, *POSLIB_PRDINFO3;
55
56typedef struct
57{
58 LPSTR pszLogAddress;
59 LPSTR pszDriverName;
60 void * pdriv;
61 LPSTR pszDataType;
62 LPSTR pszComment;
63 LPSTR pszQueueProcName;
64 LPSTR pszQueueProcParams;
65 LPSTR pszSpoolerParams;
66 LPSTR pszNetworkParams;
67} OSLIB_DEVOPENSTRUC, *POSLIB_DEVOPENSTRUC;
68
69/*** Flags for flType in PRINTERINFO and SplEnumPrinter *************/
70#define OSLIB_SPL_PR_QUEUE 0x00000001 /* include queues */
71#define OSLIB_SPL_PR_DIRECT_DEVICE 0x00000002 /* unattached devices */
72#define OSLIB_SPL_PR_QUEUED_DEVICE 0x00000004 /* queued devices */
73#define OSLIB_SPL_PR_LOCAL_ONLY 0x00000100 /* exclude remote queues */
74
75#define OSLIB_SPL_PR_ALL (OSLIB_SPL_PR_QUEUE|OSLIB_SPL_PR_DIRECT_DEVICE|OSLIB_SPL_PR_QUEUED_DEVICE)
76
77#define OSLIB_PRQ3_TYPE_RAW 0x0001 /* spools printer-specific data */
78#define OSLIB_PRQ3_TYPE_BYPASS 0x0002 /* allow print while spooling */
79#define OSLIB_PRQ3_TYPE_APPDEFAULT 0x0004 /* set for Application default Q*/
80
81void * OSLibSplEnumPrinter(LPSTR pszComputer, DWORD flType, PDWORD pcReturned, PDWORD pcTotal);
82void * OSLibSplEnumDevice(LPSTR pszComputer, DWORD ulLevel, DWORD *pcReturned, DWORD *pcTotal);
83void * OSLibSplEnumQueue(LPSTR pszComputer, DWORD ulLevel, DWORD *pcReturned, DWORD *pcTotal);
84
85BOOL ExportPrintersToRegistry(void);
86ULONG OSLibShowPrinterDialog(HWND, LPSTR printerName);
87
88BOOL OSLibSplFindDefaultPrinter(LPSTR lpszPortName, LPSTR lpszDriverName, LPSTR lpszQueueName);
89void * OSLibSplQueryQueue(LPSTR pszComputerName, LPSTR pszQueueName, ULONG ulLevel);
90
91HANDLE OSLibSplQmOpen(LPSTR pszToken, LONG lCount, LPSTR* pqmdopData);
92BOOL OSLibSplQmClose(HANDLE hspl);
93BOOL OSLibSplQmStartDoc(HANDLE hspl, LPSTR pszDocName);
94BOOL OSLibSplQmEndDoc(HANDLE hspl);
95BOOL OSLibSplQmWrite(HANDLE hspl, LONG cbData, PVOID pvData);
96BOOL OSLibSplQmNewPage(HANDLE hspl, ULONG ulPageNo);
97
98ULONG OSLibSplWinGetLastError(void);
99
100#endif
Note: See TracBrowser for help on using the repository browser.