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.
Dependents: microbit-dal microbit-dal microbit-ble-open microbit-dal ... more
Fork of BLE_API by
Diff: public/GattCharacteristic.h
- Revision:
- 689:08b9c561c62f
- Parent:
- 670:5e4aecd9af5b
- Child:
- 710:b2e1a2660ec2
--- a/public/GattCharacteristic.h Fri Jun 19 15:53:03 2015 +0100
+++ b/public/GattCharacteristic.h Fri Jun 19 15:53:04 2015 +0100
@@ -18,6 +18,7 @@
#define __GATT_CHARACTERISTIC_H__
#include "Gap.h"
+#include "SecurityManager.h"
#include "GattAttribute.h"
#include "GattCallbackParamTypes.h"
#include "FunctionPointerWithContext.h"
@@ -331,7 +332,7 @@
unsigned numDescriptors = 0) :
_valueAttribute(uuid, valuePtr, initialLen, maxLen),
_properties(props),
- _requiredSecurity(Gap::SECURITY_MODE_ENCRYPTION_OPEN_LINK),
+ _requiredSecurity(SecurityManager::SECURITY_MODE_ENCRYPTION_OPEN_LINK),
_descriptors(descriptors),
_descriptorCount(numDescriptors),
enabledReadAuthorization(false),
@@ -347,7 +348,7 @@
*
* @param securityMode Can be one of encryption or signing, with or without protection for MITM (man in the middle attacks).
*/
- void requireSecurity(Gap::SecurityMode_t securityMode) {
+ void requireSecurity(SecurityManager::SecurityMode_t securityMode) {
_requiredSecurity = securityMode;
}
@@ -422,7 +423,7 @@
const GattAttribute& getValueAttribute() const {return _valueAttribute; }
GattAttribute::Handle_t getValueHandle(void) const {return getValueAttribute().getHandle();}
uint8_t getProperties(void) const {return _properties; }
- Gap::SecurityMode_t getRequiredSecurity() const {return _requiredSecurity; }
+ SecurityManager::SecurityMode_t getRequiredSecurity() const {return _requiredSecurity; }
uint8_t getDescriptorCount(void) const {return _descriptorCount; }
bool isReadAuthorizationEnabled() const {return enabledReadAuthorization; }
bool isWriteAuthorizationEnabled() const {return enabledWriteAuthorization; }
@@ -436,11 +437,11 @@
}
private:
- GattAttribute _valueAttribute;
- uint8_t _properties;
- Gap::SecurityMode_t _requiredSecurity;
- GattAttribute **_descriptors;
- uint8_t _descriptorCount;
+ GattAttribute _valueAttribute;
+ uint8_t _properties;
+ SecurityManager::SecurityMode_t _requiredSecurity;
+ GattAttribute **_descriptors;
+ uint8_t _descriptorCount;
bool enabledReadAuthorization;
bool enabledWriteAuthorization;
