|
Kallisto Linux API
Library for interacting with Kallisto devices
|
#include <bluetooth_adapter.hpp>
Data Structures | |
| class | Listener |
| class | ScanListener |
Public Member Functions | |
| BluetoothAdapter (std::string id) | |
| ~BluetoothAdapter () | |
| BluetoothAdapter (BluetoothAdapter const &)=delete | |
| void | operator= (BluetoothAdapter const &)=delete |
| BluetoothAdapter (BluetoothAdapter &&other) | |
| BluetoothAdapter & | operator= (BluetoothAdapter &&other) |
| std::string | getId () const |
| error::KallistoDetailedResult | enable () |
| error::KallistoDetailedResult | disable () |
| bool | isEnabled () |
| const std::vector< BluetoothDevice * > | getDevices () |
| BluetoothDevice * | getDevice (std::string address) |
| error::KallistoDetailedResult | registerListener (BluetoothAdapter::Listener &listener) |
| void | unregisterListener () |
| bool | isScanning () |
| error::KallistoDetailedResult | startScan (BluetoothAdapter::ScanListener &listener) |
| error::KallistoDetailedResult | stopScan () |
| bool | operator== (const BluetoothAdapter &other) const |
| bool | operator!= (const BluetoothAdapter &other) const |
Class that handles a Bluetooth adapter
TODO: Should BluetoothAdapterManager be friend of this class and hide all methods?
| BluetoothAdapter | ( | std::string | id | ) |
Constructor.
| ~BluetoothAdapter | ( | ) |
Destructor.
|
delete |
Remove copy.
| BluetoothAdapter | ( | BluetoothAdapter && | other | ) |
Move constructor.
| error::KallistoDetailedResult disable | ( | ) |
Disables the Bluetooth adapter.
| error::KallistoDetailedResult enable | ( | ) |
Tries to enable the Bluetooth adapter. Async method, should wait for the callback.
| BluetoothDevice* getDevice | ( | std::string | address | ) |
Returns the device with the passed address.
| const std::vector<BluetoothDevice*> getDevices | ( | ) |
Returns a list with all the devices available in the system.
|
inline |
Returns this adapter id.

| bool isEnabled | ( | ) |
Checks if the Bluetooth adapter is already enabled.
| bool isScanning | ( | ) |
Checks if the Bluetooth adapter is scanning
| BluetoothAdapter& operator= | ( | BluetoothAdapter && | other | ) |
Move assigment.
| error::KallistoDetailedResult registerListener | ( | BluetoothAdapter::Listener & | listener | ) |
Registers a listener for adapter changes. If a previous listener was registered, it will be replaced.
| listener | The listener to report events to. |
| error::KallistoDetailedResult startScan | ( | BluetoothAdapter::ScanListener & | listener | ) |
Starts scanning.
| error::KallistoDetailedResult stopScan | ( | ) |
Stops an on-going scan.
| void unregisterListener | ( | ) |
Unregisters the listener for adapter changes.