Minor temporary patch to allow DFU packet callback

Fork of BLE_API by Bluetooth Low Energy

Revision:
369:9a76cc068644
Parent:
368:89726b616c1b
Child:
370:678fdba95a62
--- a/public/BLEDevice.h	Fri May 08 15:35:48 2015 +0100
+++ b/public/BLEDevice.h	Fri May 08 15:35:48 2015 +0100
@@ -509,6 +509,15 @@
     void onSecurityContextStored(Gap::HandleSpecificEvent_t callback);
 
     /**
+     * Setup a callback for when the passkey needs to be displayed on a
+     * peripheral with DISPLAY capability. This happens when security is
+     * configured to prevent Man-In-The-Middle attacks, and a PIN (or passkey)
+     * needs to be exchanged between the peers to authenticate the connection
+     * attempt.
+     */
+    void onPasskeyDisplay(Gap::PasskeyDisplayCallback_t callback);
+
+    /**
      * Get the security status of a connection.
      *
      * @param[in]  connectionHandle   Handle to identify the connection.
@@ -918,4 +927,10 @@
     return transport->initializeSecurity(enableBonding, requireMITM, iocaps, passkey);
 }
 
+inline void
+BLEDevice::onPasskeyDisplay(Gap::PasskeyDisplayCallback_t callback)
+{
+    return transport->getGap().setOnPasskeyDisplay(callback);
+}
+
 #endif // ifndef __BLE_DEVICE__
\ No newline at end of file