* Returns void
*
******************************************************************************/
-void bta_sdp_create_record(tBTA_SDP_API_RECORD_USER* p_data) {
+void bta_sdp_create_record(void* user_data) {
if (bta_sdp_cb.p_dm_cback)
- bta_sdp_cb.p_dm_cback(BTA_SDP_CREATE_RECORD_USER_EVT, NULL,
- p_data->user_data);
- osi_free(p_data);
+ bta_sdp_cb.p_dm_cback(BTA_SDP_CREATE_RECORD_USER_EVT, NULL, user_data);
}
/*******************************************************************************
* Returns void
*
******************************************************************************/
-void bta_sdp_remove_record(tBTA_SDP_API_RECORD_USER* p_data) {
+void bta_sdp_remove_record(void* user_data) {
if (bta_sdp_cb.p_dm_cback)
- bta_sdp_cb.p_dm_cback(BTA_SDP_REMOVE_RECORD_USER_EVT, NULL,
- p_data->user_data);
- osi_free(p_data);
+ bta_sdp_cb.p_dm_cback(BTA_SDP_REMOVE_RECORD_USER_EVT, NULL, user_data);
}
*
******************************************************************************/
tBTA_SDP_STATUS BTA_SdpCreateRecordByUser(void* user_data) {
- tBTA_SDP_API_RECORD_USER* p_msg =
- (tBTA_SDP_API_RECORD_USER*)osi_malloc(sizeof(tBTA_SDP_API_RECORD_USER));
-
- APPL_TRACE_API("%s", __func__);
-
- p_msg->hdr.event = BTA_SDP_API_CREATE_RECORD_USER_EVT;
- p_msg->user_data = user_data;
-
- do_in_main_thread(FROM_HERE, base::Bind(bta_sdp_create_record, p_msg));
-
+ do_in_main_thread(FROM_HERE, base::Bind(bta_sdp_create_record, user_data));
return BTA_SDP_SUCCESS;
}
*
******************************************************************************/
tBTA_SDP_STATUS BTA_SdpRemoveRecordByUser(void* user_data) {
- tBTA_SDP_API_RECORD_USER* p_msg =
- (tBTA_SDP_API_RECORD_USER*)osi_malloc(sizeof(tBTA_SDP_API_RECORD_USER));
-
- APPL_TRACE_API("%s", __func__);
-
- p_msg->hdr.event = BTA_SDP_API_REMOVE_RECORD_USER_EVT;
- p_msg->user_data = user_data;
-
- do_in_main_thread(FROM_HERE, base::Bind(bta_sdp_remove_record, p_msg));
-
+ do_in_main_thread(FROM_HERE, base::Bind(bta_sdp_remove_record, user_data));
return BTA_SDP_SUCCESS;
}
****************************************************************************/
enum {
- /* these events are handled by the state machine */
- BTA_SDP_API_ENABLE_EVT = BTA_SYS_EVT_START(BTA_ID_SDP),
- BTA_SDP_API_SEARCH_EVT,
- BTA_SDP_API_CREATE_RECORD_USER_EVT,
- BTA_SDP_API_REMOVE_RECORD_USER_EVT,
- BTA_SDP_MAX_INT_EVT
-};
-
-enum {
BTA_SDP_ACTIVE_NONE = 0,
BTA_SDP_ACTIVE_YES /* waiting for SDP result */
};
-/* data type for BTA_SDP_API_SEARCH_EVT */
-typedef struct {
- BT_HDR hdr;
- void* user_data;
-} tBTA_SDP_API_RECORD_USER;
-
-/* union of all data types */
-typedef union {
- /* GKI event buffer header */
- BT_HDR hdr;
- tBTA_SDP_API_RECORD_USER record;
-} tBTA_SDP_MSG;
-
/* SDP control block */
typedef struct {
uint8_t sdp_active; /* see BTA_SDP_SDP_ACT_* */
/* config struct */
extern tBTA_SDP_CFG* p_bta_sdp_cfg;
-extern bool bta_sdp_sm_execute(BT_HDR* p_msg);
-
extern void bta_sdp_enable(tBTA_SDP_DM_CBACK* p_cback);
extern void bta_sdp_search(const RawAddress bd_addr,
const bluetooth::Uuid uuid);
-extern void bta_sdp_create_record(tBTA_SDP_API_RECORD_USER* p_data);
-extern void bta_sdp_remove_record(tBTA_SDP_API_RECORD_USER* p_data);
+extern void bta_sdp_create_record(void* user_data);
+extern void bta_sdp_remove_record(void* user_data);
#endif /* BTA_SDP_INT_H */