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 { ... }
}
CWWiFiClient
only.Expand description
Receive Wi-Fi event notifications.
See also Apple’s documentation
Provided Methods§
Sourceunsafe fn clientConnectionInterrupted(&self)
unsafe fn clientConnectionInterrupted(&self)
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.
Sourceunsafe fn clientConnectionInvalidated(&self)
unsafe fn clientConnectionInvalidated(&self)
Invoked if the connection to the Wi-Fi subsystem is permanently invalidated.
Sourceunsafe fn powerStateDidChangeForWiFiInterfaceWithName(
&self,
interface_name: &NSString,
)
unsafe fn powerStateDidChangeForWiFiInterfaceWithName( &self, interface_name: &NSString, )
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.
Sourceunsafe fn ssidDidChangeForWiFiInterfaceWithName(
&self,
interface_name: &NSString,
)
unsafe fn ssidDidChangeForWiFiInterfaceWithName( &self, interface_name: &NSString, )
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.
Sourceunsafe fn bssidDidChangeForWiFiInterfaceWithName(
&self,
interface_name: &NSString,
)
unsafe fn bssidDidChangeForWiFiInterfaceWithName( &self, interface_name: &NSString, )
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.
Sourceunsafe fn countryCodeDidChangeForWiFiInterfaceWithName(
&self,
interface_name: &NSString,
)
unsafe fn countryCodeDidChangeForWiFiInterfaceWithName( &self, interface_name: &NSString, )
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.
Sourceunsafe fn linkDidChangeForWiFiInterfaceWithName(
&self,
interface_name: &NSString,
)
unsafe fn linkDidChangeForWiFiInterfaceWithName( &self, interface_name: &NSString, )
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.
Sourceunsafe fn linkQualityDidChangeForWiFiInterfaceWithName_rssi_transmitRate(
&self,
interface_name: &NSString,
rssi: NSInteger,
transmit_rate: c_double,
)
unsafe fn linkQualityDidChangeForWiFiInterfaceWithName_rssi_transmitRate( &self, interface_name: &NSString, rssi: NSInteger, transmit_rate: c_double, )
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.
Sourceunsafe fn modeDidChangeForWiFiInterfaceWithName(
&self,
interface_name: &NSString,
)
unsafe fn modeDidChangeForWiFiInterfaceWithName( &self, interface_name: &NSString, )
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.
Sourceunsafe fn scanCacheUpdatedForWiFiInterfaceWithName(
&self,
interface_name: &NSString,
)
unsafe fn scanCacheUpdatedForWiFiInterfaceWithName( &self, interface_name: &NSString, )
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.