ConnectionObserver
public protocol ConnectionObserver: class
A protocol allowing conforming objects registered to Bluejay to optionally respond to Bluetooth connection events.
Attention
Attention
On initial subscription to Bluetooth events, bluetoothAvailable(_ available: Bool)
will always be called immediately with whatever the current state is, and connected(_ peripheral: BluejayPeripheral)
will also be called immediately if a device is already connected.
Note
Note Available callbacks:
func bluetoothAvailable(_ available: Bool)
func connected(_ peripheral: BluejayPeripheral)
func disconnected()
-
bluetoothAvailable(_:)
Default implementationCalled whenever Bluetooth availability changes, as well as when an object first subscribes to observing Bluetooth events.
Default Implementation
Declaration
Swift
func bluetoothAvailable(_ available: Bool)
-
connected(to:)
Default implementationUndocumented
Default Implementation
Undocumented
Declaration
Swift
public protocol ConnectionObserver: class
-
disconnected()
Default implementationUndocumented
Default Implementation
Undocumented
Declaration
Swift
public protocol ConnectionObserver: class