OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 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 | 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 CHROMEOS_PRINTING_PRINTER_DISCOVERER_H_ | 5 #ifndef CHROMEOS_PRINTING_PRINTER_DISCOVERER_H_ |
6 #define CHROMEOS_PRINTING_PRINTER_DISCOVERER_H_ | 6 #define CHROMEOS_PRINTING_PRINTER_DISCOVERER_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "chromeos/printing/printer_configuration.h" | 11 #include "chromeos/printing/printer_configuration.h" |
12 | 12 |
13 namespace chromeos { | 13 namespace chromeos { |
14 | 14 |
15 // Interface for printer discovery. Constructs Printer objects from USB and | 15 // Interface for printer discovery. Constructs Printer objects from USB and |
16 // zeroconf (DNS-SD) printers. | 16 // zeroconf (DNS-SD) printers. |
17 class PrinterDiscoverer { | 17 class CHROMEOS_EXPORT PrinterDiscoverer { |
18 public: | 18 public: |
19 // Interface for objects interested in detected printers. | 19 // Interface for objects interested in detected printers. |
20 class Observer { | 20 class Observer { |
21 public: | 21 public: |
22 // Called after discovery has started. | 22 // Called after discovery has started. |
23 virtual void OnDiscoveryStarted() {} | 23 virtual void OnDiscoveryStarted() {} |
24 | 24 |
25 // Called when discovery is stopping. OnPrintersFound will not be | 25 // Called when discovery is stopping. OnPrintersFound will not be |
26 // called after this occurs. | 26 // called after this occurs. |
27 virtual void OnDiscoveryStopping() {} | 27 virtual void OnDiscoveryStopping() {} |
(...skipping 26 matching lines...) Expand all Loading... |
54 // oberserver more than once. | 54 // oberserver more than once. |
55 virtual void AddObserver(PrinterDiscoverer::Observer* observer) = 0; | 55 virtual void AddObserver(PrinterDiscoverer::Observer* observer) = 0; |
56 | 56 |
57 // Remove an observer of printer discovery. | 57 // Remove an observer of printer discovery. |
58 virtual void RemoveObserver(PrinterDiscoverer::Observer* observer) = 0; | 58 virtual void RemoveObserver(PrinterDiscoverer::Observer* observer) = 0; |
59 }; | 59 }; |
60 | 60 |
61 } // namespace chromeos | 61 } // namespace chromeos |
62 | 62 |
63 #endif // CHROMEOS_PRINTING_PRINTER_DISCOVERER_H_ | 63 #endif // CHROMEOS_PRINTING_PRINTER_DISCOVERER_H_ |
OLD | NEW |