Home | History | Annotate | Download | only in hl

Lines Matching full:p_data

89 typedef void (*tBTA_HL_DCH_ACTION)(UINT8 app_idx, UINT8 mcl_idx, UINT8 mdl_idx, tBTA_HL_DATA *p_data);
307 typedef void (*tBTA_HL_CCH_ACTION)(UINT8 app_idx, UINT8 mcl_idx, tBTA_HL_DATA *p_data);
418 UINT16 event, tBTA_HL_DATA *p_data)
445 (*bta_hl_cch_action[action])(app_idx, mcl_idx, p_data);
450 bta_hl_discard_data(p_data->hdr.event, p_data);
476 UINT16 event, tBTA_HL_DATA *p_data)
502 (*bta_hl_dch_action[action])(app_idx, mcl_idx, mdl_idx, p_data);
507 bta_hl_discard_data(p_data->hdr.event, p_data);
532 static void bta_hl_api_enable(tBTA_HL_CB *p_cb, tBTA_HL_DATA *p_data)
541 if (p_data->api_enable.p_cback)
542 p_data->api_enable.p_cback(BTA_HL_CTRL_ENABLE_CFM_EVT, (tBTA_HL_CTRL *) &evt_data);
550 p_cb->p_ctrl_cback = p_data->api_enable.p_cback;
552 if (p_data->api_enable.p_cback)
553 p_data->api_enable.p_cback(BTA_HL_CTRL_ENABLE_CFM_EVT, (tBTA_HL_CTRL *) &evt_data);
565 static void bta_hl_api_disable(tBTA_HL_CB *p_cb, tBTA_HL_DATA *p_data)
573 bta_hl_check_disable(p_data);
601 static void bta_hl_api_update(tBTA_HL_CB *p_cb, tBTA_HL_DATA *p_data)
612 status = bta_hl_app_update(p_data->api_update.app_id, p_data->api_update.is_register);
613 if (!p_data->api_update.is_register)
618 evt_data.dereg_cfm.app_id = p_data->api_update.app_id;
648 evt_data.reg_cfm.app_id = p_data->api_update.app_id;
651 if (p_data->api_reg.p_cback)
653 p_data->api_reg.p_cback(BTA_HL_REGISTER_CFM_EVT, (tBTA_HL *) &evt_data);
664 if (p_data->api_reg.p_cback)
666 p_data->api_reg.p_cback(BTA_HL_SDP_INFO_IND_EVT, (tBTA_HL *) &evt_data);
680 static void bta_hl_api_register(tBTA_HL_CB *p_cb, tBTA_HL_DATA *p_data)
690 if (!bta_hl_is_a_duplicate_id(p_data->api_reg.app_id))
696 p_acb->app_id = p_data->api_reg.app_id;
697 p_acb->p_cback = p_data->api_reg.p_cback;
698 p_acb->sec_mask = p_data->api_reg.sec_mask;
699 p_acb->dev_type = p_data->api_reg.dev_type;
700 strlcpy(p_acb->srv_name, p_data->api_reg.srv_name, BTA_SERVICE_NAME_LEN);
701 strlcpy(p_acb->srv_desp, p_data->api_reg.srv_desp, BTA_SERVICE_DESP_LEN);
702 strlcpy(p_acb->provider_name, p_data->api_reg.provider_name, BTA_PROVIDER_NAME_LEN);
738 evt_data.reg_cfm.app_id = p_data->api_reg.app_id;
741 if (p_data->api_reg.p_cback)
743 p_data->api_reg.p_cback(BTA_HL_REGISTER_CFM_EVT, (tBTA_HL *) &evt_data);
754 if (p_data->api_reg.p_cback)
756 p_data->api_reg.p_cback(BTA_HL_SDP_INFO_IND_EVT, (tBTA_HL *) &evt_data);
770 static void bta_hl_api_deregister(tBTA_HL_CB *p_cb, tBTA_HL_DATA *p_data)
776 if (bta_hl_find_app_idx_using_handle(p_data->api_dereg.app_handle, &app_idx))
780 bta_hl_check_deregistration(app_idx,p_data);
784 APPL_TRACE_ERROR("Invalid app_handle=%d", p_data->api_dereg.app_handle);
797 static void bta_hl_api_cch_open(tBTA_HL_CB *p_cb, tBTA_HL_DATA *p_data)
806 if (bta_hl_find_app_idx_using_handle(p_data->api_cch_open.app_handle, &app_idx))
809 if (!bta_hl_find_mcl_idx(app_idx, p_data->api_cch_open.bd_addr, &mcl_idx))
815 p_mcb->req_ctrl_psm = p_data->api_cch_open.ctrl_psm;
816 p_mcb->sec_mask = p_data->api_cch_open.sec_mask;
817 bdcpy(p_mcb->bd_addr, p_data->api_cch_open.bd_addr);
834 bta_hl_build_cch_open_cfm(&evt_data, p_data->api_cch_open.app_id,
835 p_data->api_cch_open.app_handle,
837 p_data->api_cch_open.bd_addr,
861 bta_hl_cch_sm_execute(app_idx, mcl_idx, BTA_HL_CCH_OPEN_EVT, p_data);
869 bta_hl_build_cch_open_cfm(&evt_data, p_data->api_cch_open.app_id,
870 p_data->api_cch_open.app_handle,
872 p_data->api_cch_open.bd_addr,
896 static void bta_hl_api_cch_close(tBTA_HL_CB *p_cb, tBTA_HL_DATA *p_data)
905 if (bta_hl_find_mcl_idx_using_handle(p_data->api_cch_close.mcl_handle, &app_idx, &mcl_idx))
923 bta_hl_check_cch_close(app_idx, mcl_idx, p_data, TRUE);
932 p_data->api_cch_close.mcl_handle,
957 static void bta_hl_api_dch_open(tBTA_HL_CB *p_cb, tBTA_HL_DATA *p_data)
969 if (bta_hl_find_mcl_idx_using_handle(p_data->api_dch_open.mcl_handle, &app_idx, &mcl_idx))
974 APPL_TRACE_DEBUG("bta_hl_api_dch_open: app_ix=%d, mcl_idx=%d, cch_state=%d, mcl_handle=%d",app_idx,mcl_idx,p_mcb->cch_state,p_data->api_dch_open.mcl_handle);
981 if (bta_hl_find_mdep_cfg_idx(app_idx, p_data->api_dch_open.local_mdep_id, &mdep_cfg_idx))
986 p_data->api_dch_open.local_cfg = BTA_HL_DCH_CFG_NO_PREF;
989 if ((status = bta_hl_chk_local_cfg(app_idx,mcl_idx,mdep_cfg_idx,p_data->api_dch_open.local_cfg))
993 if (p_data->api_dch_open.local_mdep_id != BTA_HL_ECHO_TEST_MDEP_ID)
995 if (bta_hl_set_ctrl_psm_for_dch(app_idx, mcl_idx, mdl_idx, p_data->api_dch_open.ctrl_psm))
1000 p_dcb->sec_mask = p_data->api_dch_open.sec_mask;
1001 p_dcb->local_mdep_id = p_data->api_dch_open.local_mdep_id;
1002 p_dcb->peer_mdep_id = p_data->api_dch_open.peer_mdep_id;
1014 p_dcb->local_cfg = p_data->api_dch_open.local_cfg;
1065 bta_hl_dch_sm_execute(app_idx, mcl_idx, mdl_idx, BTA_HL_DCH_OPEN_EVT, p_data);
1069 bta_hl_dch_sm_execute(app_idx, mcl_idx, mdl_idx, BTA_HL_DCH_SDP_INIT_EVT, p_data);
1084 p_data->api_dch_open.mcl_handle,
1111 static void bta_hl_api_dch_close(tBTA_HL_CB *p_cb, tBTA_HL_DATA *p_data)
1121 if (bta_hl_find_mdl_idx_using_handle(p_data->api_dch_close.mdl_handle, &app_idx, &mcl_idx, &mdl_idx ))
1144 bta_hl_dch_sm_execute(app_idx, mcl_idx, mdl_idx, BTA_HL_DCH_CLOSE_EVT, p_data);
1154 p_data->api_dch_close.mdl_handle,
1180 static void bta_hl_api_dch_reconnect(tBTA_HL_CB *p_cb, tBTA_HL_DATA *p_data)
1193 if (bta_hl_find_mcl_idx_using_handle(p_data->api_dch_reconnect.mcl_handle, &app_idx, &mcl_idx))
1202 if (bta_hl_validate_reconnect_params(app_idx, mcl_idx, &(p_data->api_dch_reconnect),
1212 if (bta_hl_set_ctrl_psm_for_dch(app_idx, mcl_idx, mdl_idx, p_data->api_dch_open.ctrl_psm))
1220 p_dcb->mdl_id = p_data->api_dch_reconnect.mdl_id;
1280 bta_hl_dch_sm_execute(app_idx, mcl_idx, mdl_idx, BTA_HL_DCH_RECONNECT_EVT, p_data);
1284 bta_hl_dch_sm_execute(app_idx, mcl_idx, mdl_idx, BTA_HL_DCH_SDP_INIT_EVT, p_data);
1296 p_data->api_dch_reconnect.mcl_handle,
1298 0,p_data->api_dch_reconnect.mdl_id,0,0,0, status);
1321 static void bta_hl_api_dch_echo_test(tBTA_HL_CB *p_cb, tBTA_HL_DATA *p_data)
1332 if (bta_hl_find_mcl_idx_using_handle(p_data->api_dch_echo_test.mcl_handle, &app_idx, &mcl_idx))
1344 if ((p_data->api_dch_echo_test.local_cfg == BTA_HL_DCH_CFG_RELIABLE) ||
1345 (p_data->api_dch_echo_test.local_cfg == BTA_HL_DCH_CFG_STREAMING))
1348 if ((p_dcb->p_echo_tx_pkt = bta_hl_get_buf(p_data->api_dch_echo_test.pkt_size, fcs_use)) != NULL )
1350 if (bta_hl_set_ctrl_psm_for_dch(app_idx, mcl_idx, mdl_idx, p_data->api_dch_open.ctrl_psm))
1356 p_dcb->local_cfg = p_data->api_dch_echo_test.local_cfg;
1414 bta_hl_dch_sm_execute(app_idx, mcl_idx, mdl_idx, BTA_HL_DCH_ECHO_TEST_EVT, p_data);
1418 bta_hl_dch_sm_execute(app_idx, mcl_idx, mdl_idx, BTA_HL_DCH_SDP_INIT_EVT, p_data);
1455 static void bta_hl_api_sdp_query(tBTA_HL_CB *p_cb, tBTA_HL_DATA *p_data)
1464 if (bta_hl_find_app_idx_using_handle(p_data->api_sdp_query.app_handle, &app_idx))
1466 if (!bta_hl_find_mcl_idx(app_idx, p_data->api_sdp_query.bd_addr, &mcl_idx))
1472 bdcpy(p_mcb->bd_addr, p_data->api_sdp_query.bd_addr);
1474 p_mcb->app_id = p_data->api_sdp_query.app_id;
1485 p_mcb->app_id = p_data->api_sdp_query.app_id;
1525 p_data->api_sdp_query.app_id,
1526 p_data->api_sdp_query.app_handle,
1527 p_data->api_sdp_query.bd_addr,
1557 static void bta_hl_sdp_query_results(tBTA_HL_CB *p_cb, tBTA_HL_DATA *p_data)
1561 UINT8 app_idx = p_data->cch_sdp.app_idx;
1562 UINT8 mcl_idx = p_data->cch_sdp.mcl_idx;
1570 event = p_data->hdr.event;
1595 if (p_data->cch_sdp.release_mcl_cb) {
1599 bta_hl_check_cch_close(app_idx, mcl_idx, p_data, TRUE);
1618 static void bta_hl_api_delete_mdl(tBTA_HL_CB *p_cb, tBTA_HL_DATA *p_data)
1627 if (bta_hl_find_mcl_idx_using_handle(p_data->api_delete_mdl.mcl_handle, &app_idx, &mcl_idx ))
1629 if (bta_hl_is_mdl_value_valid(p_data->api_delete_mdl.mdl_id))
1634 p_data->api_delete_mdl.mdl_id))
1638 p_mcb->delete_mdl.mcl_handle = p_data->api_delete_mdl.mcl_handle;
1639 p_mcb->delete_mdl.mdl_id = p_data->api_delete_mdl.mdl_id;
1643 p_data->api_delete_mdl.mdl_id)!= MCA_SUCCESS)
1682 p_data->api_delete_mdl.mcl_handle,
1683 p_data->api_delete_mdl.mdl_id,
1707 static void bta_hl_mca_delete_mdl_cfm(tBTA_HL_CB *p_cb, tBTA_HL_DATA *p_data)
1712 tMCA_RSP_EVT *p_delete_cfm = &p_data->mca_evt.mca_data.delete_cfm;
1718 if (bta_hl_find_mcl_idx_using_handle(p_data->mca_evt.mcl_handle, &app_idx, &mcl_idx))
1787 static void bta_hl_mca_delete_mdl_ind(tBTA_HL_CB *p_cb, tBTA_HL_DATA *p_data)
1791 tMCA_EVT_HDR *p_delete_ind = &p_data->mca_evt.mca_data.delete_ind;
1798 if (bta_hl_find_mcl_idx_using_handle(p_data->mca_evt.mcl_handle, &app_idx, &mcl_idx) )
1850 static void bta_hl_api_dch_abort(tBTA_HL_CB *p_cb, tBTA_HL_DATA *p_data)
1860 if (bta_hl_find_mcl_idx_using_handle(p_data->api_dch_abort.mcl_handle, &app_idx, &mcl_idx ))
1897 bta_hl_dch_sm_execute(app_idx, mcl_idx, mdl_idx, BTA_HL_DCH_ABORT_EVT, p_data);