Home | History | Annotate | Download | only in jv

Lines Matching refs:handle

48 #define HDL2CB(handle) \
49 UINT32 __hi = ((handle) & BTA_JV_RFC_HDL_MASK) - 1; \
50 UINT32 __si = BTA_JV_RFC_HDL_TO_SIDX(handle); \
148 if(bta_jv_cb.rfc_cb[i].handle )
181 ** Description allocate a control block for the given port handle
193 if (0 == bta_jv_cb.rfc_cb[i].handle )
196 /* mask handle to distinguish it with L2CAP handle */
197 p_cb->handle = (i + 1) | BTA_JV_RFCOMM_MASK;
204 APPL_TRACE_DEBUG2( "bta_jv_alloc_rfc_cb port_handle:%d handle:0x%2x",
205 port_handle, p_cb->handle);
208 p_pcb->handle = p_cb->handle;
227 ** Description find the port control block associated with the given port handle
237 && bta_jv_cb.port_cb[port_handle - 1].handle)
249 ** Description find the RFCOMM control block associated with the given port handle
257 UINT32 handle;
260 && bta_jv_cb.port_cb[port_handle - 1].handle)
262 handle = bta_jv_cb.port_cb[port_handle - 1].handle;
263 handle &= BTA_JV_RFC_HDL_MASK;
264 handle &= ~BTA_JV_RFCOMM_MASK;
265 if (handle)
266 p_cb = &bta_jv_cb.rfc_cb[handle - 1];
270 APPL_TRACE_WARNING2("bta_jv_rfc_port_to_cb(port_handle:0x%x):jv handle:0x%x not"
271 " FOUND", port_handle, bta_jv_cb.port_cb[port_handle - 1].handle);
288 "%d, state:%d, jv handle: 0x%x" ,p_cb->max_sess, p_cb->curr_sess, p_pcb,
289 (int)p_pcb->user_data, p_pcb->state, p_pcb->handle);
322 "%d, p_pcb:%p, jv handle: 0x%x, port_handle: %d, user_data:%d",
323 p_pcb->state, p_cb->scn, p_pcb, p_pcb->handle, p_pcb->port_handle,
339 APPL_TRACE_WARNING5("bta_jv_free_rfc_cb(jv handle: 0x%x, state %d)::"
341 p_pcb->handle, p_pcb->state, port_status, p_pcb->port_handle,
349 bta_jv_free_set_pm_profile_cb(p_pcb->handle);
354 int si = BTA_JV_RFC_HDL_TO_SIDX(p_pcb->handle);
357 p_pcb->handle = 0;
364 p_cb->handle = 0;
388 if(BTA_JV_L2C_FOR_SDP_HDL == p_cb->handle)
401 bta_jv_free_set_pm_profile_cb((UINT32)p_cb->handle);
402 if (GAP_ConnClose(p_cb->handle) != BT_PASS)
433 p_pm_cb->handle = BTA_JV_PM_HANDLE_CLEAR;
457 (jv_handle == bta_jv_cb.pm_cb[i].handle))
524 /* rfc handle bd addr retrieval requires core stack handle */
531 if (jv_handle == bta_jv_cb.port_cb[j].handle)
543 /* use jv handle for l2cap bd address retrieval */
546 if (jv_handle == bta_jv_cb.l2c_cb[j].handle)
558 APPL_TRACE_API5("bta_jv_alloc_set_pm_profile_cb(handle 0x%2x, app_id %d): "
568 bta_jv_cb.pm_cb[i].handle = jv_handle;
583 ** Description allocate a SDP id for the given SDP record handle
603 /* the SDP record handle reported is the (index + 1) to control block */
628 ** Description find the SDP handle associated with the given sdp id
892 ** Description callback function to handle set encryption complete event
1289 UINT32 handle;
1298 evt_data.handle = ur->handle;
1300 handle = bta_jv_get_sdp_handle(ur->handle);
1302 if(handle)
1317 if (!SDP_AddAttribute(handle, ur->p_ids[i], (UINT8)((type >> 3) & 0x1f),
1352 UINT32 handle;
1359 evt_data.handle = aa->handle;
1360 handle = bta_jv_get_sdp_handle(aa->handle);
1362 if(handle)
1370 if(ATTR_ID_SERVICE_RECORD_HDL != aa->attr_id && /* do not allow the SDP record handle to be updated */
1372 SDP_AddAttribute(handle, aa->attr_id, (UINT8)((type >> 3) & 0x1f),
1398 UINT32 handle;
1401 evt_data.handle = da->handle;
1402 handle = bta_jv_get_sdp_handle(da->handle);
1404 if(handle)
1407 if(SDP_DeleteAttribute(handle, da->attr_id))
1429 if(dr->handle)
1432 SDP_DeleteRecord(dr->handle);
1457 evt_data.l2c_open.handle = gap_handle;
1476 evt_data.handle = gap_handle;
1515 evt_data.l2c_open.handle = BTA_JV_L2C_FOR_SDP_HDL;
1526 evt_data.handle = BTA_JV_L2C_FOR_SDP_HDL;
1552 close.handle = BTA_JV_L2C_FOR_SDP_HDL;
1579 UINT16 handle=GAP_INVALID_HANDLE;
1605 handle = BTA_JV_L2C_FOR_SDP_HDL;
1613 if( (handle = GAP_ConnOpen("", sec_id, 0, cc->peer_bd_addr, cc->remote_psm,
1624 p_cb = &bta_jv_cb.l2c_cb[handle];
1625 p_cb->handle = handle;
1635 evt_data.handle = handle;
1656 evt_data.handle = cc->handle;
1689 evt_data.l2c_open.handle = gap_handle;
1702 evt_data.l2c_close.handle = p_cb->handle;
1709 evt_data.handle = gap_handle;
1740 UINT16 handle;
1765 (handle = GAP_ConnOpen("JV L2CAP", sec_id, 1, 0, ls->local_psm, &cfg,
1776 GAP_SetAcceptReady(handle, FALSE);
1778 p_cb = &bta_jv_cb.l2c_cb[handle];
1780 evt_data.handle = handle;
1783 p_cb->handle = handle;
1816 evt_data.handle = p_cb->handle;
1842 evt_data.handle = rc->handle;
1847 if(BTA_JV_L2C_FOR_SDP_HDL == rc->handle)
1859 if (BT_PASS == GAP_ConnReadData(rc->handle, rc->p_data, rc->len, &evt_data.len))
1885 evt_data.handle = ls->handle;
1890 if(BTA_JV_L2C_FOR_SDP_HDL == ls->handle)
1913 BT_PASS == GAP_ConnWriteData(ls->handle, ls->p_data, ls->len, &evt_data.len))
1985 APPL_TRACE_DEBUG3( "bta_jv_port_mgmt_cl_cback code=%d port_handle:%d handle:%d",
1986 code, port_handle, p_cb->handle);
1992 evt_data.rfc_open.handle = p_cb->handle;
2000 evt_data.rfc_close.handle = p_cb->handle;
2036 APPL_TRACE_DEBUG3( "bta_jv_port_event_cl_cback code=x%x port_handle:%d handle:%d",
2037 code, port_handle, p_cb->handle);
2040 evt_data.data_ind.handle = p_cb->handle;
2048 evt_data.rfc_cong.handle = p_cb->handle;
2070 UINT16 handle = 0;
2096 BTA_JV_DEF_RFC_MTU, cc->peer_bd_addr, &handle, bta_jv_port_mgmt_cl_cback) != PORT_SUCCESS)
2103 p_cb = bta_jv_alloc_rfc_cb(handle, &p_pcb);
2113 PORT_SetEventCallback(handle, bta_jv_port_event_cl_cback);
2114 PORT_SetEventMask(handle, event_mask);
2115 PORT_SetDataCOCallback (handle, bta_jv_port_data_co_cback);
2117 PORT_GetState(handle, &port_state);
2123 PORT_SetState(handle, &port_state);
2125 evt_data.handle = p_cb->handle;
2138 if(handle)
2139 RFCOMM_RemoveConnection(handle);
2150 UINT32 rfc_handle = bta_jv_cb.port_cb[i].handle & BTA_JV_RFC_HDL_MASK;
2157 " 0x%x, state: %d, rfc_cb->handle: 0x%x", rfc_handle, (*pcb)->handle,
2158 (*pcb)->state, (*cb)->handle);
2180 APPL_TRACE_DEBUG1("bta_jv_rfcomm_close, rfc handle:%d", cc->handle);
2181 if (!cc->handle)
2183 APPL_TRACE_ERROR0("bta_jv_rfcomm_close, rfc handle is null");
2255 APPL_TRACE_DEBUG5( "bta_jv_port_mgmt_sr_cback code=%d port_handle:0x%x handle:0x%x, p_pcb:%p, user:%d",
2256 code, port_handle, p_cb->handle, p_pcb, p_pcb->user_data);
2262 evt_data.rfc_srv_open.handle = p_pcb->handle;
2268 evt_data.rfc_srv_open.new_listen_handle = p_pcb_new_listen->handle;
2278 evt_data.rfc_close.handle = p_cb->handle;
2319 APPL_TRACE_DEBUG3( "bta_jv_port_event_sr_cback code=x%x port_handle:%d handle:%d",
2320 code, port_handle, p_cb->handle);
2325 evt_data.data_ind.handle = p_cb->handle;
2333 evt_data.rfc_cong.handle = p_cb->handle;
2380 "listen count:%d, listen pcb handle:%d, open pcb:%d",
2381 listen, p_pcb->port_handle, p_pcb_open->handle);
2418 p_pcb->handle = BTA_JV_RFC_H_S_TO_HDL(p_cb->handle, si);
2419 APPL_TRACE_DEBUG2("bta_jv_add_rfc_port: p_pcb->handle:0x%x, curr_sess:%d",
2420 p_pcb->handle, p_cb->curr_sess);
2443 UINT16 handle = 0;
2471 BTA_JV_DEF_RFC_MTU, (UINT8 *) bd_addr_any, &handle, bta_jv_port_mgmt_sr_cback) != PORT_SUCCESS)
2478 p_cb = bta_jv_alloc_rfc_cb(handle, &p_pcb);
2492 evt_data.handle = p_cb->handle;
2496 PORT_ClearKeepHandleFlag(handle);
2497 PORT_SetEventCallback(handle, bta_jv_port_event_sr_cback);
2498 PORT_SetEventMask(handle, event_mask);
2499 PORT_GetState(handle, &port_state);
2505 PORT_SetState(handle, &port_state);
2510 PORT_SetDataCOCallback (handle, bta_jv_port_data_co_cback);
2516 if(handle)
2517 RFCOMM_RemoveConnection(handle);
2537 if(!ls->handle)
2539 handle is null");
2569 evt_data.handle = p_cb->handle;
2598 evt_data.handle = p_cb->handle;
2635 APPL_TRACE_API3("bta_jv_set_pm_profile(handle: 0x%x, app_id: %d, init_st: %d)",
2636 p_data->set_pm.handle, p_data->set_pm.app_id, p_data->set_pm.init_st);
2641 status = bta_jv_free_set_pm_profile_cb(p_data->set_pm.handle);
2651 p_cb = bta_jv_alloc_set_pm_profile_cb(p_data->set_pm.handle,
2701 APPL_TRACE_API2("bta_jv_set_pm_conn_state(handle:0x%x, state: %d)", p_cb->handle,
2762 APPL_TRACE_API5("bta_jv_pm_state_change(p_cb: 0x%x, handle: 0x%x, busy/idle_state: %d"
2763 ", app_id: %d, conn_state: %d)", p_cb, p_cb->handle, p_cb->state,