test
Dependents: BLE_PowerBank_HeyFaradey
Fork of BLE_API by
Diff: public/BLE.h
- Revision:
- 550:35b3962903af
- Parent:
- 549:0ade048a19a3
- Child:
- 551:d79a7933a6d1
--- a/public/BLE.h Fri Jun 19 15:52:09 2015 +0100 +++ b/public/BLE.h Fri Jun 19 15:52:10 2015 +0100 @@ -1192,7 +1192,19 @@ ble_error_t onDataRead(void (*callback)(const GattReadCallbackParams *eventDataP)); template <typename T> ble_error_t onDataRead(T * objPtr, void (T::*memberPtr)(const GattReadCallbackParams *context)); - void onUpdatesEnabled(GattServer::EventCallback_t callback); + /** + * Setup a callback for when notifications/indications are enabled for a + * characteristic on the local GattServer. + * + * @note: This API is now *deprecated* and will be dropped in the future. + * You should use the parallel API from GattServer directly. A former call + * to ble.onUpdatesEnabled(...) should be replaced with + * ble.gattServer().onUpdatesEnabled(...). + */ + void onUpdatesEnabled(GattServer::EventCallback_t callback) { + gattServer().onUpdatesEnabled(callback); + } + void onUpdatesDisabled(GattServer::EventCallback_t callback); void onConfirmationReceived(GattServer::EventCallback_t callback); @@ -1299,12 +1311,6 @@ } inline void -BLE::onUpdatesEnabled(GattServer::EventCallback_t callback) -{ - transport->getGattServer().setOnUpdatesEnabled(callback); -} - -inline void BLE::onUpdatesDisabled(GattServer::EventCallback_t callback) { transport->getGattServer().setOnUpdatesDisabled(callback);