RVS_BTDriverDelegate

public protocol RVS_BTDriverDelegate : AnyObject

This is the delegate for the driver instance. You should definitely do this.

Required Methods

Optional Methods

  • btDriver(_:newDeviceAdded:) Default implementation

    Called 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 implementation

    Called 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.

  • Called 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.