From 91e54cf9150b37036447d423857d2bd18e4bf02b Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Wed, 5 Sep 2018 14:14:42 +0200 Subject: Major overhaul of BLE code: o Starting to remove shared_ptr. The code shouldn't be shared between threads, any thread safety will have to be built on the outside. o Better service discovery, don't fail when there are multiple requests that have to be done. o AttributeData was buggy, now it is just less than ideal. o Much better ByteBuffer. Now it is a simple view + cursor. --- ble/BluetoothImpl.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'ble/BluetoothImpl.h') diff --git a/ble/BluetoothImpl.h b/ble/BluetoothImpl.h index c660b4b..802c844 100644 --- a/ble/BluetoothImpl.h +++ b/ble/BluetoothImpl.h @@ -108,7 +108,7 @@ protected: template class DefaultBluetoothGattService : public BluetoothGattService { public: - DefaultBluetoothGattService(DeviceType &device, const Uuid uuid, const uint16_t handle, + DefaultBluetoothGattService(DeviceType &device, const Uuid& uuid, const uint16_t handle, const uint16_t endGroupHandle) : device(device), uuid(uuid), handle(handle), endGroupHandle(endGroupHandle) { } @@ -267,7 +267,10 @@ protected: shared_ptr getAdapterImpl(string name); -} -}; +template struct overloaded : Ts... { using Ts::operator()...; }; +template overloaded(Ts...) -> overloaded; + +} // namespace bluetooth +} // namespace trygvis #endif -- cgit v1.2.3