Lines Matching refs:result

211   const tBTA_AG_RESULT* result = bta_ag_result_by_code(code);  in bta_ag_send_result()  local
212 if (result == nullptr) { in bta_ag_send_result()
225 strlcpy(p, result->result_string, sizeof(buf) - 2); in bta_ag_send_result()
239 p += strlen(result->result_string); in bta_ag_send_result()
242 if (result->arg_type == BTA_AG_RES_FMT_INT) { in bta_ag_send_result()
244 } else if (result->arg_type == BTA_AG_RES_FMT_STR) { in bta_ag_send_result()
554 void bta_ag_send_call_inds(tBTA_AG_SCB* p_scb, tBTA_AG_RES result) { in bta_ag_send_call_inds() argument
558 size_t callsetup = bta_ag_indicator_by_result_code(result); in bta_ag_send_call_inds()
560 if (result == BTA_AG_END_CALL_RES) { in bta_ag_send_call_inds()
562 } else if (result == BTA_AG_IN_CALL_CONN_RES || in bta_ag_send_call_inds()
563 result == BTA_AG_OUT_CALL_CONN_RES || in bta_ag_send_call_inds()
564 result == BTA_AG_IN_CALL_HELD_RES) { in bta_ag_send_call_inds()
1341 void bta_ag_hsp_result(tBTA_AG_SCB* p_scb, const tBTA_AG_API_RESULT& result) { in bta_ag_hsp_result() argument
1342 APPL_TRACE_DEBUG("bta_ag_hsp_result : res = %d", result.result); in bta_ag_hsp_result()
1344 switch (result.result) { in bta_ag_hsp_result()
1347 bta_ag_send_result(p_scb, result.result, nullptr, result.data.num); in bta_ag_hsp_result()
1373 if (result.result == BTA_AG_IN_CALL_CONN_RES) { in bta_ag_hsp_result()
1379 if (result.data.audio_handle == bta_ag_scb_to_idx(p_scb) && in bta_ag_hsp_result()
1382 } else if (result.data.audio_handle == BTA_AG_HANDLE_NONE && in bta_ag_hsp_result()
1404 p_scb->inband_enabled = result.data.state; in bta_ag_hsp_result()
1409 if (result.data.ok_flag != BTA_AG_OK_ERROR) { in bta_ag_hsp_result()
1410 if (result.data.str[0] != 0) { in bta_ag_hsp_result()
1411 bta_ag_send_result(p_scb, result.result, result.data.str, 0); in bta_ag_hsp_result()
1414 if (result.data.ok_flag == BTA_AG_OK_DONE) bta_ag_send_ok(p_scb); in bta_ag_hsp_result()
1436 void bta_ag_hfp_result(tBTA_AG_SCB* p_scb, const tBTA_AG_API_RESULT& result) { in bta_ag_hfp_result() argument
1437 APPL_TRACE_DEBUG("bta_ag_hfp_result : res = %d", result.result); in bta_ag_hfp_result()
1439 switch (result.result) { in bta_ag_hfp_result()
1442 bta_ag_send_result(p_scb, result.result, nullptr, result.data.num); in bta_ag_hfp_result()
1450 if (result.data.str[0] != 0) { in bta_ag_hfp_result()
1451 snprintf(p_scb->clip, sizeof(p_scb->clip), "%s", result.data.str); in bta_ag_hfp_result()
1459 bta_ag_send_call_inds(p_scb, result.result); in bta_ag_hfp_result()
1464 (result.data.audio_handle != bta_ag_scb_to_idx(p_scb))) { in bta_ag_hfp_result()
1480 bta_ag_send_call_inds(p_scb, result.result); in bta_ag_hfp_result()
1483 if (result.data.audio_handle == bta_ag_scb_to_idx(p_scb) && in bta_ag_hfp_result()
1486 } else if ((result.data.audio_handle == BTA_AG_HANDLE_NONE) && in bta_ag_hfp_result()
1496 bta_ag_send_call_inds(p_scb, result.result); in bta_ag_hfp_result()
1501 bta_ag_send_call_inds(p_scb, result.result); in bta_ag_hfp_result()
1502 if (result.data.audio_handle == bta_ag_scb_to_idx(p_scb) && in bta_ag_hfp_result()
1510 bta_ag_send_call_inds(p_scb, result.result); in bta_ag_hfp_result()
1511 if (result.data.audio_handle == bta_ag_scb_to_idx(p_scb) && in bta_ag_hfp_result()
1521 if (result.data.audio_handle == bta_ag_scb_to_idx(p_scb)) { in bta_ag_hfp_result()
1523 } else if (result.data.audio_handle == BTA_AG_HANDLE_NONE) { in bta_ag_hfp_result()
1531 bta_ag_send_call_inds(p_scb, result.result); in bta_ag_hfp_result()
1535 if (result.data.audio_handle == bta_ag_scb_to_idx(p_scb)) { in bta_ag_hfp_result()
1537 } else if (result.data.audio_handle == BTA_AG_HANDLE_NONE) { in bta_ag_hfp_result()
1545 bta_ag_send_call_inds(p_scb, result.result); in bta_ag_hfp_result()
1561 bta_ag_send_call_inds(p_scb, result.result); in bta_ag_hfp_result()
1569 p_scb->inband_enabled = result.data.state; in bta_ag_hfp_result()
1571 bta_ag_send_result(p_scb, result.result, nullptr, result.data.state); in bta_ag_hfp_result()
1576 p_scb->call_ind = result.data.str[0] - '0'; in bta_ag_hfp_result()
1577 p_scb->callsetup_ind = result.data.str[2] - '0'; in bta_ag_hfp_result()
1578 p_scb->service_ind = result.data.str[4] - '0'; in bta_ag_hfp_result()
1579 p_scb->signal_ind = result.data.str[6] - '0'; in bta_ag_hfp_result()
1580 p_scb->roam_ind = result.data.str[8] - '0'; in bta_ag_hfp_result()
1581 p_scb->battchg_ind = result.data.str[10] - '0'; in bta_ag_hfp_result()
1582 p_scb->callheld_ind = result.data.str[12] - '0'; in bta_ag_hfp_result()
1586 bta_ag_send_result(p_scb, result.result, result.data.str, 0); in bta_ag_hfp_result()
1594 if (result.data.ok_flag != BTA_AG_OK_ERROR) { in bta_ag_hfp_result()
1595 if (result.data.str[0] != 0) { in bta_ag_hfp_result()
1596 bta_ag_send_result(p_scb, result.result, result.data.str, 0); in bta_ag_hfp_result()
1599 if (result.data.ok_flag == BTA_AG_OK_DONE) bta_ag_send_ok(p_scb); in bta_ag_hfp_result()
1601 bta_ag_send_error(p_scb, result.data.errcode); in bta_ag_hfp_result()
1606 if (result.data.ok_flag != BTA_AG_OK_ERROR) { in bta_ag_hfp_result()
1607 if (result.data.str[0] != 0) { in bta_ag_hfp_result()
1608 tBTA_AG_API_RESULT result_copy(result); in bta_ag_hfp_result()
1611 bta_ag_send_result(p_scb, result_copy.result, result_copy.data.str, in bta_ag_hfp_result()
1614 if (result.data.ok_flag == BTA_AG_OK_DONE) { in bta_ag_hfp_result()
1618 bta_ag_send_error(p_scb, result.data.errcode); in bta_ag_hfp_result()
1625 bta_ag_send_result(p_scb, result.result, result.data.str, 0); in bta_ag_hfp_result()
1627 bta_ag_send_call_inds(p_scb, result.result); in bta_ag_hfp_result()
1631 bta_ag_send_ind(p_scb, result.data.ind.id, result.data.ind.value, false); in bta_ag_hfp_result()
1635 bta_ag_send_ind(p_scb, result.data.ind.id, result.data.ind.value, true); in bta_ag_hfp_result()
1639 bta_ag_send_result(p_scb, result.result, nullptr, result.data.state); in bta_ag_hfp_result()
1643 if (result.data.ok_flag != BTA_AG_OK_ERROR) { in bta_ag_hfp_result()
1645 if (result.data.num != BTA_AG_BTRH_NO_RESP) { in bta_ag_hfp_result()
1646 bta_ag_send_result(p_scb, result.result, nullptr, result.data.num); in bta_ag_hfp_result()
1650 if (result.data.ok_flag == BTA_AG_OK_DONE) { in bta_ag_hfp_result()
1654 bta_ag_send_error(p_scb, result.data.errcode); in bta_ag_hfp_result()
1662 result.data.ind.id); in bta_ag_hfp_result()
1665 result.data.ind.id); in bta_ag_hfp_result()
1672 result.data.ind.id); in bta_ag_hfp_result()
1675 result.data.ind.id); in bta_ag_hfp_result()
1681 result.data.ind.on_demand) { in bta_ag_hfp_result()
1686 result.data.ind.on_demand; in bta_ag_hfp_result()
1687 p += utl_itoa(result.data.ind.id, p); in bta_ag_hfp_result()
1691 bta_ag_send_result(p_scb, result.result, buffer, 0); in bta_ag_hfp_result()
1694 "%s HF Indicator %d already %s", result.data.ind.id, in bta_ag_hfp_result()
1695 (result.data.ind.on_demand) ? "Enabled" : "Disabled"); in bta_ag_hfp_result()