Zephyr API Documentation 4.0.0-rc2
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
bt_has_client_cb Struct Reference

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.
 

Detailed Description

Hearing Access Service Client callback structure.

Field Documentation

◆ discover

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.

Parameters
connBluetooth connection object.
err0 on success, ATT error or negative errno otherwise.
hasPointer to the Hearing Access Service object or NULL on errors.
typeHearing Aid type.
capsHearing Aid capabilities.

◆ preset_availability

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.

Parameters
hasPointer to the Hearing Access Service object.
indexPreset index.
availableTrue if available, false otherwise.
is_lastTrue if preset list update operation can be considered concluded.

◆ preset_deleted

void(* bt_has_client_cb::preset_deleted) (struct bt_has *has, uint8_t index, bool is_last)

Callback function for preset deletion notifications.

The callback is called when the preset has been deleted by the remote server.

Parameters
hasPointer to the Hearing Access Service object.
indexPreset index.
is_lastTrue if preset list update operation can be considered concluded.

◆ preset_read_rsp

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.

Parameters
hasPointer to the Hearing Access Service object.
err0 on success, ATT error or negative errno otherwise.
recordPreset record or NULL on errors.
is_lastTrue if Read Presets operation can be considered concluded.

◆ preset_switch

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.

Parameters
hasPointer to the Hearing Access Service object.
err0 on success, ATT error or negative errno otherwise.
indexActive preset index.

◆ preset_update

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.

Parameters
hasPointer to the Hearing Access Service object.
index_prevIndex of the previous preset in the list.
recordPreset record.
is_lastTrue if preset list update operation can be considered concluded.

The documentation for this struct was generated from the following file: