Zephyr Project API
3.2.0
A Scalable Open Source RTOS
|
Callback structure for the Public Audio Capabilities Service (PACS) More...
#include <audio.h>
Data Fields | |
int(* | get_available_contexts )(struct bt_conn *conn, enum bt_audio_dir dir, enum bt_audio_context *context) |
Get available audio contexts callback. More... | |
int(* | publish_capability )(struct bt_conn *conn, uint8_t type, uint8_t index, struct bt_codec *const codec) |
Publish Capability callback. More... | |
Callback structure for the Public Audio Capabilities Service (PACS)
This is used for the Unicast Server ( CONFIG_BT_AUDIO_UNICAST_SERVER
) and Broadcast Sink ( CONFIG_BT_AUDIO_BROADCAST_SINK
) roles.
int(* bt_audio_pacs_cb::get_available_contexts) (struct bt_conn *conn, enum bt_audio_dir dir, enum bt_audio_context *context) |
Get available audio contexts callback.
Get available audio contexts callback is called whenever a remote client requests to read the value of Published Audio Capabilities (PAC) Available Audio Contexts, or if the value needs to be notified.
[in] | conn | The connection that requests the available audio contexts. Will be NULL if requested for sending a notification, as a result of calling bt_pacs_available_contexts_changed(). |
[in] | dir | Direction of the endpoint. |
[out] | context | Pointer to the contexts that needs to be set. |
int(* bt_audio_pacs_cb::publish_capability) (struct bt_conn *conn, uint8_t type, uint8_t index, struct bt_codec *const codec) |
Publish Capability callback.
Publish Capability callback is called whenever a remote client requests to read the Published Audio Capabilities (PAC) records. The callback will be called iteratively until it returns an error, increasing the index
each time. Once an error value (non-zero) is returned, the previously returned codec
values (if any) will be sent to the client that requested the value.
conn | The connection that requests the capabilities. Will be NULL if the capabilities is requested for sending a notification, as a result of calling bt_audio_capability_register() or bt_audio_capability_unregister(). |
type | Type of the endpoint. |
index | Index of the codec object requested. Multiple objects may be returned, and this value keep tracks of how many have previously been returned. |
codec | Codec object that shall be populated if returning success (0). Ignored if returning non-zero. |