diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2015-06-21 16:58:18 +0200 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2015-06-21 16:58:18 +0200 |
commit | 9042b87f32bcabcc671e393376d3fb96ad858caa (patch) | |
tree | c68fe4f680fcc2a53ff3375141c9ad52cd1a028e /include | |
parent | 4529a75f15bffd5bb941818deef03fb50a6fc9c9 (diff) | |
download | ble-toys-9042b87f32bcabcc671e393376d3fb96ad858caa.tar.gz ble-toys-9042b87f32bcabcc671e393376d3fb96ad858caa.tar.bz2 ble-toys-9042b87f32bcabcc671e393376d3fb96ad858caa.tar.xz ble-toys-9042b87f32bcabcc671e393376d3fb96ad858caa.zip |
ble-scan:
o New tool to scan for devices. Requires root on linux :( Linux is also touchy if the program dies.
BluetoothAdapter:
o Adding getMac().
Diffstat (limited to 'include')
-rw-r--r-- | include/ble/Bluetooth.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/include/ble/Bluetooth.h b/include/ble/Bluetooth.h index 97e7cfe..6a974d5 100644 --- a/include/ble/Bluetooth.h +++ b/include/ble/Bluetooth.h @@ -157,11 +157,13 @@ public: class BluetoothAdapter { public: + virtual Mac const &getMac() = 0; + virtual void startScan() = 0; virtual void stopScan() = 0; - virtual void runScan(void (callback)(BluetoothDevice &device)) = 0; + virtual void runScan(std::function<void(BluetoothDevice &device)>) = 0; virtual BluetoothDevice &getDevice(Mac &mac) = 0; @@ -243,7 +245,7 @@ private: AttributeData(uint16_t handle, ByteBuffer value); }; -BluetoothAdapter &getAdapter(int hciDevice); +shared_ptr<BluetoothAdapter> getAdapter(int hciDevice); void shutdown(); |