mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-01-27 06:35:20 +00:00
hafp: handle call dropped
This commit is contained in:
parent
7d9e4b220f
commit
314a4aca8d
@ -222,7 +222,7 @@ typedef enum {
|
||||
HFP_AG_INCOMING_CALL_ACCEPETED_BY_HF,
|
||||
HFP_AG_TERMINATE_CALL_BY_AG,
|
||||
HFP_AG_TERMINATE_CALL_BY_HF,
|
||||
HFP_AG_CALL_DROPED,
|
||||
HFP_AG_CALL_DROPPED,
|
||||
} hfp_ag_call_event_t;
|
||||
|
||||
|
||||
|
15
src/hfp_ag.c
15
src/hfp_ag.c
@ -816,7 +816,6 @@ static void hfp_ag_trigger_terminate_call(void){
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void hfp_ag_call_sm(hfp_ag_call_event_t event){
|
||||
switch (event){
|
||||
case HFP_AG_INCOMING_CALL:
|
||||
@ -857,19 +856,18 @@ static void hfp_ag_call_sm(hfp_ag_call_event_t event){
|
||||
}
|
||||
break;
|
||||
case HFP_AG_TERMINATE_CALL_BY_AG:
|
||||
case HFP_AG_CALL_DROPPED:
|
||||
switch (hfp_ag_call_state){
|
||||
case HFP_CALL_STATUS_ACTIVE_OR_HELD_CALL_IS_PRESENT:
|
||||
hfp_ag_callsetup_state = HFP_CALLSETUP_STATUS_NO_CALL_SETUP_IN_PROGRESS;
|
||||
hfp_ag_call_state = HFP_CALL_STATUS_NO_HELD_OR_ACTIVE_CALLS;
|
||||
hfp_ag_trigger_terminate_call();
|
||||
printf("TODO AG termante call\n");
|
||||
printf("TODO AG terminate or drop call\n");
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case HFP_AG_CALL_DROPED:
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@ -1101,17 +1099,20 @@ void hfp_ag_incoming_call(void){
|
||||
hfp_ag_call_sm(HFP_AG_INCOMING_CALL);
|
||||
}
|
||||
|
||||
void hfp_ag_call_dropped(void){
|
||||
hfp_ag_call_sm(HFP_AG_CALL_DROPPED);
|
||||
}
|
||||
|
||||
// call from AG UI
|
||||
void hfp_ag_answer_incoming_call(void){
|
||||
hfp_ag_call_sm(HFP_AG_INCOMING_CALL_ACCEPETED_BY_AG);
|
||||
}
|
||||
/**
|
||||
* @brief
|
||||
*/
|
||||
|
||||
void hfp_ag_terminate_call(void){
|
||||
hfp_ag_call_sm(HFP_AG_TERMINATE_CALL_BY_AG);
|
||||
}
|
||||
|
||||
|
||||
void hfp_ag_audio_connection_transfer_towards_ag(bd_addr_t bd_addr){
|
||||
hfp_connection_t * connection = get_hfp_connection_context_for_bd_addr(bd_addr);
|
||||
if (connection->call_state != HFP_CALL_ACTIVE) return;
|
||||
|
@ -175,6 +175,11 @@ void hfp_ag_set_use_in_band_ring_tone(int use_in_band_ring_tone);
|
||||
*/
|
||||
void hfp_ag_incoming_call(void);
|
||||
|
||||
/**
|
||||
* @brief
|
||||
*/
|
||||
void hfp_ag_call_dropped(void);
|
||||
|
||||
/**
|
||||
* @brief
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user