Bike service

Fork of BLE_API by Bluetooth Low Energy

Revision:
543:4defb791aa94
Parent:
541:aa30f63e7b3f
Child:
544:840f428d18c7
--- a/public/BLE.h	Fri Jun 19 15:52:09 2015 +0100
+++ b/public/BLE.h	Fri Jun 19 15:52:09 2015 +0100
@@ -1066,7 +1066,18 @@
         gap().onTimeout(timeoutCallback);
     }
 
-    void onConnection(Gap::ConnectionEventCallback_t connectionCallback);
+    /**
+     * Setup a callback for connection events. Refer to Gap::ConnectionEventCallback_t.
+     *
+     * @note: This API is now *deprecated* and will be dropped in the future.
+     * You should use the parallel API from GattServer directly. A former call
+     * to ble.onConnection(callback) should be replaced with
+     * ble.gap().onConnection(callback).
+     */
+    void onConnection(Gap::ConnectionEventCallback_t connectionCallback) {
+        gap().onConnection(connectionCallback);
+    }
+
     /**
      * Used to setup a callback for GAP disconnection.
      */
@@ -1168,12 +1179,6 @@
  * transport.*/
 
 inline void
-BLE::onConnection(Gap::ConnectionEventCallback_t connectionCallback)
-{
-    gap().setOnConnection(connectionCallback);
-}
-
-inline void
 BLE::onDisconnection(Gap::DisconnectionEventCallback_t disconnectionCallback)
 {
     gap().setOnDisconnection(disconnectionCallback);