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
Revision 362:3b1ff00ad8a4, committed 2015-05-08
- Comitter:
- rgrover1
- Date:
- Fri May 08 15:35:47 2015 +0100
- Parent:
- 361:9686f5c882fa
- Child:
- 363:a3d59a6e5da0
- Commit message:
- Synchronized with git rev 9cdae962
Author: Rohit Grover
add LinkSecuredCallback_t
Changed in this revision
| public/BLEDevice.h | Show annotated file Show diff for this revision Revisions of this file |
| public/Gap.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/public/BLEDevice.h Fri May 08 15:35:47 2015 +0100
+++ b/public/BLEDevice.h Fri May 08 15:35:47 2015 +0100
@@ -348,7 +348,7 @@
* occur unless the bonding information is either lost or deleted on either
* or both sides.
*/
- void onLinkSecured(Gap::HandleSpecificEvent_t callback);
+ void onLinkSecured(Gap::LinkSecuredCallback_t callback);
/**
* Setup a callback for bonding; i.e. that link-specific security context
@@ -780,7 +780,7 @@
}
inline void
-BLEDevice::onLinkSecured(Gap::HandleSpecificEvent_t callback)
+BLEDevice::onLinkSecured(Gap::LinkSecuredCallback_t callback)
{
transport->getGap().setOnLinkSecured(callback);
}
--- 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;
