Index: extensions/common/api/networking_private.idl |
diff --git a/extensions/common/api/networking_private.idl b/extensions/common/api/networking_private.idl |
index a143ad7a69e0e13768e2ddb8769c4b704b74ac34..dc9bd7a73114af055a436ed8aece1d1be1dda81f 100644 |
--- a/extensions/common/api/networking_private.idl |
+++ b/extensions/common/api/networking_private.idl |
@@ -10,14 +10,120 @@ |
// use it as the ONC specification. |
namespace networkingPrivate { |
+ enum ActivationStateType { |
+ Activated, Activating, NotActivated, PartiallyActivated |
+ }; |
+ |
enum CaptivePortalStatus { |
Unknown, Offline, Online, Portal, ProxyAuthRequired |
}; |
+ enum ConnectionStateType { |
+ Connected, Connecting, NotConnected |
+ }; |
+ |
+ enum IPConfigType { |
+ DHCP, Static |
+ }; |
+ |
enum NetworkType { |
All, Bluetooth, Cellular, Ethernet, VPN, Wireless, WiFi, WiMAX |
}; |
+ dictionary APNProperties { |
+ DOMString? AccessPointName; |
+ DOMString? Name; |
+ DOMString? Username; |
+ DOMString? Password; |
+ }; |
+ |
+ dictionary CellularConfigProperties { |
+ boolean? AutoConnect; |
+ APNProperties? APN; |
+ }; |
+ |
+ dictionary CellularStateProperties { |
+ long? SignalStrength; |
+ boolean? OutOfCredits; |
+ DOMString? RoamingState; |
+ ActivationStateType? ActivationState; |
+ DOMString? NetworkTechnology; |
+ }; |
+ |
+ dictionary EthernetStateProperties { |
+ DOMString? Authentication; |
+ }; |
+ |
+ dictionary IPConfigProperties { |
+ DOMString? Gateway; |
+ DOMString? IPAddress; |
+ DOMString[]? NameServers; |
+ DOMString? Type; |
+ long? RoutingPrefix; |
+ }; |
+ |
+ dictionary IPSecProperties { |
+ DOMString? AuthenticationType; |
+ }; |
+ |
+ dictionary VPNConfigProperties { |
+ boolean? AutoConnect; |
+ DOMString? Type; |
+ DOMString? Host; |
+ }; |
+ |
+ dictionary VPNStateProperties { |
+ DOMString? Type; |
+ IPSecProperties? IPsec; |
+ }; |
+ |
+ dictionary WiFiConfigProperties { |
+ boolean? AutoConnect; |
+ }; |
+ |
+ dictionary WiFiStateProperties { |
+ DOMString? Security; |
+ long? SignalStrength; |
+ }; |
+ |
+ dictionary WiMaxConfigProperties { |
+ boolean? AutoConnect; |
+ }; |
+ |
+ dictionary WiMAXStateProperties { |
+ long? SignalStrength; |
+ }; |
+ |
+ dictionary NetworkConfigProperties { |
+ CellularConfigProperties? Cellular; |
+ DOMString? GUID; |
+ IPConfigType? IPAddressConfigType; |
+ DOMString? Name; |
+ IPConfigType? NameServersConfigType; |
+ long? Priority; |
+ IPConfigProperties? StaticIPConfig; |
+ NetworkType? Type; |
+ VPNConfigProperties? VPN; |
+ WiFiConfigProperties? WiFi; |
+ WiMaxConfigProperties? WiMAX; |
+ }; |
+ |
+ dictionary NetworkStateProperties { |
+ CellularStateProperties? Cellular; |
+ boolean? Connectable; |
+ ConnectionStateType? ConnectionState; |
+ EthernetStateProperties? Ethernet; |
+ DOMString? ErrorState; |
+ DOMString GUID; |
+ DOMString? Name; |
+ long? Priority; |
+ DOMString? Source; |
+ NetworkType Type; |
+ VPNStateProperties? VPN; |
+ WiFiStateProperties? WiFi; |
+ WiMAXStateProperties? WiMAX; |
+ }; |
+ |
asargent_no_longer_on_chrome
2015/03/26 20:05:40
nit: usually the names for members of a dictionary
stevenjb
2015/03/27 17:03:21
These names need to match the ONC spec. I will cla
|
dictionary VerificationProperties { |
// A string containing a PEM-encoded (including the 'BEGIN CERTIFICATE' |
// header and 'END CERTIFICATE' footer) X.509 certificate for use in |
@@ -76,8 +182,8 @@ namespace networkingPrivate { |
callback GetPropertiesCallback = void(object result); |
// TODO(stevenjb): Use ManagedNetworkProperties for |result| once defined. |
callback GetManagedPropertiesCallback = void(object result); |
- callback GetStatePropertiesCallback = void(object result); |
- callback GetNetworksCallback = void(object[] result); |
+ callback GetStatePropertiesCallback = void(NetworkStateProperties result); |
+ callback GetNetworksCallback = void(NetworkStateProperties[] result); |
callback GetEnabledNetwrokTypesCallback = void(NetworkType[] result); |
callback CaptivePortalStatusCallback = void(CaptivePortalStatus result); |
@@ -116,7 +222,7 @@ namespace networkingPrivate { |
// |properties|: The ONC properties to set. |
// |callback|: Called when the operation has completed. |
static void setProperties(DOMString networkGuid, |
- object properties, |
+ NetworkConfigProperties properties, |
optional VoidCallback callback); |
// Creates a new network configuration from properties. If a matching |
@@ -126,7 +232,7 @@ namespace networkingPrivate { |
// |properties|: The ONC properties to configure the new network with. |
// |callback|: Returns the identifier of the created network. |
static void createNetwork(boolean shared, |
- object properties, |
+ NetworkConfigProperties properties, |
optional StringCallback callback); |
// Forgets a network configuration by clearing any configured properties for |