Cleanup ExtensionSyncService and SyncBundle.
[chromium-blink-merge.git] / printing / backend / cups_helper.h
blob873f1ec2821253c2493c8c5016821193400d3791
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
3 // found in the LICENSE file.
5 #ifndef PRINTING_BACKEND_CUPS_HELPER_H_
6 #define PRINTING_BACKEND_CUPS_HELPER_H_
8 #include <cups/cups.h>
10 #include <string>
12 #include "printing/printing_export.h"
14 class GURL;
16 // These are helper functions for dealing with CUPS.
17 namespace printing {
19 struct PrinterSemanticCapsAndDefaults;
21 // Helper wrapper around http_t structure, with connection and cleanup
22 // functionality.
23 class PRINTING_EXPORT HttpConnectionCUPS {
24 public:
25 HttpConnectionCUPS(const GURL& print_server_url,
26 http_encryption_t encryption);
27 ~HttpConnectionCUPS();
29 void SetBlocking(bool blocking);
31 http_t* http();
33 private:
34 http_t* http_;
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);
44 } // namespace printing
46 #endif // PRINTING_BACKEND_CUPS_HELPER_H_