High level Bluetooth Low Energy API and radio abstraction layer

Dependencies:   nRF51822

Dependents:   LinkNode_LIS3DH

Fork of BLE_API by Bluetooth Low Energy

Revision:
695:b1ae3b0a69e8
Parent:
694:02882efc6e88
Child:
697:a14056489984
--- a/public/GattServer.h	Fri Jun 19 15:53:04 2015 +0100
+++ b/public/GattServer.h	Fri Jun 19 15:53:04 2015 +0100
@@ -38,7 +38,7 @@
         dataWrittenCallChain(),
         dataReadCallChain(),
         updatesEnabledCallback(NULL),
-        onUpdatesDisabled(NULL),
+        updatesDisabledCallback(NULL),
         onConfirmationReceived(NULL) {
         /* empty */
     }
@@ -230,9 +230,14 @@
      * Setup a callback for when notifications/indications are enabled for a
      * characteristic on the local GattServer.
      */
-    void onUpdatesEnabled(EventCallback_t callback)          {updatesEnabledCallback = callback;}
+    void onUpdatesEnabled(EventCallback_t callback) {updatesEnabledCallback = callback;}
 
-    void setOnUpdatesDisabled(EventCallback_t callback)      {onUpdatesDisabled      = callback;}
+    /**
+     * Setup a callback for when notifications/indications are disabled for a
+     * characteristic on the local GattServer.
+     */
+    void onUpdatesDisabled(EventCallback_t callback) {updatesDisabledCallback = callback;}
+
     void setOnConfirmationReceived(EventCallback_t callback) {onConfirmationReceived = callback;}
 
 protected:
@@ -256,8 +261,8 @@
                 }
                 break;
             case GattServerEvents::GATT_EVENT_UPDATES_DISABLED:
-                if (onUpdatesDisabled) {
-                    onUpdatesDisabled(charHandle);
+                if (updatesDisabledCallback) {
+                    updatesDisabledCallback(charHandle);
                 }
                 break;
             case GattServerEvents::GATT_EVENT_CONFIRMATION_RECEIVED:
@@ -285,7 +290,7 @@
     CallChainOfFunctionPointersWithContext<const GattWriteCallbackParams *> dataWrittenCallChain;
     CallChainOfFunctionPointersWithContext<const GattReadCallbackParams *>  dataReadCallChain;
     EventCallback_t                                                         updatesEnabledCallback;
-    EventCallback_t                                                         onUpdatesDisabled;
+    EventCallback_t                                                         updatesDisabledCallback;
     EventCallback_t                                                         onConfirmationReceived;
 
 private: