Zephyr API Documentation 4.1.99
A Scalable Open Source RTOS
|
|
4.1.99 |
HFP profile AG application callback. More...
#include <hfp_ag.h>
Data Fields | |
void(* | connected )(struct bt_conn *conn, struct bt_hfp_ag *ag) |
HF AG connected callback to application. | |
void(* | disconnected )(struct bt_hfp_ag *ag) |
HF disconnected callback to application. | |
void(* | sco_connected )(struct bt_hfp_ag *ag, struct bt_conn *sco_conn) |
HF SCO/eSCO connected Callback. | |
void(* | sco_disconnected )(struct bt_conn *sco_conn, uint8_t reason) |
HF SCO/eSCO disconnected Callback. | |
int(* | memory_dial )(struct bt_hfp_ag *ag, const char *location, char **number) |
HF memory dialing request Callback. | |
int(* | number_call )(struct bt_hfp_ag *ag, const char *number) |
HF phone number calling request Callback. | |
void(* | outgoing )(struct bt_hfp_ag *ag, struct bt_hfp_ag_call *call, const char *number) |
HF outgoing Callback. | |
void(* | incoming )(struct bt_hfp_ag *ag, struct bt_hfp_ag_call *call, const char *number) |
HF incoming Callback. | |
void(* | incoming_held )(struct bt_hfp_ag_call *call) |
HF incoming call is held Callback. | |
void(* | ringing )(struct bt_hfp_ag_call *call, bool in_band) |
HF ringing Callback. | |
void(* | accept )(struct bt_hfp_ag_call *call) |
HF call accept Callback. | |
void(* | held )(struct bt_hfp_ag_call *call) |
HF call held Callback. | |
void(* | retrieve )(struct bt_hfp_ag_call *call) |
HF call retrieve Callback. | |
void(* | reject )(struct bt_hfp_ag_call *call) |
HF call reject Callback. | |
void(* | terminate )(struct bt_hfp_ag_call *call) |
HF call terminate Callback. | |
void(* | codec )(struct bt_hfp_ag *ag, uint32_t ids) |
Supported codec Ids callback. | |
void(* | codec_negotiate )(struct bt_hfp_ag *ag, int err) |
Codec negotiate callback. | |
void(* | audio_connect_req )(struct bt_hfp_ag *ag) |
Audio connection request callback. | |
void(* | vgm )(struct bt_hfp_ag *ag, uint8_t gain) |
HF VGM setting callback. | |
void(* | vgs )(struct bt_hfp_ag *ag, uint8_t gain) |
HF VGS setting callback. | |
void(* | ecnr_turn_off )(struct bt_hfp_ag *ag) |
HF ECNR turns off callback. | |
void(* | explicit_call_transfer )(struct bt_hfp_ag *ag) |
HF explicit call transfer callback. | |
void(* | voice_recognition )(struct bt_hfp_ag *ag, bool activate) |
Voice recognition activation/deactivation callback. | |
void(* | ready_to_accept_audio )(struct bt_hfp_ag *ag) |
Ready to accept audio callback. | |
int(* | request_phone_number )(struct bt_hfp_ag *ag, char **number) |
Request phone number callback. | |
void(* | transmit_dtmf_code )(struct bt_hfp_ag *ag, char code) |
Transmit a DTMF Code callback. | |
int(* | subscriber_number )(struct bt_hfp_ag *ag, bt_hfp_ag_query_subscriber_func_t func) |
Get subscriber number callback. | |
void(* | hf_indicator_value )(struct bt_hfp_ag *ag, enum hfp_ag_hf_indicators indicator, uint32_t value) |
HF indicator value callback. | |
HFP profile AG application callback.
void(* bt_hfp_ag_cb::accept) (struct bt_hfp_ag_call *call) |
HF call accept Callback.
If this callback is provided it will be called whenever the call is accepted.
call | HFP AG call object. |
void(* bt_hfp_ag_cb::audio_connect_req) (struct bt_hfp_ag *ag) |
Audio connection request callback.
If this callback is provided it will be called whenever the audio conenction request is triggered by HF. When AT+BCC AT command received, it means the procedure of establishment of audio connection is triggered by HF. If the callback is provided by application, AG needs to start the codec connection procedure by calling function bt_hfp_ag_audio_connect
in application layer. Or, the codec conenction procedure will be started with default codec id BT_HFP_AG_CODEC_CVSD
.
ag | HFP AG object. |
err | Result of codec negotiation. |
void(* bt_hfp_ag_cb::codec) (struct bt_hfp_ag *ag, uint32_t ids) |
Supported codec Ids callback.
If this callback is provided it will be called whenever the supported codec ids are updated.
ag | HFP AG object. |
void(* bt_hfp_ag_cb::codec_negotiate) (struct bt_hfp_ag *ag, int err) |
Codec negotiate callback.
If this callback is provided it will be called whenever the codec negotiation succeeded or failed.
ag | HFP AG object. |
err | Result of codec negotiation. |
void(* bt_hfp_ag_cb::connected) (struct bt_conn *conn, struct bt_hfp_ag *ag) |
HF AG connected callback to application.
If this callback is provided it will be called whenever the AG connection completes.
conn | Connection object. |
ag | HFP AG object. |
void(* bt_hfp_ag_cb::disconnected) (struct bt_hfp_ag *ag) |
HF disconnected callback to application.
If this callback is provided it will be called whenever the connection gets disconnected, including when a connection gets rejected or cancelled or any error in SLC establishment.
ag | HFP AG object. |
void(* bt_hfp_ag_cb::ecnr_turn_off) (struct bt_hfp_ag *ag) |
HF ECNR turns off callback.
If this callback is provided it will be called whenever the ECNR turning off request is received from HF. If the callback is NULL or CONFIG_BT_HFP_AG_ECNR
is not enabled, the response result code of AT command will be an AT ERROR.
ag | HFP AG object. |
void(* bt_hfp_ag_cb::explicit_call_transfer) (struct bt_hfp_ag *ag) |
HF explicit call transfer callback.
If this callback is provided it will be called whenever the AT+CHLD=4 is sent from HF. When the callback is notified, the application should connect the two calls and disconnects the subscriber from both calls (Explicit Call Transfer). After the callback returned, the call objects will be invalid. If the callback is NULL, the response result code of AT command will be an AT ERROR. If CONFIG_BT_HFP_AG_3WAY_CALL
is not enabled, the callback will not be notified.
ag | HFP AG object. |
void(* bt_hfp_ag_cb::held) (struct bt_hfp_ag_call *call) |
HF call held Callback.
If this callback is provided it will be called whenever the call is held.
call | HFP AG call object. |
void(* bt_hfp_ag_cb::hf_indicator_value) (struct bt_hfp_ag *ag, enum hfp_ag_hf_indicators indicator, uint32_t value) |
HF indicator value callback.
If this callback is provided it will be called whenever the AT command AT+BIEV
is received. If CONFIG_BT_HFP_AG_HF_INDICATORS
is not enabled, the callback will not be notified.
ag | HFP AG object. |
indicator | HF indicator |
value | The value of specific indicator |
void(* bt_hfp_ag_cb::incoming) (struct bt_hfp_ag *ag, struct bt_hfp_ag_call *call, const char *number) |
HF incoming Callback.
If this callback is provided it will be called whenever a new call is incoming.
ag | HFP AG object. |
call | HFP AG call object. |
number | Incoming number |
void(* bt_hfp_ag_cb::incoming_held) (struct bt_hfp_ag_call *call) |
HF incoming call is held Callback.
If this callback is provided it will be called whenever the incoming call is held but not accepted.
call | HFP AG call object. |
int(* bt_hfp_ag_cb::memory_dial) (struct bt_hfp_ag *ag, const char *location, char **number) |
HF memory dialing request Callback.
If this callback is provided it will be called whenever a new call is requested with memory dialing from HF. Get the phone number according to the given AG memory location.
ag | HFP AG object. |
location | AG memory location |
number | Dialing number |
int(* bt_hfp_ag_cb::number_call) (struct bt_hfp_ag *ag, const char *number) |
HF phone number calling request Callback.
If this callback is provided it will be called whenever a new call is requested with specific phone number from HF. When the callback is triggered, the application needs to start dialing the number with the passed phone number. If the callback is invalid, the phone number dialing from HF cannot be supported.
ag | HFP AG object. |
number | Dialing number |
void(* bt_hfp_ag_cb::outgoing) (struct bt_hfp_ag *ag, struct bt_hfp_ag_call *call, const char *number) |
HF outgoing Callback.
If this callback is provided it will be called whenever a new call is outgoing.
ag | HFP AG object. |
call | HFP AG call object. |
number | Dialing number |
void(* bt_hfp_ag_cb::ready_to_accept_audio) (struct bt_hfp_ag *ag) |
Ready to accept audio callback.
If this callback is provided it will be called whenever the HF is ready to accept audio. If the feature Enhanced Voice Recognition Status
is supported by HF, the callback will be notified if the AT command AT+BVRA=2
is received. The HF may send this value during an ongoing VR (Voice Recognition) session to terminate audio output from the AG (if there is any) and prepare the AG for new audio input. Or, the callback will be notified after the voice recognition is activated. If CONFIG_BT_HFP_AG_ENH_VOICE_RECG
is not enabled, the callback will not be notified.
ag | HFP AG object. |
void(* bt_hfp_ag_cb::reject) (struct bt_hfp_ag_call *call) |
HF call reject Callback.
If this callback is provided it will be called whenever the call is rejected.
call | HFP AG call object. |
int(* bt_hfp_ag_cb::request_phone_number) (struct bt_hfp_ag *ag, char **number) |
Request phone number callback.
If this callback is provided it will be called whenever the AT command AT+BINP=1
is received. If the upper layer accepts the request, it shall obtain a phone number. If the upper layer rejects the request, it shall return a an error. If CONFIG_BT_HFP_AG_VOICE_TAG
is not enabled, the callback will not be notified.
ag | HFP AG object. |
number | Phone number of voice tag. |
void(* bt_hfp_ag_cb::retrieve) (struct bt_hfp_ag_call *call) |
HF call retrieve Callback.
If this callback is provided it will be called whenever the call is retrieved.
call | HFP AG call object. |
void(* bt_hfp_ag_cb::ringing) (struct bt_hfp_ag_call *call, bool in_band) |
HF ringing Callback.
If this callback is provided it will be called whenever the call is in the ringing
call | HFP AG call object. |
in_bond | true - in-bond ringing, false - No in-bond ringing |
void(* bt_hfp_ag_cb::sco_connected) (struct bt_hfp_ag *ag, struct bt_conn *sco_conn) |
HF SCO/eSCO connected Callback.
If this callback is provided it will be called whenever the SCO/eSCO connection completes.
ag | HFP AG object. |
sco_conn | SCO/eSCO Connection object. |
void(* bt_hfp_ag_cb::sco_disconnected) (struct bt_conn *sco_conn, uint8_t reason) |
HF SCO/eSCO disconnected Callback.
If this callback is provided it will be called whenever the SCO/eSCO connection gets disconnected.
conn | SCO/eSCO Connection object. |
reason | BT_HCI_ERR_* reason for the disconnection. |
int(* bt_hfp_ag_cb::subscriber_number) (struct bt_hfp_ag *ag, bt_hfp_ag_query_subscriber_func_t func) |
Get subscriber number callback.
If this callback is provided it will be called whenever the AT command AT+CNUM
is received.
ag | HFP AG object. |
func | Query subscriber number callback. |
void(* bt_hfp_ag_cb::terminate) (struct bt_hfp_ag_call *call) |
HF call terminate Callback.
If this callback is provided it will be called whenever the call is terminated.
call | HFP AG call object. |
void(* bt_hfp_ag_cb::transmit_dtmf_code) (struct bt_hfp_ag *ag, char code) |
Transmit a DTMF Code callback.
If this callback is provided it will be called whenever the AT command AT+VTS=<code>
is received. During an ongoing call, the HF transmits the AT+VTS command to instruct the AG to transmit a specific DTMF code to its network connection.
ag | HFP AG object. |
code | A specific DTMF code. |
void(* bt_hfp_ag_cb::vgm) (struct bt_hfp_ag *ag, uint8_t gain) |
HF VGM setting callback.
If this callback is provided it will be called whenever the VGM gain setting is informed from HF.
ag | HFP AG object. |
gain | HF microphone gain value. |
void(* bt_hfp_ag_cb::vgs) (struct bt_hfp_ag *ag, uint8_t gain) |
HF VGS setting callback.
If this callback is provided it will be called whenever the VGS gain setting is informed from HF.
ag | HFP AG object. |
gain | HF speaker gain value. |
void(* bt_hfp_ag_cb::voice_recognition) (struct bt_hfp_ag *ag, bool activate) |
Voice recognition activation/deactivation callback.
If this callback is provided it will be called whenever the voice recognition activation is changed. If voice recognition is activated, the upper layer should call bt_hfp_ag_audio_connect
with appropriate codec ID to setup audio connection. If the callback is not provided by upper layer, the function bt_hfp_ag_audio_connect
will be called with default codec ID BT_HFP_AG_CODEC_CVSD
. If CONFIG_BT_HFP_AG_VOICE_RECG
is not enabled, the callback will not be notified.
ag | HFP AG object. |
activate | Voice recognition activation/deactivation. |