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

Unified Diff: chromeos_network.h

Issue 6606024: Eliminate ConenctionType, etc from chromeos_network.h (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/cros.git@master
Patch Set: Rebase. Created 9 years, 10 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_cros_api.h ('k') | chromeos_network.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos_network.h
diff --git a/chromeos_network.h b/chromeos_network.h
index b2f7c11e568179efee28442e54d368053b580476..867de0bca442e7bc08e4d2e5ee3b37677e3ab963 100644
--- a/chromeos_network.h
+++ b/chromeos_network.h
@@ -13,94 +13,6 @@ class Value;
namespace chromeos { // NOLINT
-// Connection enums (see flimflam/include/service.h)
-enum ConnectionType {
- TYPE_UNKNOWN = 0,
- TYPE_ETHERNET = 1,
- TYPE_WIFI = 2,
- TYPE_WIMAX = 3,
- TYPE_BLUETOOTH = 4,
- TYPE_CELLULAR = 5,
-};
-
-enum ConnectionMode {
- MODE_UNKNOWN = 0,
- MODE_MANAGED = 1,
- MODE_ADHOC = 2,
-};
-
-enum ConnectionSecurity {
- SECURITY_UNKNOWN = 0,
- SECURITY_NONE = 1,
- SECURITY_WEP = 2,
- SECURITY_WPA = 3,
- SECURITY_RSN = 4,
- SECURITY_8021X = 5,
-};
-
-enum ConnectionState {
- STATE_UNKNOWN = 0,
- STATE_IDLE = 1,
- STATE_CARRIER = 2,
- STATE_ASSOCIATION = 3,
- STATE_CONFIGURATION = 4,
- STATE_READY = 5,
- STATE_DISCONNECT = 6,
- STATE_FAILURE = 7,
- STATE_ACTIVATION_FAILURE = 8
-};
-
-enum ConnectivityState {
- CONN_STATE_UNKNOWN = 0,
- CONN_STATE_UNRESTRICTED = 1,
- CONN_STATE_RESTRICTED = 2,
- CONN_STATE_NONE = 3
-};
-
-// Network enums (see flimflam/include/network.h)
-enum NetworkTechnology {
- NETWORK_TECHNOLOGY_UNKNOWN = 0,
- NETWORK_TECHNOLOGY_1XRTT = 1,
- NETWORK_TECHNOLOGY_EVDO = 2,
- NETWORK_TECHNOLOGY_GPRS = 3,
- NETWORK_TECHNOLOGY_EDGE = 4,
- NETWORK_TECHNOLOGY_UMTS = 5,
- NETWORK_TECHNOLOGY_HSPA = 6,
- NETWORK_TECHNOLOGY_HSPA_PLUS = 7,
- NETWORK_TECHNOLOGY_LTE = 8,
- NETWORK_TECHNOLOGY_LTE_ADVANCED = 9,
-};
-
-enum ActivationState {
- ACTIVATION_STATE_UNKNOWN = 0,
- ACTIVATION_STATE_ACTIVATED = 1,
- ACTIVATION_STATE_ACTIVATING = 2,
- ACTIVATION_STATE_NOT_ACTIVATED = 3,
- ACTIVATION_STATE_PARTIALLY_ACTIVATED = 4,
-};
-
-enum NetworkRoamingState {
- ROAMING_STATE_UNKNOWN = 0,
- ROAMING_STATE_HOME = 1,
- ROAMING_STATE_ROAMING = 2,
-};
-
-// connection errors (see flimflam/include/service.h)
-enum ConnectionError {
- ERROR_UNKNOWN = 0,
- ERROR_OUT_OF_RANGE = 1,
- ERROR_PIN_MISSING = 2,
- ERROR_DHCP_FAILED = 3,
- ERROR_CONNECT_FAILED = 4,
- ERROR_BAD_PASSPHRASE = 5,
- ERROR_BAD_WEPKEY = 6,
- ERROR_ACTIVATION_FAILED = 7,
- ERROR_NEED_EVDO = 8,
- ERROR_NEED_HOME_NETWORK = 9,
- ERROR_OTASP_FAILED = 10,
- ERROR_AAA_FAILED = 11,
-};
-
// ipconfig types (see flimflam/files/doc/ipconfig-api.txt)
enum IPConfigType {
IPCONFIG_TYPE_UNKNOWN,
@@ -192,10 +104,6 @@ struct DeviceNetworkList {
DeviceNetworkInfo* networks;
};
-// Requests a scan of services of |type|.
-// If |type| is TYPE_UNKNOWN (0), it will scan for all types.
-extern void (*RequestScan)(ConnectionType type);
-
// Activates the cellular modem specified by |service_path| with carrier
// specified by |carrier|.
// |carrier| is NULL or an empty string, this will activate with the currently
@@ -377,18 +285,23 @@ extern void (*RequestNetworkProfileEntry)(const char* profile_path,
NetworkPropertiesCallback callback,
void* object);
-// Get a service path for a wifi service not in the network list (i.e. hidden).
-extern void (*RequestWifiServicePath)(const char* ssid,
- ConnectionSecurity security,
- NetworkPropertiesCallback callback,
- void* object);
+// Request a wifi service not in the network list (i.e. hidden).
+extern void (*RequestHiddenWifiNetwork)(const char* ssid,
+ const char* security,
+ NetworkPropertiesCallback callback,
+ void* object);
+
+// Requests a scan of services of |type|.
+// |type| should be is a string recognized by flimflam's Manager API.
+extern void (*RequestNetworkScan)(const char* network_type);
+
+// Request enabling or disabling a device.
+extern void (*RequestNetworkDeviceEnable)(const char* network_type,
+ bool enable);
//////////////////////////////////////////////////////////////////////////////
// Enable or disable the specific network device for connection.
//
-// Returns false on failure and true on success.
-extern bool (*EnableNetworkDevice)(ConnectionType type, bool enable);
-
// Set offline mode. This will turn off all radios.
//
// Returns false on failure and true on success.
@@ -445,8 +358,4 @@ extern void (*FreeDeviceNetworkList)(DeviceNetworkList* network_list);
} // namespace chromeos
-// TODO(stevenjb): Remove this after R11 -> stable to force Chrome to use the
-// new interfaces or explicitly include chromeos_network_deprecated.h.
-#include "chromeos_network_deprecated.h"
-
#endif // CHROMEOS_NETWORK_H_
« no previous file with comments | « chromeos_cros_api.h ('k') | chromeos_network.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698