OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 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 | 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 CHROME_SERVICE_CLOUD_PRINT_PRINT_SYSTEM_H_ | 5 #ifndef CHROME_SERVICE_CLOUD_PRINT_PRINT_SYSTEM_H_ |
6 #define CHROME_SERVICE_CLOUD_PRINT_PRINT_SYSTEM_H_ | 6 #define CHROME_SERVICE_CLOUD_PRINT_PRINT_SYSTEM_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <map> | 9 #include <map> |
10 #include <string> | 10 #include <string> |
(...skipping 173 matching lines...) Loading... |
184 virtual PrintServerWatcher* CreatePrintServerWatcher() = 0; | 184 virtual PrintServerWatcher* CreatePrintServerWatcher() = 0; |
185 virtual PrinterWatcher* CreatePrinterWatcher( | 185 virtual PrinterWatcher* CreatePrinterWatcher( |
186 const std::string& printer_name) = 0; | 186 const std::string& printer_name) = 0; |
187 virtual JobSpooler* CreateJobSpooler() = 0; | 187 virtual JobSpooler* CreateJobSpooler() = 0; |
188 | 188 |
189 // Returns a comma separated list of mimetypes for print data that are | 189 // Returns a comma separated list of mimetypes for print data that are |
190 // supported by this print system. The format of this string is the same as | 190 // supported by this print system. The format of this string is the same as |
191 // that used for the HTTP Accept: header. | 191 // that used for the HTTP Accept: header. |
192 virtual std::string GetSupportedMimeTypes() = 0; | 192 virtual std::string GetSupportedMimeTypes() = 0; |
193 | 193 |
194 // Generate unique for proxy. | |
195 static std::string GenerateProxyId(); | |
196 | |
197 // Call this function to obtain printing system for specified print server. | 194 // Call this function to obtain printing system for specified print server. |
198 // If print settings are NULL, default settings will be used. | 195 // If print settings are NULL, default settings will be used. |
199 // Return NULL if no print system available. | 196 // Return NULL if no print system available. |
200 static scoped_refptr<PrintSystem> CreateInstance( | 197 static scoped_refptr<PrintSystem> CreateInstance( |
201 const base::DictionaryValue* print_system_settings); | 198 const base::DictionaryValue* print_system_settings); |
202 }; | 199 }; |
203 | 200 |
204 | 201 |
205 // This typedef is to workaround the issue with certain versions of | 202 // This typedef is to workaround the issue with certain versions of |
206 // Visual Studio where it gets confused between multiple Delegate | 203 // Visual Studio where it gets confused between multiple Delegate |
207 // classes and gives a C2500 error. (I saw this error on the try bots - | 204 // classes and gives a C2500 error. (I saw this error on the try bots - |
208 // the workaround was not needed for my machine). | 205 // the workaround was not needed for my machine). |
209 typedef PrintSystem::PrintServerWatcher::Delegate PrintServerWatcherDelegate; | 206 typedef PrintSystem::PrintServerWatcher::Delegate PrintServerWatcherDelegate; |
210 typedef PrintSystem::PrinterWatcher::Delegate PrinterWatcherDelegate; | 207 typedef PrintSystem::PrinterWatcher::Delegate PrinterWatcherDelegate; |
211 typedef PrintSystem::JobSpooler::Delegate JobSpoolerDelegate; | 208 typedef PrintSystem::JobSpooler::Delegate JobSpoolerDelegate; |
212 | 209 |
213 } // namespace cloud_print | 210 } // namespace cloud_print |
214 | 211 |
215 #endif // CHROME_SERVICE_CLOUD_PRINT_PRINT_SYSTEM_H_ | 212 #endif // CHROME_SERVICE_CLOUD_PRINT_PRINT_SYSTEM_H_ |
OLD | NEW |