Package apple.corebluetooth.protocol
Interface CBPeripheralDelegate
-
public interface CBPeripheralDelegate[@protocol] CBPeripheralDelegate Delegate for CBPeripheral.
-
-
Method Summary
All Methods Instance Methods Default Methods Deprecated Methods Modifier and Type Method Description default voidperipheralDidDiscoverCharacteristicsForServiceError(@NotNull CBPeripheral peripheral, @NotNull CBService service, @Nullable NSError error)peripheral:didDiscoverCharacteristicsForService:error: This method returns the result of a @link discoverCharacteristics:forService: @/link call.default voidperipheralDidDiscoverDescriptorsForCharacteristicError(@NotNull CBPeripheral peripheral, @NotNull CBCharacteristic characteristic, @Nullable NSError error)peripheral:didDiscoverDescriptorsForCharacteristic:error: This method returns the result of a @link discoverDescriptorsForCharacteristic: @/link call.default voidperipheralDidDiscoverIncludedServicesForServiceError(@NotNull CBPeripheral peripheral, @NotNull CBService service, @Nullable NSError error)peripheral:didDiscoverIncludedServicesForService:error: This method returns the result of a @link discoverIncludedServices:forService: @/link call.default voidperipheralDidDiscoverServices(@NotNull CBPeripheral peripheral, @Nullable NSError error)peripheral:didDiscoverServices: This method returns the result of a @link discoverServices: @/link call.default voidperipheralDidModifyServices(@NotNull CBPeripheral peripheral, @NotNull NSArray<? extends CBService> invalidatedServices)peripheral:didModifyServices: This method is invoked when the @link services @/link of peripheral have been changed.default voidperipheralDidOpenL2CAPChannelError(@NotNull CBPeripheral peripheral, @Nullable CBL2CAPChannel channel, @Nullable NSError error)peripheral:didOpenL2CAPChannel:error: This method returns the result of a @link openL2CAPChannel: @link call.default voidperipheralDidReadRSSIError(@NotNull CBPeripheral peripheral, @NotNull NSNumber RSSI, @Nullable NSError error)peripheral:didReadRSSI:error: This method returns the result of a @link readRSSI: @/link call.default voidperipheralDidUpdateName(@NotNull CBPeripheral peripheral)peripheralDidUpdateName: This method is invoked when the @link name @/link of peripheral changes.default voidperipheralDidUpdateNotificationStateForCharacteristicError(@NotNull CBPeripheral peripheral, @NotNull CBCharacteristic characteristic, @Nullable NSError error)peripheral:didUpdateNotificationStateForCharacteristic:error: This method returns the result of a @link setNotifyValue:forCharacteristic: @/link call.default voidperipheralDidUpdateRSSIError(@NotNull CBPeripheral peripheral, @Nullable NSError error)Deprecated.Use {@link peripheral:didReadRSSI:error:} instead.default voidperipheralDidUpdateValueForCharacteristicError(@NotNull CBPeripheral peripheral, @NotNull CBCharacteristic characteristic, @Nullable NSError error)peripheral:didUpdateValueForCharacteristic:error: This method is invoked after a @link readValueForCharacteristic: @/link call, or upon receipt of a notification/indication.default voidperipheralDidUpdateValueForDescriptorError(@NotNull CBPeripheral peripheral, @NotNull CBDescriptor descriptor, @Nullable NSError error)peripheral:didUpdateValueForDescriptor:error: This method returns the result of a @link readValueForDescriptor: @/link call.default voidperipheralDidWriteValueForCharacteristicError(@NotNull CBPeripheral peripheral, @NotNull CBCharacteristic characteristic, @Nullable NSError error)peripheral:didWriteValueForCharacteristic:error: This method returns the result of a {@link writeValue:forCharacteristic:type:} call, when theCBCharacteristicWriteWithResponsetype is used.default voidperipheralDidWriteValueForDescriptorError(@NotNull CBPeripheral peripheral, @NotNull CBDescriptor descriptor, @Nullable NSError error)peripheral:didWriteValueForDescriptor:error: This method returns the result of a @link writeValue:forDescriptor: @/link call.default voidperipheralIsReadyToSendWriteWithoutResponse(@NotNull CBPeripheral peripheral)peripheralIsReadyToSendWriteWithoutResponse: This method is invoked after a failed call to @link writeValue:forCharacteristic:type: @/link, when peripheral is again ready to send characteristic value updates.
-
-
-
Method Detail
-
peripheralDidDiscoverCharacteristicsForServiceError
default void peripheralDidDiscoverCharacteristicsForServiceError(@NotNull @NotNull CBPeripheral peripheral, @NotNull @NotNull CBService service, @Nullable @Nullable NSError error)peripheral:didDiscoverCharacteristicsForService:error: This method returns the result of a @link discoverCharacteristics:forService: @/link call. If the characteristic(s) were read successfully, they can be retrieved via service'scharacteristicsproperty.- Parameters:
peripheral- The peripheral providing this information.service- TheCBServiceobject containing the characteristic(s).error- If an error occurred, the cause of the failure.
-
peripheralDidDiscoverDescriptorsForCharacteristicError
default void peripheralDidDiscoverDescriptorsForCharacteristicError(@NotNull @NotNull CBPeripheral peripheral, @NotNull @NotNull CBCharacteristic characteristic, @Nullable @Nullable NSError error)peripheral:didDiscoverDescriptorsForCharacteristic:error: This method returns the result of a @link discoverDescriptorsForCharacteristic: @/link call. If the descriptors were read successfully, they can be retrieved via characteristic'sdescriptorsproperty.- Parameters:
peripheral- The peripheral providing this information.characteristic- ACBCharacteristicobject.error- If an error occurred, the cause of the failure.
-
peripheralDidDiscoverIncludedServicesForServiceError
default void peripheralDidDiscoverIncludedServicesForServiceError(@NotNull @NotNull CBPeripheral peripheral, @NotNull @NotNull CBService service, @Nullable @Nullable NSError error)peripheral:didDiscoverIncludedServicesForService:error: This method returns the result of a @link discoverIncludedServices:forService: @/link call. If the included service(s) were read successfully, they can be retrieved via service'sincludedServicesproperty.- Parameters:
peripheral- The peripheral providing this information.service- TheCBServiceobject containing the included services.error- If an error occurred, the cause of the failure.
-
peripheralDidDiscoverServices
default void peripheralDidDiscoverServices(@NotNull @NotNull CBPeripheral peripheral, @Nullable @Nullable NSError error)peripheral:didDiscoverServices: This method returns the result of a @link discoverServices: @/link call. If the service(s) were read successfully, they can be retrieved via peripheral's @link services @/link property.- Parameters:
peripheral- The peripheral providing this information.error- If an error occurred, the cause of the failure.
-
peripheralDidModifyServices
default void peripheralDidModifyServices(@NotNull @NotNull CBPeripheral peripheral, @NotNull @NotNull NSArray<? extends CBService> invalidatedServices)peripheral:didModifyServices: This method is invoked when the @link services @/link of peripheral have been changed. At this point, the designatedCBServiceobjects have been invalidated. Services can be re-discovered via @link discoverServices: @/link. API-Since: 7.0- Parameters:
peripheral- The peripheral providing this update.invalidatedServices- The services that have been invalidated
-
peripheralDidReadRSSIError
default void peripheralDidReadRSSIError(@NotNull @NotNull CBPeripheral peripheral, @NotNull @NotNull NSNumber RSSI, @Nullable @Nullable NSError error)peripheral:didReadRSSI:error: This method returns the result of a @link readRSSI: @/link call. API-Since: 8.0- Parameters:
peripheral- The peripheral providing this update.RSSI- The current RSSI of the link.error- If an error occurred, the cause of the failure.
-
peripheralDidUpdateNotificationStateForCharacteristicError
default void peripheralDidUpdateNotificationStateForCharacteristicError(@NotNull @NotNull CBPeripheral peripheral, @NotNull @NotNull CBCharacteristic characteristic, @Nullable @Nullable NSError error)peripheral:didUpdateNotificationStateForCharacteristic:error: This method returns the result of a @link setNotifyValue:forCharacteristic: @/link call.- Parameters:
peripheral- The peripheral providing this information.characteristic- ACBCharacteristicobject.error- If an error occurred, the cause of the failure.
-
peripheralDidUpdateValueForCharacteristicError
default void peripheralDidUpdateValueForCharacteristicError(@NotNull @NotNull CBPeripheral peripheral, @NotNull @NotNull CBCharacteristic characteristic, @Nullable @Nullable NSError error)peripheral:didUpdateValueForCharacteristic:error: This method is invoked after a @link readValueForCharacteristic: @/link call, or upon receipt of a notification/indication.- Parameters:
peripheral- The peripheral providing this information.characteristic- ACBCharacteristicobject.error- If an error occurred, the cause of the failure.
-
peripheralDidUpdateValueForDescriptorError
default void peripheralDidUpdateValueForDescriptorError(@NotNull @NotNull CBPeripheral peripheral, @NotNull @NotNull CBDescriptor descriptor, @Nullable @Nullable NSError error)peripheral:didUpdateValueForDescriptor:error: This method returns the result of a @link readValueForDescriptor: @/link call.- Parameters:
peripheral- The peripheral providing this information.descriptor- ACBDescriptorobject.error- If an error occurred, the cause of the failure.
-
peripheralDidWriteValueForCharacteristicError
default void peripheralDidWriteValueForCharacteristicError(@NotNull @NotNull CBPeripheral peripheral, @NotNull @NotNull CBCharacteristic characteristic, @Nullable @Nullable NSError error)peripheral:didWriteValueForCharacteristic:error: This method returns the result of a {@link writeValue:forCharacteristic:type:} call, when theCBCharacteristicWriteWithResponsetype is used.- Parameters:
peripheral- The peripheral providing this information.characteristic- ACBCharacteristicobject.error- If an error occurred, the cause of the failure.
-
peripheralDidWriteValueForDescriptorError
default void peripheralDidWriteValueForDescriptorError(@NotNull @NotNull CBPeripheral peripheral, @NotNull @NotNull CBDescriptor descriptor, @Nullable @Nullable NSError error)peripheral:didWriteValueForDescriptor:error: This method returns the result of a @link writeValue:forDescriptor: @/link call.- Parameters:
peripheral- The peripheral providing this information.descriptor- ACBDescriptorobject.error- If an error occurred, the cause of the failure.
-
peripheralDidUpdateName
default void peripheralDidUpdateName(@NotNull @NotNull CBPeripheral peripheral)peripheralDidUpdateName: This method is invoked when the @link name @/link of peripheral changes. API-Since: 6.0- Parameters:
peripheral- The peripheral providing this update.
-
peripheralDidUpdateRSSIError
@Deprecated default void peripheralDidUpdateRSSIError(@NotNull @NotNull CBPeripheral peripheral, @Nullable @Nullable NSError error)Deprecated.Use {@link peripheral:didReadRSSI:error:} instead. API-Since: 5.0 Deprecated-Since: 8.0peripheralDidUpdateRSSI:error: This method returns the result of a @link readRSSI: @/link call.- Parameters:
peripheral- The peripheral providing this update.error- If an error occurred, the cause of the failure.
-
peripheralDidOpenL2CAPChannelError
default void peripheralDidOpenL2CAPChannelError(@NotNull @NotNull CBPeripheral peripheral, @Nullable @Nullable CBL2CAPChannel channel, @Nullable @Nullable NSError error)peripheral:didOpenL2CAPChannel:error: This method returns the result of a @link openL2CAPChannel: @link call.- Parameters:
peripheral- The peripheral providing this information.channel- ACBL2CAPChannelobject.error- If an error occurred, the cause of the failure.
-
peripheralIsReadyToSendWriteWithoutResponse
default void peripheralIsReadyToSendWriteWithoutResponse(@NotNull @NotNull CBPeripheral peripheral)peripheralIsReadyToSendWriteWithoutResponse: This method is invoked after a failed call to @link writeValue:forCharacteristic:type: @/link, when peripheral is again ready to send characteristic value updates.- Parameters:
peripheral- The peripheral providing this update.
-
-