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