Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(126)

Unified Diff: chromeos/network/network_util.h

Issue 19509002: Add support for Device.ProposeScan to NetworkDeviceHandler. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed gauravsh@'s comments. Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chromeos/network/network_device_handler.cc ('k') | chromeos/network/network_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/network/network_util.h
diff --git a/chromeos/network/network_util.h b/chromeos/network/network_util.h
index 442faceb60d1f0105ab7abb7728f6e64b79f5961..30983123fa55c3f514ca502fc61c35f84328d93a 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.
};
+// Struct for passing network scan result data.
+struct CHROMEOS_EXPORT CellularScanResult {
+ CellularScanResult();
+ ~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
« no previous file with comments | « chromeos/network/network_device_handler.cc ('k') | chromeos/network/network_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698