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(CBPeripheral peripheral, CBService service, NSError error)peripheral:didDiscoverCharacteristicsForService:error: This method returns the result of a @link discoverCharacteristics:forService: @/link call.default voidperipheralDidDiscoverDescriptorsForCharacteristicError(CBPeripheral peripheral, CBCharacteristic characteristic, NSError error)peripheral:didDiscoverDescriptorsForCharacteristic:error: This method returns the result of a @link discoverDescriptorsForCharacteristic: @/link call.default voidperipheralDidDiscoverIncludedServicesForServiceError(CBPeripheral peripheral, CBService service, NSError error)peripheral:didDiscoverIncludedServicesForService:error: This method returns the result of a @link discoverIncludedServices:forService: @/link call.default voidperipheralDidDiscoverServices(CBPeripheral peripheral, NSError error)peripheral:didDiscoverServices: This method returns the result of a @link discoverServices: @/link call.default voidperipheralDidModifyServices(CBPeripheral peripheral, NSArray<? extends CBService> invalidatedServices)peripheral:didModifyServices: This method is invoked when the @link services @/link of peripheral have been changed.default voidperipheralDidOpenL2CAPChannelError(CBPeripheral peripheral, CBL2CAPChannel channel, NSError error)peripheral:didOpenL2CAPChannel:error: This method returns the result of a @link openL2CAPChannel: @link call.default voidperipheralDidReadRSSIError(CBPeripheral peripheral, NSNumber RSSI, NSError error)peripheral:didReadRSSI:error: This method returns the result of a @link readRSSI: @/link call.default voidperipheralDidUpdateName(CBPeripheral peripheral)peripheralDidUpdateName: This method is invoked when the @link name @/link of peripheral changes.default voidperipheralDidUpdateNotificationStateForCharacteristicError(CBPeripheral peripheral, CBCharacteristic characteristic, NSError error)peripheral:didUpdateNotificationStateForCharacteristic:error: This method returns the result of a @link setNotifyValue:forCharacteristic: @/link call.default voidperipheralDidUpdateRSSIError(CBPeripheral peripheral, NSError error)Deprecated.Use {@link peripheral:didReadRSSI:error:} instead.default voidperipheralDidUpdateValueForCharacteristicError(CBPeripheral peripheral, CBCharacteristic characteristic, NSError error)peripheral:didUpdateValueForCharacteristic:error: This method is invoked after a @link readValueForCharacteristic: @/link call, or upon receipt of a notification/indication.default voidperipheralDidUpdateValueForDescriptorError(CBPeripheral peripheral, CBDescriptor descriptor, NSError error)peripheral:didUpdateValueForDescriptor:error: This method returns the result of a @link readValueForDescriptor: @/link call.default voidperipheralDidWriteValueForCharacteristicError(CBPeripheral peripheral, CBCharacteristic characteristic, NSError error)peripheral:didWriteValueForCharacteristic:error: This method returns the result of a {@link writeValue:forCharacteristic:type:} call, when theCBCharacteristicWriteWithResponsetype is used.default voidperipheralDidWriteValueForDescriptorError(CBPeripheral peripheral, CBDescriptor descriptor, NSError error)peripheral:didWriteValueForDescriptor:error: This method returns the result of a @link writeValue:forDescriptor: @/link call.default voidperipheralIsReadyToSendWriteWithoutResponse(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(CBPeripheral peripheral, CBService service, 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(CBPeripheral peripheral, CBCharacteristic characteristic, 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(CBPeripheral peripheral, CBService service, 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(CBPeripheral peripheral, 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(CBPeripheral peripheral, 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.- Parameters:
peripheral- The peripheral providing this update.invalidatedServices- The services that have been invalidated
-
peripheralDidReadRSSIError
default void peripheralDidReadRSSIError(CBPeripheral peripheral, NSNumber RSSI, NSError error)
peripheral:didReadRSSI:error: This method returns the result of a @link readRSSI: @/link call.- 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(CBPeripheral peripheral, CBCharacteristic characteristic, 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(CBPeripheral peripheral, CBCharacteristic characteristic, 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(CBPeripheral peripheral, CBDescriptor descriptor, 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(CBPeripheral peripheral, CBCharacteristic characteristic, 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(CBPeripheral peripheral, CBDescriptor descriptor, 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(CBPeripheral peripheral)
peripheralDidUpdateName: This method is invoked when the @link name @/link of peripheral changes.- Parameters:
peripheral- The peripheral providing this update.
-
peripheralDidUpdateRSSIError
@Deprecated default void peripheralDidUpdateRSSIError(CBPeripheral peripheral, NSError error)
Deprecated.Use {@link peripheral:didReadRSSI:error:} instead.peripheralDidUpdateRSSI: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(CBPeripheral peripheral, CBL2CAPChannel channel, 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(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.
-
-