Chromium Code Reviews| Index: chromeos/network/network_util.h |
| diff --git a/chromeos/network/network_util.h b/chromeos/network/network_util.h |
| index 442faceb60d1f0105ab7abb7728f6e64b79f5961..0f760466bfc04e32087cb5386340c14b67a6d6f7 100644 |
| --- a/chromeos/network/network_util.h |
| +++ b/chromeos/network/network_util.h |
| @@ -16,6 +16,7 @@ |
| #include "base/basictypes.h" |
| #include "base/callback.h" |
| #include "base/time/time.h" |
| +#include "base/values.h" |
| #include "chromeos/chromeos_export.h" |
| namespace chromeos { |
| @@ -44,6 +45,18 @@ struct CHROMEOS_EXPORT WifiAccessPoint { |
| int channel; // Wifi channel number. |
| }; |
| +// Strict for passing network scan result data. |
|
gauravsh
2013/07/19 22:59:35
Struct
armansito
2013/07/19 23:20:02
Done.
|
| +struct CHROMEOS_EXPORT CellularScanResult { |
| + CellularScanResult(); |
|
gauravsh
2013/07/19 22:59:35
Since all members are class types, it doesn't look
armansito
2013/07/19 23:20:02
The style guide says that you should declare a def
|
| + ~CellularScanResult(); |
| + std::string status; // The network's availability status. (One of "unknown", |
| + // "available", "current", or "forbidden") |
| + std::string network_id; // 3GPP operator code ("MCCMNC"). |
| + std::string short_name; // Short-format name of the operator. |
| + std::string long_name; // Long-format name of the operator. |
| + std::string technology; // Access technology. |
| +}; |
| + |
| typedef std::vector<WifiAccessPoint> WifiAccessPointVector; |
| // Describes whether there is an error and whether the error came from |
| @@ -72,6 +85,12 @@ CHROMEOS_EXPORT std::string PrefixLengthToNetmask(int32 prefix_length); |
| // e.g. a |netmask| of 255.255.255.0 is converted to a prefixlen of 24 |
| CHROMEOS_EXPORT int32 NetmaskToPrefixLength(const std::string& netmask); |
| +// Parses |list|, which contains DictionaryValues and returns a vector of |
| +// CellularScanResult in |scan_results|. Returns false if parsing fails, |
| +// in which case the contents of |scan_results| will be undefined. |
| +CHROMEOS_EXPORT bool ParseCellularScanResults( |
| + const ListValue& list, std::vector<CellularScanResult>* scan_results); |
| + |
| } // namespace network_util |
| } // namespace chromeos |