Commit: d3c9f0e9b008cb2458cea86ff7aa07530a673a82
Parent: 1731729841700d7de9fb7053544bd319336bc850
Author: Arman Uguray <armansito@chromium.org>
Committer: Marcel Holtmann <marcel@holtmann.org>
Date: 2014-09-11 03:57:34
Tree: 33dbaf07a40eb70d0f1b160d6ae40159f72c1064

shared/gatt-client: Introduce struct bt_gatt_characteristic_iter. shared/gatt-client currently defines a service iterator which returns service data in a copy. The user then accesses the service's characteristics by manually going through an array of bt_gatt_characteristic_t. This patch changes this by restricting access to individual characteristic entries via a new characteristic iterator. This is done so that gatt-client code can internally store private data on each characteristic (e.g. reference count for notification sessions) which shouldn't be exposed to external code. The code also changes the service iterator functions to return a pointer to an internally stored bt_gatt_service_t structure rather than returning its contents in a copy.

Diffstat

M src/shared/gatt-client.c | 59 ++++++++++++++++++++++++++++++++++++++++- - - - - - - - - - - - - -
M src/shared/gatt-client.h | 32 ++++++++++++++++++++- - - - - - - - - - - -
M tools/btgatt-client.c | 31 ++++++++++++++++++- - - - - - - - - - - - -

3 files changed, 83 insertions(+), 39 deletions(-)

View Full Diff | Patch