diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2015-02-21 10:37:25 +0100 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2015-02-21 10:37:25 +0100 |
commit | a76e09808905d280282a81958cb4c68f71f18ca4 (patch) | |
tree | 52719f5d59bbdeee52188c9094850c80e24eaa67 /ble/LinuxBluetooth.cpp | |
parent | 7c9f266cdb37e215279208198dfe009dc66c5daa (diff) | |
download | ble-toys-a76e09808905d280282a81958cb4c68f71f18ca4.tar.gz ble-toys-a76e09808905d280282a81958cb4c68f71f18ca4.tar.bz2 ble-toys-a76e09808905d280282a81958cb4c68f71f18ca4.tar.xz ble-toys-a76e09808905d280282a81958cb4c68f71f18ca4.zip |
o Consistence reference usage.
Diffstat (limited to 'ble/LinuxBluetooth.cpp')
-rw-r--r-- | ble/LinuxBluetooth.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/ble/LinuxBluetooth.cpp b/ble/LinuxBluetooth.cpp index a5d092b..d62bf23 100644 --- a/ble/LinuxBluetooth.cpp +++ b/ble/LinuxBluetooth.cpp @@ -55,21 +55,21 @@ private: class LinuxBluetoothDevice : public DefaultBluetoothDevice<LinuxBluetoothAdapter> { public: LinuxBluetoothDevice(LinuxBluetoothAdapter &adapter, Mac &mac); + ~LinuxBluetoothDevice(); BluetoothGatt &connectGatt() override; private: - LinuxBluetoothGatt* gatt; + LinuxBluetoothGatt *gatt; int l2cap; }; -class LinuxBluetoothGatt : public DefaultBluetoothGatt { +class LinuxBluetoothGatt : public DefaultBluetoothGatt<LinuxBluetoothDevice> { public: LinuxBluetoothGatt(LinuxBluetoothDevice &device, int l2cap); - ~LinuxBluetoothGatt(); -// LinuxBluetoothDevice &getDevice() override; + ~LinuxBluetoothGatt(); void connect() override; @@ -84,7 +84,6 @@ private: ByteBuffer writeAndRead(ByteBuffer &out, shared_ptr<uint8_t> buffer, size_t size); - LinuxBluetoothDevice &device; int l2cap; }; @@ -131,7 +130,7 @@ BluetoothGatt &LinuxBluetoothDevice::connectGatt() { // ----------------------------------------------------------------------- LinuxBluetoothGatt::LinuxBluetoothGatt(LinuxBluetoothDevice &device, int l2cap) : - device(device), l2cap(l2cap) { + DefaultBluetoothGatt(device), l2cap(l2cap) { } LinuxBluetoothGatt::~LinuxBluetoothGatt() { |