minor parameter renames and removal of un-necessary consts

This commit is contained in:
Rohit Grover 2015-03-30 11:42:32 +01:00
parent 1d21e85a06
commit 7e9fc2ae86
2 changed files with 10 additions and 10 deletions

View file

@ -299,13 +299,13 @@ public:
* input: Length in bytes to be read,
* output: Total length of attribute value upon successful return.
*/
ble_error_t readCharacteristicValue(GattAttribute::Handle_t handle, uint8_t *const buffer, uint16_t *const lengthP);
ble_error_t readCharacteristicValue(GattAttribute::Handle_t attributeHandle, uint8_t *buffer, uint16_t *lengthP);
/**
* @param localOnly
* Only update the characteristic locally regardless of notify/indicate flags in the CCCD.
*/
ble_error_t updateCharacteristicValue(GattAttribute::Handle_t handle, const uint8_t *value, uint16_t size, bool localOnly = false);
ble_error_t updateCharacteristicValue(GattAttribute::Handle_t attributeHandle, const uint8_t *value, uint16_t size, bool localOnly = false);
/**
* Yield control to the BLE stack or to other tasks waiting for events. This
@ -653,15 +653,15 @@ BLEDevice::getGapState(void) const
return transport->getGap().getState();
}
inline ble_error_t BLEDevice::readCharacteristicValue(GattAttribute::Handle_t handle, uint8_t *const buffer, uint16_t *const lengthP)
inline ble_error_t BLEDevice::readCharacteristicValue(GattAttribute::Handle_t attributeHandle, uint8_t *buffer, uint16_t *lengthP)
{
return transport->getGattServer().readValue(handle, buffer, lengthP);
return transport->getGattServer().readValue(attributeHandle, buffer, lengthP);
}
inline ble_error_t
BLEDevice::updateCharacteristicValue(GattAttribute::Handle_t handle, const uint8_t *value, uint16_t size, bool localOnly)
BLEDevice::updateCharacteristicValue(GattAttribute::Handle_t attributeHandle, const uint8_t *value, uint16_t size, bool localOnly)
{
return transport->getGattServer().updateValue(handle, const_cast<uint8_t *>(value), size, localOnly);
return transport->getGattServer().updateValue(attributeHandle, const_cast<uint8_t *>(value), size, localOnly);
}
inline void

View file

@ -44,10 +44,10 @@ protected:
friend class BLEDevice;
private:
/* These functions must be defined in the sub-class */
virtual ble_error_t addService(GattService &) = 0;
virtual ble_error_t readValue(GattAttribute::Handle_t handle, uint8_t buffer[], uint16_t *const lengthP) = 0;
virtual ble_error_t updateValue(GattAttribute::Handle_t, uint8_t[], uint16_t, bool localOnly = false) = 0;
virtual ble_error_t initializeGATTDatabase(void) = 0;
virtual ble_error_t addService(GattService &) = 0;
virtual ble_error_t readValue(GattAttribute::Handle_t attributeHandle, uint8_t buffer[], uint16_t *lengthP) = 0;
virtual ble_error_t updateValue(GattAttribute::Handle_t, const 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