Lines Matching refs:call

158 	struct bt_tbs_call *call;  in lookup_call()  local
164 call = lookup_call_in_inst(&gtbs_inst, call_index); in lookup_call()
165 if (call != NULL) { in lookup_call()
166 return call; in lookup_call()
170 call = lookup_call_in_inst(&svc_insts[i], call_index); in lookup_call()
171 if (call != NULL) { in lookup_call()
172 return call; in lookup_call()
332 const struct bt_tbs_call *call; in next_free_call_index() local
342 call = lookup_call(next_call_index); in next_free_call_index()
343 if (call == NULL) { in next_free_call_index()
384 static void call_free(struct bt_tbs_call *call) in call_free() argument
386 call->index = BT_TBS_FREE_CALL_INDEX; in call_free()
391 const struct bt_tbs_call *call; in net_buf_put_call_states_by_inst() local
399 call = &calls[i]; in net_buf_put_call_states_by_inst()
400 if (call->index == BT_TBS_FREE_CALL_INDEX) { in net_buf_put_call_states_by_inst()
409 net_buf_simple_add_u8(buf, call->index); in net_buf_put_call_states_by_inst()
410 net_buf_simple_add_u8(buf, call->state); in net_buf_put_call_states_by_inst()
411 net_buf_simple_add_u8(buf, call->flags); in net_buf_put_call_states_by_inst()
434 const struct bt_tbs_call *call; in net_buf_put_current_calls_by_inst() local
444 call = &calls[i]; in net_buf_put_current_calls_by_inst()
445 if (call->index == BT_TBS_FREE_CALL_INDEX) { in net_buf_put_current_calls_by_inst()
449 uri_length = strlen(call->remote_uri); in net_buf_put_current_calls_by_inst()
450 item_len = sizeof(call->index) + sizeof(call->state) + sizeof(call->flags) + in net_buf_put_current_calls_by_inst()
461 net_buf_simple_add_u8(buf, call->index); in net_buf_put_current_calls_by_inst()
462 net_buf_simple_add_u8(buf, call->state); in net_buf_put_current_calls_by_inst()
463 net_buf_simple_add_u8(buf, call->flags); in net_buf_put_current_calls_by_inst()
464 net_buf_simple_add_mem(buf, call->remote_uri, uri_length); in net_buf_put_current_calls_by_inst()
847 struct bt_tbs_call *call = lookup_call_in_inst(inst, ccp->call_index); in accept_call() local
849 if (call == NULL) { in accept_call()
853 if (call->state == BT_TBS_CALL_STATE_INCOMING) { in accept_call()
854 call->state = BT_TBS_CALL_STATE_ACTIVE; in accept_call()
867 struct bt_tbs_call *call = lookup_call_in_inst(inst, ccp->call_index); in terminate_call() local
869 if (call == NULL) { in terminate_call()
873 call_free(call); in terminate_call()
888 struct bt_tbs_call *call = lookup_call_in_inst(inst, ccp->call_index); in tbs_hold_call() local
894 if (call == NULL) { in tbs_hold_call()
898 if (call->state == BT_TBS_CALL_STATE_ACTIVE) { in tbs_hold_call()
899 call->state = BT_TBS_CALL_STATE_LOCALLY_HELD; in tbs_hold_call()
900 } else if (call->state == BT_TBS_CALL_STATE_REMOTELY_HELD) { in tbs_hold_call()
901 call->state = BT_TBS_CALL_STATE_LOCALLY_AND_REMOTELY_HELD; in tbs_hold_call()
902 } else if (call->state == BT_TBS_CALL_STATE_INCOMING) { in tbs_hold_call()
903 call->state = BT_TBS_CALL_STATE_LOCALLY_HELD; in tbs_hold_call()
913 struct bt_tbs_call *call = lookup_call_in_inst(inst, ccp->call_index); in retrieve_call() local
919 if (call == NULL) { in retrieve_call()
923 if (call->state == BT_TBS_CALL_STATE_LOCALLY_HELD) { in retrieve_call()
924 call->state = BT_TBS_CALL_STATE_ACTIVE; in retrieve_call()
925 } else if (call->state == BT_TBS_CALL_STATE_LOCALLY_AND_REMOTELY_HELD) { in retrieve_call()
926 call->state = BT_TBS_CALL_STATE_REMOTELY_HELD; in retrieve_call()
939 struct bt_tbs_call *call; in originate_call() local
952 call = call_alloc(inst, BT_TBS_CALL_STATE_DIALING, ccp->uri, uri_len); in originate_call()
953 if (call == NULL) { in originate_call()
957 BT_TBS_CALL_FLAG_SET_OUTGOING(call->flags); in originate_call()
959 hold_other_calls(inst, 1, &call->index); in originate_call()
962 call->state = BT_TBS_CALL_STATE_ALERTING; in originate_call()
965 LOG_DBG("New call with call index %u", call->index); in originate_call()
967 *call_index = call->index; in originate_call()
1066 struct bt_tbs_call *call; in notify_app() local
1068 call = lookup_call_in_inst(inst, call_index); in notify_app()
1070 if (call == NULL) { in notify_app()
1082 call->state = BT_TBS_CALL_STATE_ALERTING; in notify_app()
1272 const struct bt_tbs_call *call = lookup_call(call_index); in write_call_cp() local
1274 if (call != NULL) { in write_call_cp()
1276 bt_tbs_state_str(call->state)); in write_call_cp()
1847 struct bt_tbs_call *call; in bt_tbs_remote_answer() local
1853 call = lookup_call_in_inst(inst, call_index); in bt_tbs_remote_answer()
1855 if (call == NULL) { in bt_tbs_remote_answer()
1859 if (call->state == BT_TBS_CALL_STATE_ALERTING) { in bt_tbs_remote_answer()
1860 call->state = BT_TBS_CALL_STATE_ACTIVE; in bt_tbs_remote_answer()
1871 struct bt_tbs_call *call; in bt_tbs_remote_hold() local
1878 call = lookup_call_in_inst(inst, call_index); in bt_tbs_remote_hold()
1880 if (call == NULL) { in bt_tbs_remote_hold()
1884 if (call->state == BT_TBS_CALL_STATE_ACTIVE) { in bt_tbs_remote_hold()
1885 call->state = BT_TBS_CALL_STATE_REMOTELY_HELD; in bt_tbs_remote_hold()
1887 } else if (call->state == BT_TBS_CALL_STATE_LOCALLY_HELD) { in bt_tbs_remote_hold()
1888 call->state = BT_TBS_CALL_STATE_LOCALLY_AND_REMOTELY_HELD; in bt_tbs_remote_hold()
1904 struct bt_tbs_call *call; in bt_tbs_remote_retrieve() local
1911 call = lookup_call_in_inst(inst, call_index); in bt_tbs_remote_retrieve()
1913 if (call == NULL) { in bt_tbs_remote_retrieve()
1917 if (call->state == BT_TBS_CALL_STATE_REMOTELY_HELD) { in bt_tbs_remote_retrieve()
1918 call->state = BT_TBS_CALL_STATE_ACTIVE; in bt_tbs_remote_retrieve()
1920 } else if (call->state == BT_TBS_CALL_STATE_LOCALLY_AND_REMOTELY_HELD) { in bt_tbs_remote_retrieve()
1921 call->state = BT_TBS_CALL_STATE_LOCALLY_HELD; in bt_tbs_remote_retrieve()
1951 const char *friendly_name, const struct bt_tbs_call *call) in tbs_inst_remote_incoming() argument
1963 inst->in_call.call_index = call->index; in tbs_inst_remote_incoming()
1966 inst->incoming_uri.call_index = call->index; in tbs_inst_remote_incoming()
1976 inst->friendly_name.call_index = call->index; in tbs_inst_remote_incoming()
1992 struct bt_tbs_call *call = NULL; in bt_tbs_remote_incoming() local
2005 call = call_alloc(inst, BT_TBS_CALL_STATE_INCOMING, (uint8_t *)from, strlen(from)); in bt_tbs_remote_incoming()
2006 if (call == NULL) { in bt_tbs_remote_incoming()
2010 BT_TBS_CALL_FLAG_SET_INCOMING(call->flags); in bt_tbs_remote_incoming()
2013 tbs_inst_remote_incoming(inst, to, from, friendly_name, call); in bt_tbs_remote_incoming()
2019 tbs_inst_remote_incoming(&gtbs_inst, to, from, friendly_name, call); in bt_tbs_remote_incoming()
2024 LOG_DBG("New call with call index %u", call->index); in bt_tbs_remote_incoming()
2026 return call->index; in bt_tbs_remote_incoming()
2208 struct bt_tbs_call *call = &svc_insts[i].calls[j]; in bt_tbs_dbg_print_calls() local
2210 if (call->index == BT_TBS_FREE_CALL_INDEX) { in bt_tbs_dbg_print_calls()
2214 LOG_DBG(" Call #%u", call->index); in bt_tbs_dbg_print_calls()
2215 LOG_DBG(" State: %s", bt_tbs_state_str(call->state)); in bt_tbs_dbg_print_calls()
2216 LOG_DBG(" Flags: 0x%02X", call->flags); in bt_tbs_dbg_print_calls()
2217 LOG_DBG(" URI : %s", call->remote_uri); in bt_tbs_dbg_print_calls()