High level Bluetooth Low Energy API and radio abstraction layer

Dependencies:   nRF51822

Dependents:   LinkNode_LIS3DH

Fork of BLE_API by Bluetooth Low Energy

Revision:
697:a14056489984
Parent:
695:b1ae3b0a69e8
Child:
698:8d34aa7f78ea
--- a/public/GattServer.h	Fri Jun 19 15:53:04 2015 +0100
+++ b/public/GattServer.h	Fri Jun 19 15:53:05 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 */