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
driver
The
RVS_BTDriver
instance that encountered the error.encounteredThisError
The 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
driver
The
RVS_BTDriver
instance calling this.newDeviceAdded
The 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
driver
The
RVS_BTDriver
instance 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
driver
The
RVS_BTDriver
instance calling this.isScanning
True, if the new state is scanning is on.