From a76e09808905d280282a81958cb4c68f71f18ca4 Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Sat, 21 Feb 2015 10:37:25 +0100 Subject: o Consistence reference usage. --- ble/BluetoothImpl.h | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'ble/BluetoothImpl.h') diff --git a/ble/BluetoothImpl.h b/ble/BluetoothImpl.h index 7801771..ef9a733 100644 --- a/ble/BluetoothImpl.h +++ b/ble/BluetoothImpl.h @@ -133,7 +133,7 @@ public: } protected: - DefaultBluetoothDevice(A adapter, Mac &mac) : + DefaultBluetoothDevice(A &adapter, Mac &mac) : adapter(adapter), mac(mac) { DF; } @@ -150,13 +150,18 @@ protected: services.clear(); } - A adapter; + A &adapter; Mac &mac; vector services; }; +template class DefaultBluetoothGatt : public BluetoothGatt { public: + virtual _D &getDevice() const { + return device; + } + virtual const vector getServices() const { return services; }; @@ -176,7 +181,7 @@ public: } protected: - DefaultBluetoothGatt() { + DefaultBluetoothGatt(_D &device) : device(device) { DF; } @@ -192,6 +197,7 @@ protected: services.clear(); } + _D &device; vector services; }; -- cgit v1.2.3