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.
5 #ifndef CLOUD_PRINT_VIRTUAL_DRIVER_WIN_PORT_MONITOR_SPOOLER_WIN_H_
6 #define CLOUD_PRINT_VIRTUAL_DRIVER_WIN_PORT_MONITOR_SPOOLER_WIN_H_
10 // Compatible structures and prototypes are also defined in the Windows DDK in
16 BOOL (WINAPI
*pfnEnumPorts
)(HANDLE
,
24 BOOL (WINAPI
*pfnOpenPort
)(HANDLE monitor_data
, wchar_t*, HANDLE
* handle
);
26 void* pfnOpenPortEx
; // Unused.
28 BOOL (WINAPI
*pfnStartDocPort
)(HANDLE port_handle
,
29 wchar_t* printer_name
,
34 BOOL (WINAPI
*pfnWritePort
)(HANDLE port
,
37 DWORD
* bytes_written
);
39 BOOL (WINAPI
*pfnReadPort
)(HANDLE
, BYTE
*, DWORD
, DWORD
* bytes_read
);
41 BOOL (WINAPI
*pfnEndDocPort
)(HANDLE port_handle
);
43 BOOL (WINAPI
*pfnClosePort
)(HANDLE port_handle
);
45 void* pfnAddPort
; // Unused.
47 void* pfnAddPortEx
; // Unused.
49 void* pfnConfigurePort
; // Unused.
51 void* pfnDeletePort
; // Unused.
53 void* pfnGetPrinterDataFromPort
; // Unused.
55 void* pfnSetPortTimeOuts
; // Unusued.
57 BOOL (WINAPI
*pfnXcvOpenPort
)(HANDLE monitor
,
59 ACCESS_MASK granted_access
,
62 DWORD (WINAPI
*pfnXcvDataPort
)(HANDLE xcv_handle
,
63 const wchar_t* data_name
,
67 DWORD output_data_bytes
,
68 DWORD
* output_data_bytes_needed
);
70 BOOL (WINAPI
*pfnXcvClosePort
)(HANDLE handle
);
72 VOID (WINAPI
*pfnShutdown
)(HANDLE monitor_handle
);
78 BOOL (WINAPI
*pfnAddPortUI
)(const wchar_t*,
80 const wchar_t* monitor_name
,
83 BOOL (WINAPI
*pfnConfigurePortUI
)(const wchar_t*,
85 const wchar_t* port_name
);
87 BOOL (WINAPI
*pfnDeletePortUI
)(const wchar_t*,
89 const wchar_t* port_name
);
96 void* pMonitorReg
; // Unused
98 LPCWSTR pszServerName
;
101 MONITOR2
* WINAPI
InitializePrintMonitor2(MONITORINIT
* monitor_init
,
102 HANDLE
* monitor_handle
);
104 MONITORUI
* WINAPI
InitializePrintMonitorUI(void);
106 #endif // ifdef USE_WIN_DDK
107 #endif // CLOUD_PRINT_VIRTUAL_DRIVER_WIN_PORT_MONITOR_SPOOLER_WIN_H_