Home | History | Annotate | Download | only in src

Lines Matching full:p_data

104 static void btif_hl_ctrl_cback(tBTA_HL_CTRL_EVT event, tBTA_HL_CTRL *p_data);
107 static void btif_hl_cback(tBTA_HL_EVT event, tBTA_HL *p_data);
2003 static void btif_hl_proc_dereg_cfm(tBTA_HL *p_data)
2012 p_data->dereg_cfm.status, p_data->dereg_cfm.app_handle);
2014 if (btif_hl_find_app_idx_using_app_id(p_data->dereg_cfm.app_id, &app_idx))
2018 if (p_data->dereg_cfm.status == BTA_HL_STATUS_OK)
2047 static void btif_hl_proc_reg_cfm(tBTA_HL *p_data){
2052 BTIF_TRACE_DEBUG("%s reg status=%d app_handle=%d", __FUNCTION__, p_data->reg_cfm.status, p_data->reg_cfm.app_handle);
2054 if (btif_hl_find_app_idx(p_data->reg_cfm.app_id, &app_idx))
2057 if (p_data->reg_cfm.status == BTA_HL_STATUS_OK)
2059 p_acb->app_handle = p_data->reg_cfm.app_handle;
2068 BTIF_TRACE_DEBUG("%s call reg state callback app_id=%d reg state=%d", __FUNCTION__, p_data->reg_cfm.app_id, state);
2069 BTIF_HL_CALL_CBACK(bt_hl_callbacks, app_reg_state_cb, ((int) p_data->reg_cfm.app_id), state );
2227 static BOOLEAN btif_hl_proc_sdp_query_cfm(tBTA_HL *p_data){
2240 p_sdp = p_data->sdp_query_cfm.p_sdp;
2261 if (btif_hl_find_app_idx_using_app_id(p_data->sdp_query_cfm.app_id, &app_idx))
2265 if (btif_hl_find_mcl_idx(app_idx, p_data->sdp_query_cfm.bd_addr, &mcl_idx))
2348 static void btif_hl_proc_cch_open_ind(tBTA_HL *p_data)
2360 if (!btif_hl_find_mcl_idx(i, p_data->cch_open_ind.bd_addr, &mcl_idx))
2369 p_mcb->mcl_handle = p_data->cch_open_ind.mcl_handle;
2370 bdcpy(p_mcb->bd_addr, p_data->cch_open_ind.bd_addr);
2470 static BOOLEAN btif_hl_proc_cch_open_cfm(tBTA_HL *p_data)
2479 if (btif_hl_find_app_idx_using_app_id(p_data->cch_open_cfm.app_id, &app_idx))
2482 if (btif_hl_find_mcl_idx(app_idx, p_data->cch_open_cfm.bd_addr, &mcl_idx))
2485 BTIF_TRACE_DEBUG("mcl_idx=%d, mcl_handle=%d", mcl_idx,p_data->cch_open_cfm.mcl_handle);
2486 p_mcb->mcl_handle = p_data->cch_open_cfm.mcl_handle;
2539 static void btif_hl_proc_cch_close_ind(tBTA_HL *p_data)
2544 btif_hl_clean_mcb_using_handle(p_data->cch_close_ind.mcl_handle);
2556 static void btif_hl_proc_cch_close_cfm(tBTA_HL *p_data)
2560 btif_hl_clean_mcb_using_handle(p_data->cch_close_ind.mcl_handle);
2572 static void btif_hl_proc_create_ind(tBTA_HL *p_data){
2586 btif_hl_find_app_idx_using_mdepId(p_data->dch_create_ind.local_mdep_id,&orig_app_idx);
2587 if (btif_hl_find_mcl_idx(orig_app_idx, p_data->dch_create_ind.bd_addr, &mcl_idx))
2592 if (btif_hl_find_mdep_cfg_idx(orig_app_idx, p_data->dch_create_ind.local_mdep_id, &mdep_cfg_idx))
2599 if (p_data->dch_create_ind.cfg == BTA_HL_DCH_CFG_NO_PREF)
2616 if ((p_data->dch_create_ind.cfg == BTA_HL_DCH_CFG_RELIABLE) ||
2617 (first_reliable_exist && (p_data->dch_create_ind.cfg == BTA_HL_DCH_CFG_STREAMING)))
2620 rsp_cfg = p_data->dch_create_ind.cfg;
2637 create_rsp_param.local_mdep_id = p_data->dch_create_ind.local_mdep_id;
2638 create_rsp_param.mdl_id = p_data->dch_create_ind.mdl_id;
2654 static void btif_hl_proc_dch_open_ind(tBTA_HL *p_data)
2664 btif_hl_find_app_idx_using_mdepId(p_data->dch_open_ind.local_mdep_id,&orig_app_idx);
2666 if (btif_hl_find_mcl_idx_using_app_idx(p_data->dch_open_ind.mcl_handle, orig_app_idx, &mcl_idx ))
2672 if (btif_hl_find_mdep_cfg_idx(orig_app_idx, p_data->dch_open_ind.local_mdep_id, &mdep_cfg_idx))
2675 p_dcb->mdl_handle = p_data->dch_open_ind.mdl_handle;
2677 p_dcb->local_mdep_id = p_data->dch_open_ind.local_mdep_id;
2678 p_dcb->mdl_id = p_data->dch_open_ind.mdl_id;
2679 p_dcb->dch_mode = p_data->dch_open_ind.dch_mode;
2680 p_dcb->dch_mode = p_data->dch_open_ind.dch_mode;
2681 p_dcb->is_the_first_reliable = p_data->dch_open_ind.first_reliable;
2682 p_dcb->mtu = p_data->dch_open_ind.mtu;
2702 BTIF_TRACE_ERROR("INVALID_LOCAL_MDEP_ID mdep_id=%d",p_data->dch_open_cfm.local_mdep_id);
2716 BTA_HlDchClose(p_data->dch_open_cfm.mdl_handle);
2728 static BOOLEAN btif_hl_proc_dch_open_cfm(tBTA_HL *p_data)
2740 btif_hl_find_app_idx_using_mdepId(p_data->dch_open_cfm.local_mdep_id,&app_idx);
2742 if (btif_hl_find_mcl_idx_using_app_idx(p_data->dch_open_cfm.mcl_handle, app_idx, &mcl_idx ))
2750 if (btif_hl_find_mdep_cfg_idx(app_idx, p_data->dch_open_cfm.local_mdep_id, &mdep_cfg_idx))
2753 p_dcb->mdl_handle = p_data->dch_open_cfm.mdl_handle;
2755 p_dcb->local_mdep_id = p_data->dch_open_cfm.local_mdep_id;
2756 p_dcb->mdl_id = p_data->dch_open_cfm.mdl_id;
2757 p_dcb->dch_mode = p_data->dch_open_cfm.dch_mode;
2758 p_dcb->is_the_first_reliable= p_data->dch_open_cfm.first_reliable;
2759 p_dcb->mtu = p_data->dch_open_cfm.mtu;
2779 BTIF_TRACE_ERROR("INVALID_LOCAL_MDEP_ID mdep_id=%d",p_data->dch_open_cfm.local_mdep_id);
2786 BTA_HlDchClose(p_data->dch_open_cfm.mdl_handle);
2802 static BOOLEAN btif_hl_proc_dch_reconnect_cfm(tBTA_HL *p_data)
2812 btif_hl_find_app_idx_using_mdepId(p_data->dch_reconnect_cfm.local_mdep_id,&app_idx);
2814 if (btif_hl_find_mcl_idx_using_app_idx(p_data->dch_reconnect_cfm.mcl_handle, app_idx, &mcl_idx ))
2822 if (btif_hl_find_mdep_cfg_idx(app_idx, p_data->dch_reconnect_cfm.local_mdep_id, &mdep_cfg_idx))
2825 p_dcb->mdl_handle = p_data->dch_reconnect_cfm.mdl_handle;
2827 p_dcb->local_mdep_id = p_data->dch_reconnect_cfm.local_mdep_id;
2828 p_dcb->mdl_id = p_data->dch_reconnect_cfm.mdl_id;
2829 p_dcb->dch_mode = p_data->dch_reconnect_cfm.dch_mode;
2830 p_dcb->is_the_first_reliable= p_data->dch_reconnect_cfm.first_reliable;
2831 p_dcb->mtu = p_data->dch_reconnect_cfm.mtu;
2851 BTIF_TRACE_ERROR("INVALID_LOCAL_MDEP_ID mdep_id=%d",p_data->dch_open_cfm.local_mdep_id);
2858 BTA_HlDchClose(p_data->dch_reconnect_cfm.mdl_handle);
2875 static void btif_hl_proc_dch_reconnect_ind(tBTA_HL *p_data)
2886 btif_hl_find_app_idx_using_mdepId(p_data->dch_reconnect_ind.local_mdep_id,&app_idx);
2888 if (btif_hl_find_mcl_idx_using_app_idx(p_data->dch_reconnect_ind.mcl_handle, app_idx, &mcl_idx ))
2898 if (btif_hl_find_mdep_cfg_idx(app_idx, p_data->dch_reconnect_ind.local_mdep_id, &mdep_cfg_idx))
2901 p_dcb->mdl_handle = p_data->dch_reconnect_ind.mdl_handle;
2903 p_dcb->local_mdep_id = p_data->dch_reconnect_ind.local_mdep_id;
2904 p_dcb->mdl_id = p_data->dch_reconnect_ind.mdl_id;
2905 p_dcb->dch_mode = p_data->dch_reconnect_ind.dch_mode;
2906 p_dcb->dch_mode = p_data->dch_reconnect_ind.dch_mode;
2907 p_dcb->is_the_first_reliable= p_data->dch_reconnect_ind.first_reliable;
2908 p_dcb->mtu = p_data->dch_reconnect_ind.mtu;
2921 BTIF_TRACE_ERROR("INVALID_LOCAL_MDEP_ID mdep_id=%d",p_data->dch_open_cfm.local_mdep_id);
2935 BTA_HlDchClose(p_data->dch_reconnect_ind.mdl_handle);
2948 static void btif_hl_proc_dch_close_ind(tBTA_HL *p_data)
2956 if (btif_hl_find_mdl_idx_using_handle(p_data->dch_close_ind.mdl_handle,
2979 static void btif_hl_proc_dch_close_cfm(tBTA_HL *p_data)
2987 if (btif_hl_find_mdl_idx_using_handle(p_data->dch_close_cfm.mdl_handle,
3102 static void btif_hl_proc_dch_cong_ind(tBTA_HL *p_data)
3110 if (btif_hl_find_mdl_idx_using_handle(p_data->dch_cong_ind.mdl_handle, &app_idx, &mcl_idx, &mdl_idx))
3113 p_dcb->cong = p_data->dch_cong_ind.cong;
3153 btif_hl_evt_cb_t *p_data = (btif_hl_evt_cb_t *)p_param;
3167 if (p_data->chan_cb.cb_state == BTIF_HL_CHAN_CB_STATE_CONNECTED_PENDING)
3169 else if (p_data->chan_cb.cb_state == BTIF_HL_CHAN_CB_STATE_DISCONNECTED_PENDING)
3176 btif_hl_copy_bda(&bd_addr, p_data->chan_cb.bd_addr);
3178 p_data->chan_cb.channel_id,
3179 p_data->chan_cb.cb_state,
3180 state, p_data->chan_cb.fd);
3182 BTIF_HL_CALL_CBACK(bt_hl_callbacks, channel_state_cb, p_data->chan_cb.app_id,
3183 &bd_addr, p_data->chan_cb.mdep_cfg_index,
3184 p_data->chan_cb.channel_id, state, p_data->chan_cb.fd );
3189 p_acb = BTIF_HL_GET_APP_CB_PTR(p_data->reg.app_idx);
3190 BTIF_TRACE_DEBUG("Rcv BTIF_HL_REG_APP app_idx=%d reg_pending=%d", p_data->reg.app_idx, p_acb->reg_pending);
3200 btif_hl_proc_reg_request (p_data->reg.app_idx, p_acb->app_id, &reg_param, btif_hl_cback);
3210 BTIF_TRACE_DEBUG("Rcv BTIF_HL_UNREG_APP app_idx=%d", p_data->unreg.app_idx );
3211 p_acb = BTIF_HL_GET_APP_CB_PTR(p_data->unreg.app_idx);
3221 BTIF_TRACE_DEBUG("Rcv BTIF_HL_UPDATE_MDL app_idx=%d", p_data
3222 p_acb = BTIF_HL_GET_APP_CB_PTR(p_data->update_mdl.app_idx);
3241 tBTA_HL *p_data = (tBTA_HL *)p_param;
3255 p_data->reg_cfm.app_id,
3256 p_data->reg_cfm.app_handle,
3257 p_data->reg_cfm.status );
3259 btif_hl_proc_reg_cfm(p_data);
3264 p_data->sdp_info_ind.app_handle,
3265 p_data->sdp_info_ind.ctrl_psm,
3266 p_data->sdp_info_ind.data_psm,
3267 p_data->sdp_info_ind.data_x_spec,
3268 p_data->sdp_info_ind.mcap_sup_procs);
3269 //btif_hl_proc_sdp_info_ind(p_data);
3275 p_data->dereg_cfm.app_handle,
3276 p_data->dereg_cfm.status );
3277 btif_hl_proc_dereg_cfm(p_data);
3283 p_data->sdp_query_cfm.app_handle,p_data->sdp_query_cfm.app_id,
3284 p_data->sdp_query_cfm.status);
3287 p_data->sdp_query_cfm.bd_addr[0], p_data->sdp_query_cfm.bd_addr[1],
3288 p_data->sdp_query_cfm.bd_addr[2], p_data->sdp_query_cfm.bd_addr[3],
3289 p_data->sdp_query_cfm.bd_addr[4], p_data->sdp_query_cfm.bd_addr[5]);
3291 if (p_data->sdp_query_cfm.status == BTA_HL_STATUS_OK)
3292 status = btif_hl_proc_sdp_query_cfm(p_data);
3299 p_data->sdp_query_cfm.status);
3300 if (btif_hl_find_app_idx_using_app_id(p_data->sdp_query_cfm.app_id, &app_idx))
3303 if (btif_hl_find_mcl_idx(app_idx, p_data->sdp_query_cfm.bd_addr, &mcl_idx))
3332 p_data->cch_open_cfm.app_id,
3333 p_data->cch_open_cfm.app_handle,
3334 p_data->cch_open_cfm.mcl_handle,
3335 p_data->cch_open_cfm.status);
3337 p_data->cch_open_cfm.bd_addr[0], p_data->cch_open_cfm.bd_addr[1],
3338 p_data->cch_open_cfm.bd_addr[2], p_data->cch_open_cfm.bd_addr[3],
3339 p_data->cch_open_cfm.bd_addr[4], p_data->cch_open_cfm.bd_addr[5]);
3341 if (p_data->cch_open_cfm.status == BTA_HL_STATUS_OK ||
3342 p_data->cch_open_cfm.status == BTA_HL_STATUS_DUPLICATE_CCH_OPEN)
3344 status = btif_hl_proc_cch_open_cfm(p_data);
3353 if (btif_hl_find_app_idx_using_app_id(p_data->cch_open_cfm.app_id, &app_idx))
3356 if (btif_hl_find_mcl_idx(app_idx, p_data->cch_open_cfm.bd_addr, &mcl_idx))
3379 p_data->dch_open_cfm.mcl_handle,
3380 p_data->dch_open_cfm.mdl_handle,
3381 p_data->dch_open_cfm.status);
3383 p_data->dch_open_cfm.first_reliable,
3384 p_data->dch_open_cfm.dch_mode,
3385 p_data->dch_open_cfm.local_mdep_id,
3386 p_data->dch_open_cfm.mdl_id,
3387 p_data->dch_open_cfm.mtu);
3388 if (p_data->dch_open_cfm.status == BTA_HL_STATUS_OK)
3390 status = btif_hl_proc_dch_open_cfm(p_data);
3399 if (btif_hl_find_mcl_idx_using_handle(p_data->dch_open_cfm.mcl_handle,&app_idx, &mcl_idx))
3420 p_data->cch_open_ind.app_handle,
3421 p_data->cch_open_ind.mcl_handle);
3423 p_data->cch_open_ind.bd_addr[0], p_data->cch_open_ind.bd_addr[1],
3424 p_data->cch_open_ind.bd_addr[2], p_data->cch_open_ind.bd_addr[3],
3425 p_data->cch_open_ind.bd_addr[4], p_data->cch_open_ind.bd_addr[5]);
3427 btif_hl_proc_cch_open_ind(p_data);
3433 p_data->dch_create_ind.mcl_handle );
3435 p_data->dch_create_ind.local_mdep_id,
3436 p_data->dch_create_ind.mdl_id,
3437 p_data->dch_create_ind.cfg);
3438 btif_hl_proc_create_ind(p_data);
3444 p_data->dch_open_ind.mcl_handle,
3445 p_data->dch_open_ind.mdl_handle );
3447 p_data->dch_open_ind.first_reliable,
3448 p_data->dch_open_ind.dch_mode,
3449 p_data->dch_open_ind.local_mdep_id,
3450 p_data->dch_open_ind.mdl_id,
3451 p_data->dch_open_ind.mtu);
3453 btif_hl_proc_dch_open_ind(p_data);
3459 p_data->delete_mdl_ind.mcl_handle,
3460 p_data->delete_mdl_ind.mdl_id);
3466 p_data->delete_mdl_cfm.mcl_handle,
3467 p_data->delete_mdl_cfm.mdl_id,
3468 p_data->delete_mdl_cfm.status);
3470 if (btif_hl_find_app_idx_using_deleted_mdl_id( p_data->delete_mdl_cfm.mdl_id,
3482 p_data->dch_reconnect_cfm.mcl_handle,
3483 p_data->dch_reconnect_cfm.mdl_handle,
3484 p_data->dch_reconnect_cfm.status);
3486 p_data->dch_reconnect_cfm.first_reliable,
3487 p_data->dch_reconnect_cfm.dch_mode,
3488 p_data->dch_reconnect_cfm.mdl_id,
3489 p_data->dch_reconnect_cfm.mtu);
3491 if (p_data->dch_reconnect_cfm.status == BTA_HL_STATUS_OK)
3493 status = btif_hl_proc_dch_reconnect_cfm(p_data);
3502 if (btif_hl_find_mcl_idx_using_handle(p_data->dch_open_cfm.mcl_handle,&app_idx, &mcl_idx))
3524 p_data->cch_close_cfm.mcl_handle,
3525 p_data->cch_close_cfm.status);
3526 if (p_data->cch_close_cfm.status == BTA_HL_STATUS_OK)
3528 btif_hl_proc_cch_close_cfm(p_data);
3535 p_data->cch_close_ind.mcl_handle,
3536 (p_data->cch_close_ind.intentional?"Yes":"No"));
3538 btif_hl_proc_cch_close_ind(p_data);
3544 p_data->dch_close_ind.mdl_handle,
3545 (p_data->dch_close_ind.intentional?"Yes":"No") );
3547 btif_hl_proc_dch_close_ind(p_data);
3553 p_data->dch_close_cfm.mdl_handle,
3554 p_data->dch_close_cfm.status);
3556 if (p_data->dch_close_cfm.status == BTA_HL_STATUS_OK)
3558 btif_hl_proc_dch_close_cfm(p_data);
3565 p_data->echo_test_cfm.mcl_handle,
3566 p_data->echo_test_cfm.status );
3574 p_data->dch_reconnect_ind.mcl_handle,
3575 p_data->dch_reconnect_ind.mdl_handle );
3577 p_data->dch_reconnect_ind.first_reliable,
3578 p_data->dch_reconnect_ind.dch_mode,
3579 p_data->dch_reconnect_ind.mdl_id,
3580 p_data->dch_reconnect_ind.mtu);
3582 btif_hl_proc_dch_reconnect_ind(p_data);
3588 p_data->dch_cong_ind.mdl_handle,
3589 p_data->dch_cong_ind.cong);
3590 btif_hl_proc_dch_cong_ind(p_data);
3596 p_data->dch_abort_ind.mcl_handle );
3597 btif_hl_proc_abort_ind(p_data->dch_abort_ind.mcl_handle);
3602 p_data->dch_abort_cfm.mcl_handle,
3603 p_data->dch_abort_cfm.status);
3604 if (p_data->dch_abort_cfm.status == BTA_HL_STATUS_OK)
3606 btif_hl_proc_abort_cfm(p_data->dch_abort_ind.mcl_handle);
3613 p_data->dch_send_data_cfm.mdl_handle,
3614 p_data->dch_send_data_cfm.status);
3615 btif_hl_proc_send_data_cfm(p_data->dch_send_data_cfm.mdl_handle,
3616 p_data->dch_send_data_cfm.status);
3622 p_data->dch_rcv_data_ind.mdl_handle);
3641 static void btif_hl_cback(tBTA_HL_EVT event, tBTA_HL *p_data){
3721 status = btif_transfer_context(btif_hl_upstreams_evt, (uint16_t)event, (void*)p_data, param_len, NULL);
3737 tBTA_HL_CTRL *p_data = (tBTA_HL_CTRL *) p_param;
3749 BTIF_TRACE_DEBUG("status=%d", p_data->enable_cfm.status);
3751 if (p_data->enable_cfm.status == BTA_HL_STATUS_OK)
3777 p_data->disable_cfm.status);
3779 if (p_data->disable_cfm.status == BTA_HL_STATUS_OK)
3805 static void btif_hl_ctrl_cback(tBTA_HL_CTRL_EVT event, tBTA_HL_CTRL *p_data){
3822 status = btif_transfer_context(btif_hl_upstreams_ctrl_evt, (uint16_t)event, (void*)p_data, param_len, NULL);
4064 tBTA_HL_MDEP_DATA_TYPE_CFG *p_data;
4115 p_data = &p_cfg->data_cfg[0];
4141 p_data->data_type = (UINT16) p_mdep_cfg->data_type;
4142 p_data->max_rx_apdu_size = btif_hl_get_max_rx_apdu_size(p_cfg->mdep_role, p_data->data_type);
4143 p_data->max_tx_apdu_size = btif_hl_get_max_tx_apdu_size(p_cfg->mdep_role, p_data->data_type);
4146 strncpy(p_data->desp, p_mdep_cfg->mdep_description, BTA_SERVICE_DESP_LEN);