OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef PRINTING_BACKEND_WIN_HELPER_H_ | 5 #ifndef PRINTING_BACKEND_WIN_HELPER_H_ |
6 #define PRINTING_BACKEND_WIN_HELPER_H_ | 6 #define PRINTING_BACKEND_WIN_HELPER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <objidl.h> | 9 #include <objidl.h> |
10 #include <winspool.h> | 10 #include <winspool.h> |
11 #include <prntvpt.h> | 11 #include <prntvpt.h> |
12 #include <xpsprint.h> | 12 #include <xpsprint.h> |
13 | 13 |
14 #include <string> | |
15 | |
16 #include "base/memory/scoped_ptr.h" | |
14 #include "base/string16.h" | 17 #include "base/string16.h" |
15 #include "base/win/scoped_handle.h" | 18 #include "base/win/scoped_handle.h" |
16 #include "printing/printing_export.h" | 19 #include "printing/printing_export.h" |
17 | 20 |
18 // These are helper functions for dealing with Windows Printing. | 21 // These are helper functions for dealing with Windows Printing. |
19 namespace printing { | 22 namespace printing { |
20 | 23 |
24 struct PRINTING_EXPORT PrinterBasicInfo; | |
25 | |
21 class PrinterHandleTraits { | 26 class PrinterHandleTraits { |
22 public: | 27 public: |
23 typedef HANDLE Handle; | 28 typedef HANDLE Handle; |
24 | 29 |
25 static bool CloseHandle(HANDLE handle) { | 30 static bool CloseHandle(HANDLE handle) { |
26 return ::ClosePrinter(handle) != FALSE; | 31 return ::ClosePrinter(handle) != FALSE; |
27 } | 32 } |
28 | 33 |
29 static bool IsHandleValid(HANDLE handle) { | 34 static bool IsHandleValid(HANDLE handle) { |
30 return handle != NULL; | 35 return handle != NULL; |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
113 UINT8 *printable_pages_on, | 118 UINT8 *printable_pages_on, |
114 UINT32 printable_pages_on_count, | 119 UINT32 printable_pages_on_count, |
115 IXpsPrintJob **xps_print_job, | 120 IXpsPrintJob **xps_print_job, |
116 IXpsPrintJobStream **document_stream, | 121 IXpsPrintJobStream **document_stream, |
117 IXpsPrintJobStream **print_ticket_stream); | 122 IXpsPrintJobStream **print_ticket_stream); |
118 private: | 123 private: |
119 XPSPrintModule() { } | 124 XPSPrintModule() { } |
120 static bool InitImpl(); | 125 static bool InitImpl(); |
121 }; | 126 }; |
122 | 127 |
128 PRINTING_EXPORT const PRINTER_INFO_2* GetPrinterInfo2( | |
gene
2012/03/21 21:07:22
Could you please create a simple class representin
Vitaly Buka (NO REVIEWS)
2012/03/21 21:23:01
need to talk about that
On 2012/03/21 21:07:22, g
| |
129 HANDLE printer, | |
130 scoped_array<BYTE>* buffer); | |
131 | |
132 PRINTING_EXPORT const DRIVER_INFO_6* GetDriverInfo6( | |
gene
2012/03/21 21:07:22
Could you please create a simple class representin
Vitaly Buka (NO REVIEWS)
2012/03/21 21:23:01
need to talk about that
On 2012/03/21 21:07:22, g
| |
133 HANDLE printer, | |
134 scoped_array<BYTE>* buffer); | |
135 | |
136 PRINTING_EXPORT void InitBasicPrinterInfo( | |
137 const PRINTER_INFO_2* printer, | |
138 const DRIVER_INFO_6* driver, | |
139 printing::PrinterBasicInfo* printer_info); | |
140 | |
141 PRINTING_EXPORT std::string GetDriverInfo(const DRIVER_INFO_6* driver); | |
142 | |
123 } // namespace printing | 143 } // namespace printing |
124 | 144 |
125 #endif // PRINTING_BACKEND_WIN_HELPER_H_ | 145 #endif // PRINTING_BACKEND_WIN_HELPER_H_ |
OLD | NEW |