shared/gatt-db: Add service added/removed events

System Internals / BlueZ - Arman Uguray [chromium.org] - 3 December 2014 15:15 UTC

This patch adds support to gatt-db for sending events when services are added to and removed from the database:

1. Added the gatt_db_register function which can be used to register service_added and service_removed callbacks.

2. Added the gatt_db_unregister function which can be used to unregister previously added callbacks. This function can be safely called from within a service added/removed callback.

3. The service added/removed callbacks are tied to gatt_db_service_set_active. The added callback is called when a service gets marked as active and vice versa.

4. The service_removed callback will get called if a service is removed from the database.

80cf4af shared/gatt-db: Add service added/removed events
src/shared/gatt-db.c | 168 +++++++++++++++++++++++++++++++++++++++++++++-----
src/shared/gatt-db.h | 39 +++++++-----
2 files changed, 176 insertions(+), 31 deletions(-)

Upstream: git.kernel.org


  • Share