Lightly modified version of the BLE stack, that doesn't bring up a DFUService by default... as we have our own.

Fork of BLE_API by Bluetooth Low Energy

Revision:
244:aa639ef2f290
Parent:
230:2c414d3240a8
Child:
257:7a50601356cc
diff -r 98f930d14515 -r aa639ef2f290 public/BLEDevice.h
--- a/public/BLEDevice.h	Tue Dec 09 13:15:19 2014 +0000
+++ b/public/BLEDevice.h	Thu Dec 11 11:52:32 2014 +0000
@@ -216,6 +216,14 @@
     void onDisconnection(Gap::DisconnectionEventCallback_t disconnectionCallback);
 
     /**
+     * Append to a chain of callbacks to be invoked upon disconnection; these
+     * callbacks receive no context and are therefore different from the
+     * onDisconnection callback.
+     */
+    template<typename T>
+    void addToDisconnectionCallChain(T *tptr, void (T::*mptr)(void));
+
+    /**
      * Setup a callback for the GATT event DATA_SENT.
      */
     void onDataSent(GattServer::ServerEventCallbackWithCount_t callback);
@@ -510,6 +518,12 @@
     transport->getGap().setOnDisconnection(disconnectionCallback);
 }
 
+template<typename T>
+inline void
+BLEDevice::addToDisconnectionCallChain(T *tptr, void (T::*mptr)(void)) {
+    transport->getGap().addToDisconnectionCallChain(tptr, mptr);
+}
+
 inline void
 BLEDevice::onDataSent(GattServer::ServerEventCallbackWithCount_t callback)
 {