diff options
Diffstat (limited to 'src/BLERemoteService.h')
-rw-r--r-- | src/BLERemoteService.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/BLERemoteService.h b/src/BLERemoteService.h index 2007fa2..521effc 100644 --- a/src/BLERemoteService.h +++ b/src/BLERemoteService.h @@ -32,7 +32,9 @@ public: // Public methods BLERemoteCharacteristic* getCharacteristic(const char* uuid); BLERemoteCharacteristic* getCharacteristic(BLEUUID uuid); - std::map<std::string, BLERemoteCharacteristic*>* getCharacteristics(); + BLERemoteCharacteristic* getCharacteristic(uint16_t uuid); + std::map<BLERemoteCharacteristic*, std::string>* getCharacteristics(); + void getCharacteristics(std::map<uint16_t, BLERemoteCharacteristic*>* ptr); BLEClient* getClient(void); uint16_t getHandle(); @@ -61,7 +63,9 @@ private: // Properties // We maintain a map of characteristics owned by this service keyed by a string representation of the UUID. - std::map<std::string, BLERemoteCharacteristic *> m_characteristicMap; + std::map<BLERemoteCharacteristic *, std::string> m_characteristicMap; + // We maintain a map of characteristics owned by this service keyed by a handle. + std::map<uint16_t, BLERemoteCharacteristic *> m_characteristicMapByHandle; bool m_haveCharacteristics; // Have we previously obtained the characteristics. BLEClient* m_pClient; |