Bluetooth: HFP_AG: Update SDP discovery

Add set the parameter `type` to value
`BT_SDP_DISCOVER_SERVICE_SEARCH_ATTR`.

Update the SDP discovery callback function by adding a third parameter
`const struct bt_sdp_discover_params *params`. Make it align with
`bt_sdp_discover_func_t`.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
This commit is contained in:
Lyle Zhu 2024-09-11 10:51:13 +08:00 committed by Benjamin Cabé
parent d37402f447
commit 2b27b1cdd7

View file

@ -111,7 +111,8 @@ static struct bt_hfp_ag_cb ag_cb = {
.terminate = ag_terminate, .terminate = ag_terminate,
}; };
static uint8_t sdp_discover_cb(struct bt_conn *conn, struct bt_sdp_client_result *result) static uint8_t sdp_discover_cb(struct bt_conn *conn, struct bt_sdp_client_result *result,
const struct bt_sdp_discover_params *params)
{ {
int err; int err;
uint16_t value; uint16_t value;
@ -136,6 +137,7 @@ static uint8_t sdp_discover_cb(struct bt_conn *conn, struct bt_sdp_client_result
} }
static struct bt_sdp_discover_params sdp_discover = { static struct bt_sdp_discover_params sdp_discover = {
.type = BT_SDP_DISCOVER_SERVICE_SEARCH_ATTR,
.func = sdp_discover_cb, .func = sdp_discover_cb,
.pool = &sdp_discover_pool, .pool = &sdp_discover_pool,
.uuid = BT_UUID_DECLARE_16(BT_SDP_HANDSFREE_SVCLASS), .uuid = BT_UUID_DECLARE_16(BT_SDP_HANDSFREE_SVCLASS),