hfp_ag/hfp_gsm_model: allow to set last called number

This commit is contained in:
Milanka Ringwald 2021-04-19 14:04:46 +02:00
parent 245852b749
commit 9de679b765
4 changed files with 15 additions and 1 deletions

View File

@ -2489,6 +2489,10 @@ void hfp_ag_clear_last_dialed_number(void){
hfp_gsm_clear_last_dialed_number();
}
void hfp_ag_set_last_dialed_number(const char * number){
hfp_gsm_set_last_dialed_number(number);
}
void hfp_ag_notify_incoming_call_waiting(hci_con_handle_t acl_handle){
hfp_connection_t * hfp_connection = get_hfp_ag_connection_context_for_acl_handle(acl_handle);
if (!hfp_connection){

View File

@ -223,6 +223,11 @@ void hfp_ag_set_battery_level(int level);
*/
void hfp_ag_clear_last_dialed_number(void);
/*
* @brief Set last dialed number.
*/
void hfp_ag_set_last_dialed_number(const char * number);
/*
* @brief Notify the HF that an incoming call is waiting
* during an ongoing call. The notification will be sent only if the HF has

View File

@ -285,6 +285,11 @@ char * hfp_gsm_last_dialed_number(void){
return &last_dialed_number[0];
}
void hfp_gsm_set_last_dialed_number(const char* number){
strncpy(last_dialed_number, number, sizeof(last_dialed_number));
last_dialed_number[sizeof(last_dialed_number) - 1] = 0;
}
hfp_gsm_call_t * hfp_gsm_call(int call_index){
int i;

View File

@ -73,7 +73,7 @@ hfp_callsetup_status_t hfp_gsm_callsetup_status(void);
int hfp_gsm_get_number_of_calls(void);
char * hfp_gsm_last_dialed_number(void);
void hfp_gsm_clear_last_dialed_number(void);
void hfp_gsm_set_last_dialed_number(const char* number);
hfp_gsm_call_t * hfp_gsm_call(int index);