Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of nRF51822 by
Diff: source/nRF5xGattClient.h
- Revision:
- 548:920e941cbe1e
- Parent:
- 547:8550af084edc
- Child:
- 549:3f782c64d014
--- a/source/nRF5xGattClient.h Mon Jan 11 10:19:05 2016 +0000 +++ b/source/nRF5xGattClient.h Mon Jan 11 10:19:06 2016 +0000 @@ -88,14 +88,14 @@ const UUID &matchingCharacteristicUUIDIn = UUID::ShortUUIDBytes_t(BLE_UUID_UNKNOWN)); virtual void onServiceDiscoveryTermination(ServiceDiscovery::TerminationCallback_t callback) { - discovery.onTermination(callback); + _discovery.onTermination(callback); } /** * Is service-discovery currently active? */ virtual bool isServiceDiscoveryActive(void) const { - return discovery.isActive(); + return _discovery.isActive(); } /** @@ -103,7 +103,7 @@ * invocation of the TerminationCallback if service-discovery is active. */ virtual void terminateServiceDiscovery(void) { - discovery.terminate(); + _discovery.terminate(); } /** @@ -171,19 +171,25 @@ } public: - nRF5xGattClient() : discovery(this) { + nRF5xGattClient() : _discovery(this) { /* empty */ } - friend void bleGattcEventHandler(const ble_evt_t *p_ble_evt); + nRF5xServiceDiscovery& discovery() { + return _discovery; + } + + nRF5xCharacteristicDescriptorDiscoverer& characteristicDescriptorDiscoverer() { + return _characteristicDescriptorDiscoverer; + } private: nRF5xGattClient(const nRF5xGattClient &); const nRF5xGattClient& operator=(const nRF5xGattClient &); private: - nRF5xServiceDiscovery discovery; - nRF5xCharacteristicDescriptorDiscoverer characteristicDescriptorDiscoverer; + nRF5xServiceDiscovery _discovery; + nRF5xCharacteristicDescriptorDiscoverer _characteristicDescriptorDiscoverer; #endif // if !S110 };