Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of BLE_API by
Diff: public/Gap.h
- Revision:
- 362:3b1ff00ad8a4
- Parent:
- 361:9686f5c882fa
- Child:
- 363:a3d59a6e5da0
--- a/public/Gap.h Fri May 08 15:35:47 2015 +0100
+++ b/public/Gap.h Fri May 08 15:35:47 2015 +0100
@@ -138,6 +138,7 @@
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);
typedef void (*SecurityProcedureCompletedCallback_t)(Handle_t, SecurityCompletionStatus_t status);
+ typedef void (*LinkSecuredCallback_t)(Handle_t handle, SecurityMode_t securityMode);
friend class BLEDevice;
private:
@@ -198,7 +199,7 @@
* when the link is secured and setup procedures will not occur unless the
* bonding information is either lost or deleted on either or both sides.
*/
- virtual void setOnLinkSecured(HandleSpecificEvent_t callback) {onLinkSecured = callback;}
+ virtual void setOnLinkSecured(LinkSecuredCallback_t callback) {onLinkSecured = callback;}
/**
* To indicate that device context is stored persistently.
@@ -268,9 +269,9 @@
}
}
- void processLinkSecuredEvent(Handle_t handle) {
+ void processLinkSecuredEvent(Handle_t handle, SecurityMode_t securityMode) {
if (onLinkSecured) {
- onLinkSecured(handle);
+ onLinkSecured(handle, securityMode);
}
}
@@ -303,7 +304,7 @@
RadioNotificationEventCallback_t onRadioNotification;
SecurityProcedureInitiatedCallback_t onSecurityProcedureInitiated;
SecurityProcedureCompletedCallback_t onSecurityProcedureCompleted;
- HandleSpecificEvent_t onLinkSecured;
+ LinkSecuredCallback_t onLinkSecured;
HandleSpecificEvent_t onSecurityContextStored;
CallChain disconnectionCallChain;
