Chromium Code Reviews| Index: extensions/common/api/networking_onc.idl |
| diff --git a/extensions/common/api/networking_onc.idl b/extensions/common/api/networking_onc.idl |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..2cb10bb6fe333d8e17f01005b75a9624cc97e581 |
| --- /dev/null |
| +++ b/extensions/common/api/networking_onc.idl |
| @@ -0,0 +1,1404 @@ |
| +// Copyright 2017 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +// <p> |
| +// The <code>chrome.networking.onc</code> API is used for configuring |
| +// network connections (Cellular, Ethernet, VPN, WiFi or WiMAX). |
| +// This API is available in Chrome OS kiosk sessions. Additionally, the API is |
| +// available in regular user session, but only to a white-listed set of |
|
Devlin
2017/04/12 22:13:03
I'd just remove the part about whitelisted apps.
stevenjb
2017/04/12 22:42:01
sgtm
tbarzic
2017/04/12 23:46:59
Done.
|
| +// trusted apps and extensions. |
| +// </p> |
| +// <p> |
| +// Network connection configurations are specified following |
| +// <a href="https://chromium.googlesource.com/chromium/src/+/master/components/onc/docs/onc_spec.md"> |
| +// Open Network Configuration (ONC)</a> specification. |
| +// </p> |
| +// <p> |
| +// <b>NOTE</b>: Most dictionary properties and enum values use UpperCamelCase |
| +// to match the ONC specification instead of the JavaScript lowerCamelCase |
| +// convention. |
| +// </p> |
| +namespace networking.onc { |
| + enum ActivationStateType { |
| + Activated, Activating, NotActivated, PartiallyActivated |
| + }; |
| + |
| + enum CaptivePortalStatus { |
| + Unknown, Offline, Online, Portal, ProxyAuthRequired |
| + }; |
| + |
| + enum ConnectionStateType { |
| + Connected, Connecting, NotConnected |
| + }; |
| + |
| + enum DeviceStateType { |
| + // Device is available but not initialized. |
| + Uninitialized, |
| + // Device is initialized but not enabled. |
| + Disabled, |
| + // Enabled state has been requested but has not completed. |
| + Enabling, |
| + // Device is enabled. |
| + Enabled, |
| + // Device is prohibited. |
| + Prohibited |
| + }; |
| + |
| + enum IPConfigType { |
| + DHCP, Static |
| + }; |
| + |
| + enum NetworkType { |
| + All, Cellular, Ethernet, VPN, Wireless, WiFi, WiMAX |
| + }; |
| + |
| + enum ProxySettingsType { |
| + Direct, Manual, PAC, WPAD |
| + }; |
| + |
| + enum ClientCertificateType { |
| + Ref, Pattern |
| + }; |
| + |
| + dictionary ManagedBoolean { |
| + // The active value currently used by the network configuration manager |
| + // (e.g. Shill). |
| + boolean? Active; |
| + // The source from which the effective property value was determined. |
| + DOMString? Effective; |
| + // The property value provided by the user policy. |
| + boolean? UserPolicy; |
| + // The property value provided by the device policy. |
| + boolean? DevicePolicy; |
| + // The property value set by the logged in user. Only provided if |
| + // |UserEditable| is <code>true</code>. |
| + boolean? UserSetting; |
| + // The value set for all users of the device. Only provided if |
| + // |DeviceEditiable| is <code>true</code>. |
| + boolean? SharedSetting; |
| + // Whether a UserPolicy for the property exists and allows the property to |
| + // be edited (i.e. the policy set recommended property value). |
| + // Defaults to <code>false</code>. |
| + boolean? UserEditable; |
| + // Whether a DevicePolicy for the property exists and allows the property to |
| + // be edited (i.e. the policy set recommended property value). |
| + // Defaults to <code>false</code>. |
| + boolean? DeviceEditable; |
| + }; |
| + |
| + dictionary ManagedLong { |
| + // The active value currently used by the network configuration manager |
| + // (e.g. Shill). |
| + long? Active; |
| + // The source from which the effective property value was determined. |
| + DOMString? Effective; |
| + // The property value provided by the user policy. |
| + long? UserPolicy; |
| + // The property value provided by the device policy. |
| + long? DevicePolicy; |
| + // The property value set by the logged in user. Only provided if |
| + // |UserEditable| is <code>true</code>. |
| + long? UserSetting; |
| + // The value set for all users of the device. Only provided if |
| + // |DeviceEditiable| is <code>true</code>. |
| + long? SharedSetting; |
| + // Whether a UserPolicy for the property exists and allows the property to |
| + // be edited (i.e. the policy set recommended property value). |
| + // Defaults to <code>false</code>. |
| + boolean? UserEditable; |
| + // Whether a DevicePolicy for the property exists and allows the property to |
| + // be edited (i.e. the policy set recommended property value). |
| + // Defaults to <code>false</code>. |
| + boolean? DeviceEditable; |
| + }; |
| + |
| + dictionary ManagedDOMString { |
| + // The active value currently used by the network configuration manager |
| + // (e.g. Shill). |
| + DOMString? Active; |
| + // The source from which the effective property value was determined. |
| + DOMString? Effective; |
| + // The property value provided by the user policy. |
| + DOMString? UserPolicy; |
| + // The property value provided by the device policy. |
| + DOMString? DevicePolicy; |
| + // The property value set by the logged in user. Only provided if |
| + // |UserEditable| is <code>true</code>. |
| + DOMString? UserSetting; |
| + // The value set for all users of the device. Only provided if |
| + // |DeviceEditiable| is <code>true</code>. |
| + DOMString? SharedSetting; |
| + // Whether a UserPolicy for the property exists and allows the property to |
| + // be edited (i.e. the policy set recommended property value). |
| + // Defaults to <code>false</code>. |
| + boolean? UserEditable; |
| + // Whether a DevicePolicy for the property exists and allows the property to |
| + // be edited (i.e. the policy set recommended property value). |
| + // Defaults to <code>false</code>. |
| + boolean? DeviceEditable; |
| + }; |
| + |
| + dictionary ManagedDOMStringList { |
| + // The active value currently used by the network configuration manager |
| + // (e.g. Shill). |
| + DOMString[]? Active; |
| + // The source from which the effective property value was determined. |
| + DOMString? Effective; |
| + // The property value provided by the user policy. |
| + DOMString[]? UserPolicy; |
| + // The property value provided by the device policy. |
| + DOMString[]? DevicePolicy; |
| + // The property value set by the logged in user. Only provided if |
| + // |UserEditable| is <code>true</code>. |
| + DOMString[]? UserSetting; |
| + // The value set for all users of the device. Only provided if |
| + // |DeviceEditiable| is <code>true</code>. |
| + DOMString[]? SharedSetting; |
| + // Whether a UserPolicy for the property exists and allows the property to |
| + // be edited (i.e. the policy set recommended property value). |
| + // Defaults to <code>false</code>. |
| + boolean? UserEditable; |
| + // Whether a DevicePolicy for the property exists and allows the property to |
| + // be edited (i.e. the policy set recommended property value). |
| + // Defaults to <code>false</code>. |
| + boolean? DeviceEditable; |
| + }; |
| + |
| + dictionary ManagedIPConfigType { |
| + // The active value currently used by the network configuration manager |
| + // (e.g. Shill). |
| + IPConfigType? Active; |
| + // The source from which the effective property value was determined. |
| + DOMString? Effective; |
| + // The property value provided by the user policy. |
| + IPConfigType? UserPolicy; |
| + // The property value provided by the device policy. |
| + IPConfigType? DevicePolicy; |
| + // The property value set by the logged in user. Only provided if |
| + // |UserEditable| is <code>true</code>. |
| + IPConfigType? UserSetting; |
| + // The value set for all users of the device. Only provided if |
| + // |DeviceEditiable| is <code>true</code>. |
| + IPConfigType? SharedSetting; |
| + // Whether a UserPolicy for the property exists and allows the property to |
| + // be edited (i.e. the policy set recommended property value). |
| + // Defaults to <code>false</code>. |
| + boolean? UserEditable; |
| + // Whether a DevicePolicy for the property exists and allows the property to |
| + // be edited (i.e. the policy set recommended property value). |
| + // Defaults to <code>false</code>. |
| + boolean? DeviceEditable; |
| + }; |
| + |
| + dictionary ManagedProxySettingsType { |
| + // The active value currently used by the network configuration manager |
| + // (e.g. Shill). |
| + ProxySettingsType? Active; |
| + // The source from which the effective property value was determined. |
| + DOMString? Effective; |
| + // The property value provided by the user policy. |
| + ProxySettingsType? UserPolicy; |
| + // The property value provided by the device policy. |
| + ProxySettingsType? DevicePolicy; |
| + // The property value set by the logged in user. Only provided if |
| + // |UserEditable| is <code>true</code>. |
| + ProxySettingsType? UserSetting; |
| + // The value set for all users of the device. Only provided if |
| + // |DeviceEditiable| is <code>true</code>. |
| + ProxySettingsType? SharedSetting; |
| + // Whether a UserPolicy for the property exists and allows the property to |
| + // be edited (i.e. the policy set recommended property value). |
| + // Defaults to <code>false</code>. |
| + boolean? UserEditable; |
| + // Whether a DevicePolicy for the property exists and allows the property to |
| + // be edited (i.e. the policy set recommended property value). |
| + // Defaults to <code>false</code>. |
| + boolean? DeviceEditable; |
| + }; |
| + |
| + // Sub-dictionary types. |
| + |
| + [nodoc] dictionary APNProperties { |
| + DOMString AccessPointName; |
| + DOMString? Language; |
| + DOMString? LocalizedName; |
| + DOMString? Name; |
| + DOMString? Password; |
| + DOMString? Username; |
| + }; |
| + |
| + [nodoc] dictionary ManagedAPNProperties { |
| + ManagedDOMString AccessPointName; |
| + ManagedDOMString? Language; |
| + ManagedDOMString? LocalizedName; |
| + ManagedDOMString? Name; |
| + ManagedDOMString? Password; |
| + ManagedDOMString? Username; |
| + }; |
| + |
| + [nodoc] dictionary ManagedAPNList { |
| + APNProperties[]? Active; |
| + DOMString? Effective; |
| + APNProperties[]? UserPolicy; |
| + APNProperties[]? DevicePolicy; |
| + APNProperties[]? UserSetting; |
| + APNProperties[]? SharedSetting; |
| + boolean? UserEditable; |
| + boolean? DeviceEditable; |
| + }; |
| + |
| + dictionary CellularProviderProperties { |
| + // The operator name. |
| + DOMString Name; |
| + // Cellular network ID as a simple concatenation of the network's |
| + // MCC (Mobile Country Code) and MNC (Mobile Network Code). |
| + DOMString Code; |
| + // The two-letter country code. |
| + DOMString? Country; |
| + }; |
| + |
| + [nodoc] dictionary CellularSimState { |
| + // Whether or not a PIN should be required. |
| + boolean requirePin; |
| + |
| + // The current PIN (required for any change, even when the SIM is unlocked). |
| + DOMString currentPin; |
| + |
| + // If provided, change the PIN to |newPin|. |requirePin| must be true. |
| + DOMString? newPin; |
| + }; |
| + |
| + dictionary IssuerSubjectPattern { |
| + // If set, the value against which to match the certificate subject's |
| + // common name. |
| + DOMString? CommonName; |
| + // If set, the value against which to match the certificate subject's |
| + // common location. |
| + DOMString? Locality; |
| + // If set, the value against which to match the certificate subject's |
| + // organizations. At least one organization should match the value. |
| + DOMString? Organization; |
| + // If set, the value against which to match the certificate subject's |
| + // organizational units. At least one organizational unit should match the |
| + // value. |
| + DOMString? OrganizationalUnit; |
| + }; |
| + |
| + [nodoc] dictionary ManagedIssuerSubjectPattern { |
| + ManagedDOMString? CommonName; |
| + ManagedDOMString? Locality; |
| + ManagedDOMString? Organization; |
| + ManagedDOMString? OrganizationalUnit; |
| + }; |
| + |
| + dictionary CertificatePattern { |
| + // List of URIs to which the user can be directed in case no certificates |
| + // that match this pattern are found. |
| + DOMString[]? EnrollmentURI; |
| + // If set, pattern against which X.509 issuer settings should be matched. |
| + IssuerSubjectPattern? Issuer; |
| + // List of certificate issuer CA certificates. A certificate must be signed |
| + // by one of them in order to match this pattern. |
| + DOMString[]? IssuerCARef; |
| + // If set, pattern against which X.509 subject settings should be matched. |
| + IssuerSubjectPattern? Subject; |
| + }; |
| + |
| + [nodoc] dictionary ManagedCertificatePattern { |
| + ManagedDOMStringList? EnrollmentURI; |
| + ManagedIssuerSubjectPattern? Issuer; |
| + ManagedDOMStringList? IssuerCARef; |
| + ManagedIssuerSubjectPattern? Subject; |
| + }; |
| + |
| + dictionary EAPProperties { |
| + DOMString? AnonymousIdentity; |
| + CertificatePattern? ClientCertPattern; |
| + DOMString? ClientCertRef; |
| + ClientCertificateType ClientCertType; |
| + DOMString? Identity; |
| + DOMString? Inner; |
| + DOMString Outer; |
| + DOMString? Password; |
| + boolean? SaveCredentials; |
| + DOMString[]? ServerCARefs; |
| + boolean? UseProactiveKeyCaching; |
| + boolean? UseSystemCAs; |
| + }; |
| + |
| + [nodoc] dictionary ManagedEAPProperties { |
| + ManagedDOMString? AnonymousIdentity; |
| + ManagedCertificatePattern? ClientCertPattern; |
| + ManagedDOMString? ClientCertRef; |
| + ManagedDOMString? ClientCertType; |
| + ManagedDOMString? Identity; |
| + ManagedDOMString? Inner; |
| + ManagedDOMString Outer; |
| + ManagedDOMString? Password; |
| + ManagedBoolean? SaveCredentials; |
| + ManagedDOMStringList? ServerCARefs; |
| + ManagedBoolean? UseProactiveKeyCaching; |
| + ManagedBoolean? UseSystemCAs; |
| + }; |
| + |
| + dictionary FoundNetworkProperties { |
| + // Network availability. |
| + DOMString Status; |
| + // Network ID. |
| + DOMString NetworkId; |
| + // Access technology used by the network. |
| + DOMString Technology; |
| + // The network operator's short-format name. |
| + DOMString? ShortName; |
| + // The network operator's long-format name. |
| + DOMString? LongName; |
| + }; |
| + |
| + dictionary IPConfigProperties { |
| + // Gateway address used for the IP configuration. |
| + DOMString? Gateway; |
| + // The IP address for a connection. Can be IPv4 or IPv6 address, depending |
| + // on value of <code>Type</code>. |
| + DOMString? IPAddress; |
| + // Array of addresses used for name servers. |
| + DOMString[]? NameServers; |
| + // The routing prefix. |
| + long? RoutingPrefix; |
| + // The IP configuration type. Can be <code>IPv4</code> or <code>IPv6</code>. |
| + DOMString? Type; |
| + // The URL for WEb Proxy Auto-Discovery, as reported over DHCP. |
| + DOMString? WebProxyAutoDiscoveryUrl; |
| + }; |
| + |
| + dictionary ManagedIPConfigProperties { |
| + // See $(ref:IPConfigProperties.Gateway). |
| + ManagedDOMString? Gateway; |
| + // See $(ref:IPConfigProperties.IPAddress). |
| + ManagedDOMString? IPAddress; |
| + // See $(ref:IPConfigProperties.NameServers). |
| + ManagedDOMStringList? NameServers; |
| + // See $(ref:IPConfigProperties.RoutingPrefix). |
| + ManagedLong? RoutingPrefix; |
| + // See $(ref:IPConfigProperties.Type). |
| + ManagedDOMString? Type; |
| + // See $(ref:IPConfigProperties.WebProxyAutoDiscoveryUrl). |
| + ManagedDOMString? WebProxyAutoDiscoveryUrl; |
| + }; |
| + |
| + [nodoc] dictionary XAUTHProperties { |
| + DOMString? Password; |
| + boolean? SaveCredentials; |
| + DOMString? Username; |
| + }; |
| + |
| + [nodoc] dictionary ManagedXAUTHProperties { |
| + ManagedDOMString? Password; |
| + ManagedBoolean? SaveCredentials; |
| + ManagedDOMString? Username; |
| + }; |
| + |
| + [nodoc] dictionary IPSecProperties { |
| + DOMString AuthenticationType; |
| + CertificatePattern? ClientCertPattern; |
| + DOMString? ClientCertRef; |
| + DOMString? ClientCertType; |
| + EAPProperties? EAP; |
| + DOMString? Group; |
| + long? IKEVersion; |
| + DOMString? PSK; |
| + boolean? SaveCredentials; |
| + DOMString[]? ServerCARefs; |
| + XAUTHProperties? XAUTH; |
| + }; |
| + |
| + [nodoc] dictionary ManagedIPSecProperties { |
| + ManagedDOMString AuthenticationType; |
| + ManagedCertificatePattern? ClientCertPattern; |
| + ManagedDOMString? ClientCertRef; |
| + ManagedDOMString? ClientCertType; |
| + ManagedEAPProperties? EAP; |
| + ManagedDOMString? Group; |
| + ManagedLong? IKEVersion; |
| + ManagedDOMString? PSK; |
| + ManagedBoolean? SaveCredentials; |
| + ManagedDOMStringList? ServerCARefs; |
| + ManagedXAUTHProperties? XAUTH; |
| + }; |
| + |
| + [nodoc] dictionary L2TPProperties { |
| + boolean? LcpEchoDisabled; |
| + DOMString? Password; |
| + boolean? SaveCredentials; |
| + DOMString? Username; |
| + }; |
| + |
| + [nodoc] dictionary ManagedL2TPProperties { |
| + ManagedBoolean? LcpEchoDisabled; |
| + ManagedDOMString? Password; |
| + ManagedBoolean? SaveCredentials; |
| + ManagedDOMString? Username; |
| + }; |
| + |
| + dictionary PaymentPortal { |
| + // The HTTP method to use for the payment portal. |
| + DOMString Method; |
| + // The post data to send to the payment portal. Ignored unless |
| + // <code>Method</code> is <code>POST</code>. |
| + DOMString? PostData; |
| + // The payment portal URL. |
| + DOMString? Url; |
| + }; |
| + |
| + dictionary ProxyLocation { |
| + // The proxy IP address host. |
| + DOMString Host; |
| + // The port to use for the proxy. |
| + long Port; |
| + }; |
| + |
| + dictionary ManagedProxyLocation { |
| + // See $(ref:ProxyLocation.Host). |
| + ManagedDOMString Host; |
| + // See $(ref:ProxyLocation.Port). |
| + ManagedLong Port; |
| + }; |
| + |
| + [noinline_doc] dictionary ManualProxySettings { |
| + // Settings for HTTP proxy. |
| + ProxyLocation? HTTPProxy; |
| + // Settings for secure HTTP proxy. |
| + ProxyLocation? SecureHTTPProxy; |
| + // Settings for FTP proxy. |
| + ProxyLocation? FTPProxy; |
| + // Settings for SOCKS proxy. |
| + ProxyLocation? SOCKS; |
| + }; |
| + |
| + dictionary ManagedManualProxySettings { |
| + // See $(ref:ManualProxySettings.HTTPProxy). |
| + ManagedProxyLocation? HTTPProxy; |
| + // See $(ref:ManualProxySettings.SecureHTTPProxy). |
| + ManagedProxyLocation? SecureHTTPProxy; |
| + // See $(ref:ManualProxySettings.FTPProxy). |
| + ManagedProxyLocation? FTPProxy; |
| + // See $(ref:ManualProxySettings.SOCKS). |
| + ManagedProxyLocation? SOCKS; |
| + }; |
| + |
| + [noinline_doc] dictionary ProxySettings { |
| + // The type of proxy settings. |
| + ProxySettingsType Type; |
| + // Manual proxy settings - used only for <code>Manual</code> proxy settings. |
| + ManualProxySettings? Manual; |
| + // Domains and hosts for which manual proxy settings are excluded. |
| + DOMString[]? ExcludeDomains; |
| + // URL for proxy auto-configuration file. |
| + DOMString? PAC; |
| + }; |
| + |
| + dictionary ManagedProxySettings { |
| + // See $(ref:ProxySettings.Type). |
| + ManagedProxySettingsType Type; |
| + // See $(ref:ProxySettings.Manual). |
| + ManagedManualProxySettings? Manual; |
| + // See $(ref:ProxySettings.ExcludeDomains). |
| + ManagedDOMStringList? ExcludeDomains; |
| + // See $(ref:ProxySettings.PAC). |
| + ManagedDOMString? PAC; |
| + }; |
| + |
| + [nodoc] dictionary VerifyX509 { |
| + DOMString? Name; |
| + DOMString? Type; |
| + }; |
| + |
| + [nodoc] dictionary ManagedVerifyX509 { |
| + ManagedDOMString? Name; |
| + ManagedDOMString? Type; |
| + }; |
| + |
| + [nodoc] dictionary OpenVPNProperties { |
| + DOMString? Auth; |
| + DOMString? AuthRetry; |
| + boolean? AuthNoCache; |
| + DOMString? Cipher; |
| + DOMString? ClientCertRef; |
| + CertificatePattern? ClientCertPattern; |
| + DOMString? ClientCertType; |
| + DOMString? CompLZO; |
| + boolean? CompNoAdapt; |
| + boolean? IgnoreDefaultRoute; |
| + DOMString? KeyDirection; |
| + DOMString? NsCertType; |
| + DOMString? OTP; |
| + DOMString? Password; |
| + long? Port; |
| + DOMString? Proto; |
| + DOMString? PushPeerInfo; |
| + DOMString? RemoteCertEKU; |
| + DOMString[]? RemoteCertKU; |
| + DOMString? RemoteCertTLS; |
| + long? RenegSec; |
| + boolean? SaveCredentials; |
| + DOMString[]? ServerCARefs; |
| + DOMString? ServerCertRef; |
| + long? ServerPollTimeout; |
| + long? Shaper; |
| + DOMString? StaticChallenge; |
| + DOMString? TLSAuthContents; |
| + DOMString? TLSRemote; |
| + DOMString? UserAuthenticationType; |
| + DOMString? Username; |
| + DOMString? Verb; |
| + DOMString? VerifyHash; |
| + VerifyX509? VerifyX509; |
| + }; |
| + |
| + [nodoc] dictionary ManagedOpenVPNProperties { |
| + ManagedDOMString? Auth; |
| + ManagedDOMString? AuthRetry; |
| + ManagedBoolean? AuthNoCache; |
| + ManagedDOMString? Cipher; |
| + ManagedDOMString? ClientCertRef; |
| + ManagedCertificatePattern? ClientCertPattern; |
| + ManagedDOMString? ClientCertType; |
| + ManagedDOMString? CompLZO; |
| + ManagedBoolean? CompNoAdapt; |
| + ManagedBoolean? IgnoreDefaultRoute; |
| + ManagedDOMString? KeyDirection; |
| + ManagedDOMString? NsCertType; |
| + ManagedDOMString? OTP; |
| + ManagedDOMString? Password; |
| + ManagedLong? Port; |
| + ManagedDOMString? Proto; |
| + ManagedDOMString? PushPeerInfo; |
| + ManagedDOMString? RemoteCertEKU; |
| + ManagedDOMStringList? RemoteCertKU; |
| + ManagedDOMString? RemoteCertTLS; |
| + ManagedLong? RenegSec; |
| + ManagedBoolean? SaveCredentials; |
| + ManagedDOMStringList? ServerCARefs; |
| + ManagedDOMString? ServerCertRef; |
| + ManagedLong? ServerPollTimeout; |
| + ManagedLong? Shaper; |
| + ManagedDOMString? StaticChallenge; |
| + ManagedDOMString? TLSAuthContents; |
| + ManagedDOMString? TLSRemote; |
| + ManagedDOMString? UserAuthenticationType; |
| + ManagedDOMString? Username; |
| + ManagedDOMString? Verb; |
| + ManagedDOMString? VerifyHash; |
| + ManagedVerifyX509? VerifyX509; |
| + }; |
| + |
| + dictionary SIMLockStatus { |
| + // The status of SIM lock - possible values are <code>'sim-pin'</code>, |
| + // <code>'sim-puk'</code> and <code>''</code>. |
|
Devlin
2017/04/12 22:13:03
Why isn't this an enum? And why '' instead of und
stevenjb
2017/04/12 22:42:01
When I converted the API to use enums, using 'sim-
|
| + DOMString LockType; |
| + // Whether SIM lock is enabled. |
| + boolean LockEnabled; |
| + // Number of PIN lock tries allowed before PUK is required to unlock the |
| + // SIM. |
| + long? RetriesLeft; |
| + }; |
| + |
| + dictionary ThirdPartyVPNProperties { |
| + // ID of the third-party VPN provider extension. |
| + DOMString ExtensionID; |
| + // The VPN provider name. |
| + DOMString? ProviderName; |
| + }; |
| + |
| + dictionary ManagedThirdPartyVPNProperties { |
| + // See $(ref:ThirdPartyVPNProperties.ExtensionID). |
| + ManagedDOMString ExtensionID; |
| + // See $(ref:ThirdPartyVPNProperties.ProviderName). |
| + DOMString? ProviderName; |
| + }; |
| + |
| + // Network type dictionary types. |
| + |
| + [noinline_doc] dictionary CellularProperties { |
| + // Whether the cellular network should be connected automatically (when |
| + // in range). |
| + boolean? AutoConnect; |
| + [nodoc] APNProperties? APN; |
| + [nodoc] APNProperties[]? APNList; |
| + // The cellular network activation type. |
| + DOMString? ActivationType; |
| + // Carrier account activation state. |
| + ActivationStateType? ActivationState; |
| + // Whether roaming is allowed for the network. |
| + boolean? AllowRoaming; |
| + // The name of the carrier for which the cellular device is configured. |
| + DOMString? Carrier; |
| + [nodoc] DOMString? ESN; |
| + // Cellular device technology family - <code>CDMA</code> or |
| + // <code>GSM</code>. |
| + DOMString? Family; |
| + // The firmware revision loaded in the cellular modem. |
| + DOMString? FirmwareRevision; |
| + // The list of networks found during the most recent network scan. |
| + FoundNetworkProperties[]? FoundNetworks; |
| + // The cellular modem hardware revision. |
| + DOMString? HardwareRevision; |
| + // Information about the operator that issued the SIM card currently |
| + // installed in the modem. |
| + CellularProviderProperties? HomeProvider; |
| + [nodoc] DOMString? ICCID; |
| + [nodoc] DOMString? IMEI; |
| + [nodoc] APNProperties? LastGoodAPN; |
| + // The cellular modem manufacturer. |
| + DOMString? Manufacturer; |
| + [nodoc] DOMString? MDN; |
| + [nodoc] DOMString? MEID; |
| + [nodoc] DOMString? MIN; |
| + // The cellular modem model ID. |
| + DOMString? ModelID; |
| + // If the modem is registered on a network, the network technology |
| + // currently in use. |
| + DOMString? NetworkTechnology; |
| + // Online payment portal a user can use to sign-up for or modify a mobile |
| + // data plan. |
| + PaymentPortal? PaymentPortal; |
| + // The revision of the Preferred Roaming List loaded in the modem. |
| + long? PRLVersion; |
| + // The roaming state of the cellular modem on the current network. |
| + DOMString? RoamingState; |
| + // Information about the operator on whose network the modem is currently |
| + // registered. |
| + CellularProviderProperties? ServingOperator; |
| + // The state of SIM lock for GSM family networks. |
| + SIMLockStatus? SIMLockStatus; |
| + // Whether a SIM card is present. |
| + boolean? SIMPresent; |
| + // The current network signal strength. |
| + long? SignalStrength; |
| + // Whether the cellular network supports scanning. |
| + boolean? SupportNetworkScan; |
| + // A list of supported carriers. |
| + DOMString[]? SupportedCarriers; |
| + }; |
| + |
| + dictionary ManagedCellularProperties { |
| + // See $(ref:CellularProperties.AutoConnect). |
| + ManagedBoolean? AutoConnect; |
| + [nodoc] ManagedAPNProperties? APN; |
| + [nodoc] ManagedAPNList? APNList; |
| + // See $(ref:CellularProperties.ActivationType). |
| + DOMString? ActivationType; |
| + // See $(ref:CellularProperties.ActivationState). |
| + ActivationStateType? ActivationState; |
| + // See $(ref:CellularProperties.AllowRoaming). |
| + boolean? AllowRoaming; |
| + // See $(ref:CellularProperties.Carrier). |
| + ManagedDOMString? Carrier; |
| + [nodoc] DOMString? ESN; |
| + // See $(ref:CellularProperties.Family). |
| + DOMString? Family; |
| + // See $(ref:CellularProperties.FirmwareRevision). |
| + DOMString? FirmwareRevision; |
| + // See $(ref:CellularProperties.FoundNetworks). |
| + FoundNetworkProperties[]? FoundNetworks; |
| + // See $(ref:CellularProperties.HardwareRevision). |
| + DOMString? HardwareRevision; |
| + // See $(ref:CellularProperties.HomeProvider). |
| + CellularProviderProperties[]? HomeProvider; |
| + [nodoc] DOMString? ICCID; |
| + [nodoc] DOMString? IMEI; |
| + [nodoc] APNProperties? LastGoodAPN; |
| + // See $(ref:CellularProperties.Manufacturer). |
| + DOMString? Manufacturer; |
| + [nodoc] DOMString? MDN; |
| + [nodoc] DOMString? MEID; |
| + [nodoc] DOMString? MIN; |
| + // See $(ref:CellularProperties.ModelID). |
| + DOMString? ModelID; |
| + // See $(ref:CellularProperties.NetworkTechnology). |
| + DOMString? NetworkTechnology; |
| + // See $(ref:CellularProperties.PaymentPortal). |
| + PaymentPortal? PaymentPortal; |
| + // See $(ref:CellularProperties.PRLVersion). |
| + long? PRLVersion; |
| + // See $(ref:CellularProperties.RoamingState). |
| + DOMString? RoamingState; |
| + // See $(ref:CellularProperties.ServingOperator). |
| + CellularProviderProperties? ServingOperator; |
| + // See $(ref:CellularProperties.SIMLockStatus). |
| + SIMLockStatus? SIMLockStatus; |
| + // See $(ref:CellularProperties.SIMPresent). |
| + boolean? SIMPresent; |
| + // See $(ref:CellularProperties.SignalStrength). |
| + long? SignalStrength; |
| + // See $(ref:CellularProperties.SupportNetworkScan). |
| + boolean? SupportNetworkScan; |
| + // See $(ref:CellularProperties.SupportedCarriers). |
| + DOMString[]? SupportedCarriers; |
| + }; |
| + |
| + dictionary CellularStateProperties { |
| + // See $(ref:CellularProperties.ActivationState). |
| + ActivationStateType? ActivationState; |
| + // See $(ref:CellularProperties.NetworkTechnology). |
| + DOMString? NetworkTechnology; |
| + // See $(ref:CellularProperties.RoamingState). |
| + DOMString? RoamingState; |
| + // See $(ref:CellularProperties.SIMPresent). |
| + boolean? SIMPresent; |
| + // See $(ref:CellularProperties.SignalStrength). |
| + long? SignalStrength; |
| + }; |
| + |
| + dictionary EthernetProperties { |
| + // Whether the Ethernet network should be connected automatically. |
| + boolean? AutoConnect; |
| + // The authentication used by the Ethernet network. Possible values are |
| + // <code>None</code> and <code>8021X</code>. |
| + DOMString? Authentication; |
| + // Network's EAP settings. Required for 8021X authentication. |
| + EAPProperties? EAP; |
| + }; |
| + |
| + dictionary ManagedEthernetProperties { |
| + // See $(ref:EthernetProperties.AutoConnect). |
| + ManagedBoolean? AutoConnect; |
| + // See $(ref:EthernetProperties.Authentication). |
| + ManagedDOMString? Authentication; |
| + [nodoc] ManagedEAPProperties? EAP; |
| + }; |
| + |
| + dictionary EthernetStateProperties { |
| + // See $(ref:EthernetProperties.Authentication). |
| + DOMString Authentication; |
| + }; |
| + |
| + dictionary VPNProperties { |
| + // Whether the VPN network should be connected automatically. |
| + boolean? AutoConnect; |
| + // The VPN host. |
| + DOMString? Host; |
| + [nodoc] IPSecProperties? IPsec; |
| + [nodoc] L2TPProperties? L2TP; |
| + [nodoc] OpenVPNProperties? OpenVPN; |
| + [nodoc] ThirdPartyVPNProperties? ThirdPartyVPN; |
| + // The VPN type. |
| + DOMString? Type; |
| + }; |
| + |
| + dictionary ManagedVPNProperties { |
| + // See $(ref:VPNProperties.AutoConnect). |
| + ManagedBoolean? AutoConnect; |
| + // See $(ref:VPNProperties.Host). |
| + ManagedDOMString? Host; |
| + [nodoc] ManagedIPSecProperties? IPsec; |
| + [nodoc] ManagedL2TPProperties? L2TP; |
| + [nodoc] ManagedOpenVPNProperties? OpenVPN; |
| + [nodoc] ManagedThirdPartyVPNProperties? ThirdPartyVPN; |
| + // See $(ref:VPNProperties.Type). |
| + ManagedDOMString Type; |
| + }; |
| + |
| + dictionary VPNStateProperties { |
| + // See $(ref:VPNProperties.Type). |
| + DOMString Type; |
| + [nodoc] IPSecProperties? IPsec; |
| + [nodoc] ThirdPartyVPNProperties? ThirdPartyVPN; |
| + }; |
| + |
| + [noinline_doc] dictionary WiFiProperties { |
| + // Whether ARP polling of default gateway is allowed. Defaults to true. |
| + boolean? AllowGatewayARPPolling; |
| + // Whether the WiFi network should be connected automatically when in range. |
| + boolean? AutoConnect; |
| + // The BSSID of the associated access point.. |
| + DOMString? BSSID; |
| + // The network EAP properties. Required for <code>WEP-8021X</code> and |
| + // <code>WPA-EAP</code> networks. |
| + EAPProperties? EAP; |
| + // The WiFi service operating frequency in MHz. For connected networks, the |
| + // current frequency on which the network is connected. Otherwise, the |
| + // frequency of the best available BSS. |
| + long? Frequency; |
| + // Contains all operating frequency recently seen for the WiFi network. |
| + long[]? FrequencyList; |
| + // HEX-encoded copy of the network SSID. |
| + DOMString? HexSSID; |
| + // Whether the network SSID will be broadcast. |
| + boolean? HiddenSSID; |
| + // Signal-to-noise value (in dB) below which roaming to a new network |
| + // should be attempted. |
| + long? RoamThreshold; |
| + // The network SSID. |
| + DOMString? SSID; |
| + // The network security type. |
| + DOMString? Security; |
| + // The network signal strength. |
| + long? SignalStrength; |
| + }; |
| + |
| + dictionary ManagedWiFiProperties { |
| + // See $(ref:WiFiProperties.AllowGatewayARPPolling). |
| + ManagedBoolean? AllowGatewayARPPolling; |
| + // See $(ref:WiFiProperties.AutoConnect). |
| + ManagedBoolean? AutoConnect; |
| + // See $(ref:WiFiProperties.BSSID). |
| + DOMString? BSSID; |
| + // See $(ref:WiFiProperties.EAP). |
| + [nodoc] ManagedEAPProperties? EAP; |
| + // See $(ref:WiFiProperties.Frequency). |
| + long? Frequency; |
| + // See $(ref:WiFiProperties.FrequencyList). |
| + long[]? FrequencyList; |
| + // See $(ref:WiFiProperties.HexSSID). |
| + ManagedDOMString? HexSSID; |
| + // See $(ref:WiFiProperties.HiddenSSID). |
| + ManagedBoolean? HiddenSSID; |
| + // See $(ref:WiFiProperties.RoamThreshold). |
| + ManagedLong? RoamThreshold; |
| + // See $(ref:WiFiProperties.SSID). |
| + ManagedDOMString? SSID; |
| + // See $(ref:WiFiProperties.Security). |
| + ManagedDOMString Security; |
| + // See $(ref:WiFiProperties.SignalStrength). |
| + long? SignalStrength; |
| + }; |
| + |
| + dictionary WiFiStateProperties { |
| + // See $(ref:WiFiProperties.BSSID). |
| + DOMString? BSSID; |
| + // See $(ref:WiFiProperties.Frequency). |
| + long? Frequency; |
| + // See $(ref:WiFiProperties.Security). |
| + DOMString Security; |
| + // See $(ref:WiFiProperties.SignalStrength). |
| + long? SignalStrength; |
| + }; |
| + |
| + dictionary WiMAXProperties { |
| + // Whether the network should be connected automatically. |
| + boolean? AutoConnect; |
| + // The network EAP properties. |
| + EAPProperties? EAP; |
| + // The network signal strength. |
| + long? SignalStrength; |
| + }; |
| + |
| + dictionary ManagedWiMAXProperties { |
| + // See $(ref:WiMAXProperties.AutoConnect). |
| + ManagedBoolean? AutoConnect; |
| + [nodoc] ManagedEAPProperties? EAP; |
| + // See $(ref:WiMAXProperties.SignalStrength). |
| + long? SignalStrength; |
| + }; |
| + |
| + dictionary WiMAXStateProperties { |
| + // See $(ref:WiMAXProperties.SignalStrength). |
| + long? SignalStrength; |
| + }; |
| + |
| + dictionary NetworkConfigProperties { |
| + // See $(ref:NetworkProperties.Cellular). |
| + CellularProperties? Cellular; |
| + // See $(ref:NetworkProperties.Ethernet). |
| + EthernetProperties? Ethernet; |
| + // See $(ref:NetworkProperties.GUID). |
| + DOMString? GUID; |
| + // See $(ref:NetworkProperties.IPAddressConfigType). |
| + IPConfigType? IPAddressConfigType; |
| + // See $(ref:NetworkProperties.Name). |
| + DOMString? Name; |
| + // See $(ref:NetworkProperties.NameServersConfigType). |
| + IPConfigType? NameServersConfigType; |
| + // See $(ref:NetworkProperties.Priority). |
| + long? Priority; |
| + [nodoc] |
| + ProxySettings? ProxySettings; |
| + [nodoc] |
| + IPConfigProperties? StaticIPConfig; |
| + // See $(ref:NetworkProperties.Type). |
| + NetworkType? Type; |
| + // See $(ref:NetworkProperties.VPN). |
| + VPNProperties? VPN; |
| + // See $(ref:NetworkProperties.WiFi). |
| + WiFiProperties? WiFi; |
| + // See $(ref:NetworkProperties.WiMAX). |
| + WiMAXProperties? WiMAX; |
| + }; |
| + |
| + [noinline_doc] |
| + dictionary NetworkProperties { |
| + // For cellular networks, cellular network properties. |
| + CellularProperties? Cellular; |
| + // Whether the network is connectable. |
| + boolean? Connectable; |
| + // The network's current connection state. |
| + ConnectionStateType? ConnectionState; |
| + // The last recorded network error state. |
| + DOMString? ErrorState; |
| + // For Ethernet networks, the Ethernet network properties. |
| + EthernetProperties? Ethernet; |
| + // The network GUID. |
| + DOMString GUID; |
| + // The network's IP address configuration type. |
| + IPConfigType? IPAddressConfigType; |
| + // The network's IP configuration. |
| + IPConfigProperties[]? IPConfigs; |
| + // The network's MAC address. |
| + DOMString? MacAddress; |
| + // A user friendly network name. |
| + DOMString? Name; |
| + // The IP configuration type for the name servers used by the network. |
| + IPConfigType? NameServersConfigType; |
| + // The network priority. |
| + long? Priority; |
| + // The network's proxy settings. |
| + ProxySettings? ProxySettings; |
| + // For a connected network, whether the network connectivity to the |
| + // Internet is limited, e.g. if the network is behind a portal, or a |
| + // cellular network is not activated. |
| + boolean? RestrictedConnectivity; |
| + // The network's static IP configuration. |
| + IPConfigProperties? StaticIPConfig; |
| + // IP configuration that was received from the DHCP server before applying |
| + // static IP configuration. |
| + IPConfigProperties? SavedIPConfig; |
| + // Indicates whether and how the network is configured. |
| + DOMString? Source; |
| + // The network type. |
| + NetworkType Type; |
| + // For VPN networks, the network VPN properties. |
| + VPNProperties? VPN; |
| + // For WiFi networks, the network WiFi properties. |
| + WiFiProperties? WiFi; |
| + // For WiMAX networks, the network WiMAX properties. |
| + WiMAXProperties? WiMAX; |
| + }; |
| + |
| + [noinline_doc] |
| + dictionary ManagedProperties { |
| + // See $(ref:NetworkProperties.Cellular). |
| + ManagedCellularProperties? Cellular; |
| + // See $(ref:NetworkProperties.Connectable). |
| + boolean? Connectable; |
| + // See $(ref:NetworkProperties.ConnectionState). |
| + ConnectionStateType? ConnectionState; |
| + // See $(ref:NetworkProperties.ErrorState). |
| + DOMString? ErrorState; |
| + // See $(ref:NetworkProperties.Ethernet). |
| + ManagedEthernetProperties? Ethernet; |
| + // See $(ref:NetworkProperties.GUID). |
| + DOMString GUID; |
| + // See $(ref:NetworkProperties.IPAddressConfigType). |
| + ManagedIPConfigType? IPAddressConfigType; |
| + // See $(ref:NetworkProperties.IPConfigs). |
| + IPConfigProperties[]? IPConfigs; |
| + // See $(ref:NetworkProperties.MacAddress). |
| + DOMString? MacAddress; |
| + // See $(ref:NetworkProperties.Name). |
| + ManagedDOMString? Name; |
| + // See $(ref:NetworkProperties.NameServersConfigType). |
| + ManagedIPConfigType? NameServersConfigType; |
| + // See $(ref:NetworkProperties.Priority). |
| + ManagedLong? Priority; |
| + // See $(ref:NetworkProperties.ProxySettings). |
| + ManagedProxySettings? ProxySettings; |
| + // See $(ref:NetworkProperties.RestrictedConnectivity). |
| + boolean? RestrictedConnectivity; |
| + // See $(ref:NetworkProperties.StaticIPConfig). |
| + ManagedIPConfigProperties? StaticIPConfig; |
| + // See $(ref:NetworkProperties.SavedIPConfig). |
| + IPConfigProperties? SavedIPConfig; |
| + // See $(ref:NetworkProperties.Source). |
| + DOMString? Source; |
| + // See $(ref:NetworkProperties.Type). |
| + NetworkType Type; |
| + // See $(ref:NetworkProperties.VPN). |
| + ManagedVPNProperties? VPN; |
| + // See $(ref:NetworkProperties.WiFi). |
| + ManagedWiFiProperties? WiFi; |
| + // See $(ref:NetworkProperties.WiMAX). |
| + ManagedWiMAXProperties? WiMAX; |
| + }; |
| + |
| + dictionary NetworkStateProperties { |
| + // See $(ref:NetworkProperties.Cellular). |
| + CellularStateProperties? Cellular; |
| + // See $(ref:NetworkProperties.Connectable). |
| + boolean? Connectable; |
| + // See $(ref:NetworkProperties.ConnectionState). |
| + ConnectionStateType? ConnectionState; |
| + // See $(ref:NetworkProperties.Ethernet). |
| + EthernetStateProperties? Ethernet; |
| + // See $(ref:NetworkProperties.ErrorState). |
| + DOMString? ErrorState; |
| + // See $(ref:NetworkProperties.GUID). |
| + DOMString GUID; |
| + // See $(ref:NetworkProperties.Name). |
| + DOMString? Name; |
| + // See $(ref:NetworkProperties.Priority). |
| + long? Priority; |
| + // See $(ref:NetworkProperties.Source). |
| + DOMString? Source; |
| + // See $(ref:NetworkProperties.Type). |
| + NetworkType Type; |
| + // See $(ref:NetworkProperties.VPN). |
| + VPNStateProperties? VPN; |
| + // See $(ref:NetworkProperties.WiFi). |
| + WiFiStateProperties? WiFi; |
| + // See $(ref:NetworkProperties.WiMAX). |
| + WiMAXStateProperties? WiMAX; |
| + }; |
| + |
| + dictionary DeviceStateProperties { |
| + // Set if the device is enabled. True if the device is currently scanning. |
| + boolean? Scanning; |
| + |
| + // Set to the SIM lock type if the device type is Cellular and the device |
| + // is locked. |
| + DOMString? SimLockType; |
| + |
| + // Set to the SIM present state if the device type is Cellular. |
| + boolean? SimPresent; |
| + |
| + // The current state of the device. |
| + DeviceStateType State; |
| + |
| + // The network type associated with the device (Cellular, Ethernet, WiFi, or |
| + // WiMAX). |
| + NetworkType Type; |
| + }; |
| + |
| + [nodoc] dictionary VerificationProperties { |
| + // A string containing a PEM-encoded (including the 'BEGIN CERTIFICATE' |
| + // header and 'END CERTIFICATE' footer) X.509 certificate for use in |
| + // verifying the signed data. |
| + DOMString certificate; |
| + |
| + // An array of PEM-encoded X.509 intermediate certificate authority |
| + // certificates. Each PEM-encoded certificate is expected to have the |
| + // 'BEGIN CERTIFICATE' header and 'END CERTIFICATE' footer. |
| + DOMString[]? intermediateCertificates; |
| + |
| + // A string containing a base64-encoded RSAPublicKey ASN.1 structure, |
| + // representing the public key to be used by |
| + // $(ref:verifyAndEncryptCredentials) and $(ref:verifyAndEncryptData) |
| + // methods. |
| + DOMString publicKey; |
| + |
| + // A string containing a base64-encoded random binary data for use in |
| + // verifying the signed data. |
| + DOMString nonce; |
| + |
| + // A string containing the identifying data string signed by the device. |
| + DOMString signedData; |
| + |
| + // A string containing the serial number of the device. |
| + DOMString deviceSerial; |
| + |
| + // A string containing the SSID of the device. Should be empty for new |
| + // configurations. |
| + DOMString deviceSsid; |
| + |
| + // A string containing the BSSID of the device. Should be empty for new |
| + // configurations. |
| + DOMString deviceBssid; |
| + }; |
| + |
| + dictionary NetworkFilter { |
| + // The type of networks to return. |
| + NetworkType networkType; |
| + |
| + // If true, only include visible (physically connected or in-range) |
| + // networks. Defaults to 'false'. |
| + boolean? visible; |
| + |
| + // If true, only include configured (saved) networks. Defaults to 'false'. |
| + boolean? configured; |
| + |
| + // Maximum number of networks to return. Defaults to 1000 if unspecified. |
| + // Use 0 for no limit. |
| + long? limit; |
| + }; |
| + |
| + dictionary GlobalPolicy { |
| + // If true, only policy networks may auto connect. Defaults to false. |
| + boolean? AllowOnlyPolicyNetworksToAutoconnect; |
| + |
| + // If true, only policy networks may be connected to and no new networks may |
| + // be added or configured. Defaults to false. |
| + boolean? AllowOnlyPolicyNetworksToConnect; |
| + }; |
| + |
| + callback VoidCallback = void(); |
| + callback BooleanCallback = void(boolean result); |
| + callback StringCallback = void(DOMString result); |
| + callback GetPropertiesCallback = void(NetworkProperties result); |
| + callback GetManagedPropertiesCallback = void(ManagedProperties result); |
| + callback GetStatePropertiesCallback = void(NetworkStateProperties result); |
| + callback GetNetworksCallback = void(NetworkStateProperties[] result); |
| + callback GetDeviceStatesCallback = void(DeviceStateProperties[] result); |
| + callback GetEnabledNetworkTypesCallback = void(NetworkType[] result); |
| + callback CaptivePortalStatusCallback = void(CaptivePortalStatus result); |
| + callback GetGlobalPolicyCallback = void(GlobalPolicy result); |
| + |
| + interface Functions { |
| + // Gets all the properties of the network with id networkGuid. Includes all |
| + // properties of the network (read-only and read/write values). |
| + // |networkGuid|: The GUID of the network to get properties for. |
| + // |callback|: Called with the network properties when received. |
| + static void getProperties(DOMString networkGuid, |
| + GetPropertiesCallback callback); |
| + |
| + // Gets the merged properties of the network with id networkGuid from the |
| + // sources: User settings, shared settings, user policy, device policy and |
| + // the currently active settings. |
| + // |networkGuid|: The GUID of the network to get properties for. |
| + // |callback|: Called with the managed network properties when received. |
| + static void getManagedProperties(DOMString networkGuid, |
| + GetManagedPropertiesCallback callback); |
| + |
| + // Gets the cached read-only properties of the network with id networkGuid. |
| + // This is meant to be a higher performance function than |
| + // $(ref:getProperties), which requires a round trip to query the networking |
| + // subsystem. The following properties are returned for all networks: GUID, |
| + // Type, Name, WiFi.Security. Additional properties are provided for visible |
| + // networks: ConnectionState, ErrorState, WiFi.SignalStrength, |
| + // Cellular.NetworkTechnology, Cellular.ActivationState, |
| + // Cellular.RoamingState. |
| + // |networkGuid|: The GUID of the network to get properties for. |
| + // |callback|: Called immediately with the network state properties. |
| + static void getState(DOMString networkGuid, |
| + GetStatePropertiesCallback callback); |
| + |
| + // Sets the properties of the network with id networkGuid. |
| + // <b> |
| + // In kiosk sessions, calling this method on a shared network will fail. |
| + // </b> |
| + // |networkGuid|: The GUID of the network to set properties for. |
| + // |properties|: The properties to set. |
| + // |callback|: Called when the operation has completed. |
| + static void setProperties(DOMString networkGuid, |
| + NetworkConfigProperties properties, |
| + optional VoidCallback callback); |
| + |
| + // Creates a new network configuration from properties. If a matching |
| + // configured network already exists, this will fail. Otherwise returns the |
| + // GUID of the new network. |
| + // |shared|: <p> |
| + // If <code>true</code>, share this network configuration with |
| + // other users. |
| + // </p> |
| + // <p> |
| + // <b>This option is exposed only to Chrome's Web UI.</b> |
| + // When called by apps, <code>false</code> is the only allowed value. |
| + // </p> |
| + // |properties|: The properties to configure the new network with. |
| + // |callback|: Called with the GUID for the new network configuration once |
| + // the network has been created. |
| + static void createNetwork(boolean shared, |
| + NetworkConfigProperties properties, |
| + optional StringCallback callback); |
| + |
| + // <p> |
| + // Forgets a network configuration by clearing any configured properties |
| + // for the network with GUID <code>networkGuid</code>. This may also |
| + // include any other networks with matching identifiers (e.g. WiFi SSID |
| + // and Security). If no such configuration exists, an error will be set |
| + // and the operation will fail. |
| + // </p> |
| + // <p> |
| + // <b>In kiosk sessions, this method will not be able to forget shared |
| + // network configurations.</b> |
| + // </p> |
| + // |networkGuid|: The GUID of the network to forget. |
| + // |callback|: Called when the operation has completed. |
| + static void forgetNetwork(DOMString networkGuid, |
| + optional VoidCallback callback); |
| + |
| + // Returns a list of network objects with the same properties provided by |
| + // $(ref:getState). A filter is provided to specify the |
| + // type of networks returned and to limit the number of networks. Networks |
| + // are ordered by the system based on their priority, with connected or |
| + // connecting networks listed first. |
| + // |filter|: Describes which networks to return. |
| + // |callback|: Called with a dictionary of networks and their state |
| + // properties when received. |
| + static void getNetworks(NetworkFilter filter, |
| + GetNetworksCallback callback); |
| + |
| + // Deprecated. Please use $(ref:getNetworks) with |
| + // filter.visible = true instead. |
| + [nodoc, deprecated="Use getNetworks."] |
| + static void getVisibleNetworks(NetworkType networkType, |
| + GetNetworksCallback callback); |
| + |
| + // Deprecated. Please use $(ref:getDeviceStates) instead. |
| + [nodoc, deprecated="Use getDeviceStates."] |
| + static void getEnabledNetworkTypes(GetEnabledNetworkTypesCallback callback); |
| + |
| + // Returns states of available networking devices. |
| + // |callback|: Called with a list of devices and their state. |
| + static void getDeviceStates(GetDeviceStatesCallback callback); |
| + |
| + // Enables any devices matching the specified network type. Note, the type |
| + // might represent multiple network types (e.g. 'Wireless'). |
| + // |networkType|: The type of network to enable. |
| + static void enableNetworkType(NetworkType networkType); |
| + |
| + // Disables any devices matching the specified network type. See note for |
| + // $(ref:enableNetworkType). |
| + // |networkType|: The type of network to disable. |
| + static void disableNetworkType(NetworkType networkType); |
| + |
| + // Requests that the networking subsystem scan for new networks and |
| + // update the list returned by $(ref:getNetworks). This is only a |
| + // request: the network subsystem can choose to ignore it. If the list |
| + // is updated, then the $(ref:onNetworkListChanged) event will be fired. |
| + static void requestNetworkScan(); |
| + |
| + // Starts a connection to the network with networkGuid. |
| + // |networkGuid|: The GUID of the network to connect to. |
| + // |callback|: Called when the connect request has been sent. Note: the |
| + // connection may not have completed. Observe $(ref:onNetworksChanged) |
| + // to be notified when a network state changes. |
| + static void startConnect(DOMString networkGuid, |
| + optional VoidCallback callback); |
| + |
| + // Starts a disconnect from the network with networkGuid. |
| + // |networkGuid|: The GUID of the network to disconnect from. |
| + // |callback|: Called when the disconnect request has been sent. See note |
| + // for $(ref:startConnect). |
| + static void startDisconnect(DOMString networkGuid, |
| + optional VoidCallback callback); |
| + |
| + // Starts activation of the Cellular network with networkGuid. If called |
| + // for a network that is already activated, or for a network with a carrier |
| + // that can not be directly activated, this will show the account details |
| + // page for the carrier if possible. |
| + // |networkGuid|: The GUID of the Cellular network to activate. |
| + // |carrier|: Optional name of carrier to activate. |
| + // |callback|: Called when the activation request has been sent. See note |
| + // for $(ref:startConnect). |
| + [nodoc] static void startActivate(DOMString networkGuid, |
| + optional DOMString carrier, |
| + optional VoidCallback callback); |
| + |
| + // Verifies that the device is a trusted device. |
| + // |properties|: Properties of the destination to use in verifying that it |
| + // is a trusted device. |
| + // |callback|: A callback function that indicates whether or not the device |
| + // is a trusted device. |
| + [nodoc, deprecated = "Use networking.castPrivate API."] |
| + static void verifyDestination(VerificationProperties properties, |
| + BooleanCallback callback); |
| + |
| + // Verifies that the device is a trusted device and retrieves encrypted |
| + // network credentials. |
| + // |properties|: Properties of the destination to use in verifying that it |
| + // is a trusted device. |
| + // |networkGuid|: The GUID of the Cellular network to activate. |
| + // |callback|: A callback function that receives base64-encoded encrypted |
| + // credential data to send to a trusted device. |
| + [nodoc, deprecated = "Use networking.castPrivate API."] |
| + static void verifyAndEncryptCredentials(VerificationProperties properties, |
| + DOMString networkGuid, |
| + StringCallback callback); |
| + |
| + // Verifies that the device is a trusted device and encrypts supplied |
| + // data with device public key. |
| + // |properties|: Properties of the destination to use in verifying that it |
| + // is a trusted device. |
| + // |data|: A string containing the base64-encoded data to encrypt. |
| + // |callback|: A callback function that receives base64-encoded encrypted |
| + // data to send to a trusted device. |
| + [nodoc, deprecated = "Use networking.castPrivate API."] |
| + static void verifyAndEncryptData(VerificationProperties properties, |
| + DOMString data, |
| + StringCallback callback); |
| + |
| + // Enables TDLS for WiFi traffic with a specified peer if available. |
| + // |ip_or_mac_address|: The IP or MAC address of the peer with which to |
| + // enable a TDLS connection. |
| + // |enabled| If true, enable TDLS, otherwise disable TDLS. |
| + // |callback|: A callback function that receives a string with an error or |
| + // the current TDLS status. 'Failed' indicates that the request failed |
| + // (e.g. MAC address lookup failed). 'Timeout' indicates that the lookup |
| + // timed out. Otherwise a valid status is returned (see |
| + // $(ref:getWifiTDLSStatus)). |
| + [nodoc, deprecated = "Use networking.castPrivate API."] |
| + static void setWifiTDLSEnabledState(DOMString ip_or_mac_address, |
| + boolean enabled, |
| + optional StringCallback callback); |
| + |
| + // Returns the current TDLS status for the specified peer. |
| + // |ip_or_mac_address|: The IP or MAC address of the peer. |
| + // |callback|: A callback function that receives a string with the current |
| + // TDLS status which can be 'Connected', 'Disabled', 'Disconnected', |
| + // 'Nonexistent', or 'Unknown'. |
| + [nodoc, deprecated = "Use networking.castPrivate API."] |
| + static void getWifiTDLSStatus(DOMString ip_or_mac_address, |
| + StringCallback callback); |
| + |
| + // Returns captive portal status for the network matching 'networkGuid'. |
| + // |networkGuid|: The GUID of the network to get captive portal status for. |
| + // |callback|: A callback function that returns the results of the query for |
| + // network captive portal status. |
| + static void getCaptivePortalStatus(DOMString networkGuid, |
| + CaptivePortalStatusCallback callback); |
| + |
| + // Unlocks a Cellular SIM card. |
| + // * If the SIM is PIN locked, |pin| will be used to unlock the SIM and |
| + // the |puk| argument will be ignored if provided. |
| + // * If the SIM is PUK locked, |puk| and |pin| must be provided. If the |
| + // operation succeeds (|puk| is valid), the PIN will be set to |pin|. |
| + // (If |pin| is empty or invalid the operation will fail). |
| + // |networkGuid|: The GUID of the cellular network to unlock. |
| + // If empty, the default cellular device will be used. |
| + // |pin|: The current SIM PIN, or the new PIN if PUK is provided. |
| + // |puk|: The operator provided PUK for unblocking a blocked SIM. |
| + // |callback|: Called when the operation has completed. |
| + [nodoc] static void unlockCellularSim(DOMString networkGuid, |
| + DOMString pin, |
| + optional DOMString puk, |
| + optional VoidCallback callback); |
| + |
| + // Sets whether or not SIM locking is enabled (i.e a PIN will be required |
| + // when the device is powered) and changes the PIN if a new PIN is |
| + // specified. If the new PIN is provided but not valid (e.g. too short) |
| + // the operation will fail. This will not lock the SIM; that is handled |
| + // automatically by the device. NOTE: If the SIM is locked, it must first be |
| + // unlocked with unlockCellularSim() before this can be called (otherwise it |
| + // will fail and chrome.runtime.lastError will be set to Error.SimLocked). |
| + // |networkGuid|: The GUID of the cellular network to set the SIM state of. |
| + // If empty, the default cellular device will be used. |
| + // |simState|: The SIM state to set. |
| + // |callback|: Called when the operation has completed. |
| + [nodoc] static void setCellularSimState(DOMString networkGuid, |
| + CellularSimState simState, |
| + optional VoidCallback callback); |
| + |
| + // Gets the global policy properties. These properties are not expected to |
| + // change during a session. |
| + static void getGlobalPolicy(GetGlobalPolicyCallback callback); |
| + }; |
| + |
| + interface Events { |
| + // Fired when the properties change on any of the networks. Sends a list of |
| + // GUIDs for networks whose properties have changed. |
| + static void onNetworksChanged(DOMString[] changes); |
| + |
| + // Fired when the list of networks has changed. Sends a complete list of |
| + // GUIDs for all the current networks. |
| + static void onNetworkListChanged(DOMString[] changes); |
| + |
| + // Fired when the list of devices has changed or any device state properties |
| + // have changed. |
| + static void onDeviceStateListChanged(); |
| + |
| + // Fired when a portal detection for a network completes. Sends the GUID of |
| + // the network and the corresponding captive portal status. |
| + static void onPortalDetectionCompleted(DOMString networkGuid, |
| + CaptivePortalStatus status); |
| + }; |
| +}; |