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 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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <cups/cups.h> | 9 #include <cups/cups.h> |
10 | 10 |
11 #include "printing/printing_export.h" | 11 #include "printing/printing_export.h" |
12 | 12 |
13 class GURL; | 13 class GURL; |
14 | 14 |
15 // These are helper functions for dealing with CUPS. | 15 // These are helper functions for dealing with CUPS. |
16 namespace printing { | 16 namespace printing { |
17 | 17 |
18 // Helper wrapper around http_t structure, with connection and cleanup | 18 // Helper wrapper around http_t structure, with connection and cleanup |
19 // functionality. | 19 // functionality. |
20 class PRINTING_EXPORT HttpConnectionCUPS { | 20 class PRINTING_EXPORT HttpConnectionCUPS { |
21 public: | 21 public: |
22 explicit HttpConnectionCUPS(const GURL& print_server_url); | 22 HttpConnectionCUPS(const GURL& print_server_url, |
| 23 http_encryption_t encryption); |
23 ~HttpConnectionCUPS(); | 24 ~HttpConnectionCUPS(); |
24 | 25 |
25 void SetBlocking(bool blocking); | 26 void SetBlocking(bool blocking); |
26 | 27 |
27 http_t* http(); | 28 http_t* http(); |
28 | 29 |
29 private: | 30 private: |
30 http_t* http_; | 31 http_t* http_; |
31 }; | 32 }; |
32 | 33 |
33 } // namespace printing | 34 } // namespace printing |
34 | 35 |
35 #endif // PRINTING_BACKEND_CUPS_HELPER_H_ | 36 #endif // PRINTING_BACKEND_CUPS_HELPER_H_ |
OLD | NEW |