From a5eeb92a05673de528a7f9d3fe45b2d7d53ba558 Mon Sep 17 00:00:00 2001 From: Rohit Grover Date: Thu, 28 May 2015 14:48:07 +0100 Subject: [PATCH] allow for DiscoveredCharacteristic::setup() be in the derived class --- public/DiscoveredCharacteristic.h | 24 ++++-------------------- 1 file changed, 4 insertions(+), 20 deletions(-) diff --git a/public/DiscoveredCharacteristic.h b/public/DiscoveredCharacteristic.h index c46eeef..2e39211 100644 --- a/public/DiscoveredCharacteristic.h +++ b/public/DiscoveredCharacteristic.h @@ -82,25 +82,6 @@ public: */ virtual ble_error_t read(uint16_t offset = 0) = 0; -public: - void setup(Properties_t propsIn, - GattAttribute::Handle_t declHandleIn, - GattAttribute::Handle_t valueHandleIn) { - props = propsIn; - declHandle = declHandleIn; - valueHandle = valueHandleIn; - } - - void setup(UUID::ShortUUIDBytes_t uuidIn, - Properties_t propsIn, - GattAttribute::Handle_t declHandleIn, - GattAttribute::Handle_t valueHandleIn) { - uuid = uuidIn; - props = propsIn; - declHandle = declHandleIn; - valueHandle = valueHandleIn; - } - void setupLongUUID(UUID::LongUUIDBytes_t longUUID) { uuid.setupLong(longUUID); } @@ -129,12 +110,15 @@ public: /* empty */ } -private: +protected: UUID uuid; Properties_t props; GattAttribute::Handle_t declHandle; GattAttribute::Handle_t valueHandle; + Gap::Handle_t connHandle; + +public: static ReadCallback_t onDataReadCallback; };