OLD | NEW |
| (Empty) |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef CLOUD_PRINT_VIRTUAL_DRIVER_WIN_PORT_MONITOR_SPOOLER_WIN_H_ | |
6 #define CLOUD_PRINT_VIRTUAL_DRIVER_WIN_PORT_MONITOR_SPOOLER_WIN_H_ | |
7 #pragma once | |
8 | |
9 #include <windows.h> | |
10 | |
11 // Compatible structures and prototypes are also defined in the Windows DDK in | |
12 // winsplp.h. | |
13 #ifndef _WINSPLP_ | |
14 | |
15 typedef struct { | |
16 DWORD size; | |
17 BOOL (WINAPI *pfnEnumPorts)(HANDLE, | |
18 wchar_t*, | |
19 DWORD level, | |
20 BYTE* ports, | |
21 DWORD ports_size, | |
22 DWORD* needed_bytes, | |
23 DWORD* returned); | |
24 | |
25 BOOL (WINAPI *pfnOpenPort)(HANDLE monitor_data, wchar_t*, HANDLE* handle); | |
26 | |
27 void* pfnOpenPortEx; // Unused. | |
28 | |
29 BOOL (WINAPI *pfnStartDocPort)(HANDLE port_handle, | |
30 wchar_t* printer_name, | |
31 DWORD job_id, | |
32 DWORD, | |
33 BYTE*); | |
34 | |
35 BOOL (WINAPI *pfnWritePort)(HANDLE port, | |
36 BYTE* buffer, | |
37 DWORD buffer_size, | |
38 DWORD* bytes_written); | |
39 | |
40 BOOL (WINAPI *pfnReadPort)(HANDLE, BYTE*, DWORD, DWORD* bytes_read); | |
41 | |
42 BOOL (WINAPI *pfnEndDocPort)(HANDLE port_handle); | |
43 | |
44 BOOL (WINAPI *pfnClosePort)(HANDLE port_handle); | |
45 | |
46 void* pfnAddPort; // Unused. | |
47 | |
48 void* pfnAddPortEx; // Unused. | |
49 | |
50 void* pfnConfigurePort; // Unused. | |
51 | |
52 void* pfnDeletePort; // Unused. | |
53 | |
54 void* pfnGetPrinterDataFromPort; // Unused. | |
55 | |
56 void* pfnSetPortTimeOuts; // Unusued. | |
57 | |
58 BOOL (WINAPI *pfnXcvOpenPort)(HANDLE monitor, | |
59 const wchar_t*, | |
60 ACCESS_MASK granted_access, | |
61 HANDLE* handle); | |
62 | |
63 DWORD (WINAPI *pfnXcvDataPort)(HANDLE xcv_handle, | |
64 const wchar_t* data_name, | |
65 BYTE*, | |
66 DWORD, | |
67 BYTE* output_data, | |
68 DWORD output_data_bytes, | |
69 DWORD* output_data_bytes_needed); | |
70 | |
71 BOOL (WINAPI *pfnXcvClosePort)(HANDLE handle); | |
72 | |
73 VOID (WINAPI *pfnShutdown)(HANDLE monitor_handle); | |
74 } MONITOR2; | |
75 | |
76 typedef struct { | |
77 DWORD size; | |
78 | |
79 BOOL (WINAPI *pfnAddPortUI)(const wchar_t*, | |
80 HWND hwnd, | |
81 const wchar_t* monitor_name, | |
82 wchar_t**); | |
83 | |
84 BOOL (WINAPI *pfnConfigurePortUI)(const wchar_t*, | |
85 HWND hwnd, | |
86 const wchar_t* port_name); | |
87 | |
88 BOOL (WINAPI *pfnDeletePortUI)(const wchar_t*, | |
89 HWND hwnd, | |
90 const wchar_t* port_name); | |
91 } MONITORUI; | |
92 | |
93 typedef struct { | |
94 DWORD cbSize; | |
95 HANDLE hSpooler; | |
96 HKEY hckRegistryRoot; | |
97 void* pMonitorReg; // Unused | |
98 BOOL bLocal; | |
99 LPCWSTR pszServerName; | |
100 } MONITORINIT; | |
101 | |
102 MONITOR2* WINAPI InitializePrintMonitor2(MONITORINIT* monitor_init, | |
103 HANDLE* monitor_handle); | |
104 | |
105 MONITORUI* WINAPI InitializePrintMonitorUI(void); | |
106 | |
107 #endif // ifdef USE_WIN_DDK | |
108 #endif // CLOUD_PRINT_VIRTUAL_DRIVER_WIN_PORT_MONITOR_SPOOLER_WIN_H_ | |
109 | |
OLD | NEW |