Index: chrome/browser/media/router/discovery/discovery_network_info.h |
diff --git a/chrome/browser/media/router/discovery/discovery_network_info.h b/chrome/browser/media/router/discovery/discovery_network_info.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..b8ec085d2f765beb8a1c66770e1dccf052c68d4f |
--- /dev/null |
+++ b/chrome/browser/media/router/discovery/discovery_network_info.h |
@@ -0,0 +1,33 @@ |
+// Copyright (c) 2017 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef CHROME_BROWSER_MEDIA_ROUTER_DISCOVERY_DISCOVERY_NETWORK_INFO_H_ |
+#define CHROME_BROWSER_MEDIA_ROUTER_DISCOVERY_DISCOVERY_NETWORK_INFO_H_ |
mark a. foltz
2017/05/26 21:38:54
The main purpose of this file seems to be to suppo
btolsch
2017/05/26 23:38:10
Well discovery_network_monitor.h needs this struct
|
+ |
+#include <string> |
+ |
+// Represents a single network interface that can be used for local discovery. |
+struct DiscoveryNetworkInfo { |
+ public: |
+ DiscoveryNetworkInfo(); |
+ DiscoveryNetworkInfo(std::string name, std::string network_id); |
imcheng
2017/05/26 23:49:00
const std::string& for both parameters.
btolsch
2017/05/30 09:54:30
Done.
|
+ ~DiscoveryNetworkInfo() = default; |
mark a. foltz
2017/05/26 21:38:54
If you're declaring the default ctor in the .cc yo
btolsch
2017/05/26 23:38:10
Done.
|
+ |
+ DiscoveryNetworkInfo(const DiscoveryNetworkInfo&); |
+ DiscoveryNetworkInfo& operator=(const DiscoveryNetworkInfo&); |
+ |
+ bool operator==(const DiscoveryNetworkInfo&) const; |
+ bool operator!=(const DiscoveryNetworkInfo&) const; |
+ |
+ // The name of the network interface. e.g. eth0, wlan0 |
+ std::string name; |
+ // Some form of identifier for the network to which this interface is |
+ // connected. For WiFi, we assume the associated SSID identifies the |
+ // connected network. For Ethernet, we assume that the network remains the |
+ // same for the interface (until disconnected), so we use the interface's MAC |
+ // address to identify the network. |
+ std::string network_id; |
+}; |
+ |
+#endif // CHROME_BROWSER_MEDIA_ROUTER_DISCOVERY_DISCOVERY_NETWORK_INFO_H_ |