Home | History | Annotate | Download | only in src

Lines Matching defs: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);
287 BTIF_TRACE_DEBUG3("%app_idx=%d, mcl_idx=%d mcl-connected=%d",
292 BTIF_TRACE_DEBUG3("Idle timeout Close CCH app_idx=%d mcl_idx=%d mcl_handle=%d",
298 BTIF_TRACE_DEBUG2("CCH idle timeout But CCH not connected app_idx=%d mcl_idx=%d ",i,j);
312 void btif_hl_stop_cch_timer(UINT8 app_idx, UINT8 mcl_idx)
314 btif_hl_mcl_cb_t *p_mcb = BTIF_HL_GET_MCL_CB_PTR(app_idx, mcl_idx);
315 BTIF_TRACE_DEBUG4("%s app_idx=%d, mcl_idx=%d timer_in_use=%d",
316 __FUNCTION__,app_idx, mcl_idx, p_mcb->cch_timer.in_use);
333 void btif_hl_start_cch_timer(UINT8 app_idx, UINT8 mcl_idx)
335 btif_hl_mcl_cb_t *p_mcb = BTIF_HL_GET_MCL_CB_PTR(app_idx, mcl_idx);
336 BTIF_TRACE_DEBUG5("%s app_idx=%d, mcl_idx=%d timer_active=%d timer_in_use=%d",
337 __FUNCTION__,app_idx, mcl_idx,
367 static BOOLEAN btif_hl_find_mdl_idx(UINT8 app_idx, UINT8 mcl_idx, UINT16 mdl_id,
370 btif_hl_mcl_cb_t *p_mcb = BTIF_HL_GET_MCL_CB_PTR(app_idx, mcl_idx);
451 BOOLEAN btif_hl_is_the_first_reliable_existed(UINT8 app_idx, UINT8 mcl_idx )
453 btif_hl_mcl_cb_t *p_mcb =BTIF_HL_GET_MCL_CB_PTR(app_idx, mcl_idx);
527 static void btif_hl_clean_mcl_cb(UINT8 app_idx, UINT8 mcl_idx)
530 BTIF_TRACE_DEBUG3("%s app_idx=%d, mcl_idx=%d", __FUNCTION__,app_idx, mcl_idx);
531 p_mcb = BTIF_HL_GET_MCL_CB_PTR(app_idx, mcl_idx);
545 static void btif_hl_reset_mdep_filter(UINT8 app_idx)
547 btif_hl_app_cb_t *p_acb =BTIF_HL_GET_APP_CB_PTR(app_idx);
560 static BOOLEAN btif_hl_find_sdp_idx_using_mdep_filter(UINT8 app_idx, UINT8 mcl_idx, UINT8 *p_sdp_idx)
562 btif_hl_app_cb_t *p_acb =BTIF_HL_GET_APP_CB_PTR(app_idx);
563 btif_hl_mcl_cb_t *p_mcb =BTIF_HL_GET_MCL_CB_PTR(app_idx, mcl_idx);
627 btif_hl_reset_mdep_filter(app_idx);
640 BOOLEAN btif_hl_is_reconnect_possible(UINT8 app_idx, UINT8 mcl_idx, int mdep_cfg_idx,
643 btif_hl_app_cb_t *p_acb = BTIF_HL_GET_APP_CB_PTR(app_idx);
644 btif_hl_mcl_cb_t *p_mcb = BTIF_HL_GET_MCL_CB_PTR(app_idx, mcl_idx);
658 BTIF_TRACE_DEBUG4("%s app_idx=%d mcl_idx=%d mdep_cfg_idx=%d",
659 __FUNCTION__, app_idx, mcl_idx, mdep_cfg_idx );
663 if (!btif_hl_is_the_first_reliable_existed(app_idx, mcl_idx))
695 !btif_hl_find_mdl_idx(app_idx, mcl_idx,p_mdl->base.mdl_id, &mdl_idx))
767 UINT8 app_idx, mcl_idx;
777 if (btif_hl_find_app_idx(app_id, &app_idx))
779 if (btif_hl_find_mcl_idx(app_idx, bd_addr , &mcl_idx))
781 p_mcb = BTIF_HL_GET_MCL_CB_PTR(app_idx, mcl_idx);
783 p_pcb = BTIF_HL_GET_PCB_PTR(app_idx, mcl_idx);
803 if (!btif_hl_is_reconnect_possible(app_idx, mcl_idx, mdep_cfg_idx, p_dch_open_api, &mdl_id ))
821 p_acb = BTIF_HL_GET_APP_CB_PTR(app_idx);
873 void btif_hl_dch_abort(UINT8 app_idx, UINT8 mcl_idx){
876 BTIF_TRACE_DEBUG3("%s app_idx=%d mcl_idx=%d",__FUNCTION__, app_idx, mcl_idx );
877 p_mcb = BTIF_HL_GET_MCL_CB_PTR(app_idx, mcl_idx);
904 UINT8 app_idx, mcl_idx, chan_idx;
912 if (btif_hl_find_app_idx(app_id, &app_idx))
914 p_acb = BTIF_HL_GET_APP_CB_PTR(app_idx);
916 if (!btif_hl_find_mcl_idx(app_idx, bd_addr, &mcl_idx))
918 if (btif_hl_find_avail_mcl_idx(app_idx, &mcl_idx))
920 p_mcb = BTIF_HL_GET_MCL_CB_PTR(app_idx, mcl_idx);
935 p_pcb = BTIF_HL_GET_PCB_PTR(app_idx, mcl_idx);
1024 BTIF_TRACE_EVENT5("%s found=%d channel_id=0x%08x, app_idx=%d mdl_cfg_idx=%d ",
1069 BTIF_TRACE_DEBUG5("%s found=%d app_idx=%d mcl_idx=%d mdl_idx=%d ",
1082 BOOLEAN btif_hl_find_channel_id_using_mdl_id(UINT8 app_idx, tBTA_HL_MDL_ID mdl_id,
1089 p_acb =BTIF_HL_GET_APP_CB_PTR(app_idx);
1094 p_mdl =BTIF_HL_GET_MDL_CFG_PTR(app_idx,j);
1095 mdl_cfg_channel_id = *(BTIF_HL_GET_MDL_CFG_CHANNEL_ID_PTR(app_idx,j));
1104 BTIF_TRACE_EVENT6("%s found=%d channel_id=0x%08x, mdl_id=0x%x app_idx=%d mdl_cfg_idx=%d ",
1105 __FUNCTION__,found,*p_channel_id,mdl_id, app_idx,j );
1153 BTIF_TRACE_EVENT5("%s found=%d app_idx=%d mcl_idx=%d mdl_idx=%d ",
1170 UINT8 app_idx, mcl_idx;
1196 if (btif_hl_find_app_idx(app_id, &app_idx) )
1198 p_acb = BTIF_HL_GET_APP_CB_PTR(app_idx);
1199 if (btif_hl_find_mcl_idx(app_idx, bd_addr, &mcl_idx))
1201 p_mcb =BTIF_HL_GET_MCL_CB_PTR(app_idx, mcl_idx);
1203 BTIF_TRACE_DEBUG2("app_idx=%d mcl_idx=%d",app_idx, mcl_idx);
1244 UINT8 app_idx;
1251 if (btif_hl_find_app_idx(app_id, &app_idx) )
1253 p_acb =BTIF_HL_GET_APP_CB_PTR(app_idx);
1286 static BOOLEAN btif_hl_find_mdep_cfg_idx(UINT8 app_idx, tBTA_HL_MDEP_ID local_mdep_id,
1288 btif_hl_app_cb_t *p_acb =BTIF_HL_GET_APP_CB_PTR(app_idx);
1295 BTIF_TRACE_DEBUG2("btif_hl_find_mdep_cfg_idx: mdep_id=%d app_idx = %d",
1296 p_sup_feature->mdep[i].mdep_id,app_idx);
1305 BTIF_TRACE_DEBUG5("%s found=%d mdep_idx=%d local_mdep_id=%d app_idx=%d ",
1306 __FUNCTION__, found,i, local_mdep_id,app_idx);
1321 BOOLEAN btif_hl_find_mcl_idx(UINT8 app_idx, BD_ADDR p_bd_addr, UINT8 *p_mcl_idx){
1324 btif_hl_app_cb_t *p_acb =BTIF_HL_GET_APP_CB_PTR(app_idx);
1329 p_mcb = BTIF_HL_GET_MCL_CB_PTR(app_idx, i);
1412 static void btif_hl_free_app_idx(UINT8 app_idx){
1414 if ((app_idx < BTA_HL_NUM_APPS) && btif_hl_cb.acb[app_idx].in_use )
1416 btif_hl_cb.acb[app_idx].in_use = FALSE;
1417 memset (&btif_hl_cb.acb[app_idx], 0, sizeof(btif_hl_app_cb_t));
1727 BTIF_TRACE_EVENT4("%s status=%d handle=%d app_idx=%d ",
1758 BTIF_TRACE_EVENT4("%s found=%d app_id=%d app_idx=%d ",
1785 BTIF_TRACE_DEBUG3("btif_hl_find_mcl_idx_using_handle:app_idx=%d,"
1797 BTIF_TRACE_DEBUG4("%s found=%d app_idx=%d mcl_idx=%d",__FUNCTION__,
1842 BTIF_TRACE_DEBUG4("%s found=%d app_idx=%d mcl_idx=%d",__FUNCTION__,
1866 BTIF_TRACE_DEBUG3("btif_hl_find_app_idx_using_deleted_mdl_id: app_idx=%d,"
1876 BTIF_TRACE_DEBUG3("%s found=%d app_idx=%d",__FUNCTION__,
1944 ** Description clean dch cpntrol bloack using app_idx
1949 void btif_hl_clean_mdls_using_app_idx( UINT8 app_idx){
1956 p_acb =BTIF_HL_GET_APP_CB_PTR(app_idx);
1967 p_dcb = BTIF_HL_GET_MDL_CB_PTR(app_idx, j,x);
1968 btif_hl_release_socket(app_idx,j,x);
2010 BTIF_TRACE_DEBUG3("%s found=%d app_idx=%d", __FUNCTION__, found, i );
2040 BTIF_TRACE_DEBUG3("%s found=%d app_idx=%d", __FUNCTION__, found, i );
2054 BOOLEAN btif_hl_find_avail_mdl_idx(UINT8 app_idx, UINT8 mcl_idx,
2056 btif_hl_mcl_cb_t *p_mcb = BTIF_HL_GET_MCL_CB_PTR(app_idx, mcl_idx);
2084 BOOLEAN btif_hl_find_avail_mcl_idx(UINT8 app_idx, UINT8 *p_mcl_idx){
2090 if (!btif_hl_cb.acb[app_idx].mcb[i].in_use)
2124 BTIF_TRACE_DEBUG3("%s found=%d app_idx=%d", __FUNCTION__, found, i);
2142 UINT8 app_idx;
2150 if (btif_hl_find_app_idx_using_app_id(p_data->dereg_cfm.app_id, &app_idx))
2152 p_acb = BTIF_HL_GET_APP_CB_PTR(app_idx);
2156 btif_hl_clean_mdls_using_app_idx(app_idx);
2183 UINT8 app_idx;
2189 if (btif_hl_find_app_idx(p_data->reg_cfm.app_id, &app_idx))
2191 p_acb = BTIF_HL_GET_APP_CB_PTR(app_idx);
2198 btif_hl_free_app_idx(app_idx);
2221 UINT8 app_idx;
2224 if (btif_hl_find_app_idx_using_handle(p_data->sdp_info_ind.app_handle, &app_idx))
2226 p_acb = BTIF_HL_GET_APP_CB_PTR(app_idx);
2239 void btif_hl_set_chan_cb_state(UINT8 app_idx, UINT8 mcl_idx, btif_hl_chan_cb_state_t state){
2240 btif_hl_pending_chan_cb_t *p_pcb = BTIF_HL_GET_PCB_PTR(app_idx, mcl_idx);
2283 void btif_hl_send_disconnecting_cb(UINT8 app_idx, UINT8 mcl_idx, UINT8 mdl_idx){
2284 btif_hl_mdl_cb_t *p_dcb = BTIF_HL_GET_MDL_CB_PTR( app_idx, mcl_idx, mdl_idx);
2308 void btif_hl_send_setup_connecting_cb(UINT8 app_idx, UINT8 mcl_idx){
2309 btif_hl_pending_chan_cb_t *p_pcb = BTIF_HL_GET_PCB_PTR(app_idx, mcl_idx);
2325 btif_hl_set_chan_cb_state(app_idx, mcl_idx, BTIF_HL_CHAN_CB_STATE_CONNECTED_PENDING);
2337 void btif_hl_send_setup_disconnected_cb(UINT8 app_idx, UINT8 mcl_idx){
2338 btif_hl_pending_chan_cb_t *p_pcb = BTIF_HL_GET_PCB_PTR(app_idx, mcl_idx);
2390 UINT8 app_idx, mcl_idx, sdp_idx = 0;
2419 app_idx))
2421 p_acb = BTIF_HL_GET_APP_CB_PTR(app_idx);
2423 if (btif_hl_find_mcl_idx(app_idx, p_data->sdp_query_cfm.bd_addr, &mcl_idx))
2425 p_mcb = BTIF_HL_GET_MCL_CB_PTR(app_idx, mcl_idx);
2435 status = btif_hl_find_sdp_idx_using_mdep_filter(app_idx,
2451 p_pcb = BTIF_HL_GET_PCB_PTR(app_idx, mcl_idx);
2459 btif_hl_send_setup_connecting_cb(app_idx, mcl_idx);
2479 status = btif_hl_proc_pending_op(app_idx,mcl_idx);
2511 UINT8 app_idx, mcl_idx;
2549 BOOLEAN btif_hl_proc_pending_op(UINT8 app_idx, UINT8 mcl_idx)
2553 btif_hl_app_cb_t *p_acb = BTIF_HL_GET_APP_CB_PTR(app_idx);
2554 btif_hl_mcl_cb_t *p_mcb = BTIF_HL_GET_MCL_CB_PTR(app_idx, mcl_idx);
2561 p_pcb = BTIF_HL_GET_PCB_PTR(app_idx, mcl_idx);
2578 && !btif_hl_is_the_first_reliable_existed(app_idx, mcl_idx))
2584 btif_hl_send_setup_connecting_cb(app_idx,mcl_idx);
2586 if (!btif_hl_is_reconnect_possible(app_idx, mcl_idx, p_pcb->mdep_cfg_idx, &dch_open, &mdl_id ))
2603 btif_hl_send_setup_disconnected_cb(app_idx, mcl_idx);
2633 UINT8 app_idx, mcl_idx;
2640 if (btif_hl_find_app_idx_using_app_id(p_data->cch_open_cfm.app_id, &app_idx))
2642 BTIF_TRACE_DEBUG1("app_idx=%d", app_idx);
2643 if (btif_hl_find_mcl_idx(app_idx, p_data->cch_open_cfm.bd_addr, &mcl_idx))
2645 p_acb = BTIF_HL_GET_APP_CB_PTR(app_idx);
2647 p_mcb = BTIF_HL_GET_MCL_CB_PTR(app_idx, mcl_idx);
2651 status = btif_hl_proc_pending_op(app_idx, mcl_idx);
2653 btif_hl_start_cch_timer(app_idx, mcl_idx);
2679 BTIF_TRACE_DEBUG3("btif_hl_find_mcl_idx_using_handle: app_idx=%d,"
2705 UINT8 app_idx, mcl_idx;
2723 UINT8 app_idx, mcl_idx;
2742 UINT8 app_idx, orig_app_idx, mcl_idx, mdep_cfg_idx;
2751 // Find the correct app_idx based on the mdep_id;
2826 UINT8 app_idx,orig_app_idx, mcl_idx, mdl_idx, mdep_cfg_idx;
2832 // Find the correct app_idx based on the mdep_id;
2858 BTIF_TRACE_DEBUG4(" app_idx=%d mcl_idx=%d mdl_idx=%d channel_id=%d",
2859 app_idx, mcl_idx, mdl_idx, p_dcb->channel_id );
2907 UINT8 app_idx, mcl_idx, mdl_idx, mdep_cfg_idx;
2913 // Find the correct app_idx based on the mdep_id;
2914 btif_hl_find_app_idx_using_mdepId(p_data->dch_open_cfm.local_mdep_id,&app_idx);
2916 if (btif_hl_find_mcl_idx_using_app_idx(p_data->dch_open_cfm.mcl_handle, app_idx, &mcl_idx ))
2918 p_acb = BTIF_HL_GET_APP_CB_PTR(app_idx);
2919 p_mcb = BTIF_HL_GET_MCL_CB_PTR(app_idx, mcl_idx);
2920 p_pcb = BTIF_HL_GET_PCB_PTR(app_idx, mcl_idx);
2922 if (btif_hl_find_avail_mdl_idx(app_idx, mcl_idx, &mdl_idx))
2924 p_dcb = BTIF_HL_GET_MDL_CB_PTR(app_idx, mcl_idx, mdl_idx);
2926 if (btif_hl_find_mdep_cfg_idx(app_idx, p_data->dch_open_cfm.local_mdep_id, &mdep_cfg_idx))
2938 BTIF_TRACE_DEBUG3("app_idx=%d mcl_idx=%d mdl_idx=%d", app_idx, mcl_idx, mdl_idx );
2939 btif_hl_send_setup_connecting_cb(app_idx, mcl_idx);
2940 if (btif_hl_create_socket(app_idx, mcl_idx, mdl_idx))
2943 BTIF_TRACE_DEBUG4("app_idx=%d mcl_idx=%d mdl_idx=%d p_dcb->channel_id=0x%08x",
2944 app_idx, mcl_idx, mdl_idx, p_dcb->channel_id);
2984 UINT8 app_idx, mcl_idx, mdl_idx, mdep_cfg_idx;
2990 btif_hl_find_app_idx_using_mdepId(p_data->dch_reconnect_cfm.local_mdep_id,&app_idx);
2992 if (btif_hl_find_mcl_idx_using_app_idx(p_data->dch_reconnect_cfm.mcl_handle, app_idx, &mcl_idx ))
2994 p_acb = BTIF_HL_GET_APP_CB_PTR(app_idx);
2995 p_mcb = BTIF_HL_GET_MCL_CB_PTR(app_idx, mcl_idx);
2996 p_pcb = BTIF_HL_GET_PCB_PTR(app_idx, mcl_idx);
2998 if (btif_hl_find_avail_mdl_idx(app_idx, mcl_idx, &mdl_idx))
3000 p_dcb = BTIF_HL_GET_MDL_CB_PTR(app_idx, mcl_idx, mdl_idx);
3002 if (btif_hl_find_mdep_cfg_idx(app_idx, p_data->dch_reconnect_cfm.local_mdep_id, &mdep_cfg_idx))
3014 BTIF_TRACE_DEBUG3("app_idx=%d mcl_idx=%d mdl_idx=%d", app_idx, mcl_idx, mdl_idx );
3015 btif_hl_send_setup_connecting_cb(app_idx, mcl_idx);
3016 if (btif_hl_create_socket(app_idx, mcl_idx, mdl_idx))
3019 BTIF_TRACE_DEBUG4("app_idx=%d mcl_idx=%d mdl_idx=%d p_dcb->channel_id=0x%08x",
3020 app_idx, mcl_idx, mdl_idx, p_dcb->channel_id);
3061 UINT8 app_idx, mcl_idx, mdl_idx, mdep_cfg_idx, dc_cfg;
3066 // Find the correct app_idx based on the mdep_id;
3067 btif_hl_find_app_idx_using_mdepId(p_data->dch_reconnect_ind.local_mdep_id,&app_idx);
3069 if (btif_hl_find_mcl_idx_using_app_idx(p_data->dch_reconnect_ind.mcl_handle, app_idx, &mcl_idx ))
3071 p_acb = BTIF_HL_GET_APP_CB_PTR(app_idx);
3072 BTIF_TRACE_DEBUG2("btif_hl_proc_dch_reconnect_ind: app_idx = %d, mcl_idx = %d",
3073 app_idx, mcl_idx);
3074 p_mcb = BTIF_HL_GET_MCL_CB_PTR(app_idx, mcl_idx);
3076 if (btif_hl_find_avail_mdl_idx(app_idx, mcl_idx, &mdl_idx))
3078 p_dcb =BTIF_HL_GET_MDL_CB_PTR(app_idx, mcl_idx, mdl_idx);
3080 if (btif_hl_find_mdep_cfg_idx(app_idx, p_data->dch_reconnect_ind.local_mdep_id, &mdep_cfg_idx))
3093 BTIF_TRACE_DEBUG4(" app_idx=%d mcl_idx=%d mdl_idx=%d channel_id=%d",
3094 app_idx, mcl_idx, mdl_idx, p_dcb->channel_id );
3095 if (!btif_hl_create_socket(app_idx, mcl_idx, mdl_idx))
3135 UINT8 app_idx, mcl_idx, mdl_idx;
3139 &app_idx, &mcl_idx, &mdl_idx ))
3141 p_dcb = BTIF_HL_GET_MDL_CB_PTR(app_idx, mcl_idx, mdl_idx);
3142 btif_hl_release_socket(app_idx,mcl_idx, mdl_idx);
3143 btif_hl_send_setup_disconnected_cb(app_idx, mcl_idx);
3144 p_mcb = BTIF_HL_GET_MCL_CB_PTR(app_idx,mcl_idx);
3147 btif_hl_start_cch_timer(app_idx, mcl_idx);
3166 UINT8 app_idx, mcl_idx, mdl_idx;
3170 &app_idx, &mcl_idx, &mdl_idx ))
3172 p_dcb = BTIF_HL_GET_MDL_CB_PTR(app_idx, mcl_idx, mdl_idx);
3173 btif_hl_release_socket(app_idx,mcl_idx,mdl_idx);
3175 p_mcb = BTIF_HL_GET_MCL_CB_PTR(app_idx,mcl_idx);
3177 btif_hl_start_cch_timer(app_idx, mcl_idx);
3194 UINT8 app_idx,mcl_idx;
3205 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);
3227 UINT8 app_idx,mcl_idx;
3239 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);
3263 app_idx,mcl_idx, mdl_idx;
3268 &app_idx, &mcl_idx, &mdl_idx ))
3270 p_dcb =BTIF_HL_GET_MDL_CB_PTR(app_idx, mcl_idx, mdl_idx);
3290 UINT8 app_idx, mcl_idx, mdl_idx;
3295 if (btif_hl_find_mdl_idx_using_handle(p_data->dch_cong_ind.mdl_handle, &app_idx, &mcl_idx, &mdl_idx))
3297 p_dcb =BTIF_HL_GET_MDL_CB_PTR(app_idx, mcl_idx, mdl_idx);
3311 static void btif_hl_proc_reg_request(UINT8 app_idx, UINT8 app_id,
3317 BTIF_TRACE_DEBUG3("%s app_idx=%d app_id=%d", __FUNCTION__, app_idx, app_id);
3380 p_acb = BTIF_HL_GET_APP_CB_PTR(p_data->reg.app_idx);
3382 BTIF_TRACE_DEBUG2("Rcv BTIF_HL_REG_APP app_idx=%d reg_pending=%d", p_data->reg.app_idx, p_acb->reg_pending);
3392 btif_hl_proc_reg_request (p_data->reg.app_idx, p_acb->app_id, &reg_param, btif_hl_cback);
3402 BTIF_TRACE_DEBUG1("Rcv BTIF_HL_UNREG_APP app_idx=%d", p_data->unreg.app_idx );
3403 p_acb = BTIF_HL_GET_APP_CB_PTR(p_data->unreg.app_idx);
3413 BTIF_TRACE_DEBUG1("Rcv BTIF_HL_UPDATE_MDL app_idx=%d", p_data->update_mdl.app_idx );
3414 p_acb = BTIF_HL_GET_APP_CB_PTR(p_data->update_mdl.app_idx);
3434 UINT8 app_idx, mcl_idx;
3493 if (btif_hl_find_app_idx_using_app_id(p_data->sdp_query_cfm.app_id, &app_idx))
3495 p_acb = BTIF_HL_GET_APP_CB_PTR(app_idx);
3496 if (btif_hl_find_mcl_idx(app_idx, p_data->sdp_query_cfm.bd_addr, &mcl_idx))
3498 p_mcb = BTIF_HL_GET_MCL_CB_PTR(app_idx, mcl_idx);
3506 btif_hl_send_setup_disconnected_cb(app_idx, mcl_idx);
3514 btif_hl_clean_mcl_cb(app_idx, mcl_idx);
3547 if (btif_hl_find_app_idx_using_app_id(p_data->cch_open_cfm.app_id, &app_idx))
3549 p_acb = BTIF_HL_GET_APP_CB_PTR(app_idx);
3550 if (btif_hl_find_mcl_idx(app_idx, p_data->cch_open_cfm.bd_addr, &mcl_idx))
3552 p_mcb = BTIF_HL_GET_MCL_CB_PTR(app_idx, mcl_idx);
3557 btif_hl_send_setup_disconnected_cb(app_idx, mcl_idx);
3564 btif_hl_clean_mcl_cb(app_idx, mcl_idx);
3593 if (btif_hl_find_mcl_idx_using_handle(p_data->dch_open_cfm.mcl_handle,&app_idx, &mcl_idx))
3595 p_mcb = BTIF_HL_GET_MCL_CB_PTR(app_idx, mcl_idx);
3600 btif_hl_send_setup_disconnected_cb(app_idx, mcl_idx);
3666 &app_idx))
3668 p_acb = BTIF_HL_GET_APP_CB_PTR(app_idx);
3698 if (btif_hl_find_mcl_idx_using_handle(p_data->dch_open_cfm.mcl_handle,&app_idx, &mcl_idx))
3700 p_mcb = BTIF_HL_GET_MCL_CB_PTR(app_idx, mcl_idx);
3705 btif_hl_send_setup_disconnected_cb(app_idx, mcl_idx);
4028 UINT8 app_idx, mcl_idx;
4046 if (btif_hl_find_app_idx(((UINT8)app_id), &app_idx))
4048 p_acb = BTIF_HL_GET_APP_CB_PTR(app_idx);
4049 if (btif_hl_find_mcl_idx(app_idx, bda , &mcl_idx))
4051 p_mcb = BTIF_HL_GET_MCL_CB_PTR(app_idx, mcl_idx);
4056 BTIF_TRACE_DEBUG4("connect_channel: app_idx =%d, mdep_cfg_indx =%d, mdep_id =%d app_id= %d", app_idx,
4064 && !btif_hl_is_the_first_reliable_existed(app_idx,mcl_idx))
4081 p_pcb = BTIF_HL_GET_PCB_PTR(app_idx, mcl_idx);
4130 UINT8 app_idx, mcl_idx, mdl_idx, mdl_cfg_idx, app_id, mdep_cfg_idx;
4142 if (btif_hl_if_channel_setup_pending(channel_id, &app_idx, &mcl_idx))
4144 btif_hl_dch_abort(app_idx, mcl_idx);
4148 if (btif_hl_find_mdl_cfg_idx_using_channel_id(channel_id, &app_idx, &mdl_cfg_idx))
4149 // if(btif_hl_find_mdl_idx_using_channel_id(channel_id, &app_idx,&mcl_idx, &mdl_idx))
4151 p_acb = BTIF_HL_GET_APP_CB_PTR(app_idx);
4154 p_mdl =BTIF_HL_GET_MDL_CFG_PTR(app_idx, mdl_cfg_idx);
4161 if (btif_hl_find_mcl_idx(app_idx, p_mdl->base.peer_bd_addr, &mcl_idx))
4163 p_mcb = BTIF_HL_GET_MCL_CB_PTR(app_idx, mcl_idx);
4222 UINT8 app_idx;
4231 if (btif_hl_find_app_idx(((UINT8)app_id), &app_idx))
4233 evt_param.unreg.app_idx = app_idx;
4234 p_acb = BTIF_HL_GET_APP_CB_PTR(app_idx);
4263 UINT8 app_idx=0, i=0, pending_reg_idx=0;
4280 if (!btif_hl_find_avail_app_idx(&app_idx))
4286 p_acb = BTIF_HL_GET_APP_CB_PTR(app_idx);
4359 evt_param.reg.app_idx = app_idx;
4371 btif_hl_free_app_idx(app_idx);
4393 UINT8 app_idx, mcl_idx, mdl_idx, len;
4402 if(btif_hl_find_app_idx_using_mdepId(mdep_id,&app_idx))
4404 p_acb = BTIF_HL_GET_APP_CB_PTR(app_idx);
4405 p_mdl = BTIF_HL_GET_MDL_CFG_PTR(app_idx, item_idx);
4406 p_channel_id = BTIF_HL_GET_MDL_CFG_CHANNEL_ID_PTR(app_idx, item_idx);
4410 if (btif_hl_find_mcl_idx(app_idx, p_mdl->base.peer_bd_addr , &mcl_idx))
4412 p_mcb = BTIF_HL_GET_MCL_CB_PTR(app_idx, mcl_idx);
4427 BTIF_TRACE_DEBUG4("%s app_idx=%d item_idx=%d mld_id=0x%x",
4428 __FUNCTION__, app_idx, item_idx, p_mdl->base.mdl_id);
4429 evt_param.update_mdl.app_idx = app_idx;
4431 BTIF_TRACE_DEBUG1("send BTIF_HL_UPDATE_MDL event app_idx=%d ",app_idx);
4459 UINT8 app_idx, len;
4463 if(btif_hl_find_app_idx_using_mdepId(mdep_id,&app_idx))
4466 p_acb = BTIF_HL_GET_APP_CB_PTR(app_idx);
4468 p_mdl = BTIF_HL_GET_MDL_CFG_PTR(app_idx, item_idx);
4472 evt_param.update_mdl.app_idx = app_idx;
4474 BTIF_TRACE_DEBUG1("send BTIF_HL_UPDATE_MDL event app_idx=%d ",app_idx);
4499 UINT8 app_idx;
4513 if (btif_hl_find_app_idx(((UINT8)app_id), &app_idx))
4515 p_acb = BTIF_HL_GET_APP_CB_PTR(app_idx);
4668 void btif_hl_release_mcl_sockets(UINT8 app_idx, UINT8 mcl_idx){
4676 p_dcb = BTIF_HL_GET_MDL_CB_PTR(app_idx, mcl_idx, i);
4679 BTIF_TRACE_DEBUG3("found socket for app_idx=%d mcl_id=%d, mdl_idx=%d", app_idx, mcl_idx, i);
4697 void btif_hl_release_socket(UINT8 app_idx, UINT8 mcl_idx, UINT8 mdl_idx){
4699 btif_hl_mdl_cb_t *p_dcb = BTIF_HL_GET_MDL_CB_PTR(app_idx, mcl_idx, mdl_idx);
4702 BTIF_TRACE_DEBUG3("app_idx=%d mcl_idx=%d mdl_idx=%d", app_idx, mcl_idx, mdl_idx );
4721 BOOLEAN btif_hl_create_socket(UINT8 app_idx, UINT8 mcl_idx, UINT8 mdl_idx){
4722 btif_hl_mcl_cb_t *p_mcb = BTIF_HL_GET_MCL_CB_PTR(app_idx, mcl_idx);
4723 btif_hl_mdl_cb_t *p_dcb = BTIF_HL_GET_MDL_CB_PTR(app_idx, mcl_idx, mdl_idx);
4736 p_scb->app_idx = app_idx;
4789 p_mcb = BTIF_HL_GET_MCL_CB_PTR(p_scb->app_idx, p_scb->mcl_idx);
4790 p_dcb = BTIF_HL_GET_MDL_CB_PTR(p_scb->app_idx, p_scb->mcl_idx, p_scb->mdl_idx);
4791 p_acb = BTIF_HL_GET_APP_CB_PTR(p_scb->app_idx);
4830 int app_idx;
4841 BTIF_TRACE_DEBUG3("app_idx=%d mcl_id=%d, mdl_idx=%d",
4842 p_scb->app_idx, p_scb->mcl_idx, p_scb->mdl_idx);
4873 p_dcb = BTIF_HL_GET_MDL_CB_PTR(p_scb->app_idx, p_scb->mcl_idx, p_scb->mdl_idx);
4874 BTIF_TRACE_DEBUG4("idle socket app_idx=%d mcl_id=%d, mdl_idx=%d p_dcb->in_use=%d",
4875 p_scb->app_idx, p_scb->mcl_idx, p_scb->mdl_idx, p_dcb->in_use);
4947 p_dcb = BTIF_HL_GET_MDL_CB_PTR(p_scb->app_idx, p_scb->mcl_idx, p_scb->mdl_idx);
5234 UINT8 app_idx;
5241 if (btif_hl_find_app_idx(app_id, &app_idx))
5243 p_acb = BTIF_HL_GET_APP_CB_PTR(app_idx);