Lines Matching refs:p_result
1306 void bta_ag_hsp_result(tBTA_AG_SCB *p_scb, tBTA_AG_API_RESULT *p_result)
1308 UINT8 code = bta_ag_trans_result[p_result->result];
1310 APPL_TRACE_DEBUG1("bta_ag_hsp_result : res = %d", p_result->result);
1312 switch(p_result->result)
1316 bta_ag_send_result(p_scb, code, NULL, p_result->data.num);
1327 bta_ag_send_ring(p_scb, (tBTA_AG_DATA *) p_result);
1338 bta_ag_sco_open(p_scb, (tBTA_AG_DATA *) p_result);
1345 if (p_result->result == BTA_AG_IN_CALL_CONN_RES)
1353 if (p_result->data.audio_handle == bta_ag_scb_to_idx(p_scb))
1355 bta_ag_sco_open(p_scb, (tBTA_AG_DATA *) p_result);
1358 else if (p_result->data.audio_handle == BTA_AG_HANDLE_NONE)
1360 bta_ag_sco_close(p_scb, (tBTA_AG_DATA *) p_result);
1372 bta_ag_sco_close(p_scb, (tBTA_AG_DATA *) p_result);
1382 p_scb->inband_enabled = p_result->data.state;
1387 if (p_result->data.ok_flag != BTA_AG_OK_ERROR)
1389 if (p_result->data.str[0] != 0)
1391 bta_ag_send_result(p_scb, code, p_result->data.str, 0);
1394 if (p_result->data.ok_flag == BTA_AG_OK_DONE)
1419 void bta_ag_hfp_result(tBTA_AG_SCB *p_scb, tBTA_AG_API_RESULT *p_result)
1421 UINT8 code = bta_ag_trans_result[p_result->result];
1423 APPL_TRACE_DEBUG1("bta_ag_hfp_result : res = %d", p_result->result);
1425 switch(p_result->result)
1429 bta_ag_send_result(p_scb, code, NULL, p_result->data.num);
1440 if ((p_result->data.num < BTA_AG_CLIP_TYPE_MIN) || (p_result->data.num > BTA_AG_CLIP_TYPE_MAX))
1442 if (p_result->data.num != BTA_AG_CLIP_TYPE_VOIP)
1443 p_result->data.num = BTA_AG_CLIP_TYPE_DEFAULT;
1446 APPL_TRACE_DEBUG1("CLIP type :%d", p_result->data.num);
1448 if (p_result->data.str[0] != 0)
1449 sprintf(p_scb->clip,"%s,%d", p_result->data.str, p_result->data.num);
1459 bta_ag_send_call_inds(p_scb, p_result->result);
1465 bta_ag_send_ring(p_scb, (tBTA_AG_DATA *) p_result);
1471 bta_ag_sco_open(p_scb, (tBTA_AG_DATA *) p_result);
1483 if (p_result->data.audio_handle == bta_ag_scb_to_idx(p_scb) &&
1487 bta_ag_sco_open(p_scb, (tBTA_AG_DATA *) p_result);
1492 else if (p_result->data.audio_handle == BTA_AG_HANDLE_NONE &&
1496 bta_ag_sco_close(p_scb, (tBTA_AG_DATA *) p_result);
1501 bta_ag_send_call_inds(p_scb, p_result->result);
1509 bta_ag_send_call_inds(p_scb, p_result->result);
1517 if (p_result->data.audio_handle == BTA_AG_HANDLE_NONE &&
1521 bta_ag_sco_close(p_scb, (tBTA_AG_DATA *) p_result);
1525 bta_ag_send_call_inds(p_scb, p_result->result);
1526 if (p_result->data.audio_handle == bta_ag_scb_to_idx(p_scb) &&
1529 bta_ag_sco_open(p_scb, (tBTA_AG_DATA *) p_result);
1536 bta_ag_send_call_inds(p_scb, p_result->result);
1537 if (p_result->data.audio_handle == bta_ag_scb_to_idx(p_scb) &&
1540 bta_ag_sco_open(p_scb, (tBTA_AG_DATA *) p_result);
1546 bta_ag_send_call_inds(p_scb, p_result->result);
1551 if (p_result->data.audio_handle == bta_ag_scb_to_idx(p_scb))
1553 bta_ag_sco_open(p_scb, (tBTA_AG_DATA *) p_result);
1555 else if (p_result->data.audio_handle == BTA_AG_HANDLE_NONE)
1557 bta_ag_sco_close(p_scb, (tBTA_AG_DATA *) p_result);
1564 bta_ag_send_call_inds(p_scb, p_result->result);
1575 bta_ag_sco_close(p_scb, (tBTA_AG_DATA *) p_result);
1585 bta_ag_send_call_inds(p_scb, p_result->result);
1593 p_scb->inband_enabled = p_result->data.state;
1595 bta_ag_send_result(p_scb, code, NULL, p_result->data.state);
1600 p_scb->call_ind = p_result->data.str[0] - '0';
1601 p_scb->callsetup_ind = p_result->data.str[2] - '0';
1602 p_scb->service_ind = p_result->data.str[4] - '0';
1603 p_scb->signal_ind = p_result->data.str[6] - '0';
1604 p_scb->roam_ind = p_result->data.str[8] - '0';
1605 p_scb->battchg_ind = p_result->data.str[10] - '0';
1608 bta_ag_send_result(p_scb, code, p_result->data.str, 0);
1616 if (p_result->data.ok_flag != BTA_AG_OK_ERROR)
1618 if (p_result->data.str[0] != 0)
1620 bta_ag_send_result(p_scb, code, p_result->data.str, 0);
1623 if (p_result->data.ok_flag == BTA_AG_OK_DONE)
1628 bta_ag_send_error(p_scb, p_result->data.errcode);
1634 if (p_result->data.ok_flag != BTA_AG_OK_ERROR)
1636 if (p_result->data.str[0] != 0)
1638 bta_ag_process_unat_res(p_result->data.str);
1639 APPL_TRACE_DEBUG1("BTA_AG_RES :%s",p_result->data.str);
1640 bta_ag_send_result(p_scb, code, p_result->data.str, 0);
1643 if (p_result->data.ok_flag == BTA_AG_OK_DONE)
1648 bta_ag_send_error(p_scb, p_result->data.errcode);
1655 bta_ag_send_result(p_scb, code, p_result->data.str, 0);
1657 bta_ag_send_call_inds(p_scb, p_result->result);
1661 bta_ag_send_ind(p_scb, p_result->data.ind.id, p_result->data.ind.value, FALSE);
1665 bta_ag_send_result(p_scb, code, NULL, p_result->data.state);
1669 if (p_result->data.ok_flag != BTA_AG_OK_ERROR)
1672 if (p_result->data.num != BTA_AG_BTRH_NO_RESP)
1674 bta_ag_send_result(p_scb, code, NULL, p_result->data.num);
1678 if (p_result->data.ok_flag == BTA_AG_OK_DONE)
1683 bta_ag_send_error(p_scb, p_result->data.errcode);