just a fork
Fork of BLE_API by
Diff: ble/DiscoveredCharacteristic.h
- Revision:
- 1046:87a2ebe45470
- Parent:
- 1045:b9d15970040f
- Child:
- 1047:2d66d38d9ac9
--- a/ble/DiscoveredCharacteristic.h Mon Jan 11 08:51:26 2016 +0000 +++ b/ble/DiscoveredCharacteristic.h Mon Jan 11 08:51:27 2016 +0000 @@ -154,6 +154,10 @@ return lastHandle; } + void setLastHandle(GattAttribute::Handle_t last) { + lastHandle = last; + } + GattClient* getGattClient() { return gattc; } @@ -167,22 +171,27 @@ } friend bool operator==(const DiscoveredCharacteristic& rhs, const DiscoveredCharacteristic& lhs) { - return rhs.gattc == rhs.gattc && + return rhs.gattc == lhs.gattc && rhs.uuid == lhs.uuid && - rhs.props == rhs.props && + rhs.props == lhs.props && rhs.declHandle == lhs.declHandle && rhs.valueHandle == lhs.valueHandle && rhs.lastHandle == lhs.lastHandle && rhs.connHandle == lhs.connHandle; } + friend bool operator !=(const DiscoveredCharacteristic& rhs, const DiscoveredCharacteristic& lhs) { + return !(rhs == lhs); + } + public: DiscoveredCharacteristic() : gattc(NULL), uuid(UUID::ShortUUIDBytes_t(0)), props(), declHandle(GattAttribute::INVALID_HANDLE), valueHandle(GattAttribute::INVALID_HANDLE), - lastHandle(GattAttribute::INVALID_HANDLE) { + lastHandle(GattAttribute::INVALID_HANDLE), + connHandle() { /* empty */ }