| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROMEOS_NETWORK_NETWORK_UTIL_H_ | 5 #ifndef CHROMEOS_NETWORK_NETWORK_UTIL_H_ |
| 6 #define CHROMEOS_NETWORK_NETWORK_UTIL_H_ | 6 #define CHROMEOS_NETWORK_NETWORK_UTIL_H_ |
| 7 | 7 |
| 8 // This header is introduced to make it easy to switch from chromeos_network.cc | 8 // This header is introduced to make it easy to switch from chromeos_network.cc |
| 9 // to Chrome's own DBus code. crosbug.com/16557 | 9 // to Chrome's own DBus code. crosbug.com/16557 |
| 10 // All calls to functions in chromeos_network.h should be made through | 10 // All calls to functions in chromeos_network.h should be made through |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 } | 26 } |
| 27 | 27 |
| 28 namespace chromeos { | 28 namespace chromeos { |
| 29 | 29 |
| 30 class NetworkState; | 30 class NetworkState; |
| 31 class NetworkTypePattern; | 31 class NetworkTypePattern; |
| 32 | 32 |
| 33 // Struct for passing wifi access point data. | 33 // Struct for passing wifi access point data. |
| 34 struct CHROMEOS_EXPORT WifiAccessPoint { | 34 struct CHROMEOS_EXPORT WifiAccessPoint { |
| 35 WifiAccessPoint(); | 35 WifiAccessPoint(); |
| 36 WifiAccessPoint(const WifiAccessPoint& other); |
| 36 ~WifiAccessPoint(); | 37 ~WifiAccessPoint(); |
| 37 std::string ssid; // The ssid of the WiFi node if available. | 38 std::string ssid; // The ssid of the WiFi node if available. |
| 38 std::string mac_address; // The mac address of the WiFi node. | 39 std::string mac_address; // The mac address of the WiFi node. |
| 39 base::Time timestamp; // Timestamp when this AP was detected. | 40 base::Time timestamp; // Timestamp when this AP was detected. |
| 40 int signal_strength; // Radio signal strength measured in dBm. | 41 int signal_strength; // Radio signal strength measured in dBm. |
| 41 int signal_to_noise; // Current signal to noise ratio measured in dB. | 42 int signal_to_noise; // Current signal to noise ratio measured in dB. |
| 42 int channel; // Wifi channel number. | 43 int channel; // Wifi channel number. |
| 43 }; | 44 }; |
| 44 | 45 |
| 45 // Struct for passing network scan result data. | 46 // Struct for passing network scan result data. |
| 46 struct CHROMEOS_EXPORT CellularScanResult { | 47 struct CHROMEOS_EXPORT CellularScanResult { |
| 47 CellularScanResult(); | 48 CellularScanResult(); |
| 49 CellularScanResult(const CellularScanResult& other); |
| 48 ~CellularScanResult(); | 50 ~CellularScanResult(); |
| 49 std::string status; // The network's availability status. (One of "unknown", | 51 std::string status; // The network's availability status. (One of "unknown", |
| 50 // "available", "current", or "forbidden") | 52 // "available", "current", or "forbidden") |
| 51 std::string network_id; // 3GPP operator code ("MCCMNC"). | 53 std::string network_id; // 3GPP operator code ("MCCMNC"). |
| 52 std::string short_name; // Short-format name of the operator. | 54 std::string short_name; // Short-format name of the operator. |
| 53 std::string long_name; // Long-format name of the operator. | 55 std::string long_name; // Long-format name of the operator. |
| 54 std::string technology; // Access technology. | 56 std::string technology; // Access technology. |
| 55 }; | 57 }; |
| 56 | 58 |
| 57 typedef std::vector<WifiAccessPoint> WifiAccessPointVector; | 59 typedef std::vector<WifiAccessPoint> WifiAccessPointVector; |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 // there is no match. Only valid for ethernet, wifi, wimax, cellular, and vpn. | 115 // there is no match. Only valid for ethernet, wifi, wimax, cellular, and vpn. |
| 114 CHROMEOS_EXPORT std::string TranslateONCTypeToShill(const std::string& type); | 116 CHROMEOS_EXPORT std::string TranslateONCTypeToShill(const std::string& type); |
| 115 | 117 |
| 116 // Inverse of TranslateONCTypeToShill. | 118 // Inverse of TranslateONCTypeToShill. |
| 117 CHROMEOS_EXPORT std::string TranslateShillTypeToONC(const std::string& type); | 119 CHROMEOS_EXPORT std::string TranslateShillTypeToONC(const std::string& type); |
| 118 | 120 |
| 119 } // namespace network_util | 121 } // namespace network_util |
| 120 } // namespace chromeos | 122 } // namespace chromeos |
| 121 | 123 |
| 122 #endif // CHROMEOS_NETWORK_NETWORK_UTIL_H_ | 124 #endif // CHROMEOS_NETWORK_NETWORK_UTIL_H_ |
| OLD | NEW |