Lines Matching defs:p_pcb
52 tBTA_JV_PCB *p_pcb = &bta_jv_cb.port_cb[p_cb->rfc_hdl[__si] - 1]
189 tBTA_JV_PCB *p_pcb;
207 p_pcb = &bta_jv_cb.port_cb[port_handle - 1];
208 p_pcb->handle = p_cb->handle;
209 p_pcb->port_handle = port_handle;
210 p_pcb->p_pm_cb = NULL;
211 *pp_pcb = p_pcb;
234 tBTA_JV_PCB *p_pcb = NULL;
239 p_pcb = &bta_jv_cb.port_cb[port_handle - 1];
242 return p_pcb;
276 static tBTA_JV_STATUS bta_jv_free_rfc_cb(tBTA_JV_RFC_CB *p_cb, tBTA_JV_PCB *p_pcb)
282 if (!p_cb || !p_pcb)
284 APPL_TRACE_ERROR("bta_jv_free_sr_rfc_cb, p_cb or p_pcb cannot be null");
287 APPL_TRACE_DEBUG("bta_jv_free_sr_rfc_cb: max_sess:%d, curr_sess:%d, p_pcb:%p, user:"
288 "%p, state:%d, jv handle: 0x%x" ,p_cb->max_sess, p_cb->curr_sess, p_pcb,
289 p_pcb->user_data, p_pcb->state, p_pcb->handle);
294 switch (p_pcb->state)
299 "scn:%d, p_pcb:%p, user_data:%p", p_pcb->state, p_cb->scn, p_pcb,
300 p_pcb->user_data);
306 " user_data:%p", p_pcb->state, p_cb->scn, p_pcb->user_data);
307 p_pcb->state = BTA_JV_ST_CL_CLOSING;
310 p_pcb->state = BTA_JV_ST_SR_CLOSING;
313 " user_data:%p", p_cb->scn, p_pcb->user_data);
316 p_pcb->state = BTA_JV_ST_SR_CLOSING;
318 " user_data:%p", p_cb->scn, p_pcb->user_data);
322 "%d, p_pcb:%p, jv handle: 0x%x, port_handle: %d, user_data:%p",
323 p_pcb->state, p_cb->scn, p_pcb, p_pcb->handle, p_pcb->port_handle,
324 p_pcb->user_data);
333 port_status = RFCOMM_RemoveConnection(p_pcb->port_handle);
335 port_status = RFCOMM_RemoveServer(p_pcb->port_handle);
341 p_pcb->handle, p_pcb->state, port_status, p_pcb->port_handle,
347 p_pcb->port_handle = 0;
348 p_pcb->state = BTA_JV_ST_NONE;
349 bta_jv_free_set_pm_profile_cb(p_pcb->handle);
352 p_pcb->cong = FALSE;
353 p_pcb->user_data = 0;
354 int si = BTA_JV_RFC_HDL_TO_SIDX(p_pcb->handle);
357 p_pcb->handle = 0;
493 tBTA_JV_PCB *p_pcb = bta_jv_rfc_port_to_pcb(bta_jv_cb.rfc_cb[hi].rfc_hdl[si]);
494 if (p_pcb)
496 if (NULL == p_pcb->p_pm_cb)
499 "pm_cb?", jv_handle, p_pcb->port_handle, i);
500 p_cb = &p_pcb->p_pm_cb;
1873 tBTA_JV_PCB *p_pcb = bta_jv_rfc_port_to_pcb(port_handle);
1875 APPL_TRACE_DEBUG("bta_jv_port_data_co_cback, p_cb:%p, p_pcb:%p, len:%d, type:%d",
1876 p_cb, p_pcb, len, type);
1877 if (p_pcb != NULL)
1882 bta_jv_pm_conn_busy(p_pcb->p_pm_cb);
1883 ret = bta_co_rfc_data_incoming(p_pcb->user_data, (BT_HDR*)buf);
1884 bta_jv_pm_conn_idle(p_pcb->p_pm_cb);
1887 return bta_co_rfc_data_outgoing_size(p_pcb->user_data, (int*)buf);
1889 return bta_co_rfc_data_outgoing(p_pcb->user_data, buf, len);
1911 tBTA_JV_PCB *p_pcb = bta_jv_rfc_port_to_pcb(port_handle);
1931 p_pcb->state = BTA_JV_ST_CL_OPEN;
1932 p_cb->p_cback(BTA_JV_RFCOMM_OPEN_EVT, &evt_data, p_pcb->user_data);
1940 if (p_pcb->state == BTA_JV_ST_CL_CLOSING)
1944 //p_pcb->state = BTA_JV_ST_NONE;
1945 //p_pcb->cong = FALSE;
1947 p_cback(BTA_JV_RFCOMM_CLOSE_EVT, &evt_data, p_pcb->user_data);
1948 //bta_jv_free_rfc_cb(p_cb, p_pcb);
1965 tBTA_JV_PCB *p_pcb = bta_jv_rfc_port_to_pcb(port_handle);
1977 p_cb->p_cback(BTA_JV_RFCOMM_DATA_IND_EVT, &evt_data, p_pcb->user_data);
1982 p_pcb->cong = (code & PORT_EV_FCS) ? FALSE : TRUE;
1983 evt_data.rfc_cong.cong = p_pcb->cong;
1986 p_cb->p_cback(BTA_JV_RFCOMM_CONG_EVT, &evt_data, p_pcb->user_data);
1991 bta_jv_pm_conn_idle(p_pcb->p_pm_cb);
2011 tBTA_JV_PCB *p_pcb;
2039 p_cb = bta_jv_alloc_rfc_cb(handle, &p_pcb);
2045 p_pcb->state = BTA_JV_ST_CL_OPENING;
2046 p_pcb->user_data = cc->user_data;
2115 tBTA_JV_PCB *p_pcb = NULL;
2124 if (!find_rfc_pcb(user_data, &p_cb, &p_pcb))
2126 bta_jv_free_rfc_cb(p_cb, p_pcb);
2143 tBTA_JV_PCB *p_pcb = bta_jv_rfc_port_to_pcb(port_handle);
2157 void *user_data = p_pcb->user_data;
2158 APPL_TRACE_DEBUG( "bta_jv_port_mgmt_sr_cback code=%d port_handle:0x%x handle:0x%x, p_pcb:%p, user:%d",
2159 code, port_handle, p_cb->handle, p_pcb, p_pcb->user_data);
2165 evt_data.rfc_srv_open.handle = p_pcb->handle;
2168 tBTA_JV_PCB *p_pcb_new_listen = bta_jv_add_rfc_port(p_cb, p_pcb);
2185 p_pcb->cong = FALSE;
2190 if(BTA_JV_ST_SR_CLOSING == p_pcb->state)
2195 //p_pcb->state = BTA_JV_ST_NONE;
2197 //bta_jv_free_rfc_cb(p_cb, p_pcb);
2215 tBTA_JV_PCB *p_pcb = bta_jv_rfc_port_to_pcb(port_handle);
2225 void *user_data = p_pcb->user_data;
2234 p_pcb->cong = (code & PORT_EV_FCS) ? FALSE : TRUE;
2235 evt_data.rfc_cong.cong = p_pcb->cong;
2243 bta_jv_pm_conn_idle(p_pcb->p_pm_cb);
2262 tBTA_JV_PCB *p_pcb = NULL;
2269 p_pcb = &bta_jv_cb.port_cb[p_cb->rfc_hdl[i] - 1];
2270 if (p_pcb->state == BTA_JV_ST_SR_LISTEN)
2273 if(p_pcb_open == p_pcb)
2276 p_pcb->port_handle);
2277 p_pcb->state = BTA_JV_ST_SR_OPEN;
2284 listen, p_pcb->port_handle, p_pcb_open->handle);
2305 p_pcb = &bta_jv_cb.port_cb[p_cb->rfc_hdl[si] - 1];
2306 p_pcb->state = BTA_JV_ST_SR_LISTEN;
2307 p_pcb->port_handle = p_cb->rfc_hdl[si];
2308 p_pcb->user_data = p_pcb_open->user_data;
2310 PORT_ClearKeepHandleFlag(p_pcb->port_handle);
2311 PORT_SetEventCallback(p_pcb->port_handle, bta_jv_port_event_sr_cback);
2312 PORT_SetDataCOCallback (p_pcb->port_handle, bta_jv_port_data_co_cback);
2313 PORT_SetEventMask(p_pcb->port_handle, event_mask);
2314 PORT_GetState(p_pcb->port_handle, &port_state);
2320 PORT_SetState(p_pcb->port_handle, &port_state);
2321 p_pcb->handle = BTA_JV_RFC_H_S_TO_HDL(p_cb->handle, si);
2322 APPL_TRACE_DEBUG("bta_jv_add_rfc_port: p_pcb->handle:0x%x, curr_sess:%d",
2323 p_pcb->handle, p_cb->curr_sess);
2331 return p_pcb;
2351 tBTA_JV_PCB *p_pcb;
2381 p_cb = bta_jv_alloc_rfc_cb(handle, &p_pcb);
2392 p_pcb->state = BTA_JV_ST_SR_LISTEN;
2393 p_pcb->user_data = rs->user_data;
2438 tBTA_JV_PCB *p_pcb = NULL;
2446 if(!find_rfc_pcb(user_data, &p_cb, &p_pcb))
2448 APPL_TRACE_DEBUG("bta_jv_rfcomm_stop_server: p_pcb:%p, p_pcb->port_handle:%d",
2449 p_pcb, p_pcb->port_handle);
2450 bta_jv_free_rfc_cb(p_cb, p_pcb);
2468 tBTA_JV_PCB *p_pcb = rc->p_pcb;
2475 if (PORT_ReadData(rc->p_pcb->port_handle, (char *)rc->p_data, rc->len, &evt_data.len) ==
2481 p_cb->p_cback(BTA_JV_RFCOMM_READ_EVT, (tBTA_JV *)&evt_data, p_pcb->user_data);
2497 tBTA_JV_PCB *p_pcb = wc->p_pcb;
2503 evt_data.cong = p_pcb->cong;
2505 bta_jv_pm_conn_busy(p_pcb->p_pm_cb);
2507 PORT_WriteDataCO(p_pcb->port_handle, &evt_data.len) ==
2513 evt_data.cong = p_pcb->cong;
2516 p_cb->p_cback(BTA_JV_RFCOMM_WRITE_EVT, (tBTA_JV *)&evt_data, p_pcb->user_data);