OLD | NEW |
| (Empty) |
1 // Copyright 2016 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. | |
4 | |
5 #ifndef CHROMEOS_PRINTING_PRINTER_TRANSLATOR_H_ | |
6 #define CHROMEOS_PRINTING_PRINTER_TRANSLATOR_H_ | |
7 | |
8 #include <memory> | |
9 | |
10 #include "chromeos/chromeos_export.h" | |
11 #include "chromeos/printing/printer_configuration.h" | |
12 | |
13 namespace base { | |
14 class DictionaryValue; | |
15 } | |
16 | |
17 namespace chromeos { | |
18 namespace printing { | |
19 | |
20 CHROMEOS_EXPORT extern const char kPrinterId[]; | |
21 | |
22 // Returns a new Printer populated with fields from |pref|. Returns a nullptr | |
23 // if |pref| does not contain an id field. | |
24 CHROMEOS_EXPORT std::unique_ptr<Printer> PrefToPrinter( | |
25 const base::DictionaryValue& pref); | |
26 | |
27 // Returns a dictionary generated from the |printer| fields. | |
28 CHROMEOS_EXPORT std::unique_ptr<base::DictionaryValue> PrinterToPref( | |
29 const Printer& printer); | |
30 | |
31 } // namespace printing | |
32 } // namespace chromeos | |
33 | |
34 #endif // CHROMEOS_PRINTING_PRINTER_TRANSLATOR_H_ | |
OLD | NEW |