class ClientController

Defined at line 5285 of file fidling/gen/sdk/fidl/fuchsia.wlan.policy/fuchsia.wlan.policy/hlcpp/fuchsia/wlan/policy/cpp/fidl.h

ClientControllers allow the caller to trigger wlan state changes. This includes

whether connections will be attempted, scan triggers and saved network

configuration changes.

Individual calls provided by the API are triggered after registering with

the wlan ClientProvider via the OpenControlChannel call.

Public Methods

void ~ClientController ()
void StartClientConnections (StartClientConnectionsCallback callback)

Enables WLAN client functionality. Once enabled, automatic connections will be

attempted for saved networks, and callers can initiate operations via the

ScanForNetworks() and Connect() APIs.

Depending on the underlying capabilities of the device, this call may impact

other device operation (for example, acting as an access point).

The returned status represents acknowledgement of the request. The

ClientListener protocol should be monitored to learn when client functionality

has been enabled.

void StopClientConnections (StopClientConnectionsCallback callback)

Tears down any existing connections to wlan networks and disables initiation of

new connections.

The returned status represents acknowledgements of the request. The

ClientListener protocol should be monitored to learn when client functionality

has been disabled.

void ScanForNetworks (::fidl::InterfaceRequest< ::fuchsia::wlan::policy::ScanResultIterator> iterator)

Triggers a network scan. Note, even in normal operation, some scan requests

may be rejected due to timing with connection establishment or other critical

connection maintenance. If the scan is cancelled or errors, the caller is

notified via a status update in the ScanResultIterator.

In the current implementation, client connections must be started for a scan

to be performed.

void SaveNetwork (::fuchsia::wlan::policy::NetworkConfig config, SaveNetworkCallback callback)

Saves a network and any credential information needed to connect. Multiple

entries for the same NetworkIdentifier can exist if the credentials are

different. If a caller attempts to save a NetworkConfig with the same

NetworkIdentifier and same Credentials as a previously saved network

the method will effectively be a no-op. Saved networks will be used to

autoconnect, and are also available to use with the Connect() API.

void RemoveNetwork (::fuchsia::wlan::policy::NetworkConfig config, RemoveNetworkCallback callback)

Removes a saved network configuration, if one exists. This method will

automatically trigger a disconnection if the NetworkConfig was used to

establish the connection.

void GetSavedNetworks (::fidl::InterfaceRequest< ::fuchsia::wlan::policy::NetworkConfigIterator> iterator)

Retrieve the currently saved networks using the provided iterator.

void Connect (::fuchsia::wlan::policy::NetworkIdentifier id, ConnectCallback callback)

Request to attempt a connection to the specified network. The target of the

connect call must already be a saved network. This call is not a

blocking call for the duration of the connection attempt. If the call cannot

be immediately attempted, a failure status will be returned. If the connection

request will be attempted, an acknowledgment status will be returned. Updates

to the connection status are disseminated via the ClientStateUpdates protocol.

If the connect attempt fails, the service will fall back to default behavior

with scanning and connecting via network selection.