From b6f080193d71334e8afea95ae26afbc03c27fac3 Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Fri, 20 Feb 2015 20:45:43 +0100 Subject: o Decoding GATT characteristics. --- Bluetooth.h | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'Bluetooth.h') diff --git a/Bluetooth.h b/Bluetooth.h index e840f37..4314d8e 100644 --- a/Bluetooth.h +++ b/Bluetooth.h @@ -84,7 +84,13 @@ public: virtual BluetoothGattService &getService() const = 0; + virtual uint16_t getHandle() const = 0; + virtual const boost::uuids::uuid getUuid() const = 0; + + virtual uint8_t getProperties() const = 0; + + virtual uint16_t getValueHandle() const = 0; }; class BluetoothGattService { @@ -100,7 +106,9 @@ public: virtual uint16_t getEndGroupHandle() const = 0; - virtual vector::const_iterator getCharacteristics() const = 0; + virtual const vector getCharacteristics() const = 0; + + virtual void addCharacteristic(BluetoothGattCharacteristic* characteristic) = 0; }; class BluetoothDevice { @@ -119,7 +127,7 @@ public: virtual void discoverServices() = 0; - virtual vector::const_iterator getServices() const = 0; + virtual const vector getServices() const = 0; }; class BluetoothAdapter { @@ -179,11 +187,10 @@ public: static AttributeData fromByteBuffer(ByteBuffer &value); const uint16_t handle; - const uint16_t endGroupHandle; - const ByteBuffer value; + ByteBuffer value; private: - AttributeData(uint16_t handle, uint16_t groupEndHandle, ByteBuffer value); + AttributeData(uint16_t handle, ByteBuffer value); }; BluetoothAdapter &getAdapter(int hciDevice); -- cgit v1.2.3