pub unsafe trait CBPeripheralDelegate: NSObjectProtocol {
Show 15 methods
// Provided methods
unsafe fn peripheralDidUpdateName(&self, peripheral: &CBPeripheral)
where Self: Sized + Message { ... }
unsafe fn peripheral_didModifyServices(
&self,
peripheral: &CBPeripheral,
invalidated_services: &NSArray<CBService>,
)
where Self: Sized + Message { ... }
unsafe fn peripheralDidUpdateRSSI_error(
&self,
peripheral: &CBPeripheral,
error: Option<&NSError>,
)
where Self: Sized + Message { ... }
unsafe fn peripheral_didReadRSSI_error(
&self,
peripheral: &CBPeripheral,
rssi: &NSNumber,
error: Option<&NSError>,
)
where Self: Sized + Message { ... }
unsafe fn peripheral_didDiscoverServices(
&self,
peripheral: &CBPeripheral,
error: Option<&NSError>,
)
where Self: Sized + Message { ... }
unsafe fn peripheral_didDiscoverIncludedServicesForService_error(
&self,
peripheral: &CBPeripheral,
service: &CBService,
error: Option<&NSError>,
)
where Self: Sized + Message { ... }
unsafe fn peripheral_didDiscoverCharacteristicsForService_error(
&self,
peripheral: &CBPeripheral,
service: &CBService,
error: Option<&NSError>,
)
where Self: Sized + Message { ... }
unsafe fn peripheral_didUpdateValueForCharacteristic_error(
&self,
peripheral: &CBPeripheral,
characteristic: &CBCharacteristic,
error: Option<&NSError>,
)
where Self: Sized + Message { ... }
unsafe fn peripheral_didWriteValueForCharacteristic_error(
&self,
peripheral: &CBPeripheral,
characteristic: &CBCharacteristic,
error: Option<&NSError>,
)
where Self: Sized + Message { ... }
unsafe fn peripheral_didUpdateNotificationStateForCharacteristic_error(
&self,
peripheral: &CBPeripheral,
characteristic: &CBCharacteristic,
error: Option<&NSError>,
)
where Self: Sized + Message { ... }
unsafe fn peripheral_didDiscoverDescriptorsForCharacteristic_error(
&self,
peripheral: &CBPeripheral,
characteristic: &CBCharacteristic,
error: Option<&NSError>,
)
where Self: Sized + Message { ... }
unsafe fn peripheral_didUpdateValueForDescriptor_error(
&self,
peripheral: &CBPeripheral,
descriptor: &CBDescriptor,
error: Option<&NSError>,
)
where Self: Sized + Message { ... }
unsafe fn peripheral_didWriteValueForDescriptor_error(
&self,
peripheral: &CBPeripheral,
descriptor: &CBDescriptor,
error: Option<&NSError>,
)
where Self: Sized + Message { ... }
unsafe fn peripheralIsReadyToSendWriteWithoutResponse(
&self,
peripheral: &CBPeripheral,
)
where Self: Sized + Message { ... }
unsafe fn peripheral_didOpenL2CAPChannel_error(
&self,
peripheral: &CBPeripheral,
channel: Option<&CBL2CAPChannel>,
error: Option<&NSError>,
)
where Self: Sized + Message { ... }
}CBPeripheral only.Expand description
Delegate for CBPeripheral.
See also Apple’s documentation
Provided Methods§
Sourceunsafe fn peripheralDidUpdateName(&self, peripheral: &CBPeripheral)
Available on crate feature CBPeer only.
unsafe fn peripheralDidUpdateName(&self, peripheral: &CBPeripheral)
CBPeer only.Parameter peripheral: The peripheral providing this update.
This method is invoked when the
nameof peripheral changes.
Sourceunsafe fn peripheral_didModifyServices(
&self,
peripheral: &CBPeripheral,
invalidated_services: &NSArray<CBService>,
)
Available on crate features CBAttribute and CBPeer and CBService only.
unsafe fn peripheral_didModifyServices( &self, peripheral: &CBPeripheral, invalidated_services: &NSArray<CBService>, )
CBAttribute and CBPeer and CBService only.Parameter peripheral: The peripheral providing this update.
Parameter invalidatedServices: The services that have been invalidated
This method is invoked when the
servicesof
peripheral
have been changed.
At this point, the designated
CBService
objects have been invalidated.
Services can be re-discovered via
discoverServices:.
Sourceunsafe fn peripheralDidUpdateRSSI_error(
&self,
peripheral: &CBPeripheral,
error: Option<&NSError>,
)
👎DeprecatedAvailable on crate feature CBPeer only.
unsafe fn peripheralDidUpdateRSSI_error( &self, peripheral: &CBPeripheral, error: Option<&NSError>, )
CBPeer only.Parameter peripheral: The peripheral providing this update.
Parameter error: If an error occurred, the cause of the failure.
This method returns the result of a
readRSSI:call.
peripheral:didReadRSSI:error:} instead.
Sourceunsafe fn peripheral_didReadRSSI_error(
&self,
peripheral: &CBPeripheral,
rssi: &NSNumber,
error: Option<&NSError>,
)
Available on crate feature CBPeer only.
unsafe fn peripheral_didReadRSSI_error( &self, peripheral: &CBPeripheral, rssi: &NSNumber, error: Option<&NSError>, )
CBPeer only.Parameter peripheral: The peripheral providing this update.
Parameter RSSI: The current RSSI of the link.
Parameter error: If an error occurred, the cause of the failure.
This method returns the result of a
readRSSI:call.
Sourceunsafe fn peripheral_didDiscoverServices(
&self,
peripheral: &CBPeripheral,
error: Option<&NSError>,
)
Available on crate feature CBPeer only.
unsafe fn peripheral_didDiscoverServices( &self, peripheral: &CBPeripheral, error: Option<&NSError>, )
CBPeer only.Parameter peripheral: The peripheral providing this information.
Parameter error: If an error occurred, the cause of the failure.
This method returns the result of a
discoverServices:call. If the service(s) were read successfully, they can be retrieved via peripheral ’s
servicesproperty.
Sourceunsafe fn peripheral_didDiscoverIncludedServicesForService_error(
&self,
peripheral: &CBPeripheral,
service: &CBService,
error: Option<&NSError>,
)
Available on crate features CBAttribute and CBPeer and CBService only.
unsafe fn peripheral_didDiscoverIncludedServicesForService_error( &self, peripheral: &CBPeripheral, service: &CBService, error: Option<&NSError>, )
CBAttribute and CBPeer and CBService only.Parameter peripheral: The peripheral providing this information.
Parameter service: The
CBService
object containing the included services.
Parameter error: If an error occurred, the cause of the failure.
This method returns the result of a
discoverIncludedServices:forService:call. If the included service(s) were read successfully,
they can be retrieved via
service
’s
includedServices
property.
Sourceunsafe fn peripheral_didDiscoverCharacteristicsForService_error(
&self,
peripheral: &CBPeripheral,
service: &CBService,
error: Option<&NSError>,
)
Available on crate features CBAttribute and CBPeer and CBService only.
unsafe fn peripheral_didDiscoverCharacteristicsForService_error( &self, peripheral: &CBPeripheral, service: &CBService, error: Option<&NSError>, )
CBAttribute and CBPeer and CBService only.Parameter peripheral: The peripheral providing this information.
Parameter service: The
CBService
object containing the characteristic(s).
Parameter error: If an error occurred, the cause of the failure.
This method returns the result of a
discoverCharacteristics:forService:call. If the characteristic(s) were read successfully,
they can be retrieved via
service
’s
characteristics
property.
Sourceunsafe fn peripheral_didUpdateValueForCharacteristic_error(
&self,
peripheral: &CBPeripheral,
characteristic: &CBCharacteristic,
error: Option<&NSError>,
)
Available on crate features CBAttribute and CBCharacteristic and CBPeer only.
unsafe fn peripheral_didUpdateValueForCharacteristic_error( &self, peripheral: &CBPeripheral, characteristic: &CBCharacteristic, error: Option<&NSError>, )
CBAttribute and CBCharacteristic and CBPeer only.Parameter peripheral: The peripheral providing this information.
Parameter characteristic: A
CBCharacteristic
object.
Parameter error: If an error occurred, the cause of the failure.
This method is invoked after a
readValueForCharacteristic:call, or upon receipt of a notification/indication.
Sourceunsafe fn peripheral_didWriteValueForCharacteristic_error(
&self,
peripheral: &CBPeripheral,
characteristic: &CBCharacteristic,
error: Option<&NSError>,
)
Available on crate features CBAttribute and CBCharacteristic and CBPeer only.
unsafe fn peripheral_didWriteValueForCharacteristic_error( &self, peripheral: &CBPeripheral, characteristic: &CBCharacteristic, error: Option<&NSError>, )
CBAttribute and CBCharacteristic and CBPeer only.Parameter peripheral: The peripheral providing this information.
Parameter characteristic: A
CBCharacteristic
object.
Parameter error: If an error occurred, the cause of the failure.
This method returns the result of a {
writeValue:forCharacteristic:type:} call, when the <code>CBCharacteristicWriteWithResponse</code> type is used.
Sourceunsafe fn peripheral_didUpdateNotificationStateForCharacteristic_error(
&self,
peripheral: &CBPeripheral,
characteristic: &CBCharacteristic,
error: Option<&NSError>,
)
Available on crate features CBAttribute and CBCharacteristic and CBPeer only.
unsafe fn peripheral_didUpdateNotificationStateForCharacteristic_error( &self, peripheral: &CBPeripheral, characteristic: &CBCharacteristic, error: Option<&NSError>, )
CBAttribute and CBCharacteristic and CBPeer only.Parameter peripheral: The peripheral providing this information.
Parameter characteristic: A
CBCharacteristic
object.
Parameter error: If an error occurred, the cause of the failure.
This method returns the result of a
setNotifyValue:forCharacteristic:call.
Sourceunsafe fn peripheral_didDiscoverDescriptorsForCharacteristic_error(
&self,
peripheral: &CBPeripheral,
characteristic: &CBCharacteristic,
error: Option<&NSError>,
)
Available on crate features CBAttribute and CBCharacteristic and CBPeer only.
unsafe fn peripheral_didDiscoverDescriptorsForCharacteristic_error( &self, peripheral: &CBPeripheral, characteristic: &CBCharacteristic, error: Option<&NSError>, )
CBAttribute and CBCharacteristic and CBPeer only.Parameter peripheral: The peripheral providing this information.
Parameter characteristic: A
CBCharacteristic
object.
Parameter error: If an error occurred, the cause of the failure.
This method returns the result of a
discoverDescriptorsForCharacteristic:call. If the descriptors were read successfully,
they can be retrieved via
characteristic
’s
descriptors
property.
Sourceunsafe fn peripheral_didUpdateValueForDescriptor_error(
&self,
peripheral: &CBPeripheral,
descriptor: &CBDescriptor,
error: Option<&NSError>,
)
Available on crate features CBAttribute and CBDescriptor and CBPeer only.
unsafe fn peripheral_didUpdateValueForDescriptor_error( &self, peripheral: &CBPeripheral, descriptor: &CBDescriptor, error: Option<&NSError>, )
CBAttribute and CBDescriptor and CBPeer only.Parameter peripheral: The peripheral providing this information.
Parameter descriptor: A
CBDescriptor
object.
Parameter error: If an error occurred, the cause of the failure.
This method returns the result of a
readValueForDescriptor:call.
Sourceunsafe fn peripheral_didWriteValueForDescriptor_error(
&self,
peripheral: &CBPeripheral,
descriptor: &CBDescriptor,
error: Option<&NSError>,
)
Available on crate features CBAttribute and CBDescriptor and CBPeer only.
unsafe fn peripheral_didWriteValueForDescriptor_error( &self, peripheral: &CBPeripheral, descriptor: &CBDescriptor, error: Option<&NSError>, )
CBAttribute and CBDescriptor and CBPeer only.Parameter peripheral: The peripheral providing this information.
Parameter descriptor: A
CBDescriptor
object.
Parameter error: If an error occurred, the cause of the failure.
This method returns the result of a
writeValue:forDescriptor:call.
Sourceunsafe fn peripheralIsReadyToSendWriteWithoutResponse(
&self,
peripheral: &CBPeripheral,
)
Available on crate feature CBPeer only.
unsafe fn peripheralIsReadyToSendWriteWithoutResponse( &self, peripheral: &CBPeripheral, )
CBPeer only.Parameter peripheral: The peripheral providing this update.
This method is invoked after a failed call to
writeValue:forCharacteristic:type:, when peripheral is again ready to send characteristic value updates.
Sourceunsafe fn peripheral_didOpenL2CAPChannel_error(
&self,
peripheral: &CBPeripheral,
channel: Option<&CBL2CAPChannel>,
error: Option<&NSError>,
)
Available on crate features CBL2CAPChannel and CBPeer only.
unsafe fn peripheral_didOpenL2CAPChannel_error( &self, peripheral: &CBPeripheral, channel: Option<&CBL2CAPChannel>, error: Option<&NSError>, )
CBL2CAPChannel and CBPeer only.Parameter peripheral: The peripheral providing this information.
Parameter channel: A
CBL2CAPChannel
object.
Parameter error: If an error occurred, the cause of the failure.
This method returns the result of a
openL2CAPChannel: @link call.