CWEventDelegate

Trait CWEventDelegate 

Source
pub unsafe trait CWEventDelegate {
    // Provided methods
    unsafe fn clientConnectionInterrupted(&self)
       where Self: Sized + Message { ... }
    unsafe fn clientConnectionInvalidated(&self)
       where Self: Sized + Message { ... }
    unsafe fn powerStateDidChangeForWiFiInterfaceWithName(
        &self,
        interface_name: &NSString,
    )
       where Self: Sized + Message { ... }
    unsafe fn ssidDidChangeForWiFiInterfaceWithName(
        &self,
        interface_name: &NSString,
    )
       where Self: Sized + Message { ... }
    unsafe fn bssidDidChangeForWiFiInterfaceWithName(
        &self,
        interface_name: &NSString,
    )
       where Self: Sized + Message { ... }
    unsafe fn countryCodeDidChangeForWiFiInterfaceWithName(
        &self,
        interface_name: &NSString,
    )
       where Self: Sized + Message { ... }
    unsafe fn linkDidChangeForWiFiInterfaceWithName(
        &self,
        interface_name: &NSString,
    )
       where Self: Sized + Message { ... }
    unsafe fn linkQualityDidChangeForWiFiInterfaceWithName_rssi_transmitRate(
        &self,
        interface_name: &NSString,
        rssi: NSInteger,
        transmit_rate: c_double,
    )
       where Self: Sized + Message { ... }
    unsafe fn modeDidChangeForWiFiInterfaceWithName(
        &self,
        interface_name: &NSString,
    )
       where Self: Sized + Message { ... }
    unsafe fn scanCacheUpdatedForWiFiInterfaceWithName(
        &self,
        interface_name: &NSString,
    )
       where Self: Sized + Message { ... }
}
Available on crate feature CWWiFiClient only.
Expand description

Receive Wi-Fi event notifications.

See also Apple’s documentation

Provided Methods§

Source

unsafe fn clientConnectionInterrupted(&self)
where Self: Sized + Message,

Invoked if the connection to the Wi-Fi subsystem is temporarily interrupted.

All event notifications for which the Wi-Fi client has registered will be automatically re-registered if the connection is interrupted. The Wi-Fi client should re-sync any local state which is updated as a result of Wi-Fi event notifications.

Source

unsafe fn clientConnectionInvalidated(&self)
where Self: Sized + Message,

Invoked if the connection to the Wi-Fi subsystem is permanently invalidated.

Source

unsafe fn powerStateDidChangeForWiFiInterfaceWithName( &self, interface_name: &NSString, )
where Self: Sized + Message,

Parameter interfaceName: The name of the Wi-Fi interface.

Invoked when the Wi-Fi power state changes.

Use -[CWWiFiClient startMonitoringEventWithType:error:] with the CWEventTypePowerDidChange event type to register for power event notifications. Use -[CWInterface powerOn] to query the current Wi-Fi power state.

Source

unsafe fn ssidDidChangeForWiFiInterfaceWithName( &self, interface_name: &NSString, )
where Self: Sized + Message,

Parameter interfaceName: The name of the Wi-Fi interface.

Invoked when the current SSID changes.

Use -[CWWiFiClient startMonitoringEventWithType:error:] with the CWEventTypeSSIDDidChange event type to register for SSID event notifications. Use -[CWInterface ssidData] or -[CWInterface ssid] to query the current SSID.

Source

unsafe fn bssidDidChangeForWiFiInterfaceWithName( &self, interface_name: &NSString, )
where Self: Sized + Message,

Parameter interfaceName: The name of the Wi-Fi interface.

Invoked when the current BSSID changes.

Use -[CWWiFiClient startMonitoringEventWithType:error:] with the CWEventTypeBSSIDDidChange event type to register for BSSID event notifications. Use -[CWInterface bssid] to query the current BSSID.

Source

unsafe fn countryCodeDidChangeForWiFiInterfaceWithName( &self, interface_name: &NSString, )
where Self: Sized + Message,

Parameter interfaceName: The name of the Wi-Fi interface.

Invoked when the currently adopted country code changes.

Use -[CWWiFiClient startMonitoringEventWithType:error:] with the CWEventTypeCountryCodeDidChange event type to register for country code event notifications. Use -[CWInterface countryCode] to query the currently adopted country code.

Source

unsafe fn linkDidChangeForWiFiInterfaceWithName( &self, interface_name: &NSString, )
where Self: Sized + Message,

Parameter interfaceName: The name of the Wi-Fi interface.

Invoked when the Wi-Fi link state changes.

Use -[CWWiFiClient startMonitoringEventWithType:error:] with the CWEventTypeLinkDidChange event type to register for link event notifications.

Source

unsafe fn linkQualityDidChangeForWiFiInterfaceWithName_rssi_transmitRate( &self, interface_name: &NSString, rssi: NSInteger, transmit_rate: c_double, )
where Self: Sized + Message,

Parameter interfaceName: The name of the Wi-Fi interface.

Parameter rssi: The RSSI value for the currently associated network on the Wi-Fi interface.

Parameter transmitRate: The transmit rate for the currently associated network on the Wi-Fi interface.

Invoked when the Wi-Fi link quality changes.

Use -[CWWiFiClient startMonitoringEventWithType:error:] with the CWEventTypeLinkQualityDidChange event type to register for link quality event notifications. Use -[CWInterface rssiValue] and -[CWInterface transmitRate] to query the current RSSI and transmit rate, respectively.

Source

unsafe fn modeDidChangeForWiFiInterfaceWithName( &self, interface_name: &NSString, )
where Self: Sized + Message,

Parameter interfaceName: The name of the Wi-Fi interface.

Invoked when the Wi-Fi operating mode changes.

Use -[CWWiFiClient startMonitoringEventWithType:error:] with the CWEventTypeModeDidChange event type to register for interface mode event notifications. Use -[CWInterface interfaceMode] to query the current operating mode.

Source

unsafe fn scanCacheUpdatedForWiFiInterfaceWithName( &self, interface_name: &NSString, )
where Self: Sized + Message,

Parameter interfaceName: The name of the Wi-Fi interface.

Invoked when the Wi-Fi interface scan cache is updated with new scan results.

Use -[CWWiFiClient startMonitoringEventWithType:error:] with the CWEventTypeScanCacheUpdated event type to register for scan cache event notifications. Use -[CWInterface cachedScanResults] to query scan cache results from the last scan.

Trait Implementations§

Source§

impl ProtocolType for dyn CWEventDelegate

Source§

const NAME: &'static str = "CWEventDelegate"

The name of the Objective-C protocol that this type represents. Read more
Source§

fn protocol() -> Option<&'static AnyProtocol>

Get a reference to the Objective-C protocol object that this type represents. Read more
Source§

impl<T> ImplementedBy<T> for dyn CWEventDelegate

Implementations on Foreign Types§

Source§

impl<T> CWEventDelegate for ProtocolObject<T>
where T: ?Sized + CWEventDelegate,

Implementors§