Liking cljdoc? Tell your friends :D

chromex.app.networking.onc

clj

The chrome.networking.onc API is used for configuring network connections (Cellular, Ethernet, VPN or WiFi). This API is available in auto-launched 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 or WiFi).
This API is available in auto-launched 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
raw docstring

api-tableclj

source

create-networkclj/smacro

(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.
sourceraw docstring

create-network*cljs

(create-network* config shared properties)
source

disable-network-typeclj/smacro

(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.
sourceraw docstring

disable-network-type*cljs

(disable-network-type* config network-type)
source

enable-network-typeclj/smacro

(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.
sourceraw docstring

enable-network-type*cljs

(enable-network-type* config network-type)
source

forget-networkclj/smacro

(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.
sourceraw docstring

forget-network*cljs

(forget-network* config network-guid)
source

gen-callclj

source

gen-wrapclj/smacro

(gen-wrap kind item-id config & args)
source

get-captive-portal-statusclj/smacro

(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.
sourceraw docstring

get-captive-portal-status*cljs

(get-captive-portal-status* config network-guid)
source

get-device-statesclj/smacro

(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.
sourceraw docstring

get-device-states*cljs

(get-device-states* config)
source

get-global-policyclj/smacro

(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.
sourceraw docstring

get-global-policy*cljs

(get-global-policy* config)
source

get-managed-propertiesclj/smacro

(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.
sourceraw docstring

get-managed-properties*cljs

(get-managed-properties* config network-guid)
source

get-networksclj/smacro

(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.
sourceraw docstring

get-networks*cljs

(get-networks* config filter)
source

get-propertiesclj/smacro

(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.
sourceraw docstring

get-properties*cljs

(get-properties* config network-guid)
source

get-stateclj/smacro

(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.
sourceraw docstring

get-state*cljs

(get-state* config network-guid)
source

on-device-state-list-changed*cljs

(on-device-state-list-changed* config channel & args)
source

on-network-list-changed*cljs

(on-network-list-changed* config channel & args)
source

on-networks-changed*cljs

(on-networks-changed* config channel & args)
source

on-portal-detection-completed*cljs

(on-portal-detection-completed* config channel & args)
source

request-network-scanclj/smacro

(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.
sourceraw docstring

request-network-scan*cljs

(request-network-scan* config network-type)
source

set-propertiesclj/smacro

(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.
sourceraw docstring

set-properties*cljs

(set-properties* config network-guid properties)
source

start-connectclj/smacro

(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.
sourceraw docstring

start-connect*cljs

(start-connect* config network-guid)
source

start-disconnectclj/smacro

(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.
sourceraw docstring

start-disconnect*cljs

(start-disconnect* config network-guid)
source

tap-all-eventsclj/smacro

(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.
sourceraw docstring

tap-on-device-state-list-changed-eventsclj/smacro

(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.
sourceraw docstring

tap-on-network-list-changed-eventsclj/smacro

(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.
sourceraw docstring

tap-on-networks-changed-eventsclj/smacro

(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.
sourceraw docstring

tap-on-portal-detection-completed-eventsclj/smacro

(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.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close