Zephyr API Documentation
3.7.0
A Scalable Open Source RTOS
|
Hearing Access Service Client callback structure. More...
#include <has.h>
Data Fields | |
void(* | discover )(struct bt_conn *conn, int err, struct bt_has *has, enum bt_has_hearing_aid_type type, enum bt_has_capabilities caps) |
Callback function for bt_has_discover. | |
void(* | preset_switch )(struct bt_has *has, int err, uint8_t index) |
Callback function for Hearing Access Service active preset changes. | |
void(* | preset_read_rsp )(struct bt_has *has, int err, const struct bt_has_preset_record *record, bool is_last) |
Callback function for presets read operation. | |
void(* | preset_update )(struct bt_has *has, uint8_t index_prev, const struct bt_has_preset_record *record, bool is_last) |
Callback function for preset update notifications. | |
void(* | preset_deleted )(struct bt_has *has, uint8_t index, bool is_last) |
Callback function for preset deletion notifications. | |
void(* | preset_availability )(struct bt_has *has, uint8_t index, bool available, bool is_last) |
Callback function for preset availability notifications. | |
Hearing Access Service Client callback structure.
void(* bt_has_client_cb::discover) (struct bt_conn *conn, int err, struct bt_has *has, enum bt_has_hearing_aid_type type, enum bt_has_capabilities caps) |
Callback function for bt_has_discover.
This callback is called when discovery procedure is complete.
conn | Bluetooth connection object. |
err | 0 on success, ATT error or negative errno otherwise. |
has | Pointer to the Hearing Access Service object or NULL on errors. |
type | Hearing Aid type. |
caps | Hearing Aid capabilities. |
void(* bt_has_client_cb::preset_availability) (struct bt_has *has, uint8_t index, bool available, bool is_last) |
Callback function for preset availability notifications.
The callback is called when the preset availability change is notified by the remote server.
has | Pointer to the Hearing Access Service object. |
index | Preset index. |
available | True if available, false otherwise. |
is_last | True if preset list update operation can be considered concluded. |
Callback function for preset deletion notifications.
The callback is called when the preset has been deleted by the remote server.
has | Pointer to the Hearing Access Service object. |
index | Preset index. |
is_last | True if preset list update operation can be considered concluded. |
void(* bt_has_client_cb::preset_read_rsp) (struct bt_has *has, int err, const struct bt_has_preset_record *record, bool is_last) |
Callback function for presets read operation.
The callback is called when the preset read response is sent by the remote server. The record object as well as its members are temporary and must be copied to in order to cache its information.
has | Pointer to the Hearing Access Service object. |
err | 0 on success, ATT error or negative errno otherwise. |
record | Preset record or NULL on errors. |
is_last | True if Read Presets operation can be considered concluded. |
void(* bt_has_client_cb::preset_switch) (struct bt_has *has, int err, uint8_t index) |
Callback function for Hearing Access Service active preset changes.
Optional callback called when the active preset is changed by the remote server when the preset switch procedure is complete. The callback must be set to receive active preset changes and enable support for switching presets. If the callback is not set, the Active Index and Control Point characteristics will not be discovered by bt_has_client_discover.
has | Pointer to the Hearing Access Service object. |
err | 0 on success, ATT error or negative errno otherwise. |
index | Active preset index. |
void(* bt_has_client_cb::preset_update) (struct bt_has *has, uint8_t index_prev, const struct bt_has_preset_record *record, bool is_last) |
Callback function for preset update notifications.
The callback is called when the preset record update is notified by the remote server. The record object as well as its objects are temporary and must be copied to in order to cache its information.
has | Pointer to the Hearing Access Service object. |
index_prev | Index of the previous preset in the list. |
record | Preset record. |
is_last | True if preset list update operation can be considered concluded. |