RVS_BTDriverDelegate
public protocol RVS_BTDriverDelegate : AnyObject
This is the delegate for the driver instance. You should definitely do this.
-
Error reporting method. This is required for the delegate.
Declaration
Swift
func btDriver(_ driver: RVS_BTDriver, encounteredThisError: RVS_BTDriver.Errors)Parameters
driverThe
RVS_BTDriverinstance that encountered the error.encounteredThisErrorThe error that was encountered.
-
btDriver(_:newDeviceAdded:)Default implementationCalled when a device has been added and instantiated.
This is optional, and is NOT guaranteed to be called in the main thread.
Default Implementation
The default implementation does nothing.
Declaration
Swift
func btDriver(_ driver: RVS_BTDriver, newDeviceAdded: RVS_BTDriver_DeviceProtocol)Parameters
driverThe
RVS_BTDriverinstance calling this.newDeviceAddedThe device object, masked as a protocol.
-
btDriverStatusUpdate(_:)Default implementationCalled to indicate that the driver’s status should be checked.
It may be called frequently, and there may not be any changes. This is mereley a “make you aware of the POSSIBILITY of a change” call.
This is optional, and is NOT guaranteed to be called in the main thread.
Default Implementation
The default implementation does nothing.
Declaration
Swift
func btDriverStatusUpdate(_ driver: RVS_BTDriver)Parameters
driverThe
RVS_BTDriverinstance calling this. -
btDriverScanningChanged(_:isScanning:)Default implementationCalled to indicate that the driver started or stopped scanning.
This is optional, and is NOT guaranteed to be called in the main thread.
Default Implementation
The default implementation does nothing.
Declaration
Swift
func btDriverScanningChanged(_ driver: RVS_BTDriver, isScanning: Bool)Parameters
driverThe
RVS_BTDriverinstance calling this.isScanningTrue, if the new state is scanning is on.
View on GitHub
RVS_BTDriverDelegate Protocol Reference