diff options
Diffstat (limited to 'ble/BluetoothImpl.h')
-rw-r--r-- | ble/BluetoothImpl.h | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/ble/BluetoothImpl.h b/ble/BluetoothImpl.h index 3f4615e..4627443 100644 --- a/ble/BluetoothImpl.h +++ b/ble/BluetoothImpl.h @@ -43,11 +43,11 @@ protected: // Shared classes -class DefaultBluetoothGattCharacteristic : LogSetup, public BluetoothGattCharacteristic { +class DefaultBluetoothGattCharacteristic : protected LogSetup, public BluetoothGattCharacteristic { public: DefaultBluetoothGattCharacteristic(BluetoothGattService &service, uint16_t handle, uuid_t uuid, uint8_t properties, uint16_t valueHandle) - : LogSetup("DefaultBluetoothGattCharacteristic"), service(service), handle(handle), uuid(uuid), + : LogSetup("BluetoothGattCharacteristic"), service(service), handle(handle), uuid(uuid), properties(properties), valueHandle(valueHandle) { } @@ -117,14 +117,14 @@ public: characteristics.push_back(characteristic); } - virtual const o<BluetoothGattCharacteristic &> findCharacteristic(uuid_t uuid) const { + virtual const o<const BluetoothGattCharacteristic &> findCharacteristic(uuid_t uuid) const { for (auto c: characteristics) { if (memcmp(c->getUuid().data, uuid.data, 16) == 0) { - return o<BluetoothGattCharacteristic &>(*c); + return o<const BluetoothGattCharacteristic &>(*c); } } - return o<BluetoothGattCharacteristic &>(); + return o<const BluetoothGattCharacteristic &>(); } protected: @@ -187,7 +187,7 @@ protected: }; template<class A> -class DefaultBluetoothDevice : public BluetoothDevice { +class DefaultBluetoothDevice : protected LogSetup, public BluetoothDevice { public: virtual Mac const &getMac() override { @@ -199,7 +199,7 @@ public: } protected: - DefaultBluetoothDevice(A &adapter, Mac &mac) : + DefaultBluetoothDevice(A &adapter, Mac &mac) : LogSetup("BluetoothDevice"), adapter(adapter), mac(mac) { } @@ -233,9 +233,7 @@ protected: Mac &mac; }; -shared_ptr<BluetoothAdapter> getAdapterImpl(int hciDevice); - -void shutdownImpl(); +shared_ptr<BluetoothAdapter> getAdapterImpl(string name); } }; |