Skip to content

Commit

Permalink
Bluetooth: BAP: Modify unicast client callbacks to slist
Browse files Browse the repository at this point in the history
Modify the BAP unicast client callback structure to be a
linked list. The purpose of this is to have multiple listeners
of the unicast client changes and notifications.
This is needed for the CAP initiatior.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
  • Loading branch information
Thalley committed Sep 25, 2024
1 parent 5448837 commit 742aabb
Show file tree
Hide file tree
Showing 3 changed files with 232 additions and 129 deletions.
7 changes: 6 additions & 1 deletion include/zephyr/bluetooth/audio/bap.h
Original file line number Diff line number Diff line change
Expand Up @@ -1462,6 +1462,11 @@ struct bt_bap_unicast_client_cb {
* If discovery procedure has complete both @p codec and @p ep are set to NULL.
*/
void (*discover)(struct bt_conn *conn, int err, enum bt_audio_dir dir);

/** @cond INTERNAL_HIDDEN */
/** Internally used field for list handling */
sys_snode_t _node;
/** @endcond */
};

/**
Expand All @@ -1474,7 +1479,7 @@ struct bt_bap_unicast_client_cb {
*
* @return 0 in case of success or negative value in case of error.
*/
int bt_bap_unicast_client_register_cb(const struct bt_bap_unicast_client_cb *cb);
int bt_bap_unicast_client_register_cb(struct bt_bap_unicast_client_cb *cb);

/**
* @brief Discover remote capabilities and endpoints
Expand Down
Loading

0 comments on commit 742aabb

Please sign in to comment.