Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(41)

Side by Side Diff: chrome/service/cloud_print/print_system.h

Issue 4233004: Make CUPS cloud print proxy to support multiple print servers.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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>
11 #include <vector> 11 #include <vector>
12 12
13 #include "base/ref_counted.h" 13 #include "base/ref_counted.h"
14 14
15 #include "printing/backend/print_backend.h"
16
15 class DictionaryValue; 17 class DictionaryValue;
16 class FilePath; 18 class FilePath;
17 19
18 namespace printing { 20 namespace printing {
19 class PrintBackend; 21 class PrintBackend;
20 struct PrinterBasicInfo; 22 struct PrinterBasicInfo;
23 struct PrinterCapsAndDefaults;
21 } 24 }
22 25
23 // This is the interface for platform-specific code for cloud print 26 // This is the interface for platform-specific code for cloud print
24 namespace cloud_print { 27 namespace cloud_print {
25 28
26 typedef int PlatformJobId; 29 typedef int PlatformJobId;
27 30
28 enum PrintJobStatus { 31 enum PrintJobStatus {
29 PRINT_JOB_STATUS_INVALID, 32 PRINT_JOB_STATUS_INVALID,
30 PRINT_JOB_STATUS_IN_PROGRESS, 33 PRINT_JOB_STATUS_IN_PROGRESS,
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 virtual bool Spool(const std::string& print_ticket, 124 virtual bool Spool(const std::string& print_ticket,
122 const FilePath& print_data_file_path, 125 const FilePath& print_data_file_path,
123 const std::string& print_data_mime_type, 126 const std::string& print_data_mime_type,
124 const std::string& printer_name, 127 const std::string& printer_name,
125 const std::string& job_title, 128 const std::string& job_title,
126 JobSpooler::Delegate* delegate) = 0; 129 JobSpooler::Delegate* delegate) = 0;
127 }; 130 };
128 131
129 virtual ~PrintSystem(); 132 virtual ~PrintSystem();
130 133
131 // Get the printing backend. 134 // Initialize print system. This need to be called before any other function
132 virtual printing::PrintBackend* GetPrintBackend() = 0; 135 // of PrintSystem.
136 virtual void Init() = 0;
137
138 // Enumerates the list of installed local and network printers.
139 virtual void EnumeratePrinters(printing::PrinterList* printer_list) = 0;
140
141 // Gets the capabilities and defaults for a specific printer.
142 virtual bool GetPrinterCapsAndDefaults(
143 const std::string& printer_name,
144 printing::PrinterCapsAndDefaults* printer_info) = 0;
145
146 // Returns true if printer_name points to a valid printer.
147 virtual bool IsValidPrinter(const std::string& printer_name) = 0;
133 148
134 // Returns true if ticket is valid. 149 // Returns true if ticket is valid.
135 virtual bool ValidatePrintTicket(const std::string& printer_name, 150 virtual bool ValidatePrintTicket(const std::string& printer_name,
136 const std::string& print_ticket_data) = 0; 151 const std::string& print_ticket_data) = 0;
137 152
138 // Get details for already spooled job. 153 // Get details for already spooled job.
139 virtual bool GetJobDetails(const std::string& printer_name, 154 virtual bool GetJobDetails(const std::string& printer_name,
140 PlatformJobId job_id, 155 PlatformJobId job_id,
141 PrintJobDetails *job_details) = 0; 156 PrintJobDetails *job_details) = 0;
142 157
(...skipping 19 matching lines...) Expand all
162 // Visual Studio where it gets confused between multiple Delegate 177 // Visual Studio where it gets confused between multiple Delegate
163 // classes and gives a C2500 error. (I saw this error on the try bots - 178 // classes and gives a C2500 error. (I saw this error on the try bots -
164 // the workaround was not needed for my machine). 179 // the workaround was not needed for my machine).
165 typedef PrintSystem::PrintServerWatcher::Delegate PrintServerWatcherDelegate; 180 typedef PrintSystem::PrintServerWatcher::Delegate PrintServerWatcherDelegate;
166 typedef PrintSystem::PrinterWatcher::Delegate PrinterWatcherDelegate; 181 typedef PrintSystem::PrinterWatcher::Delegate PrinterWatcherDelegate;
167 typedef PrintSystem::JobSpooler::Delegate JobSpoolerDelegate; 182 typedef PrintSystem::JobSpooler::Delegate JobSpoolerDelegate;
168 183
169 } // namespace cloud_print 184 } // namespace cloud_print
170 185
171 #endif // CHROME_SERVICE_CLOUD_PRINT_PRINT_SYSTEM_H_ 186 #endif // CHROME_SERVICE_CLOUD_PRINT_PRINT_SYSTEM_H_
OLDNEW
« no previous file with comments | « chrome/service/cloud_print/cloud_print_proxy_backend.cc ('k') | chrome/service/cloud_print/print_system_cups.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698