OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2017 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 CHROME_BROWSER_MEDIA_ROUTER_DISCOVERY_DISCOVERY_NETWORK_INFO_H_ |
| 6 #define CHROME_BROWSER_MEDIA_ROUTER_DISCOVERY_DISCOVERY_NETWORK_INFO_H_ |
| 7 |
| 8 #include <string> |
| 9 |
| 10 // Represents a single network interface that can be used for local discovery. |
| 11 struct DiscoveryNetworkInfo { |
| 12 public: |
| 13 DiscoveryNetworkInfo(); |
| 14 DiscoveryNetworkInfo(const std::string& name, const std::string& network_id); |
| 15 ~DiscoveryNetworkInfo(); |
| 16 |
| 17 DiscoveryNetworkInfo(const DiscoveryNetworkInfo&); |
| 18 DiscoveryNetworkInfo& operator=(const DiscoveryNetworkInfo&); |
| 19 |
| 20 bool operator==(const DiscoveryNetworkInfo&) const; |
| 21 bool operator!=(const DiscoveryNetworkInfo&) const; |
| 22 |
| 23 // The name of the network interface. e.g. eth0, wlan0 |
| 24 std::string name; |
| 25 // Some form of identifier for the network to which this interface is |
| 26 // connected. For WiFi, we assume the associated SSID identifies the |
| 27 // connected network. For Ethernet, we assume that the network remains the |
| 28 // same for the interface (until disconnected), so we use the interface's MAC |
| 29 // address to identify the network. |
| 30 std::string network_id; |
| 31 }; |
| 32 |
| 33 #endif // CHROME_BROWSER_MEDIA_ROUTER_DISCOVERY_DISCOVERY_NETWORK_INFO_H_ |
OLD | NEW |