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: BLE_ANCS_SDAPI BLE_temperature BLE_HeartRate BLE_ANCS_SDAPI_IRC ... more
Diff: public/GattServer.h
- Revision:
- 139:baaf1c5f0db2
- Parent:
- 135:6cf6e7bd21c9
- Child:
- 140:407d134c179d
diff -r 3e9f06fd4259 -r baaf1c5f0db2 public/GattServer.h
--- a/public/GattServer.h Fri Nov 21 09:23:23 2014 +0000
+++ b/public/GattServer.h Fri Nov 21 09:23:24 2014 +0000
@@ -17,6 +17,7 @@
#ifndef __GATT_SERVER_H__
#define __GATT_SERVER_H__
+#include "blecommon.h"
#include "GattService.h"
#include "GattServerEvents.h"
#include "GattCharacteristicWriteCBParams.h"
@@ -36,7 +37,6 @@
virtual ble_error_t addService(GattService &) = 0;
virtual ble_error_t readValue(uint16_t handle, uint8_t buffer[], uint16_t *const lengthP) = 0;
virtual ble_error_t updateValue(uint16_t, uint8_t[], uint16_t, bool localOnly = false) = 0;
- virtual ble_error_t initializeGATTDatabase(void) = 0;
// ToDo: For updateValue, check the CCCD to see if the value we are
// updating has the notify or indicate bits sent, and if BOTH are set
@@ -67,12 +67,6 @@
onConfirmationReceived = callback;
}
-protected:
- GattServer() : serviceCount(0), characteristicCount(0), onDataSent(NULL), onDataWritten(), onUpdatesEnabled(NULL), onUpdatesDisabled(NULL), onConfirmationReceived(NULL) {
- /* empty */
- }
-
-protected:
void handleDataWrittenEvent(const GattCharacteristicWriteCBParams *params) {
if (onDataWritten.hasCallbacksAttached()) {
onDataWritten.call(params);
@@ -106,8 +100,14 @@
}
protected:
+ GattServer() : serviceCount(0), characteristicCount(0), onDataSent(NULL), onDataWritten(), onUpdatesEnabled(NULL), onUpdatesDisabled(NULL), onConfirmationReceived(NULL) {
+ /* empty */
+ }
+
+protected:
uint8_t serviceCount;
uint8_t characteristicCount;
+ uint8_t descriptorCount;
private:
ServerEventCallbackWithCount_t onDataSent;