1 /*
2  * SPDX-FileCopyrightText: 2015-2022 Espressif Systems (Shanghai) CO LTD
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  */
6 
7 #ifndef __BTC_SDP_H__
8 #define __BTC_SDP_H__
9 
10 #include "btc/btc_task.h"
11 #include "esp_bt_defs.h"
12 #include "common/bt_target.h"
13 #include "bta/bta_sdp_api.h"
14 #include "bt_sdp.h"
15 
16 #if (defined BTC_SDP_INCLUDED && BTC_SDP_INCLUDED == TRUE)
17 
18 typedef enum {
19     BTC_SDP_ACT_INIT = 0,
20     BTC_SDP_ACT_DEINIT,
21     BTC_SDP_ACT_SEARCH,
22     BTC_SDP_ACT_CREATE_RECORD,
23     BTC_SDP_ACT_REMOVE_RECORD,
24 } btc_sdp_act_t;
25 
26 /* btc_sdp_args_t */
27 typedef union {
28     //BTC_SDP_ACT_SEARCH
29     struct search_record_arg {
30         BD_ADDR bd_addr;
31         tSDP_UUID sdp_uuid;
32     } search;
33 
34     //BTC_SDP_ACT_CREATE_RECORD
35     struct creat_record_arg {
36         bluetooth_sdp_record *record;
37     } creat_record;
38 
39     //BTC_SDP_ACT_REMOVE_RECORD
40     struct remove_record_arg {
41         int record_handle;
42     } remove_record;
43 
44 } btc_sdp_args_t;
45 
46 void btc_sdp_arg_deep_copy(btc_msg_t *msg, void *p_dest, void *p_src);
47 void btc_sdp_arg_deep_free(btc_msg_t *msg);
48 
49 void btc_sdp_call_handler(btc_msg_t *msg);
50 void btc_sdp_cb_handler(btc_msg_t *msg);
51 
52 #endif ///defined BTC_SDP_INCLUDED && BTC_SDP_INCLUDED == TRUE
53 #endif ///__BTC_SDP_H__
54