add "LE Device Address" 0x1B to advertising data types
Fork of BLE_API by
Diff: ble/GattServer.h
- Revision:
- 734:4872b70437ce
- Parent:
- 733:718a3566b4ce
- Child:
- 740:8d52f0f8efd9
diff -r 718a3566b4ce -r 4872b70437ce ble/GattServer.h --- a/ble/GattServer.h Mon Jul 06 10:10:35 2015 +0100 +++ b/ble/GattServer.h Mon Jul 06 10:10:35 2015 +0100 @@ -52,7 +52,10 @@ * Add a service declaration to the local server ATT table. Also add the * characteristics contained within. */ - virtual ble_error_t addService(GattService &) { + virtual ble_error_t addService(GattService &service) { + /* avoid compiler warnings about unused variables */ + (void)service; + return BLE_ERROR_NOT_IMPLEMENTED; /* Requesting action from porter(s): override this API if this capability is supported. */ } @@ -72,6 +75,11 @@ * @return BLE_ERROR_NONE if a value was read successfully into the buffer. */ virtual ble_error_t read(GattAttribute::Handle_t attributeHandle, uint8_t buffer[], uint16_t *lengthP) { + /* avoid compiler warnings about unused variables */ + (void)attributeHandle; + (void)buffer; + (void)lengthP; + return BLE_ERROR_NOT_IMPLEMENTED; /* Requesting action from porter(s): override this API if this capability is supported. */ } @@ -97,6 +105,12 @@ * attributes (such as the CCCDs). */ virtual ble_error_t read(Gap::Handle_t connectionHandle, GattAttribute::Handle_t attributeHandle, uint8_t *buffer, uint16_t *lengthP) { + /* avoid compiler warnings about unused variables */ + (void)connectionHandle; + (void)attributeHandle; + (void)buffer; + (void)lengthP; + return BLE_ERROR_NOT_IMPLEMENTED; /* Requesting action from porter(s): override this API if this capability is supported. */ } @@ -118,7 +132,13 @@ * * @return BLE_ERROR_NONE if we have successfully set the value of the attribute. */ - virtual ble_error_t write(GattAttribute::Handle_t, const uint8_t *, uint16_t, bool localOnly = false) { + virtual ble_error_t write(GattAttribute::Handle_t attributeHandle, const uint8_t *value, uint16_t size, bool localOnly = false) { + /* avoid compiler warnings about unused variables */ + (void)attributeHandle; + (void)value; + (void)size; + (void)localOnly; + return BLE_ERROR_NOT_IMPLEMENTED; /* Requesting action from porter(s): override this API if this capability is supported. */ } @@ -144,7 +164,14 @@ * * @return BLE_ERROR_NONE if we have successfully set the value of the attribute. */ - virtual ble_error_t write(Gap::Handle_t connectionHandle, GattAttribute::Handle_t, const uint8_t *, uint16_t, bool localOnly = false) { + virtual ble_error_t write(Gap::Handle_t connectionHandle, GattAttribute::Handle_t attributeHandle, const uint8_t *value, uint16_t size, bool localOnly = false) { + /* avoid compiler warnings about unused variables */ + (void)connectionHandle; + (void)attributeHandle; + (void)value; + (void)size; + (void)localOnly; + return BLE_ERROR_NOT_IMPLEMENTED; /* Requesting action from porter(s): override this API if this capability is supported. */ } @@ -159,6 +186,10 @@ * @return BLE_ERROR_NONE if the connection and handle are found. false otherwise. */ virtual ble_error_t areUpdatesEnabled(const GattCharacteristic &characteristic, bool *enabledP) { + /* avoid compiler warnings about unused variables */ + (void)characteristic; + (void)enabledP; + return BLE_ERROR_NOT_IMPLEMENTED; /* Requesting action from porter(s): override this API if this capability is supported. */ } @@ -176,6 +207,11 @@ * @return BLE_ERROR_NONE if the connection and handle are found. false otherwise. */ virtual ble_error_t areUpdatesEnabled(Gap::Handle_t connectionHandle, const GattCharacteristic &characteristic, bool *enabledP) { + /* avoid compiler warnings about unused variables */ + (void)connectionHandle; + (void)characteristic; + (void)enabledP; + return BLE_ERROR_NOT_IMPLEMENTED; /* Requesting action from porter(s): override this API if this capability is supported. */ }