diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2015-02-20 20:45:43 +0100 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2015-02-20 20:45:43 +0100 |
commit | b6f080193d71334e8afea95ae26afbc03c27fac3 (patch) | |
tree | a5abdbb564bc817165ee3803570590520f548170 /Bluetooth.h | |
parent | 71167b3c8fb1ce47feb72b9376b899e40ffd3907 (diff) | |
download | ble-toys-b6f080193d71334e8afea95ae26afbc03c27fac3.tar.gz ble-toys-b6f080193d71334e8afea95ae26afbc03c27fac3.tar.bz2 ble-toys-b6f080193d71334e8afea95ae26afbc03c27fac3.tar.xz ble-toys-b6f080193d71334e8afea95ae26afbc03c27fac3.zip |
o Decoding GATT characteristics.
Diffstat (limited to 'Bluetooth.h')
-rw-r--r-- | Bluetooth.h | 17 |
1 files changed, 12 insertions, 5 deletions
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<BluetoothGattCharacteristic *>::const_iterator getCharacteristics() const = 0; + virtual const vector<BluetoothGattCharacteristic *> getCharacteristics() const = 0; + + virtual void addCharacteristic(BluetoothGattCharacteristic* characteristic) = 0; }; class BluetoothDevice { @@ -119,7 +127,7 @@ public: virtual void discoverServices() = 0; - virtual vector<BluetoothGattService *>::const_iterator getServices() const = 0; + virtual const vector<BluetoothGattService *> 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); |