fork BLE_API to add update adv payload API
Fork of BLE_API by
Revision 724:80e065731d70, committed 2015-07-02
- Comitter:
- rgrover1
- Date:
- Thu Jul 02 09:06:12 2015 +0100
- Parent:
- 723:71507679c9b2
- Child:
- 725:f4a355b35cf8
- Commit message:
- Synchronized with git rev 9a0be477
Author: Rohit Grover
Introduce GattServer API to determine notification status for a characteristic.
follow up from https://github.com/mbedmicro/BLE_API/pull/41.
@jeremybrodt did a lovely job submitting that pull request, but there had been too many changes in the neighbouring code recently to merge his work directly. I didn't take the trouble of preseving his submission in the history; my apologies--credit for this API goes entirely to him.
Changed in this revision
ble/GattServer.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/ble/GattServer.h Thu Jul 02 09:06:12 2015 +0100 +++ b/ble/GattServer.h Thu Jul 02 09:06:12 2015 +0100 @@ -149,6 +149,37 @@ } /** + * Determine the updates-enabled status (notification/indication) for the current connection from a characteristic's CCCD. + * + * @param characteristic + * The characteristic + * @param[out] enabledP + * Upon return, *enabledP is true if updates are enabled, else false. + * + * @return BLE_ERROR_NONE if the connection and handle are found. false otherwise. + */ + virtual ble_error_t areUpdatesEnabled(const GattCharacteristic &characteristic, bool *enabledP) { + return BLE_ERROR_NOT_IMPLEMENTED; /* default implementation; override this API if this capability is supported. */ + } + + /** + * Determine the connection-specific updates-enabled status (notification/indication) from a characteristic's CCCD. + * + * @param connectionHandle + * The connection handle + * @param[out] enabledP + * Upon return, *enabledP is true if updates are enabled, else false. + * + * @param characteristic + * The characteristic + * + * @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) { + return BLE_ERROR_NOT_IMPLEMENTED; /* default implementation; override this API if this capability is supported. */ + } + + /** * A virtual function to allow underlying stacks to indicate if they support * onDataRead(). It should be overridden to return true as applicable. */