Minor temporary patch to allow DFU packet callback

Fork of BLE_API by Bluetooth Low Energy

Revision:
358:6a3536a141f3
Parent:
357:d4bb5d2b837a
Child:
359:611485c370f5
--- a/public/Gap.h	Fri May 08 15:35:47 2015 +0100
+++ b/public/Gap.h	Fri May 08 15:35:47 2015 +0100
@@ -111,6 +111,7 @@
     typedef void (*HandleSpecificEvent_t)(Handle_t handle);
     typedef void (*DisconnectionEventCallback_t)(Handle_t, DisconnectionReason_t);
     typedef void (*RadioNotificationEventCallback_t) (bool radio_active); /* gets passed true for ACTIVE; false for INACTIVE. */
+    typedef void (*SecurityProcedureInitiatedCallback_t)(Handle_t, bool allowBonding, bool requireMITM, SecurityIOCapabilities_t iocaps);
 
     friend class BLEDevice;
 private:
@@ -158,7 +159,7 @@
     /**
      * To indicate that security procedure for link has started.
      */
-    virtual void setOnSecuritySetupStarted(HandleSpecificEvent_t callback) {onSecuritySetupStarted = callback;}
+    virtual void setonSecurityProcedureInitiated(SecurityProcedureInitiatedCallback_t callback) {onSecurityProcedureInitiated = callback;}
 
     /**
      * To indicate that security procedure for link has completed.
@@ -205,7 +206,7 @@
         onConnection(NULL),
         onDisconnection(NULL),
         onRadioNotification(),
-        onSecuritySetupStarted(),
+        onSecurityProcedureInitiated(),
         onSecuritySetupCompleted(),
         onLinkSecured(),
         onSecurityContextStored(),
@@ -229,9 +230,9 @@
         disconnectionCallChain.call();
     }
 
-    void processSecuritySetupStartedEvent(Handle_t handle) {
-        if (onSecuritySetupStarted) {
-            onSecuritySetupStarted(handle);
+    void processSecurityProcedureInitiatedEvent(Handle_t handle, bool allowBonding, bool requireMITM, SecurityIOCapabilities_t iocaps) {
+        if (onSecurityProcedureInitiated) {
+            onSecurityProcedureInitiated(handle, allowBonding, requireMITM, iocaps);
         }
     }
 
@@ -267,18 +268,18 @@
     }
 
 protected:
-    GapState_t                   state;
+    GapState_t                           state;
 
 protected:
-    EventCallback_t              onTimeout;
-    ConnectionEventCallback_t    onConnection;
-    DisconnectionEventCallback_t onDisconnection;
-    RadioNotificationEventCallback_t onRadioNotification;
-    HandleSpecificEvent_t        onSecuritySetupStarted;
-    HandleSpecificEvent_t        onSecuritySetupCompleted;
-    HandleSpecificEvent_t        onLinkSecured;
-    HandleSpecificEvent_t        onSecurityContextStored;
-    CallChain                    disconnectionCallChain;
+    EventCallback_t                      onTimeout;
+    ConnectionEventCallback_t            onConnection;
+    DisconnectionEventCallback_t         onDisconnection;
+    RadioNotificationEventCallback_t     onRadioNotification;
+    SecurityProcedureInitiatedCallback_t onSecurityProcedureInitiated;
+    HandleSpecificEvent_t                onSecuritySetupCompleted;
+    HandleSpecificEvent_t                onLinkSecured;
+    HandleSpecificEvent_t                onSecurityContextStored;
+    CallChain                            disconnectionCallChain;
 
 private:
     /* disallow copy and assignment */