jgh

Dependents:   Migration

Fork of BLE_API by Bluetooth Low Energy

Revision:
838:e2f69ba31b02
Parent:
837:66f14bc44c30
Child:
841:468a5863cacb
diff -r 66f14bc44c30 -r e2f69ba31b02 ble/services/LinkLossService.h
--- a/ble/services/LinkLossService.h	Mon Nov 02 09:09:03 2015 +0000
+++ b/ble/services/LinkLossService.h	Mon Nov 02 09:09:04 2015 +0000
@@ -52,12 +52,11 @@
         GattCharacteristic *charTable[] = {&alertLevelChar};
         GattService         linkLossService(GattService::UUID_LINK_LOSS_SERVICE, charTable, sizeof(charTable) / sizeof(GattCharacteristic *));
 
-        ble.gattServer().addService(linkLossService);
+        ble.addService(linkLossService);
         serviceAdded = true;
 
-        ble.gap().onDisconnection(this, &LinkLossService::onDisconnectionFilter);
-        ble.gattServer().onDataWritten(this, &LinkLossService::onDataWritten);
-
+        ble.addToDisconnectionCallChain(this, &LinkLossService::onDisconnectionFilter);
+        ble.onDataWritten(this, &LinkLossService::onDataWritten);
     }
 
     /**
@@ -87,7 +86,7 @@
         }
     }
 
-    void onDisconnectionFilter(const Gap::DisconnectionCallbackParams_t *params) {
+    void onDisconnectionFilter(void) {
         if (alertLevel != NO_ALERT) {
             callback(alertLevel);
         }