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

Side by Side Diff: printing/backend/cups_helper.h

Issue 10905006: Get semantic capabilities from Print Backend. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 3 months 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) 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_CUPS_HELPER_H_ 5 #ifndef PRINTING_BACKEND_CUPS_HELPER_H_
6 #define PRINTING_BACKEND_CUPS_HELPER_H_ 6 #define PRINTING_BACKEND_CUPS_HELPER_H_
7 7
8 #include <cups/cups.h> 8 #include <cups/cups.h>
9 9
10 #include <string>
11
10 #include "printing/printing_export.h" 12 #include "printing/printing_export.h"
11 13
12 class GURL; 14 class GURL;
13 15
14 // These are helper functions for dealing with CUPS. 16 // These are helper functions for dealing with CUPS.
15 namespace printing { 17 namespace printing {
16 18
19 struct PrinterSemanticCapsAndDefaults;
20
17 // Helper wrapper around http_t structure, with connection and cleanup 21 // Helper wrapper around http_t structure, with connection and cleanup
18 // functionality. 22 // functionality.
19 class PRINTING_EXPORT HttpConnectionCUPS { 23 class PRINTING_EXPORT HttpConnectionCUPS {
20 public: 24 public:
21 HttpConnectionCUPS(const GURL& print_server_url, 25 HttpConnectionCUPS(const GURL& print_server_url,
22 http_encryption_t encryption); 26 http_encryption_t encryption);
23 ~HttpConnectionCUPS(); 27 ~HttpConnectionCUPS();
24 28
25 void SetBlocking(bool blocking); 29 void SetBlocking(bool blocking);
26 30
27 http_t* http(); 31 http_t* http();
28 32
29 private: 33 private:
30 http_t* http_; 34 http_t* http_;
31 }; 35 };
32 36
37 // Helper function to parse and convert PPD capabilitites to
38 // semantic options.
39 PRINTING_EXPORT bool parsePpdCapabilities(
40 const std::string& printer_name,
41 const std::string& printer_capabilities,
42 PrinterSemanticCapsAndDefaults* printer_info);
43
33 } // namespace printing 44 } // namespace printing
34 45
35 #endif // PRINTING_BACKEND_CUPS_HELPER_H_ 46 #endif // PRINTING_BACKEND_CUPS_HELPER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698