pub struct ClientControllerProxy { /* private fields */ }
Implementations§
Source§impl ClientControllerProxy
impl ClientControllerProxy
Sourcepub fn new(channel: AsyncChannel) -> Self
pub fn new(channel: AsyncChannel) -> Self
Create a new Proxy for fuchsia.wlan.policy/ClientController.
Sourcepub fn take_event_stream(&self) -> ClientControllerEventStream
pub fn take_event_stream(&self) -> ClientControllerEventStream
Get a Stream of events from the remote end of the protocol.
§Panics
Panics if the event stream was already taken.
Sourcepub fn start_client_connections(
&self,
) -> QueryResponseFut<RequestStatus, DefaultFuchsiaResourceDialect>
pub fn start_client_connections( &self, ) -> QueryResponseFut<RequestStatus, DefaultFuchsiaResourceDialect>
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.
Sourcepub fn stop_client_connections(
&self,
) -> QueryResponseFut<RequestStatus, DefaultFuchsiaResourceDialect>
pub fn stop_client_connections( &self, ) -> QueryResponseFut<RequestStatus, DefaultFuchsiaResourceDialect>
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.
Sourcepub fn scan_for_networks(
&self,
iterator: ServerEnd<ScanResultIteratorMarker>,
) -> Result<(), Error>
pub fn scan_for_networks( &self, iterator: ServerEnd<ScanResultIteratorMarker>, ) -> Result<(), Error>
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.
Sourcepub fn save_network(
&self,
config: &NetworkConfig,
) -> QueryResponseFut<ClientControllerSaveNetworkResult, DefaultFuchsiaResourceDialect>
pub fn save_network( &self, config: &NetworkConfig, ) -> QueryResponseFut<ClientControllerSaveNetworkResult, DefaultFuchsiaResourceDialect>
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.
Sourcepub fn remove_network(
&self,
config: &NetworkConfig,
) -> QueryResponseFut<ClientControllerRemoveNetworkResult, DefaultFuchsiaResourceDialect>
pub fn remove_network( &self, config: &NetworkConfig, ) -> QueryResponseFut<ClientControllerRemoveNetworkResult, DefaultFuchsiaResourceDialect>
Removes a saved network configuration, if one exists. This method will automatically trigger a disconnection if the NetworkConfig was used to establish the connection.
Sourcepub fn get_saved_networks(
&self,
iterator: ServerEnd<NetworkConfigIteratorMarker>,
) -> Result<(), Error>
pub fn get_saved_networks( &self, iterator: ServerEnd<NetworkConfigIteratorMarker>, ) -> Result<(), Error>
Retrieve the currently saved networks using the provided iterator.
Sourcepub fn connect(
&self,
id: &NetworkIdentifier,
) -> QueryResponseFut<RequestStatus, DefaultFuchsiaResourceDialect>
pub fn connect( &self, id: &NetworkIdentifier, ) -> QueryResponseFut<RequestStatus, DefaultFuchsiaResourceDialect>
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.
Trait Implementations§
Source§impl ClientControllerProxyInterface for ClientControllerProxy
impl ClientControllerProxyInterface for ClientControllerProxy
type StartClientConnectionsResponseFut = QueryResponseFut<RequestStatus>
type StopClientConnectionsResponseFut = QueryResponseFut<RequestStatus>
type SaveNetworkResponseFut = QueryResponseFut<Result<(), NetworkConfigChangeError>>
type RemoveNetworkResponseFut = QueryResponseFut<Result<(), NetworkConfigChangeError>>
type ConnectResponseFut = QueryResponseFut<RequestStatus>
fn start_client_connections(&self) -> Self::StartClientConnectionsResponseFut
fn stop_client_connections(&self) -> Self::StopClientConnectionsResponseFut
fn scan_for_networks( &self, iterator: ServerEnd<ScanResultIteratorMarker>, ) -> Result<(), Error>
fn save_network(&self, config: &NetworkConfig) -> Self::SaveNetworkResponseFut
fn remove_network( &self, config: &NetworkConfig, ) -> Self::RemoveNetworkResponseFut
fn get_saved_networks( &self, iterator: ServerEnd<NetworkConfigIteratorMarker>, ) -> Result<(), Error>
fn connect(&self, id: &NetworkIdentifier) -> Self::ConnectResponseFut
Source§impl Clone for ClientControllerProxy
impl Clone for ClientControllerProxy
Source§fn clone(&self) -> ClientControllerProxy
fn clone(&self) -> ClientControllerProxy
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for ClientControllerProxy
impl Debug for ClientControllerProxy
Source§impl Proxy for ClientControllerProxy
impl Proxy for ClientControllerProxy
Source§type Protocol = ClientControllerMarker
type Protocol = ClientControllerMarker
Proxy
controls.Source§fn from_channel(inner: AsyncChannel) -> Self
fn from_channel(inner: AsyncChannel) -> Self
Source§fn into_channel(self) -> Result<AsyncChannel, Self>
fn into_channel(self) -> Result<AsyncChannel, Self>
Source§fn as_channel(&self) -> &AsyncChannel
fn as_channel(&self) -> &AsyncChannel
§fn into_client_end(self) -> Result<ClientEnd<Self::Protocol>, Self>
fn into_client_end(self) -> Result<ClientEnd<Self::Protocol>, Self>
Auto Trait Implementations§
impl Freeze for ClientControllerProxy
impl !RefUnwindSafe for ClientControllerProxy
impl Send for ClientControllerProxy
impl Sync for ClientControllerProxy
impl Unpin for ClientControllerProxy
impl !UnwindSafe for ClientControllerProxy
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)