pub struct WlanApPolicyFacade { /* private fields */ }
Implementations§
Source§impl WlanApPolicyFacade
impl WlanApPolicyFacade
pub fn new() -> Result<WlanApPolicyFacade, Error>
pub async fn start_access_point( &self, target_ssid: Vec<u8>, type_: SecurityType, credential: Credential, mode: ConnectivityMode, band: OperatingBand, ) -> Result<(), Error>
pub async fn stop_access_point( &self, target_ssid: Vec<u8>, type_: SecurityType, credential: Credential, ) -> Result<(), Error>
pub async fn stop_all_access_points(&self) -> Result<(), Error>
Sourcepub fn set_new_listener(&self) -> Result<(), Error>
pub fn set_new_listener(&self) -> Result<(), Error>
This function will set a new listener even if there is one because new listeners will get the most recent update immediately without waiting.
Sourcepub async fn get_update(&self) -> Result<Vec<AccessPointState>, Error>
pub async fn get_update(&self) -> Result<Vec<AccessPointState>, Error>
Wait for and return an AP update. If this is the first update gotten from the facade since the AP controller or a new update listener has been created, it will get an immediate status. After that, it will wait for a change and return a status when there has been a change since the last call to get_update. This call will hang if there are no updates. This function is not thread safe, so there should not be multiple get_update calls at the same time unless a new listener is set between them. There is no lock around the update_listener field of the facade in order to prevent a hanging get_update from blocking all future get_updates.