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 353:5ed63cda3038, committed 2015-05-08
- Comitter:
- rgrover1
- Date:
- Fri May 08 15:35:46 2015 +0100
- Parent:
- 352:79d7cb60ae27
- Child:
- 354:cfe0a8bafaaa
- Commit message:
- Synchronized with git rev 985edbdf
Author: Rohit Grover
add APIs for getLinkSecurity() and purgeAllBondingState()
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:46 2015 +0100
+++ b/public/BLEDevice.h Fri May 08 15:35:46 2015 +0100
@@ -357,6 +357,26 @@
void setOnSecurityContextStored(Gap::HandleSpecificEvent_t callback);
/**
+ * Get the security status of a connection.
+ *
+ * @param[in] connectionHandle Handle to identify the connection.
+ * @param[out] securityStatusP security status.
+ *
+ * @return BLE_SUCCESS Or appropriate error code indicating reason for failure.
+ */
+ ble_error_t getLinkSecurity(Gap::Handle_t connectionHandle, Gap::LinkSecurityStatus_t *securityStatusP);
+
+ /**
+ * Delete all peer device context and all related bonding information from
+ * the database within the security manager.
+ *
+ * @retval BLE_ERROR_NONE On success, else an error code indicating reason for failure.
+ * @retval BLE_ERROR_INVALID_STATE If the API is called without module initialization and/or
+ * application registration.
+ */
+ ble_error_t purgeAllBondingState(void);
+
+ /**
* Add a service declaration to the local server ATT table. Also add the
* characteristics contained within.
*/
@@ -760,6 +780,18 @@
}
inline ble_error_t
+BLEDevice::getLinkSecurity(Gap::Handle_t connectionHandle, Gap::LinkSecurityStatus_t *securityStatusP)
+{
+ return transport->getGap().getLinkSecurity(connectionHandle, securityStatusP);
+}
+
+inline ble_error_t
+BLEDevice::purgeAllBondingState(void)
+{
+ return transport->getGap().purgeAllBondingState();
+}
+
+inline ble_error_t
BLEDevice::addService(GattService &service)
{
return transport->getGattServer().addService(service);
--- a/public/Gap.h Fri May 08 15:35:46 2015 +0100
+++ b/public/Gap.h Fri May 08 15:35:46 2015 +0100
@@ -112,7 +112,7 @@
virtual ble_error_t setPreferredConnectionParams(const ConnectionParams_t *params) = 0;
virtual ble_error_t updateConnectionParams(Handle_t handle, const ConnectionParams_t *params) = 0;
- virtual ble_error_t deleteAllBondedDevices(void) = 0;
+ virtual ble_error_t purgeAllBondingState(void) = 0;
virtual ble_error_t getLinkSecurity(Handle_t connectionHandle, LinkSecurityStatus_t *securityStatusP) = 0;
virtual ble_error_t setDeviceName(const uint8_t *deviceName) = 0;
