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