OLD | NEW |
(Empty) | |
| 1 // Copyright 2013 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 GCP20_PROTOTYPE_PRINTER_H_ |
| 6 #define GCP20_PROTOTYPE_PRINTER_H_ |
| 7 |
| 8 #include <string> |
| 9 #include <vector> |
| 10 |
| 11 #include "cloud_print/gcp20/prototype/dns_sd_server.h" |
| 12 |
| 13 // This class will maintain work of DNS-SD server, HTTP server and others. |
| 14 class Printer { |
| 15 public: |
| 16 // Constructs uninitialized object. |
| 17 Printer(); |
| 18 |
| 19 // Destroys the object. |
| 20 ~Printer(); |
| 21 |
| 22 // Starts all servers. |
| 23 bool Start(); |
| 24 |
| 25 // Stops all servers. |
| 26 void Stop(); |
| 27 |
| 28 private: |
| 29 // Creates data for DNS TXT respond. |
| 30 std::vector<std::string> CreateTxt() const; |
| 31 |
| 32 // Contains |true| if initialized. |
| 33 bool initialized_; |
| 34 |
| 35 // Contains DNS-SD server. |
| 36 DnsSdServer dns_server_; |
| 37 |
| 38 DISALLOW_COPY_AND_ASSIGN(Printer); |
| 39 }; |
| 40 |
| 41 #endif // GCP20_PROTOTYPE_PRINTER_H_ |
| 42 |
OLD | NEW |