CGA_BlueThoth_Delegate
public protocol CGA_BlueThoth_Delegate : AnyObject
All delegate callbacks are made in the main thread. This is the only delegate for the BlueThoth framework. All events in the system come to this one place.
-
handleError(_:Default implementationfrom: ) OPTIONAL: This is called to tell the instance to do whatever it needs to do to handle an error.
Default Implementation
The default does nothing.
Declaration
Swift
func handleError(_ error: CGA_Errors, from: RVS_BlueThoth)Parameters
errorThe error to be handled.
-
updateFrom(_:Default implementation) OPTIONAL: This is called to tell the instance to do whatever it needs to do to update its data. NOTE: There may be no changes, or many changes. What has changed is not specified.
Default Implementation
The default does nothing.
Declaration
Swift
func updateFrom(_ centralManager: RVS_BlueThoth)Parameters
centralManagerThe central manager that is calling this.
-
centralManagerPoweredOn(_:Default implementation) OPTIONAL: This is called to tell the instance that the state of the Central manager just became “powered on.”
Default Implementation
The default does nothing.
Declaration
Swift
func centralManagerPoweredOn(_ centralManager: RVS_BlueThoth)Parameters
centralManagerThe central manager that is calling this.
-
centralManager(_:Default implementationdidConnectThisDevice: ) OPTIONAL: This is called to tell the instance that a Peripheral device has been connected.
Default Implementation
The default does nothing.
Declaration
Swift
func centralManager(_ centralManager: RVS_BlueThoth, didConnectThisDevice: CGA_Bluetooth_Peripheral)Parameters
centralManagerThe central manager that is calling this.
didConnectThisDeviceThe device instance that was connected.
-
centralManager(_:Default implementationwillDisconnectThisDevice: ) OPTIONAL: This is called to tell the instance that a peripheral device is about to be disconnected.
Default Implementation
The default does nothing.
Declaration
Swift
func centralManager(_ centralManager: RVS_BlueThoth, willDisconnectThisDevice: CGA_Bluetooth_Peripheral)Parameters
centralManagerThe central manager that is calling this.
willDisconnectThisDeviceThe device instance that will be removed after this call.
-
centralManager(_:Default implementationdeviceInfoChanged: ) OPTIONAL: This is called to tell the instance that a Peripheral device has had some change.
Default Implementation
The default does nothing.
Declaration
Swift
func centralManager(_ centralManager: RVS_BlueThoth, deviceInfoChanged: CGA_Bluetooth_Peripheral)Parameters
centralManagerThe central manager that is calling this.
deviceInfoChangedThe device instance that was changed.
-
centralManager(_:Default implementationdeviceReadyForWrite: ) OPTIONAL: This is called to tell the instance that a Peripheral device is ready for a write.
Default Implementation
The default does nothing.
Declaration
Swift
func centralManager(_ centralManager: RVS_BlueThoth, deviceReadyForWrite: CGA_Bluetooth_Peripheral)Parameters
centralManagerThe central manager that is calling this.
deviceReadyForWriteThe device instance that is ready for a write.
-
centralManager(_:Default implementationdevice: changedService: ) OPTIONAL: This is called to tell the instance that a Service changed.
Default Implementation
The default does nothing.
Declaration
Swift
func centralManager(_ centralManager: RVS_BlueThoth, device: CGA_Bluetooth_Peripheral, changedService: CGA_Bluetooth_Service)Parameters
centralManagerThe central manager that is calling this.
deviceThe device instance that contained the changed Service.
changedServiceThe Service instance that was changed.
-
centralManager(_:Default implementationdevice: service: characteristicWriteComplete: ) OPTIONAL: This is called to tell the instance that a Characteristic write with response received its response.
Default Implementation
The default does nothing.
Declaration
Swift
func centralManager(_ centralManager: RVS_BlueThoth, device: CGA_Bluetooth_Peripheral, service: CGA_Bluetooth_Service, characteristicWriteComplete: CGA_Bluetooth_Characteristic)Parameters
centralManagerThe central manager that is calling this.
deviceThe device instance that contained the changed Service.
serviceThe Service instance that contained the changed Characteristic.
characteristicWriteCompleteThe Characteristic that had its write completed.
-
centralManager(_:Default implementationdevice: service: changedCharacteristicNotificationState: ) OPTIONAL: This is called to tell the instance that a Characteristic changed its notification state.
Default Implementation
The default does nothing.
Declaration
Swift
func centralManager(_ centralManager: RVS_BlueThoth, device: CGA_Bluetooth_Peripheral, service: CGA_Bluetooth_Service, changedCharacteristicNotificationState: CGA_Bluetooth_Characteristic)Parameters
centralManagerThe central manager that is calling this.
deviceThe device instance that contained the changed Service.
serviceThe Service instance that contained the changed Characteristic.
changedCharacteristicNotificationStateThe Characteristic that was changed.
-
centralManager(_:Default implementationdevice: service: changedCharacteristic: ) OPTIONAL: This is called to tell the instance that a Characteristic changed its value.
Default Implementation
The default does nothing.
Declaration
Swift
func centralManager(_ centralManager: RVS_BlueThoth, device: CGA_Bluetooth_Peripheral, service: CGA_Bluetooth_Service, changedCharacteristic: CGA_Bluetooth_Characteristic)Parameters
centralManagerThe central manager that is calling this.
deviceThe device instance that contained the changed Service.
serviceThe Service instance that contained the changed Characteristic.
changedCharacteristicThe Characteristic that was changed.
-
centralManager(_:Default implementationdevice: service: characteristic: changedDescriptor: ) OPTIONAL: This is called to tell the instance that a Descriptor changed its value.
Default Implementation
The default does nothing.
Declaration
Swift
func centralManager(_ centralManager: RVS_BlueThoth, device: CGA_Bluetooth_Peripheral, service: CGA_Bluetooth_Service, characteristic: CGA_Bluetooth_Characteristic, changedDescriptor: CGA_Bluetooth_Descriptor)Parameters
centralManagerThe central manager that is calling this.
deviceThe device instance that contained the changed Service.
serviceThe Service instance that contained the changed Characteristic.
characteristicThe Characteristic that contains the Descriptor that was changed.
changedDescriptorThe Descriptor that was changed.
View on GitHub
CGA_BlueThoth_Delegate Protocol Reference