diff --git a/src/shared/bap.c b/src/shared/bap.c
index fd52db3..c564297 100644
--- a/src/shared/bap.c
+++ b/src/shared/bap.c
return bt_gatt_client_get_att(bap->client);
}
+struct gatt_db *bt_bap_get_db(struct bt_bap *bap, bool remote)
+{
+ if (!bap)
+ return NULL;
+
+ if (remote)
+ return bap->rdb ? bap->rdb->db : NULL;
+
+ return bap->ldb ? bap->ldb->db : NULL;
+}
+
struct bt_bap *bt_bap_ref(struct bt_bap *bap)
{
if (!bap)
diff --git a/src/shared/bap.h b/src/shared/bap.h
index fba8b6b..efeed60 100644
--- a/src/shared/bap.h
+++ b/src/shared/bap.h
struct bt_att *bt_bap_get_att(struct bt_bap *bap);
+struct gatt_db *bt_bap_get_db(struct bt_bap *bap, bool remote);
+
struct bt_bap *bt_bap_ref(struct bt_bap *bap);
void bt_bap_unref(struct bt_bap *bap);