Lancaster University's fork of the mbed BLE API. Lives on github, https://github.com/lancaster-university/BLE_API
Dependents: microbit-dal microbit-dal microbit-ble-open microbit-dal ... more
Fork of BLE_API by
Revision 1057:93a9679d655c, committed 2016-01-11
- Comitter:
- vcoubard
- Date:
- Mon Jan 11 08:51:34 2016 +0000
- Parent:
- 1056:ce2fb3d09929
- Child:
- 1058:f6149d00aba8
- Commit message:
- Synchronized with git rev 372e2036
Author: Marcus Chang
Added SecurityManager::setLinkSecurity call for elevating security settings on a particular connection.
Changed in this revision
ble/SecurityManager.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/ble/SecurityManager.h Mon Jan 11 08:51:34 2016 +0000 +++ b/ble/SecurityManager.h Mon Jan 11 08:51:34 2016 +0000 @@ -120,7 +120,7 @@ * @param[in] connectionHandle Handle to identify the connection. * @param[out] securityStatusP Security status. * - * @return BLE_SUCCESS or appropriate error code indicating the failure reason. + * @return BLE_ERROR_NONE or appropriate error code indicating the failure reason. */ virtual ble_error_t getLinkSecurity(Gap::Handle_t connectionHandle, LinkSecurityStatus_t *securityStatusP) { /* Avoid compiler warnings about unused variables. */ @@ -131,6 +131,23 @@ } /** + * Set the security mode on a connection. Useful for elevating the security mode + * once certain conditions are met, e.g., a particular service is found. + * + * @param[in] connectionHandle Handle to identify the connection. + * @param[in] securityMode Requested security mode. + * + * @return BLE_ERROR_NONE or appropriate error code indicating the failure reason. + */ + virtual ble_error_t setLinkSecurity(Gap::Handle_t connectionHandle, SecurityMode_t securityMode) { + /* Avoid compiler warnings about unused variables. */ + (void)connectionHandle; + (void)securityMode; + + return BLE_ERROR_NOT_IMPLEMENTED; + } + + /** * Delete all peer device context and all related bonding information from * the database within the security manager. *