Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. | |
|
Vitaly Buka (NO REVIEWS)
2014/01/07 21:16:23
(c) ?
Noam Samuel
2014/01/09 21:30:33
Done.
| |
| 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 CHROME_BROWSER_LOCAL_DISCOVERY_DEVICE_DESCRIPTION_H_ | |
| 6 #define CHROME_BROWSER_LOCAL_DISCOVERY_DEVICE_DESCRIPTION_H_ | |
| 7 | |
| 8 #include <string> | |
| 9 | |
| 10 #include "base/time/time.h" | |
| 11 #include "net/base/host_port_pair.h" | |
| 12 #include "net/base/net_util.h" | |
| 13 | |
| 14 namespace local_discovery { | |
| 15 | |
| 16 struct ServiceDescription; | |
| 17 | |
| 18 struct DeviceDescription { | |
| 19 enum ConnectionState { | |
| 20 ONLINE, | |
| 21 OFFLINE, | |
| 22 CONNECTING, | |
| 23 NOT_CONFIGURED, | |
| 24 UNKNOWN | |
| 25 }; | |
| 26 | |
| 27 DeviceDescription(); | |
| 28 ~DeviceDescription(); | |
| 29 | |
| 30 void FillFromServiceDescription( | |
| 31 const ServiceDescription& service_description); | |
| 32 | |
| 33 // Display attributes | |
| 34 std::string name; | |
| 35 std::string description; | |
| 36 | |
| 37 // Functional attributes | |
| 38 std::string url; | |
| 39 std::string id; | |
| 40 std::string type; | |
| 41 ConnectionState connection_state; | |
| 42 | |
| 43 // Attributes related to local HTTP | |
| 44 net::HostPortPair address; | |
| 45 net::IPAddressNumber ip_address; | |
| 46 base::Time last_seen; | |
| 47 }; | |
| 48 | |
| 49 } // namespace local_discovery | |
| 50 | |
| 51 #endif // CHROME_BROWSER_LOCAL_DISCOVERY_DEVICE_DESCRIPTION_H_ | |
| OLD | NEW |