High level Bluetooth Low Energy API and radio abstraction layer

Dependencies:   nRF51822

Dependents:   LinkNode_LIS3DH

Fork of BLE_API by Bluetooth Low Energy

Revision:
546:9fdf3d960d12
Parent:
527:493185cebc03
Child:
567:e4b38e43de7c
--- a/public/GattCharacteristic.h	Fri Jun 19 15:52:09 2015 +0100
+++ b/public/GattCharacteristic.h	Fri Jun 19 15:52:09 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;