aboutsummaryrefslogtreecommitdiff
path: root/ble/BluetoothImpl.h
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2018-09-05 14:14:42 +0200
committerTrygve Laugstøl <trygvis@inamo.no>2018-09-05 14:14:42 +0200
commit91e54cf9150b37036447d423857d2bd18e4bf02b (patch)
tree7738db9a61cb6385f0abc6359b5b89aaa1ff104d /ble/BluetoothImpl.h
parent25d82b0c52120c81cfed5bc1f245408f08203b7b (diff)
downloadble-toys-91e54cf9150b37036447d423857d2bd18e4bf02b.tar.gz
ble-toys-91e54cf9150b37036447d423857d2bd18e4bf02b.tar.bz2
ble-toys-91e54cf9150b37036447d423857d2bd18e4bf02b.tar.xz
ble-toys-91e54cf9150b37036447d423857d2bd18e4bf02b.zip
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.
Diffstat (limited to 'ble/BluetoothImpl.h')
-rw-r--r--ble/BluetoothImpl.h9
1 files changed, 6 insertions, 3 deletions
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<typename DeviceType>
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 <BluetoothAdapter> getAdapterImpl(string name);
-}
-};
+template<class... Ts> struct overloaded : Ts... { using Ts::operator()...; };
+template<class... Ts> overloaded(Ts...) -> overloaded<Ts...>;
+
+} // namespace bluetooth
+} // namespace trygvis
#endif