aboutsummaryrefslogtreecommitdiff
path: root/ble/BluetoothImpl.h
diff options
context:
space:
mode:
Diffstat (limited to 'ble/BluetoothImpl.h')
-rw-r--r--ble/BluetoothImpl.h12
1 files changed, 9 insertions, 3 deletions
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<BluetoothGattService *> services;
};
+template<class _D>
class DefaultBluetoothGatt : public BluetoothGatt {
public:
+ virtual _D &getDevice() const {
+ return device;
+ }
+
virtual const vector<BluetoothGattService *> 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<BluetoothGattService *> services;
};