Roll leveldb to r78 / 1.15.
[chromium-blink-merge.git] / cloud_print / virtual_driver / win / port_monitor / spooler_win.h
blob7536f95577242033bf8d4373eaed15c004b134ca
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_
8 #include <windows.h>
10 // Compatible structures and prototypes are also defined in the Windows DDK in
11 // winsplp.h.
12 #ifndef _WINSPLP_
14 typedef struct {
15 DWORD size;
16 BOOL (WINAPI *pfnEnumPorts)(HANDLE,
17 wchar_t*,
18 DWORD level,
19 BYTE* ports,
20 DWORD ports_size,
21 DWORD* needed_bytes,
22 DWORD* returned);
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,
30 DWORD job_id,
31 DWORD,
32 BYTE*);
34 BOOL (WINAPI *pfnWritePort)(HANDLE port,
35 BYTE* buffer,
36 DWORD buffer_size,
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,
58 const wchar_t*,
59 ACCESS_MASK granted_access,
60 HANDLE* handle);
62 DWORD (WINAPI *pfnXcvDataPort)(HANDLE xcv_handle,
63 const wchar_t* data_name,
64 BYTE*,
65 DWORD,
66 BYTE* output_data,
67 DWORD output_data_bytes,
68 DWORD* output_data_bytes_needed);
70 BOOL (WINAPI *pfnXcvClosePort)(HANDLE handle);
72 VOID (WINAPI *pfnShutdown)(HANDLE monitor_handle);
73 } MONITOR2;
75 typedef struct {
76 DWORD size;
78 BOOL (WINAPI *pfnAddPortUI)(const wchar_t*,
79 HWND hwnd,
80 const wchar_t* monitor_name,
81 wchar_t**);
83 BOOL (WINAPI *pfnConfigurePortUI)(const wchar_t*,
84 HWND hwnd,
85 const wchar_t* port_name);
87 BOOL (WINAPI *pfnDeletePortUI)(const wchar_t*,
88 HWND hwnd,
89 const wchar_t* port_name);
90 } MONITORUI;
92 typedef struct {
93 DWORD cbSize;
94 HANDLE hSpooler;
95 HKEY hckRegistryRoot;
96 void* pMonitorReg; // Unused
97 BOOL bLocal;
98 LPCWSTR pszServerName;
99 } MONITORINIT;
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_