Lines Matching refs:app_idx
70 extern void btif_hl_release_mcl_sockets(UINT8 app_idx, UINT8 mcl_idx);
71 extern BOOLEAN btif_hl_create_socket(UINT8 app_idx, UINT8 mcl_idx, UINT8 mdl_idx);
72 extern void btif_hl_release_socket(UINT8 app_idx, UINT8 mcl_idx, UINT8 mdl_idx);
283 BTIF_TRACE_DEBUG3("%app_idx=%d, mcl_idx=%d mcl-connected=%d",
288 BTIF_TRACE_DEBUG3("Idle timeout Close CCH app_idx=%d mcl_idx=%d mcl_handle=%d",
294 BTIF_TRACE_DEBUG2("CCH idle timeout But CCH not connected app_idx=%d mcl_idx=%d ",i,j);
308 void btif_hl_stop_cch_timer(UINT8 app_idx, UINT8 mcl_idx)
310 btif_hl_mcl_cb_t *p_mcb = BTIF_HL_GET_MCL_CB_PTR(app_idx, mcl_idx);
311 BTIF_TRACE_DEBUG4("%s app_idx=%d, mcl_idx=%d timer_in_use=%d",
312 __FUNCTION__,app_idx, mcl_idx, p_mcb->cch_timer.in_use);
329 void btif_hl_start_cch_timer(UINT8 app_idx, UINT8 mcl_idx)
331 btif_hl_mcl_cb_t *p_mcb = BTIF_HL_GET_MCL_CB_PTR(app_idx, mcl_idx);
332 BTIF_TRACE_DEBUG5("%s app_idx=%d, mcl_idx=%d timer_active=%d timer_in_use=%d",
333 __FUNCTION__,app_idx, mcl_idx,
363 static BOOLEAN btif_hl_find_mdl_idx(UINT8 app_idx, UINT8 mcl_idx, UINT16 mdl_id,
366 btif_hl_mcl_cb_t *p_mcb = BTIF_HL_GET_MCL_CB_PTR(app_idx, mcl_idx);
447 BOOLEAN btif_hl_is_the_first_reliable_existed(UINT8 app_idx, UINT8 mcl_idx )
449 btif_hl_mcl_cb_t *p_mcb =BTIF_HL_GET_MCL_CB_PTR(app_idx, mcl_idx);
523 static void btif_hl_clean_mcl_cb(UINT8 app_idx, UINT8 mcl_idx)
526 BTIF_TRACE_DEBUG3("%s app_idx=%d, mcl_idx=%d", __FUNCTION__,app_idx, mcl_idx);
527 p_mcb = BTIF_HL_GET_MCL_CB_PTR(app_idx, mcl_idx);
541 static void btif_hl_reset_mdep_filter(UINT8 app_idx)
543 btif_hl_app_cb_t *p_acb =BTIF_HL_GET_APP_CB_PTR(app_idx);
556 static BOOLEAN btif_hl_find_sdp_idx_using_mdep_filter(UINT8 app_idx, UINT8 mcl_idx, UINT8 *p_sdp_idx)
558 btif_hl_app_cb_t *p_acb =BTIF_HL_GET_APP_CB_PTR(app_idx);
559 btif_hl_mcl_cb_t *p_mcb =BTIF_HL_GET_MCL_CB_PTR(app_idx, mcl_idx);
623 btif_hl_reset_mdep_filter(app_idx);
636 BOOLEAN btif_hl_is_reconnect_possible(UINT8 app_idx, UINT8 mcl_idx, int mdep_cfg_idx,
639 btif_hl_app_cb_t *p_acb = BTIF_HL_GET_APP_CB_PTR(app_idx);
640 btif_hl_mcl_cb_t *p_mcb = BTIF_HL_GET_MCL_CB_PTR(app_idx, mcl_idx);
654 BTIF_TRACE_DEBUG4("%s app_idx=%d mcl_idx=%d mdep_cfg_idx=%d",
655 __FUNCTION__, app_idx, mcl_idx, mdep_cfg_idx );
659 if (!btif_hl_is_the_first_reliable_existed(app_idx, mcl_idx))
691 !btif_hl_find_mdl_idx(app_idx, mcl_idx,p_mdl->base.mdl_id, &mdl_idx))
763 UINT8 app_idx, mcl_idx;
773 if (btif_hl_find_app_idx(app_id, &app_idx))
775 if (btif_hl_find_mcl_idx(app_idx, bd_addr , &mcl_idx))
777 p_mcb = BTIF_HL_GET_MCL_CB_PTR(app_idx, mcl_idx);
779 p_pcb = BTIF_HL_GET_PCB_PTR(app_idx, mcl_idx);
799 if (!btif_hl_is_reconnect_possible(app_idx, mcl_idx, mdep_cfg_idx, p_dch_open_api, &mdl_id ))
817 p_acb = BTIF_HL_GET_APP_CB_PTR(app_idx);
869 void btif_hl_dch_abort(UINT8 app_idx, UINT8 mcl_idx){
872 BTIF_TRACE_DEBUG3("%s app_idx=%d mcl_idx=%d",__FUNCTION__, app_idx, mcl_idx );
873 p_mcb = BTIF_HL_GET_MCL_CB_PTR(app_idx, mcl_idx);
900 UINT8 app_idx, mcl_idx, chan_idx;
908 if (btif_hl_find_app_idx(app_id, &app_idx))
910 p_acb = BTIF_HL_GET_APP_CB_PTR(app_idx);
912 if (!btif_hl_find_mcl_idx(app_idx, bd_addr, &mcl_idx))
914 if (btif_hl_find_avail_mcl_idx(app_idx, &mcl_idx))
916 p_mcb = BTIF_HL_GET_MCL_CB_PTR(app_idx, mcl_idx);
931 p_pcb = BTIF_HL_GET_PCB_PTR(app_idx, mcl_idx);
1020 BTIF_TRACE_EVENT5("%s found=%d channel_id=0x%08x, app_idx=%d mdl_cfg_idx=%d ",
1065 BTIF_TRACE_DEBUG5("%s found=%d app_idx=%d mcl_idx=%d mdl_idx=%d ",
1078 BOOLEAN btif_hl_find_channel_id_using_mdl_id(UINT8 app_idx, tBTA_HL_MDL_ID mdl_id,
1085 p_acb =BTIF_HL_GET_APP_CB_PTR(app_idx);
1090 p_mdl =BTIF_HL_GET_MDL_CFG_PTR(app_idx,j);
1091 mdl_cfg_channel_id = *(BTIF_HL_GET_MDL_CFG_CHANNEL_ID_PTR(app_idx,j));
1100 BTIF_TRACE_EVENT6("%s found=%d channel_id=0x%08x, mdl_id=0x%x app_idx=%d mdl_cfg_idx=%d ",
1101 __FUNCTION__,found,*p_channel_id,mdl_id, app_idx,j );
1149 BTIF_TRACE_EVENT5("%s found=%d app_idx=%d mcl_idx=%d mdl_idx=%d ",
1166 UINT8 app_idx, mcl_idx;
1192 if (btif_hl_find_app_idx(app_id, &app_idx) )
1194 p_acb = BTIF_HL_GET_APP_CB_PTR(app_idx);
1195 if (btif_hl_find_mcl_idx(app_idx, bd_addr, &mcl_idx))
1197 p_mcb =BTIF_HL_GET_MCL_CB_PTR(app_idx, mcl_idx);
1199 BTIF_TRACE_DEBUG2("app_idx=%d mcl_idx=%d",app_idx, mcl_idx);
1240 UINT8 app_idx;
1247 if (btif_hl_find_app_idx(app_id, &app_idx) )
1249 p_acb =BTIF_HL_GET_APP_CB_PTR(app_idx);
1282 static BOOLEAN btif_hl_find_mdep_cfg_idx(UINT8 app_idx, tBTA_HL_MDEP_ID local_mdep_id,
1284 btif_hl_app_cb_t *p_acb =BTIF_HL_GET_APP_CB_PTR(app_idx);
1291 BTIF_TRACE_DEBUG2("btif_hl_find_mdep_cfg_idx: mdep_id=%d app_idx = %d",
1292 p_sup_feature->mdep[i].mdep_id,app_idx);
1301 BTIF_TRACE_DEBUG5("%s found=%d mdep_idx=%d local_mdep_id=%d app_idx=%d ",
1302 __FUNCTION__, found,i, local_mdep_id,app_idx);
1317 BOOLEAN btif_hl_find_mcl_idx(UINT8 app_idx, BD_ADDR p_bd_addr, UINT8 *p_mcl_idx){
1320 btif_hl_app_cb_t *p_acb =BTIF_HL_GET_APP_CB_PTR(app_idx);
1325 p_mcb = BTIF_HL_GET_MCL_CB_PTR(app_idx, i);
1408 static void btif_hl_free_app_idx(UINT8 app_idx){
1410 if ((app_idx < BTA_HL_NUM_APPS) && btif_hl_cb.acb[app_idx].in_use )
1412 btif_hl_cb.acb[app_idx].in_use = FALSE;
1413 memset (&btif_hl_cb.acb[app_idx], 0, sizeof(btif_hl_app_cb_t));
1723 BTIF_TRACE_EVENT4("%s status=%d handle=%d app_idx=%d ",
1754 BTIF_TRACE_EVENT4("%s found=%d app_id=%d app_idx=%d ",
1781 BTIF_TRACE_DEBUG3("btif_hl_find_mcl_idx_using_handle:app_idx=%d,"
1793 BTIF_TRACE_DEBUG4("%s found=%d app_idx=%d mcl_idx=%d",__FUNCTION__,
1838 BTIF_TRACE_DEBUG4("%s found=%d app_idx=%d mcl_idx=%d",__FUNCTION__,
1862 BTIF_TRACE_DEBUG3("btif_hl_find_app_idx_using_deleted_mdl_id: app_idx=%d,"
1872 BTIF_TRACE_DEBUG3("%s found=%d app_idx=%d",__FUNCTION__,
1940 ** Description clean dch cpntrol bloack using app_idx
1945 void btif_hl_clean_mdls_using_app_idx( UINT8 app_idx){
1952 p_acb =BTIF_HL_GET_APP_CB_PTR(app_idx);
1963 p_dcb = BTIF_HL_GET_MDL_CB_PTR(app_idx, j,x);
1964 btif_hl_release_socket(app_idx,j,x);
2006 BTIF_TRACE_DEBUG3("%s found=%d app_idx=%d", __FUNCTION__, found, i );
2036 BTIF_TRACE_DEBUG3("%s found=%d app_idx=%d", __FUNCTION__, found, i );
2050 BOOLEAN btif_hl_find_avail_mdl_idx(UINT8 app_idx, UINT8 mcl_idx,
2052 btif_hl_mcl_cb_t *p_mcb = BTIF_HL_GET_MCL_CB_PTR(app_idx, mcl_idx);
2080 BOOLEAN btif_hl_find_avail_mcl_idx(UINT8 app_idx, UINT8 *p_mcl_idx){
2086 if (!btif_hl_cb.acb[app_idx].mcb[i].in_use)
2120 BTIF_TRACE_DEBUG3("%s found=%d app_idx=%d", __FUNCTION__, found, i);
2138 UINT8 app_idx;
2146 if (btif_hl_find_app_idx_using_app_id(p_data->dereg_cfm.app_id, &app_idx))
2148 p_acb = BTIF_HL_GET_APP_CB_PTR(app_idx);
2152 btif_hl_clean_mdls_using_app_idx(app_idx);
2179 UINT8 app_idx;
2185 if (btif_hl_find_app_idx(p_data->reg_cfm.app_id, &app_idx))
2187 p_acb = BTIF_HL_GET_APP_CB_PTR(app_idx);
2194 btif_hl_free_app_idx(app_idx);
2217 UINT8 app_idx;
2220 if (btif_hl_find_app_idx_using_handle(p_data->sdp_info_ind.app_handle, &app_idx))
2222 p_acb = BTIF_HL_GET_APP_CB_PTR(app_idx);
2235 void btif_hl_set_chan_cb_state(UINT8 app_idx, UINT8 mcl_idx, btif_hl_chan_cb_state_t state){
2236 btif_hl_pending_chan_cb_t *p_pcb = BTIF_HL_GET_PCB_PTR(app_idx, mcl_idx);
2279 void btif_hl_send_disconnecting_cb(UINT8 app_idx, UINT8 mcl_idx, UINT8 mdl_idx){
2280 btif_hl_mdl_cb_t *p_dcb = BTIF_HL_GET_MDL_CB_PTR( app_idx, mcl_idx, mdl_idx);
2304 void btif_hl_send_setup_connecting_cb(UINT8 app_idx, UINT8 mcl_idx){
2305 btif_hl_pending_chan_cb_t *p_pcb = BTIF_HL_GET_PCB_PTR(app_idx, mcl_idx);
2321 btif_hl_set_chan_cb_state(app_idx, mcl_idx, BTIF_HL_CHAN_CB_STATE_CONNECTED_PENDING);
2333 void btif_hl_send_setup_disconnected_cb(UINT8 app_idx, UINT8 mcl_idx){
2334 btif_hl_pending_chan_cb_t *p_pcb = BTIF_HL_GET_PCB_PTR(app_idx, mcl_idx);
2386 UINT8 app_idx, mcl_idx, sdp_idx = 0;
2415 if (btif_hl_find_app_idx_using_app_id(p_data->sdp_query_cfm.app_id, &app_idx))
2417 p_acb = BTIF_HL_GET_APP_CB_PTR(app_idx);
2419 if (btif_hl_find_mcl_idx(app_idx
2421 p_mcb = BTIF_HL_GET_MCL_CB_PTR(app_idx, mcl_idx);
2431 status = btif_hl_find_sdp_idx_using_mdep_filter(app_idx,
2447 p_pcb = BTIF_HL_GET_PCB_PTR(app_idx, mcl_idx);
2455 btif_hl_send_setup_connecting_cb(app_idx, mcl_idx);
2475 status = btif_hl_proc_pending_op(app_idx,mcl_idx);
2507 UINT8 app_idx, mcl_idx;
2545 BOOLEAN btif_hl_proc_pending_op(UINT8 app_idx, UINT8 mcl_idx)
2549 btif_hl_app_cb_t *p_acb = BTIF_HL_GET_APP_CB_PTR(app_idx);
2550 btif_hl_mcl_cb_t *p_mcb = BTIF_HL_GET_MCL_CB_PTR(app_idx, mcl_idx);
2557 p_pcb = BTIF_HL_GET_PCB_PTR(app_idx, mcl_idx);
2574 && !btif_hl_is_the_first_reliable_existed(app_idx, mcl_idx))
2580 btif_hl_send_setup_connecting_cb(app_idx,mcl_idx);
2582 if (!btif_hl_is_reconnect_possible(app_idx, mcl_idx, p_pcb->mdep_cfg_idx, &dch_open, &mdl_id ))
2599 btif_hl_send_setup_disconnected_cb(app_idx, mcl_idx);
2629 UINT8 app_idx, mcl_idx;
2636 if (btif_hl_find_app_idx_using_app_id(p_data->cch_open_cfm.app_id, &app_idx))
2638 BTIF_TRACE_DEBUG1("app_idx=%d", app_idx);
2639 if (btif_hl_find_mcl_idx(app_idx, p_data->cch_open_cfm.bd_addr, &mcl_idx))
2641 p_acb = BTIF_HL_GET_APP_CB_PTR(app_idx);
2643 p_mcb = BTIF_HL_GET_MCL_CB_PTR(app_idx, mcl_idx);
2647 status = btif_hl_proc_pending_op(app_idx, mcl_idx);
2649 btif_hl_start_cch_timer(app_idx, mcl_idx);
2675 BTIF_TRACE_DEBUG3("btif_hl_find_mcl_idx_using_handle: app_idx=%d,"
2701 UINT8 app_idx, mcl_idx;
2719 UINT8 app_idx, mcl_idx;
2738 UINT8 app_idx, orig_app_idx, mcl_idx, mdep_cfg_idx;
2747 // Find the correct app_idx based on the mdep_id;
2822 UINT8 app_idx,orig_app_idx, mcl_idx, mdl_idx, mdep_cfg_idx;
2828 // Find the correct app_idx based on the mdep_id;
2854 BTIF_TRACE_DEBUG4(" app_idx=%d mcl_idx=%d mdl_idx=%d channel_id=%d",
2855 app_idx, mcl_idx, mdl_idx, p_dcb->channel_id );
2903 UINT8 app_idx, mcl_idx, mdl_idx, mdep_cfg_idx;
2909 // Find the correct app_idx based on the mdep_id;
2910 btif_hl_find_app_idx_using_mdepId(p_data->dch_open_cfm.local_mdep_id,&app_idx);
2912 if (btif_hl_find_mcl_idx_using_app_idx(p_data->dch_open_cfm.mcl_handle, app_idx, &mcl_idx ))
2914 p_acb = BTIF_HL_GET_APP_CB_PTR(app_idx);
2915 p_mcb = BTIF_HL_GET_MCL_CB_PTR(app_idx, mcl_idx);
2916 p_pcb = BTIF_HL_GET_PCB_PTR(app_idx, mcl_idx);
2918 if (btif_hl_find_avail_mdl_idx(app_idx, mcl_idx, &mdl_idx))
2920 p_dcb = BTIF_HL_GET_MDL_CB_PTR(app_idx, mcl_idx, mdl_idx);
2922 if (btif_hl_find_mdep_cfg_idx(app_idx, p_data->dch_open_cfm.local_mdep_id, &mdep_cfg_idx))
2934 BTIF_TRACE_DEBUG3("app_idx=%d mcl_idx=%d mdl_idx=%d", app_idx, mcl_idx, mdl_idx );
2935 btif_hl_send_setup_connecting_cb(app_idx, mcl_idx);
2936 if (btif_hl_create_socket(app_idx, mcl_idx, mdl_idx))
2939 BTIF_TRACE_DEBUG4("app_idx=%d mcl_idx=%d mdl_idx=%d p_dcb->channel_id=0x%08x",
2940 app_idx, mcl_idx, mdl_idx, p_dcb->channel_id);
2980 UINT8 app_idx, mcl_idx, mdl_idx, mdep_cfg_idx;
2986 btif_hl_find_app_idx_using_mdepId(p_data->dch_reconnect_cfm.local_mdep_id,&app_idx);
2988 if (btif_hl_find_mcl_idx_using_app_idx(p_data->dch_reconnect_cfm.mcl_handle, app_idx, &mcl_idx ))
2990 p_acb = BTIF_HL_GET_APP_CB_PTR(app_idx);
2991 p_mcb = BTIF_HL_GET_MCL_CB_PTR(app_idx, mcl_idx);
2992 p_pcb = BTIF_HL_GET_PCB_PTR(app_idx, mcl_idx);
2994 if (btif_hl_find_avail_mdl_idx(app_idx, mcl_idx, &mdl_idx))
2996 p_dcb = BTIF_HL_GET_MDL_CB_PTR(app_idx, mcl_idx, mdl_idx);
2998 if (btif_hl_find_mdep_cfg_idx(app_idx, p_data->dch_reconnect_cfm.local_mdep_id, &mdep_cfg_idx))
3010 BTIF_TRACE_DEBUG3("app_idx=%d mcl_idx=%d mdl_idx=%d", app_idx, mcl_idx, mdl_idx );
3011 btif_hl_send_setup_connecting_cb(app_idx, mcl_idx);
3012 if (btif_hl_create_socket(app_idx, mcl_idx, mdl_idx))
3015 BTIF_TRACE_DEBUG4("app_idx=%d mcl_idx=%d mdl_idx=%d p_dcb->channel_id=0x%08x",
3016 app_idx, mcl_idx, mdl_idx, p_dcb->channel_id);
3057 UINT8 app_idx, mcl_idx, mdl_idx, mdep_cfg_idx, dc_cfg;
3062 // Find the correct app_idx based on the mdep_id;
3063 btif_hl_find_app_idx_using_mdepId(p_data->dch_reconnect_ind.local_mdep_id,&app_idx);
3065 if (btif_hl_find_mcl_idx_using_app_idx(p_data->dch_reconnect_ind.mcl_handle, app_idx, &mcl_idx ))
3067 p_acb = BTIF_HL_GET_APP_CB_PTR(app_idx);
3068 BTIF_TRACE_DEBUG2("btif_hl_proc_dch_reconnect_ind: app_idx = %d, mcl_idx = %d",
3069 app_idx, mcl_idx);
3070 p_mcb = BTIF_HL_GET_MCL_CB_PTR(app_idx, mcl_idx);
3072 if (btif_hl_find_avail_mdl_idx(app_idx, mcl_idx, &mdl_idx))
3074 p_dcb =BTIF_HL_GET_MDL_CB_PTR(app_idx, mcl_idx, mdl_idx);
3076 if (btif_hl_find_mdep_cfg_idx(app_idx, p_data->dch_reconnect_ind.local_mdep_id, &mdep_cfg_idx))
3089 BTIF_TRACE_DEBUG4(" app_idx=%d mcl_idx=%d mdl_idx=%d channel_id=%d",
3090 app_idx, mcl_idx, mdl_idx, p_dcb->channel_id );
3091 if (!btif_hl_create_socket(app_idx, mcl_idx, mdl_idx))
3131 UINT8 app_idx, mcl_idx, mdl_idx;
3135 &app_idx, &mcl_idx, &mdl_idx ))
3137 p_dcb = BTIF_HL_GET_MDL_CB_PTR(app_idx, mcl_idx, mdl_idx);
3138 btif_hl_release_socket(app_idx,mcl_idx, mdl_idx);
3139 btif_hl_send_setup_disconnected_cb(app_idx, mcl_idx);
3140 p_mcb = BTIF_HL_GET_MCL_CB_PTR(app_idx,mcl_idx);
3143 btif_hl_start_cch_timer(app_idx, mcl_idx);
3162 UINT8 app_idx, mcl_idx, mdl_idx;
3166 &app_idx, &mcl_idx, &mdl_idx ))
3168 p_dcb = BTIF_HL_GET_MDL_CB_PTR(app_idx, mcl_idx, mdl_idx);
3169 btif_hl_release_socket(app_idx,mcl_idx,mdl_idx);
3171 p_mcb = BTIF_HL_GET_MCL_CB_PTR(app_idx,mcl_idx);
3173 btif_hl_start_cch_timer(app_idx, mcl_idx);
3190 UINT8 app_idx,mcl_idx;
3201 BTIF_TRACE_DEBUG3("btif_hl_find_mcl_idx_using_handle: app_idx=%d,mcl_idx =%d mcl_handle=%d",i,j,p_acb->mcb[j].mcl_handle);
3223 UINT8 app_idx,mcl_idx;
3235 BTIF_TRACE_DEBUG3("btif_hl_find_mcl_idx_using_handle: app_idx=%d,mcl_idx =%d mcl_handle=%d",i,j,p_acb->mcb[j].mcl_handle);
3259 UINT8 app_idx,mcl_idx, mdl_idx;
3264 app_idx, &mcl_idx, &mdl_idx ))
3266 p_dcb =BTIF_HL_GET_MDL_CB_PTR(app_idx, mcl_idx, mdl_idx);
3286 UINT8 app_idx, mcl_idx, mdl_idx;
3291 if (btif_hl_find_mdl_idx_using_handle(p_data->dch_cong_ind.mdl_handle, &app_idx, &mcl_idx, &mdl_idx))
3293 p_dcb =BTIF_HL_GET_MDL_CB_PTR(app_idx, mcl_idx, mdl_idx);
3307 static void btif_hl_proc_reg_request(UINT8 app_idx, UINT8 app_id,
3313 BTIF_TRACE_DEBUG3("%s app_idx=%d app_id=%d", __FUNCTION__, app_idx, app_id);
3376 p_acb = BTIF_HL_GET_APP_CB_PTR(p_data->reg.app_idx);
3378 BTIF_TRACE_DEBUG2("Rcv BTIF_HL_REG_APP app_idx=%d reg_pending=%d", p_data->reg.app_idx, p_acb->reg_pending);
3388 btif_hl_proc_reg_request (p_data->reg.app_idx, p_acb->app_id, ®_param, btif_hl_cback);
3398 BTIF_TRACE_DEBUG1("Rcv BTIF_HL_UNREG_APP app_idx=%d", p_data->unreg.app_idx );
3399 p_acb = BTIF_HL_GET_APP_CB_PTR(p_data->unreg.app_idx);
3409 BTIF_TRACE_DEBUG1("Rcv BTIF_HL_UPDATE_MDL app_idx=%d", p_data->update_mdl.app_idx );
3410 p_acb = BTIF_HL_GET_APP_CB_PTR(p_data->update_mdl.app_idx);
3430 UINT8 app_idx, mcl_idx;
3489 if (btif_hl_find_app_idx_using_app_id(p_data->sdp_query_cfm.app_id, &app_idx))
3491 p_acb = BTIF_HL_GET_APP_CB_PTR(app_idx);
3492 if (btif_hl_find_mcl_idx(app_idx, p_data->sdp_query_cfm.bd_addr, &mcl_idx))
3494 p_mcb = BTIF_HL_GET_MCL_CB_PTR(app_idx, mcl_idx);
3502 btif_hl_send_setup_disconnected_cb(app_idx, mcl_idx);
3510 btif_hl_clean_mcl_cb(app_idx, mcl_idx);
3543 if (btif_hl_find_app_idx_using_app_id(p_data->cch_open_cfm.app_id, &app_idx))
3545 p_acb = BTIF_HL_GET_APP_CB_PTR(app_idx);
3546 if (btif_hl_find_mcl_idx(app_idx, p_data->cch_open_cfm.bd_addr, &mcl_idx))
3548 p_mcb = BTIF_HL_GET_MCL_CB_PTR(app_idx, mcl_idx);
3553 btif_hl_send_setup_disconnected_cb(app_idx, mcl_idx);
3560 btif_hl_clean_mcl_cb(app_idx, mcl_idx);
3589 if (btif_hl_find_mcl_idx_using_handle(p_data->dch_open_cfm.mcl_handle,&app_idx, &mcl_idx))
3591 p_mcb = BTIF_HL_GET_MCL_CB_PTR(app_idx, mcl_idx);
3596 btif_hl_send_setup_disconnected_cb(app_idx, mcl_idx);
3662 &app_idx))
3664 p_acb = BTIF_HL_GET_APP_CB_PTR(app_idx);
3694 if (btif_hl_find_mcl_idx_using_handle(p_data->dch_open_cfm.mcl_handle,&app_idx, &mcl_idx))
3696 p_mcb = BTIF_HL_GET_MCL_CB_PTR(app_idx, mcl_idx);
3701 btif_hl_send_setup_disconnected_cb(app_idx, mcl_idx);
4024 UINT8 app_idx, mcl_idx;
4042 if (btif_hl_find_app_idx(((UINT8)app_id), &app_idx))
4044 p_acb = BTIF_HL_GET_APP_CB_PTR(app_idx);
4045 if (btif_hl_find_mcl_idx(app_idx, bda , &mcl_idx))
4047 p_mcb = BTIF_HL_GET_MCL_CB_PTR(app_idx, mcl_idx);
4052 BTIF_TRACE_DEBUG4("connect_channel: app_idx =%d, mdep_cfg_indx =%d, mdep_id =%d app_id= %d", app_idx,
4060 && !btif_hl_is_the_first_reliable_existed(app_idx,mcl_idx))
4077 p_pcb = BTIF_HL_GET_PCB_PTR(app_idx, mcl_idx);
4126 UINT8 app_idx, mcl_idx, mdl_idx, mdl_cfg_idx, app_id, mdep_cfg_idx;
4138 if (btif_hl_if_channel_setup_pending(channel_id, &app_idx, &mcl_idx))
4140 btif_hl_dch_abort(app_idx, mcl_idx);
4144 if (btif_hl_find_mdl_cfg_idx_using_channel_id(channel_id, &app_idx, &mdl_cfg_idx))
4145 // if(btif_hl_find_mdl_idx_using_channel_id(channel_id, &app_idx,&mcl_idx, &mdl_idx))
4147 p_acb = BTIF_HL_GET_APP_CB_PTR(app_idx);
4150 p_mdl =BTIF_HL_GET_MDL_CFG_PTR(app_idx, mdl_cfg_idx);
4157 if (btif_hl_find_mcl_idx(app_idx, p_mdl->base.peer_bd_addr, &mcl_idx))
4159 p_mcb = BTIF_HL_GET_MCL_CB_PTR(app_idx, mcl_idx);
4218 UINT8 app_idx;
4227 if (btif_hl_find_app_idx(((UINT8)app_id), &app_idx))
4229 evt_param.unreg.app_idx = app_idx;
4230 p_acb = BTIF_HL_GET_APP_CB_PTR(app_idx);
4259 UINT8 app_idx=0, i=0, pending_reg_idx=0;
4276 if (!btif_hl_find_avail_app_idx(&app_idx))
4282 p_acb = BTIF_HL_GET_APP_CB_PTR(app_idx);
4355 evt_param.reg.app_idx = app_idx;
4367 btif_hl_free_app_idx(app_idx);
4389 UINT8 app_idx, mcl_idx, mdl_idx, len;
4398 if(btif_hl_find_app_idx_using_mdepId(mdep_id,&app_idx))
4400 p_acb = BTIF_HL_GET_APP_CB_PTR(app_idx);
4401 p_mdl = BTIF_HL_GET_MDL_CFG_PTR(app_idx, item_idx);
4402 p_channel_id = BTIF_HL_GET_MDL_CFG_CHANNEL_ID_PTR(app_idx, item_idx);
4406 if (btif_hl_find_mcl_idx(app_idx, p_mdl->base.peer_bd_addr , &mcl_idx))
4408 p_mcb = BTIF_HL_GET_MCL_CB_PTR(app_idx, mcl_idx);
4423 BTIF_TRACE_DEBUG4("%s app_idx=%d item_idx=%d mld_id=0x%x",
4424 __FUNCTION__, app_idx, item_idx, p_mdl->base.mdl_id);
4425 evt_param.update_mdl.app_idx = app_idx;
4427 BTIF_TRACE_DEBUG1("send BTIF_HL_UPDATE_MDL event app_idx=%d ",app_idx);
4455 UINT8 app_idx, len;
4459 if(btif_hl_find_app_idx_using_mdepId(mdep_id,&app_idx))
4462 p_acb = BTIF_HL_GET_APP_CB_PTR(app_idx);
4464 p_mdl = BTIF_HL_GET_MDL_CFG_PTR(app_idx, item_idx);
4468 evt_param.update_mdl.app_idx = app_idx;
4470 BTIF_TRACE_DEBUG1("send BTIF_HL_UPDATE_MDL event app_idx=%d ",app_idx);
4495 UINT8 app_idx;
4509 if (btif_hl_find_app_idx(((UINT8)app_id), &app_idx))
4511 p_acb = BTIF_HL_GET_APP_CB_PTR(app_idx);
4664 void btif_hl_release_mcl_sockets(UINT8 app_idx, UINT8 mcl_idx){
4672 p_dcb = BTIF_HL_GET_MDL_CB_PTR(app_idx, mcl_idx, i);
4675 BTIF_TRACE_DEBUG3("found socket for app_idx=%d mcl_id=%d, mdl_idx=%d", app_idx, mcl_idx, i);
4693 void btif_hl_release_socket(UINT8 app_idx, UINT8 mcl_idx, UINT8 mdl_idx){
4695 btif_hl_mdl_cb_t *p_dcb = BTIF_HL_GET_MDL_CB_PTR(app_idx, mcl_idx, mdl_idx);
4698 BTIF_TRACE_DEBUG3("app_idx=%d mcl_idx=%d mdl_idx=%d", app_idx, mcl_idx, mdl_idx );
4717 BOOLEAN btif_hl_create_socket(UINT8 app_idx, UINT8 mcl_idx, UINT8 mdl_idx){
4718 btif_hl_mcl_cb_t *p_mcb = BTIF_HL_GET_MCL_CB_PTR(app_idx, mcl_idx);
4719 btif_hl_mdl_cb_t *p_dcb = BTIF_HL_GET_MDL_CB_PTR(app_idx, mcl_idx, mdl_idx);
4732 p_scb->app_idx = app_idx;
4785 p_mcb = BTIF_HL_GET_MCL_CB_PTR(p_scb->app_idx, p_scb->mcl_idx);
4786 p_dcb = BTIF_HL_GET_MDL_CB_PTR(p_scb->app_idx, p_scb->mcl_idx, p_scb->mdl_idx);
4787 p_acb = BTIF_HL_GET_APP_CB_PTR(p_scb->app_idx);
4826 int app_idx;
4837 BTIF_TRACE_DEBUG3("app_idx=%d mcl_id=%d, mdl_idx=%d",
4838 p_scb->app_idx, p_scb->mcl_idx, p_scb->mdl_idx);
4869 p_dcb = BTIF_HL_GET_MDL_CB_PTR(p_scb->app_idx, p_scb->mcl_idx, p_scb->mdl_idx);
4870 BTIF_TRACE_DEBUG4("idle socket app_idx=%d mcl_id=%d, mdl_idx=%d p_dcb->in_use=%d",
4871 p_scb->app_idx, p_scb->mcl_idx, p_scb->mdl_idx, p_dcb->in_use);
4943 p_dcb = BTIF_HL_GET_MDL_CB_PTR(p_scb->app_idx, p_scb->mcl_idx, p_scb->mdl_idx);
5230 UINT8 app_idx;
5237 if (btif_hl_find_app_idx(app_id, &app_idx))
5239 p_acb = BTIF_HL_GET_APP_CB_PTR(app_idx);