abc
Fork of BLE_API by
Diff: public/BLEDevice.h
- Revision:
- 353:5ed63cda3038
- Parent:
- 349:b8b2b3973c47
- Child:
- 356:261c251c6936
--- 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);