The chrome.networking.onc API is used for configuring network connections (Cellular, Ethernet, VPN, WiFi or WiMAX). This API is available in Chrome OS kiosk sessions.
Network connection configurations are specified following
Open Network Configuration (ONC) specification.
NOTE: Most dictionary properties and enum values use UpperCamelCase to match the ONC specification instead of the JavaScript lowerCamelCase convention.
The chrome.networking.onc API is used for configuring network connections (Cellular, Ethernet, VPN, WiFi or WiMAX). This API is available in Chrome OS kiosk sessions. Network connection configurations are specified following Open Network Configuration (ONC) specification. NOTE: Most dictionary properties and enum values use UpperCamelCase to match the ONC specification instead of the JavaScript lowerCamelCase convention. * available since Chrome 59 * https://developer.chrome.com/apps/networking.onc
(create-network shared properties)
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| - If true, share this network configuration with other users. This option is exposed only to Chrome's Web UI. When called by apps, false is the only allowed value. |properties| - The properties to configure the new network with.
This function returns a core.async channel of type promise-chan
which eventually receives a result value.
Signature of the result value put on the channel is [result] where:
|result| - https://developer.chrome.com/apps/networking.onc#property-callback-result.
In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.
https://developer.chrome.com/apps/networking.onc#method-createNetwork.
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| - If true, share this network configuration with other users. This option is exposed only to Chrome's Web UI. When called by apps, false is the only allowed value. |properties| - The properties to configure the new network with. This function returns a core.async channel of type `promise-chan` which eventually receives a result value. Signature of the result value put on the channel is [result] where: |result| - https://developer.chrome.com/apps/networking.onc#property-callback-result. In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error. https://developer.chrome.com/apps/networking.onc#method-createNetwork.
(disable-network-type network-type)
Disables any devices matching the specified network type. See note for 'enableNetworkType'.
|network-type| - The type of network to disable.
https://developer.chrome.com/apps/networking.onc#method-disableNetworkType.
Disables any devices matching the specified network type. See note for 'enableNetworkType'. |network-type| - The type of network to disable. https://developer.chrome.com/apps/networking.onc#method-disableNetworkType.
(enable-network-type network-type)
Enables any devices matching the specified network type. Note, the type might represent multiple network types (e.g. 'Wireless').
|network-type| - The type of network to enable.
https://developer.chrome.com/apps/networking.onc#method-enableNetworkType.
Enables any devices matching the specified network type. Note, the type might represent multiple network types (e.g. 'Wireless'). |network-type| - The type of network to enable. https://developer.chrome.com/apps/networking.onc#method-enableNetworkType.
(forget-network network-guid)
Forgets a network configuration by clearing any configured properties for the network with GUID networkGuid. 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. In kiosk sessions, this method will not be able to forget shared network configurations.
|network-guid| - The GUID of the network to forget.
This function returns a core.async channel of type promise-chan
which eventually receives a result value.
Signature of the result value put on the channel is [].
In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.
https://developer.chrome.com/apps/networking.onc#method-forgetNetwork.
Forgets a network configuration by clearing any configured properties for the network with GUID networkGuid. 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. In kiosk sessions, this method will not be able to forget shared network configurations. |network-guid| - The GUID of the network to forget. This function returns a core.async channel of type `promise-chan` which eventually receives a result value. Signature of the result value put on the channel is []. In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error. https://developer.chrome.com/apps/networking.onc#method-forgetNetwork.
(get-captive-portal-status network-guid)
Returns captive portal status for the network matching 'networkGuid'.
|network-guid| - The GUID of the network to get captive portal status for.
This function returns a core.async channel of type promise-chan
which eventually receives a result value.
Signature of the result value put on the channel is [result] where:
|result| - https://developer.chrome.com/apps/networking.onc#property-callback-result.
In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.
https://developer.chrome.com/apps/networking.onc#method-getCaptivePortalStatus.
Returns captive portal status for the network matching 'networkGuid'. |network-guid| - The GUID of the network to get captive portal status for. This function returns a core.async channel of type `promise-chan` which eventually receives a result value. Signature of the result value put on the channel is [result] where: |result| - https://developer.chrome.com/apps/networking.onc#property-callback-result. In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error. https://developer.chrome.com/apps/networking.onc#method-getCaptivePortalStatus.
(get-device-states)
Returns states of available networking devices.
This function returns a core.async channel of type promise-chan
which eventually receives a result value.
Signature of the result value put on the channel is [result] where:
|result| - https://developer.chrome.com/apps/networking.onc#property-callback-result.
In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.
https://developer.chrome.com/apps/networking.onc#method-getDeviceStates.
Returns states of available networking devices. This function returns a core.async channel of type `promise-chan` which eventually receives a result value. Signature of the result value put on the channel is [result] where: |result| - https://developer.chrome.com/apps/networking.onc#property-callback-result. In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error. https://developer.chrome.com/apps/networking.onc#method-getDeviceStates.
(get-global-policy)
Gets the global policy properties. These properties are not expected to change during a session.
This function returns a core.async channel of type promise-chan
which eventually receives a result value.
Signature of the result value put on the channel is [result] where:
|result| - https://developer.chrome.com/apps/networking.onc#property-callback-result.
In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.
https://developer.chrome.com/apps/networking.onc#method-getGlobalPolicy.
Gets the global policy properties. These properties are not expected to change during a session. This function returns a core.async channel of type `promise-chan` which eventually receives a result value. Signature of the result value put on the channel is [result] where: |result| - https://developer.chrome.com/apps/networking.onc#property-callback-result. In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error. https://developer.chrome.com/apps/networking.onc#method-getGlobalPolicy.
(get-managed-properties network-guid)
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.
|network-guid| - The GUID of the network to get properties for.
This function returns a core.async channel of type promise-chan
which eventually receives a result value.
Signature of the result value put on the channel is [result] where:
|result| - https://developer.chrome.com/apps/networking.onc#property-callback-result.
In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.
https://developer.chrome.com/apps/networking.onc#method-getManagedProperties.
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. |network-guid| - The GUID of the network to get properties for. This function returns a core.async channel of type `promise-chan` which eventually receives a result value. Signature of the result value put on the channel is [result] where: |result| - https://developer.chrome.com/apps/networking.onc#property-callback-result. In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error. https://developer.chrome.com/apps/networking.onc#method-getManagedProperties.
(get-networks filter)
Returns a list of network objects with the same properties provided by '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.
This function returns a core.async channel of type promise-chan
which eventually receives a result value.
Signature of the result value put on the channel is [result] where:
|result| - https://developer.chrome.com/apps/networking.onc#property-callback-result.
In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.
https://developer.chrome.com/apps/networking.onc#method-getNetworks.
Returns a list of network objects with the same properties provided by '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. This function returns a core.async channel of type `promise-chan` which eventually receives a result value. Signature of the result value put on the channel is [result] where: |result| - https://developer.chrome.com/apps/networking.onc#property-callback-result. In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error. https://developer.chrome.com/apps/networking.onc#method-getNetworks.
(get-properties network-guid)
Gets all the properties of the network with id networkGuid. Includes all properties of the network (read-only and read/write values).
|network-guid| - The GUID of the network to get properties for.
This function returns a core.async channel of type promise-chan
which eventually receives a result value.
Signature of the result value put on the channel is [result] where:
|result| - https://developer.chrome.com/apps/networking.onc#property-callback-result.
In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.
https://developer.chrome.com/apps/networking.onc#method-getProperties.
Gets all the properties of the network with id networkGuid. Includes all properties of the network (read-only and read/write values). |network-guid| - The GUID of the network to get properties for. This function returns a core.async channel of type `promise-chan` which eventually receives a result value. Signature of the result value put on the channel is [result] where: |result| - https://developer.chrome.com/apps/networking.onc#property-callback-result. In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error. https://developer.chrome.com/apps/networking.onc#method-getProperties.
(get-state network-guid)
Gets the cached read-only properties of the network with id networkGuid. This is meant to be a higher performance function than '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.
|network-guid| - The GUID of the network to get properties for.
This function returns a core.async channel of type promise-chan
which eventually receives a result value.
Signature of the result value put on the channel is [result] where:
|result| - https://developer.chrome.com/apps/networking.onc#property-callback-result.
In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.
https://developer.chrome.com/apps/networking.onc#method-getState.
Gets the cached read-only properties of the network with id networkGuid. This is meant to be a higher performance function than '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. |network-guid| - The GUID of the network to get properties for. This function returns a core.async channel of type `promise-chan` which eventually receives a result value. Signature of the result value put on the channel is [result] where: |result| - https://developer.chrome.com/apps/networking.onc#property-callback-result. In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error. https://developer.chrome.com/apps/networking.onc#method-getState.
(request-network-scan)
(request-network-scan network-type)
Requests that the networking subsystem scan for new networks and update the list returned by 'getVisibleNetworks'. This is only a request: the network subsystem can choose to ignore it. If the list is updated, then the 'onNetworkListChanged' event will be fired.
|network-type| - If provided, requests a scan specific to the type. For Cellular a mobile network scan will be requested if supported.
https://developer.chrome.com/apps/networking.onc#method-requestNetworkScan.
Requests that the networking subsystem scan for new networks and update the list returned by 'getVisibleNetworks'. This is only a request: the network subsystem can choose to ignore it. If the list is updated, then the 'onNetworkListChanged' event will be fired. |network-type| - If provided, requests a scan specific to the type. For Cellular a mobile network scan will be requested if supported. https://developer.chrome.com/apps/networking.onc#method-requestNetworkScan.
(set-properties network-guid properties)
Sets the properties of the network with id |networkGuid|. This is only valid for configured networks (Source != None). Unconfigured visible networks should use 'createNetwork' instead. In kiosk sessions, calling this method on a shared network will fail.
|network-guid| - The GUID of the network to set properties for. |properties| - The properties to set.
This function returns a core.async channel of type promise-chan
which eventually receives a result value.
Signature of the result value put on the channel is [].
In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.
https://developer.chrome.com/apps/networking.onc#method-setProperties.
Sets the properties of the network with id |networkGuid|. This is only valid for configured networks (Source != None). Unconfigured visible networks should use 'createNetwork' instead. In kiosk sessions, calling this method on a shared network will fail. |network-guid| - The GUID of the network to set properties for. |properties| - The properties to set. This function returns a core.async channel of type `promise-chan` which eventually receives a result value. Signature of the result value put on the channel is []. In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error. https://developer.chrome.com/apps/networking.onc#method-setProperties.
(start-connect network-guid)
Starts a connection to the network with networkGuid.
|network-guid| - The GUID of the network to connect to.
This function returns a core.async channel of type promise-chan
which eventually receives a result value.
Signature of the result value put on the channel is [].
In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.
https://developer.chrome.com/apps/networking.onc#method-startConnect.
Starts a connection to the network with networkGuid. |network-guid| - The GUID of the network to connect to. This function returns a core.async channel of type `promise-chan` which eventually receives a result value. Signature of the result value put on the channel is []. In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error. https://developer.chrome.com/apps/networking.onc#method-startConnect.
(start-disconnect network-guid)
Starts a disconnect from the network with networkGuid.
|network-guid| - The GUID of the network to disconnect from.
This function returns a core.async channel of type promise-chan
which eventually receives a result value.
Signature of the result value put on the channel is [].
In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.
https://developer.chrome.com/apps/networking.onc#method-startDisconnect.
Starts a disconnect from the network with networkGuid. |network-guid| - The GUID of the network to disconnect from. This function returns a core.async channel of type `promise-chan` which eventually receives a result value. Signature of the result value put on the channel is []. In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error. https://developer.chrome.com/apps/networking.onc#method-startDisconnect.
(tap-all-events chan)
Taps all valid non-deprecated events in chromex.app.networking.onc namespace.
Taps all valid non-deprecated events in chromex.app.networking.onc namespace.
(tap-on-device-state-list-changed-events channel & args)
Fired when the list of devices has changed or any device state properties have changed.
Events will be put on the |channel| with signature [::on-device-state-list-changed []].
Note: |args| will be passed as additional parameters into Chrome event's .addListener call.
https://developer.chrome.com/apps/networking.onc#event-onDeviceStateListChanged.
Fired when the list of devices has changed or any device state properties have changed. Events will be put on the |channel| with signature [::on-device-state-list-changed []]. Note: |args| will be passed as additional parameters into Chrome event's .addListener call. https://developer.chrome.com/apps/networking.onc#event-onDeviceStateListChanged.
(tap-on-network-list-changed-events channel & args)
Fired when the list of networks has changed. Sends a complete list of GUIDs for all the current networks.
Events will be put on the |channel| with signature [::on-network-list-changed [changes]] where:
|changes| - https://developer.chrome.com/apps/networking.onc#property-onNetworkListChanged-changes.
Note: |args| will be passed as additional parameters into Chrome event's .addListener call.
https://developer.chrome.com/apps/networking.onc#event-onNetworkListChanged.
Fired when the list of networks has changed. Sends a complete list of GUIDs for all the current networks. Events will be put on the |channel| with signature [::on-network-list-changed [changes]] where: |changes| - https://developer.chrome.com/apps/networking.onc#property-onNetworkListChanged-changes. Note: |args| will be passed as additional parameters into Chrome event's .addListener call. https://developer.chrome.com/apps/networking.onc#event-onNetworkListChanged.
(tap-on-networks-changed-events channel & args)
Fired when the properties change on any of the networks. Sends a list of GUIDs for networks whose properties have changed.
Events will be put on the |channel| with signature [::on-networks-changed [changes]] where:
|changes| - https://developer.chrome.com/apps/networking.onc#property-onNetworksChanged-changes.
Note: |args| will be passed as additional parameters into Chrome event's .addListener call.
https://developer.chrome.com/apps/networking.onc#event-onNetworksChanged.
Fired when the properties change on any of the networks. Sends a list of GUIDs for networks whose properties have changed. Events will be put on the |channel| with signature [::on-networks-changed [changes]] where: |changes| - https://developer.chrome.com/apps/networking.onc#property-onNetworksChanged-changes. Note: |args| will be passed as additional parameters into Chrome event's .addListener call. https://developer.chrome.com/apps/networking.onc#event-onNetworksChanged.
(tap-on-portal-detection-completed-events channel & args)
Fired when a portal detection for a network completes. Sends the GUID of the network and the corresponding captive portal status.
Events will be put on the |channel| with signature [::on-portal-detection-completed [network-guid status]] where:
|network-guid| - https://developer.chrome.com/apps/networking.onc#property-onPortalDetectionCompleted-networkGuid. |status| - https://developer.chrome.com/apps/networking.onc#property-onPortalDetectionCompleted-status.
Note: |args| will be passed as additional parameters into Chrome event's .addListener call.
https://developer.chrome.com/apps/networking.onc#event-onPortalDetectionCompleted.
Fired when a portal detection for a network completes. Sends the GUID of the network and the corresponding captive portal status. Events will be put on the |channel| with signature [::on-portal-detection-completed [network-guid status]] where: |network-guid| - https://developer.chrome.com/apps/networking.onc#property-onPortalDetectionCompleted-networkGuid. |status| - https://developer.chrome.com/apps/networking.onc#property-onPortalDetectionCompleted-status. Note: |args| will be passed as additional parameters into Chrome event's .addListener call. https://developer.chrome.com/apps/networking.onc#event-onPortalDetectionCompleted.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close