Zephyr API Documentation 4.1.99
A Scalable Open Source RTOS
|
|
4.1.99 |
HFP profile application callback. More...
#include <hfp_hf.h>
Data Fields | |
void(* | connected )(struct bt_conn *conn, struct bt_hfp_hf *hf) |
HF connected callback to application. | |
void(* | disconnected )(struct bt_hfp_hf *hf) |
HF disconnected callback to application. | |
void(* | sco_connected )(struct bt_hfp_hf *hf, 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. | |
void(* | service )(struct bt_hfp_hf *hf, uint32_t value) |
HF indicator Callback. | |
void(* | outgoing )(struct bt_hfp_hf *hf, struct bt_hfp_hf_call *call) |
HF call outgoing Callback. | |
void(* | remote_ringing )(struct bt_hfp_hf_call *call) |
HF call outgoing call is ringing Callback. | |
void(* | incoming )(struct bt_hfp_hf *hf, struct bt_hfp_hf_call *call) |
HF call incoming Callback. | |
void(* | incoming_held )(struct bt_hfp_hf_call *call) |
HF incoming call on hold Callback. | |
void(* | accept )(struct bt_hfp_hf_call *call) |
HF call accept Callback. | |
void(* | reject )(struct bt_hfp_hf_call *call) |
HF call reject Callback. | |
void(* | terminate )(struct bt_hfp_hf_call *call) |
HF call terminate Callback. | |
void(* | held )(struct bt_hfp_hf_call *call) |
HF call held Callback. | |
void(* | retrieve )(struct bt_hfp_hf_call *call) |
HF call retrieve Callback. | |
void(* | signal )(struct bt_hfp_hf *hf, uint32_t value) |
HF indicator Callback. | |
void(* | roam )(struct bt_hfp_hf *hf, uint32_t value) |
HF indicator Callback. | |
void(* | battery )(struct bt_hfp_hf *hf, uint32_t value) |
HF indicator Callback. | |
void(* | ring_indication )(struct bt_hfp_hf_call *call) |
HF incoming call Ring indication callback to application. | |
void(* | dialing )(struct bt_hfp_hf *hf, int err) |
HF call dialing Callback. | |
void(* | clip )(struct bt_hfp_hf_call *call, char *number, uint8_t type) |
HF calling line identification notification callback to application. | |
void(* | vgm )(struct bt_hfp_hf *hf, uint8_t gain) |
HF microphone gain notification callback to application. | |
void(* | vgs )(struct bt_hfp_hf *hf, uint8_t gain) |
HF speaker gain notification callback to application. | |
void(* | inband_ring )(struct bt_hfp_hf *hf, bool inband) |
HF in-band ring tone notification callback to application. | |
void(*)(struct bt_hfp_hf *hf, uint8_t id) | operator) (struct bt_hfp_hf *hf, uint8_t mode, uint8_t format, char *operator);void(*codec_negotiate |
HF network operator notification callback to application. | |
void(* | ecnr_turn_off )(struct bt_hfp_hf *hf, int err) |
HF ECNR turns off callback. | |
void(* | call_waiting )(struct bt_hfp_hf_call *call, char *number, uint8_t type) |
HF call waiting notification callback to application. | |
void(* | voice_recognition )(struct bt_hfp_hf *hf, bool activate) |
Voice recognition activation/deactivation callback. | |
void(* | vre_state )(struct bt_hfp_hf *hf, uint8_t state) |
Voice recognition engine state callback. | |
void(* | textual_representation )(struct bt_hfp_hf *hf, char *id, uint8_t type, uint8_t operation, char *text) |
Textual representation callback. | |
void(* | request_phone_number )(struct bt_hfp_hf *hf, const char *number) |
Request phone number callback. | |
void(* | subscriber_number )(struct bt_hfp_hf *hf, const char *number, uint8_t type, uint8_t service) |
Query subscriber number callback. | |
HFP profile application callback.
void(* bt_hfp_hf_cb::accept) (struct bt_hfp_hf_call *call) |
HF call accept Callback.
This callback provides the incoming/outgoing call active status to the application.
call | HFP HF call object. |
void(* bt_hfp_hf_cb::battery) (struct bt_hfp_hf *hf, uint32_t value) |
HF indicator Callback.
This callback battery service indicator value to the application
hf | HFP HF object. |
value | battery indicator value received from the AG. |
void(* bt_hfp_hf_cb::call_waiting) (struct bt_hfp_hf_call *call, char *number, uint8_t type) |
HF call waiting notification callback to application.
If this callback is provided it will be called whenever there is a unsolicited result code +CCWA. This notification can be enabled/disabled by calling function bt_hfp_hf_call_waiting_notify
. If CONFIG_BT_HFP_HF_3WAY_CALL
is not enabled, the unsolicited result code +CCWA will be ignored. And the callback will not be notified.
call | HFP HF call object. |
number | Notified phone number. |
type | Specify the format of the phone number. |
void(* bt_hfp_hf_cb::clip) (struct bt_hfp_hf_call *call, char *number, uint8_t type) |
HF calling line identification notification callback to application.
If this callback is provided it will be called whenever there is a unsolicited result code +CLIP. If CONFIG_BT_HFP_HF_CLI
is not enabled, the unsolicited result code +CLIP will be ignored. And the callback will not be notified.
call | HFP HF call object. |
number | Notified phone number. |
type | Specify the format of the phone number. |
void(* bt_hfp_hf_cb::connected) (struct bt_conn *conn, struct bt_hfp_hf *hf) |
HF connected callback to application.
If this callback is provided it will be called whenever the connection completes.
conn | Connection object. |
hf | HFP HF object. |
void(* bt_hfp_hf_cb::dialing) (struct bt_hfp_hf *hf, int err) |
HF call dialing Callback.
This callback provides call dialing result to the application.
hf | HFP HF object. |
err | Result of calling dialing. |
void(* bt_hfp_hf_cb::disconnected) (struct bt_hfp_hf *hf) |
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. And the HFP HF object will be freed after the registered callback disconnected
returned.
hf | HFP HF object. |
void(* bt_hfp_hf_cb::ecnr_turn_off) (struct bt_hfp_hf *hf, int err) |
HF ECNR turns off callback.
If this callback is provided it will be called whenever the response of ECNR turning off is received from AG. If CONFIG_BT_HFP_HF_ECNR
is not enabled, the callback will not be notified.
hf | HFP HF object. |
err | The result of request. |
void(* bt_hfp_hf_cb::held) (struct bt_hfp_hf_call *call) |
HF call held Callback.
This callback provides call held to the application
call | HFP HF call object. |
void(* bt_hfp_hf_cb::inband_ring) (struct bt_hfp_hf *hf, bool inband) |
HF in-band ring tone notification callback to application.
If this callback is provided it will be called whenever there is a unsolicited result code +BSIR issued by the AG to indicate to the HF that the in-band ring tone setting has been locally changed.
hf | HFP HF object. |
inband | In-band ring tone status from the AG. |
void(* bt_hfp_hf_cb::incoming) (struct bt_hfp_hf *hf, struct bt_hfp_hf_call *call) |
HF call incoming Callback.
This callback provides the incoming call status to the application.
hf | HFP HF object. |
call | HFP HF call object. |
void(* bt_hfp_hf_cb::incoming_held) (struct bt_hfp_hf_call *call) |
HF incoming call on hold Callback.
This callback provides the incoming call on hold status to the application.
call | HFP HF call object. |
void(*)(struct bt_hfp_hf *hf, uint8_t id) bt_hfp_hf_cb::operator)(struct bt_hfp_hf *hf, uint8_t mode, uint8_t format, char *operator); void(*codec_negotiate |
HF network operator notification callback to application.
If this callback is provided it will be called whenever there is a response code +COPS issued by the AG to response the AT+COPS? command issued by the HF by calling function bt_hfp_hf_get_operator
.
hf | HFP HF object. |
mode | Current mode. |
format | Format of the operator parameter string. It should be zero. |
operator | A string in alphanumeric format representing the name of the network operator. |
void(* bt_hfp_hf_cb::outgoing) (struct bt_hfp_hf *hf, struct bt_hfp_hf_call *call) |
HF call outgoing Callback.
This callback provides the outgoing call status to the application.
hf | HFP HF object. |
call | HFP HF call object. |
void(* bt_hfp_hf_cb::reject) (struct bt_hfp_hf_call *call) |
HF call reject Callback.
This callback provides the incoming/outgoing call reject status to the application.
call | HFP HF call object. |
void(* bt_hfp_hf_cb::remote_ringing) (struct bt_hfp_hf_call *call) |
HF call outgoing call is ringing Callback.
This callback provides the outgoing call is ringing status to the application.
call | HFP HF call object. |
void(* bt_hfp_hf_cb::request_phone_number) (struct bt_hfp_hf *hf, const char *number) |
Request phone number callback.
If this callback is provided it will be called whenever the result code +BINP: <Phone number>
is received from AG. If the request is failed, the number
will be NULL.
hf | HFP HF object. |
number | Value of <Phone number> . |
void(* bt_hfp_hf_cb::retrieve) (struct bt_hfp_hf_call *call) |
HF call retrieve Callback.
This callback provides call retrieved to the application
call | HFP HF call object. |
void(* bt_hfp_hf_cb::ring_indication) (struct bt_hfp_hf_call *call) |
HF incoming call Ring indication callback to application.
If this callback is provided it will be called whenever there is an incoming call.
call | HFP HF call object. |
void(* bt_hfp_hf_cb::roam) (struct bt_hfp_hf *hf, uint32_t value) |
HF indicator Callback.
This callback provides roaming indicator value to the application
hf | HFP HF object. |
value | roaming indicator value received from the AG. |
void(* bt_hfp_hf_cb::sco_connected) (struct bt_hfp_hf *hf, 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.
hf | HFP HF object. |
sco_conn | SCO/eSCO Connection object. |
void(* bt_hfp_hf_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. |
void(* bt_hfp_hf_cb::service) (struct bt_hfp_hf *hf, uint32_t value) |
HF indicator Callback.
This callback provides service indicator value to the application
hf | HFP HF object. |
value | service indicator value received from the AG. |
void(* bt_hfp_hf_cb::signal) (struct bt_hfp_hf *hf, uint32_t value) |
HF indicator Callback.
This callback provides signal indicator value to the application
hf | HFP HF object. |
value | signal indicator value received from the AG. |
void(* bt_hfp_hf_cb::subscriber_number) (struct bt_hfp_hf *hf, const char *number, uint8_t type, uint8_t service) |
Query subscriber number callback.
If this callback is provided it will be called whenever the result code +CUNM: [<alpha>],<number>, <type>,[<speed> ,<service>]
is received from AG. <alpha>
: This optional field is not supported, and shall be left blank. <number>
: Quoted string containing the phone number in the format specified by <type>
. <type>
field specifies the format of the phone number provided, and can be one of the following values:
<speed>
: This optional field is not supported, and shall be left blank. <service>
: Indicates which service this phone number relates to. Shall be either 4 (voice) or 5 (fax).hf | HFP HF object. |
number | Value of <number> without quotes. |
type | Value of <type> . |
service | Value of <service> . |
void(* bt_hfp_hf_cb::terminate) (struct bt_hfp_hf_call *call) |
HF call terminate Callback.
This callback provides the incoming/outgoing call terminate status to the application.
call | HFP HF call object. |
void(* bt_hfp_hf_cb::textual_representation) (struct bt_hfp_hf *hf, char *id, uint8_t type, uint8_t operation, char *text) |
Textual representation callback.
If this callback is provided it will be called whenever the unsolicited result code +BVRA: 1,<vrecstate>, <textualRepresentation>
is received from AG. <textualRepresentation>: <textID>,<textType>,<textOperation>, <string>
. <textID>
: Unique ID of the current text as a hexadecimal string (a maximum of 4 characters in length, but less than 4 characters in length is valid). <textType>
: ID of the textType from the following list: 0 - Text recognized by the AG from the audio input provided by the HF 1 - Text of the audio output from the AG 2 - Text of the audio output from the AG that contains a question 3 - Text of the audio output from the AG that contains an error description <textOperation>
: ID of the operation of the text 1 - NewText: Indicates that a new text started. Shall be used when the <textID>
changes 2 - Replace: Replace any existing text with the same <textID>
and same <textType>
3 - Append: Attach new text to existing text and keep the same <textID>
and same <textType>
<string>
: The <string>
parameter shall be a UTF-8 text string and shall always be contained within double quotes. If CONFIG_BT_HFP_HF_VOICE_RECG_TEXT
is not enabled, the unsolicited result code +BVRA will be ignored. And the callback will not be notified.
hf | HFP HF object. |
id | Value of <textID> . |
type | Value of <textType> . |
operation | Value of <textOperation> . |
text | Value of <string> . |
void(* bt_hfp_hf_cb::vgm) (struct bt_hfp_hf *hf, uint8_t gain) |
HF microphone gain notification callback to application.
If this callback is provided it will be called whenever there is a unsolicited result code +VGM. If CONFIG_BT_HFP_HF_VOLUME
is not enabled, the unsolicited result code +VGM will be ignored. And the callback will not be notified.
hf | HFP HF object. |
gain | Microphone gain. |
void(* bt_hfp_hf_cb::vgs) (struct bt_hfp_hf *hf, uint8_t gain) |
HF speaker gain notification callback to application.
If this callback is provided it will be called whenever there is a unsolicited result code +VGS. If CONFIG_BT_HFP_HF_VOLUME
is not enabled, the unsolicited result code +VGS will be ignored. And the callback will not be notified.
hf | HFP HF object. |
gain | Speaker gain. |
void(* bt_hfp_hf_cb::voice_recognition) (struct bt_hfp_hf *hf, bool activate) |
Voice recognition activation/deactivation callback.
If this callback is provided it will be called whenever the unsolicited result code +BVRA is notified the HF when the voice recognition function in the AG is activated/deactivated autonomously from the AG. If CONFIG_BT_HFP_HF_VOICE_RECG
is not enabled, the unsolicited result code +BVRA will be ignored. And the callback will not be notified.
hf | HFP HF object. |
activate | Voice recognition activation/deactivation. |
Voice recognition engine state callback.
If this callback is provided it will be called whenever the unsolicited result code +BVRA: 1,<vrecstate>
is received from AG. <vrecstate>
: Bitmask that reflects the current state of the voice recognition engine on the AG. Bit 0 - If it is 1, the AG is ready to accept audio input Bit 1 - If it is 1, the AG is sending audio to the HF Bit 2 - If it is 1, the AG is processing the audio input If CONFIG_BT_HFP_HF_ENH_VOICE_RECG
is not enabled, the unsolicited result code +BVRA will be ignored. And the callback will not be notified.
hf | HFP HF object. |
state | Value of <vrecstate> . |