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.
Dependents: BLE_ANCS_SDAPI BLE_temperature BLE_HeartRate BLE_ANCS_SDAPI_IRC ... more
Diff: public/GattServer.h
- Revision:
- 554:59e95a0efa37
- Parent:
- 552:9bf985a8a49b
- Child:
- 555:d31907908234
--- a/public/GattServer.h Fri Jun 19 15:52:10 2015 +0100 +++ b/public/GattServer.h Fri Jun 19 15:52:10 2015 +0100 @@ -39,7 +39,7 @@ dataReadCallChain(), updatesEnabledCallback(NULL), updatesDisabledCallback(NULL), - onConfirmationReceived(NULL) { + confirmationReceivedCallback(NULL) { /* empty */ } @@ -238,7 +238,11 @@ */ void onUpdatesDisabled(EventCallback_t callback) {updatesDisabledCallback = callback;} - void setOnConfirmationReceived(EventCallback_t callback) {onConfirmationReceived = callback;} + /** + * Setup a callback for when the GATT server receives a response for an + * indication event sent previously. + */ + void onConfirmationReceived(EventCallback_t callback) {confirmationReceivedCallback = callback;} protected: void handleDataWrittenEvent(const GattWriteCallbackParams *params) { @@ -266,8 +270,8 @@ } break; case GattServerEvents::GATT_EVENT_CONFIRMATION_RECEIVED: - if (onConfirmationReceived) { - onConfirmationReceived(charHandle); + if (confirmationReceivedCallback) { + confirmationReceivedCallback(charHandle); } break; default: @@ -291,7 +295,7 @@ CallChainOfFunctionPointersWithContext<const GattReadCallbackParams *> dataReadCallChain; EventCallback_t updatesEnabledCallback; EventCallback_t updatesDisabledCallback; - EventCallback_t onConfirmationReceived; + EventCallback_t confirmationReceivedCallback; private: /* disallow copy and assignment */