public interface CBPeripheralDelegate
Delegate for CBPeripheral.
| Modifier and Type | Method and Description |
|---|---|
default void |
peripheralDidDiscoverCharacteristicsForServiceError(CBPeripheral peripheral,
CBService service,
NSError error)
peripheral:didDiscoverCharacteristicsForService:error:
|
default void |
peripheralDidDiscoverDescriptorsForCharacteristicError(CBPeripheral peripheral,
CBCharacteristic characteristic,
NSError error)
peripheral:didDiscoverDescriptorsForCharacteristic:error:
|
default void |
peripheralDidDiscoverIncludedServicesForServiceError(CBPeripheral peripheral,
CBService service,
NSError error)
peripheral:didDiscoverIncludedServicesForService:error:
|
default void |
peripheralDidDiscoverServices(CBPeripheral peripheral,
NSError error)
peripheral:didDiscoverServices:
|
default void |
peripheralDidModifyServices(CBPeripheral peripheral,
NSArray<? extends CBService> invalidatedServices)
peripheral:didModifyServices:
|
default void |
peripheralDidOpenL2CAPChannelError(CBPeripheral peripheral,
CBL2CAPChannel channel,
NSError error)
peripheral:didOpenL2CAPChannel:error:
|
default void |
peripheralDidReadRSSIError(CBPeripheral peripheral,
NSNumber RSSI,
NSError error)
peripheral:didReadRSSI:error:
|
default void |
peripheralDidUpdateName(CBPeripheral peripheral)
peripheralDidUpdateName:
|
default void |
peripheralDidUpdateNotificationStateForCharacteristicError(CBPeripheral peripheral,
CBCharacteristic characteristic,
NSError error)
peripheral:didUpdateNotificationStateForCharacteristic:error:
|
default void |
peripheralDidUpdateRSSIError(CBPeripheral peripheral,
NSError error)
Deprecated.
Use
peripheral:didReadRSSI:error: instead. |
default void |
peripheralDidUpdateValueForCharacteristicError(CBPeripheral peripheral,
CBCharacteristic characteristic,
NSError error)
peripheral:didUpdateValueForCharacteristic:error:
|
default void |
peripheralDidUpdateValueForDescriptorError(CBPeripheral peripheral,
CBDescriptor descriptor,
NSError error)
peripheral:didUpdateValueForDescriptor:error:
|
default void |
peripheralDidWriteValueForCharacteristicError(CBPeripheral peripheral,
CBCharacteristic characteristic,
NSError error)
peripheral:didWriteValueForCharacteristic:error:
|
default void |
peripheralDidWriteValueForDescriptorError(CBPeripheral peripheral,
CBDescriptor descriptor,
NSError error)
peripheral:didWriteValueForDescriptor:error:
|
default void |
peripheralIsReadyToSendWriteWithoutResponse(CBPeripheral peripheral)
peripheralIsReadyToSendWriteWithoutResponse:
|
default void peripheralDidDiscoverCharacteristicsForServiceError(CBPeripheral peripheral, CBService service, NSError 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's characteristics property.
peripheral - The peripheral providing this information.service - The CBService object containing the characteristic(s).error - If an error occurred, the cause of the failure.default void peripheralDidDiscoverDescriptorsForCharacteristicError(CBPeripheral peripheral, CBCharacteristic characteristic, NSError error)
This method returns the result of a @link discoverDescriptorsForCharacteristic: @/link call. If the descriptors were read successfully,
they can be retrieved via characteristic's descriptors property.
peripheral - The peripheral providing this information.characteristic - A CBCharacteristic object.error - If an error occurred, the cause of the failure.default void peripheralDidDiscoverIncludedServicesForServiceError(CBPeripheral peripheral, CBService service, NSError 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's includedServices property.
peripheral - The peripheral providing this information.service - The CBService object containing the included services.error - If an error occurred, the cause of the failure.default void peripheralDidDiscoverServices(CBPeripheral peripheral, NSError error)
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.
peripheral - The peripheral providing this information.error - If an error occurred, the cause of the failure.default void peripheralDidModifyServices(CBPeripheral peripheral, NSArray<? extends CBService> invalidatedServices)
This method is invoked when the @link services @/link of peripheral have been changed.
At this point, the designated CBService objects have been invalidated.
Services can be re-discovered via @link discoverServices: @/link.
peripheral - The peripheral providing this update.invalidatedServices - The services that have been invalidateddefault void peripheralDidReadRSSIError(CBPeripheral peripheral, NSNumber RSSI, NSError error)
This method returns the result of a @link readRSSI: @/link call.
peripheral - The peripheral providing this update.RSSI - The current RSSI of the link.error - If an error occurred, the cause of the failure.default void peripheralDidUpdateNotificationStateForCharacteristicError(CBPeripheral peripheral, CBCharacteristic characteristic, NSError error)
This method returns the result of a @link setNotifyValue:forCharacteristic: @/link call.
peripheral - The peripheral providing this information.characteristic - A CBCharacteristic object.error - If an error occurred, the cause of the failure.default void peripheralDidUpdateValueForCharacteristicError(CBPeripheral peripheral, CBCharacteristic characteristic, NSError error)
This method is invoked after a @link readValueForCharacteristic: @/link call, or upon receipt of a notification/indication.
peripheral - The peripheral providing this information.characteristic - A CBCharacteristic object.error - If an error occurred, the cause of the failure.default void peripheralDidUpdateValueForDescriptorError(CBPeripheral peripheral, CBDescriptor descriptor, NSError error)
This method returns the result of a @link readValueForDescriptor: @/link call.
peripheral - The peripheral providing this information.descriptor - A CBDescriptor object.error - If an error occurred, the cause of the failure.default void peripheralDidWriteValueForCharacteristicError(CBPeripheral peripheral, CBCharacteristic characteristic, NSError error)
This method returns the result of a writeValue:forCharacteristic:type: call, when the CBCharacteristicWriteWithResponse type is used.
peripheral - The peripheral providing this information.characteristic - A CBCharacteristic object.error - If an error occurred, the cause of the failure.default void peripheralDidWriteValueForDescriptorError(CBPeripheral peripheral, CBDescriptor descriptor, NSError error)
This method returns the result of a @link writeValue:forDescriptor: @/link call.
peripheral - The peripheral providing this information.descriptor - A CBDescriptor object.error - If an error occurred, the cause of the failure.default void peripheralDidUpdateName(CBPeripheral peripheral)
This method is invoked when the @link name @/link of peripheral changes.
peripheral - The peripheral providing this update.@Deprecated default void peripheralDidUpdateRSSIError(CBPeripheral peripheral, NSError error)
peripheral:didReadRSSI:error: instead.This method returns the result of a @link readRSSI: @/link call.
peripheral - The peripheral providing this update.error - If an error occurred, the cause of the failure.default void peripheralDidOpenL2CAPChannelError(CBPeripheral peripheral, CBL2CAPChannel channel, NSError error)
This method returns the result of a @link openL2CAPChannel: @link call.
peripheral - The peripheral providing this information.channel - A CBL2CAPChannel object.error - If an error occurred, the cause of the failure.default void peripheralIsReadyToSendWriteWithoutResponse(CBPeripheral peripheral)
This method is invoked after a failed call to @link writeValue:forCharacteristic:type: @/link, when peripheral is again ready to send characteristic value updates.
peripheral - The peripheral providing this update.