pub enum ClientControllerRequest {
StartClientConnections {
responder: ClientControllerStartClientConnectionsResponder,
},
StopClientConnections {
responder: ClientControllerStopClientConnectionsResponder,
},
ScanForNetworks {
iterator: ServerEnd<ScanResultIteratorMarker>,
control_handle: ClientControllerControlHandle,
},
SaveNetwork {
config: NetworkConfig,
responder: ClientControllerSaveNetworkResponder,
},
RemoveNetwork {
config: NetworkConfig,
responder: ClientControllerRemoveNetworkResponder,
},
GetSavedNetworks {
iterator: ServerEnd<NetworkConfigIteratorMarker>,
control_handle: ClientControllerControlHandle,
},
Connect {
id: NetworkIdentifier,
responder: ClientControllerConnectResponder,
},
}
Expand description
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.
Variants§
StartClientConnections
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.
Fields
StopClientConnections
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.
Fields
ScanForNetworks
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.
SaveNetwork
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.
RemoveNetwork
Removes a saved network configuration, if one exists. This method will automatically trigger a disconnection if the NetworkConfig was used to establish the connection.
GetSavedNetworks
Retrieve the currently saved networks using the provided iterator.
Fields
iterator: ServerEnd<NetworkConfigIteratorMarker>
control_handle: ClientControllerControlHandle
Connect
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.
Implementations§
Source§impl ClientControllerRequest
impl ClientControllerRequest
pub fn into_start_client_connections( self, ) -> Option<ClientControllerStartClientConnectionsResponder>
pub fn into_stop_client_connections( self, ) -> Option<ClientControllerStopClientConnectionsResponder>
pub fn into_scan_for_networks( self, ) -> Option<(ServerEnd<ScanResultIteratorMarker>, ClientControllerControlHandle)>
pub fn into_save_network( self, ) -> Option<(NetworkConfig, ClientControllerSaveNetworkResponder)>
pub fn into_remove_network( self, ) -> Option<(NetworkConfig, ClientControllerRemoveNetworkResponder)>
pub fn into_get_saved_networks( self, ) -> Option<(ServerEnd<NetworkConfigIteratorMarker>, ClientControllerControlHandle)>
pub fn into_connect( self, ) -> Option<(NetworkIdentifier, ClientControllerConnectResponder)>
Sourcepub fn method_name(&self) -> &'static str
pub fn method_name(&self) -> &'static str
Name of the method defined in FIDL