diff options
author | Neil Kolban <kolban1@kolban.com> | 2018-01-17 18:16:31 -0600 |
---|---|---|
committer | Neil Kolban <kolban1@kolban.com> | 2018-01-17 18:16:31 -0600 |
commit | 3f5005c383540d07dd16ac044c78d7be28d4aa8e (patch) | |
tree | c5236ddbe5c8dd99ad7083dd498110152ad0e9be /src/BLECharacteristic.h | |
parent | Removal of unneeded file (diff) | |
download | thermostat-3f5005c383540d07dd16ac044c78d7be28d4aa8e.tar.gz thermostat-3f5005c383540d07dd16ac044c78d7be28d4aa8e.tar.bz2 thermostat-3f5005c383540d07dd16ac044c78d7be28d4aa8e.zip |
0.4.8
Diffstat (limited to 'src/BLECharacteristic.h')
-rw-r--r-- | src/BLECharacteristic.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/BLECharacteristic.h b/src/BLECharacteristic.h index cacf1e5..10dc787 100644 --- a/src/BLECharacteristic.h +++ b/src/BLECharacteristic.h @@ -13,6 +13,7 @@ #include <map> #include "BLEUUID.h" #include <esp_gatts_api.h> +#include <esp_gap_ble_api.h> #include "BLEDescriptor.h" #include "BLEValue.h" #include "FreeRTOS.h" @@ -78,7 +79,7 @@ public: void setWriteNoResponseProperty(bool value); std::string toString(); uint16_t getHandle(); - + void setAccessPermissions(esp_gatt_perm_t perm); static const uint32_t PROPERTY_READ = 1<<0; static const uint32_t PROPERTY_WRITE = 1<<1; @@ -88,6 +89,7 @@ public: static const uint32_t PROPERTY_WRITE_NR = 1<<5; private: + friend class BLEServer; friend class BLEService; friend class BLEDescriptor; @@ -100,6 +102,7 @@ private: BLECharacteristicCallbacks* m_pCallbacks; BLEService* m_pService; BLEValue m_value; + esp_gatt_perm_t m_permissions = ESP_GATT_PERM_READ | ESP_GATT_PERM_WRITE; void handleGATTServerEvent( esp_gatts_cb_event_t event, |