Kallisto Linux API
Library for interacting with Kallisto devices
BluetoothAdapterEventListener Class Referenceabstract

#include <bluetooth_adapter_event_listener.hpp>

Public Member Functions

 BluetoothAdapterEventListener ()
 
virtual void onBluetoothAdapterDisabled (std::chrono::nanoseconds timestamp)=0
 
virtual void onBluetoothAdapterEnabled (std::chrono::nanoseconds timestamp)=0
 
virtual void onBluetoothAdapterIrrecuperable (std::chrono::nanoseconds timestamp)=0
 

Protected Member Functions

virtual ~BluetoothAdapterEventListener ()
 

Detailed Description

Callback listener interface for bluetooth events.

Constructor & Destructor Documentation

◆ ~BluetoothAdapterEventListener()

virtual ~BluetoothAdapterEventListener ( )
protectedvirtual

Destructor.

◆ BluetoothAdapterEventListener()

Member Function Documentation

◆ onBluetoothAdapterDisabled()

virtual void onBluetoothAdapterDisabled ( std::chrono::nanoseconds  timestamp)
pure virtual

Called when the Bluetooth adapter is turned off.

If there are any devices under use, onLinkLoss() events will be triggered for each device.

The system will try to turn on the Bluetooth adapter in order to continue working.

Following this event, one of onBluetoothAdapterEnabled() or onBluetoothAdapterIrrecuperable() will be triggered.

Parameters
timestampThe time at which the event happened in nanoseconds since the epoch.

◆ onBluetoothAdapterEnabled()

virtual void onBluetoothAdapterEnabled ( std::chrono::nanoseconds  timestamp)
pure virtual

Called when the Bluetooth adapter is turned back on following a onBluetoothAdapterDisabled() event.

◆ onBluetoothAdapterIrrecuperable()

virtual void onBluetoothAdapterIrrecuperable ( std::chrono::nanoseconds  timestamp)
pure virtual

Called when the Bluetooth adapter fails to turn back on following a onBluetoothAdapterDisabled() event.

This can happen if the adapter was removed from the system of if it is in error and fails to be enabled. The system will wait for a new adapter.

Every device is destroyed and the internal data cleared.

Parameters
timestampThe time at which the event happened in nanoseconds since the epoch.

The documentation for this class was generated from the following file: