Zephyr API Documentation  3.6.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
bt_bap_unicast_client_cb Struct Reference

Unicast Client callback structure. More...

#include <bap.h>

Data Fields

void(* location )(struct bt_conn *conn, enum bt_audio_dir dir, enum bt_audio_location loc)
 Remote Unicast Server Audio Locations.
 
void(* available_contexts )(struct bt_conn *conn, enum bt_audio_context snk_ctx, enum bt_audio_context src_ctx)
 Remote Unicast Server Available Contexts.
 
void(* config )(struct bt_bap_stream *stream, enum bt_bap_ascs_rsp_code rsp_code, enum bt_bap_ascs_reason reason)
 Callback function for bt_bap_stream_config() and bt_bap_stream_reconfig().
 
void(* qos )(struct bt_bap_stream *stream, enum bt_bap_ascs_rsp_code rsp_code, enum bt_bap_ascs_reason reason)
 Callback function for bt_bap_stream_qos().
 
void(* enable )(struct bt_bap_stream *stream, enum bt_bap_ascs_rsp_code rsp_code, enum bt_bap_ascs_reason reason)
 Callback function for bt_bap_stream_enable().
 
void(* start )(struct bt_bap_stream *stream, enum bt_bap_ascs_rsp_code rsp_code, enum bt_bap_ascs_reason reason)
 Callback function for bt_bap_stream_start().
 
void(* stop )(struct bt_bap_stream *stream, enum bt_bap_ascs_rsp_code rsp_code, enum bt_bap_ascs_reason reason)
 Callback function for bt_bap_stream_stop().
 
void(* disable )(struct bt_bap_stream *stream, enum bt_bap_ascs_rsp_code rsp_code, enum bt_bap_ascs_reason reason)
 Callback function for bt_bap_stream_disable().
 
void(* metadata )(struct bt_bap_stream *stream, enum bt_bap_ascs_rsp_code rsp_code, enum bt_bap_ascs_reason reason)
 Callback function for bt_bap_stream_metadata().
 
void(* release )(struct bt_bap_stream *stream, enum bt_bap_ascs_rsp_code rsp_code, enum bt_bap_ascs_reason reason)
 Callback function for bt_bap_stream_release().
 
void(* pac_record )(struct bt_conn *conn, enum bt_audio_dir dir, const struct bt_audio_codec_cap *codec_cap)
 Remote Published Audio Capability (PAC) record discovered.
 
void(* endpoint )(struct bt_conn *conn, enum bt_audio_dir dir, struct bt_bap_ep *ep)
 Remote Audio Stream Endoint (ASE) discovered.
 
void(* discover )(struct bt_conn *conn, int err, enum bt_audio_dir dir)
 BAP discovery callback function.
 

Detailed Description

Unicast Client callback structure.

Field Documentation

◆ available_contexts

void(* bt_bap_unicast_client_cb::available_contexts) (struct bt_conn *conn, enum bt_audio_context snk_ctx, enum bt_audio_context src_ctx)

Remote Unicast Server Available Contexts.

This callback is called whenever the available contexts are read from the server or otherwise notified to the client.

Parameters
connConnection to the remote unicast server.
snk_ctxThe sink context bitfield value.
src_ctxThe source context bitfield value.
Returns
0 in case of success or negative value in case of error.

◆ config

void(* bt_bap_unicast_client_cb::config) (struct bt_bap_stream *stream, enum bt_bap_ascs_rsp_code rsp_code, enum bt_bap_ascs_reason reason)

Callback function for bt_bap_stream_config() and bt_bap_stream_reconfig().

Called when the codec configure operation is completed on the server.

Parameters
streamStream the operation was performed on.
rsp_codeResponse code.
reasonReason code.

◆ disable

void(* bt_bap_unicast_client_cb::disable) (struct bt_bap_stream *stream, enum bt_bap_ascs_rsp_code rsp_code, enum bt_bap_ascs_reason reason)

Callback function for bt_bap_stream_disable().

Called when the disable operation is completed on the server.

Parameters
streamStream the operation was performed on. May be NULL if there is no stream associated with the ASE ID sent by the server.
rsp_codeResponse code.
reasonReason code.

◆ discover

void(* bt_bap_unicast_client_cb::discover) (struct bt_conn *conn, int err, enum bt_audio_dir dir)

BAP discovery callback function.

If discovery procedure has completed ep is set to NULL and err is 0.

Parameters
connConnection to the remote unicast server.
errError value. 0 on success, GATT error on positive value or errno on negative value.
dirThe type of remote endpoints and capabilities discovered.

If discovery procedure has complete both codec and ep are set to NULL.

◆ enable

void(* bt_bap_unicast_client_cb::enable) (struct bt_bap_stream *stream, enum bt_bap_ascs_rsp_code rsp_code, enum bt_bap_ascs_reason reason)

Callback function for bt_bap_stream_enable().

Called when the enable operation is completed on the server.

Parameters
streamStream the operation was performed on. May be NULL if there is no stream associated with the ASE ID sent by the server.
rsp_codeResponse code.
reasonReason code.

◆ endpoint

void(* bt_bap_unicast_client_cb::endpoint) (struct bt_conn *conn, enum bt_audio_dir dir, struct bt_bap_ep *ep)

Remote Audio Stream Endoint (ASE) discovered.

Called when an ASE has been discovered as part of the discovery procedure.

Parameters
connConnection to the remote unicast server.
dirThe type of remote endpoints and capabilities discovered.
epRemote endpoint.

If discovery procedure has complete both codec and ep are set to NULL.

◆ location

void(* bt_bap_unicast_client_cb::location) (struct bt_conn *conn, enum bt_audio_dir dir, enum bt_audio_location loc)

Remote Unicast Server Audio Locations.

This callback is called whenever the audio locations is read from the server or otherwise notified to the client.

Parameters
connConnection to the remote unicast server.
dirDirection of the location.
locThe location bitfield value.
Returns
0 in case of success or negative value in case of error.

◆ metadata

void(* bt_bap_unicast_client_cb::metadata) (struct bt_bap_stream *stream, enum bt_bap_ascs_rsp_code rsp_code, enum bt_bap_ascs_reason reason)

Callback function for bt_bap_stream_metadata().

Called when the metadata operation is completed on the server.

Parameters
streamStream the operation was performed on. May be NULL if there is no stream associated with the ASE ID sent by the server.
rsp_codeResponse code.
reasonReason code.

◆ pac_record

void(* bt_bap_unicast_client_cb::pac_record) (struct bt_conn *conn, enum bt_audio_dir dir, const struct bt_audio_codec_cap *codec_cap)

Remote Published Audio Capability (PAC) record discovered.

Called when a PAC record has been discovered as part of the discovery procedure.

The codec is only valid while in the callback, so the values must be stored by the receiver if future use is wanted.

Parameters
connConnection to the remote unicast server.
dirThe type of remote endpoints and capabilities discovered.
codec_capRemote capabilities.

If discovery procedure has complete both codec and ep are set to NULL.

◆ qos

void(* bt_bap_unicast_client_cb::qos) (struct bt_bap_stream *stream, enum bt_bap_ascs_rsp_code rsp_code, enum bt_bap_ascs_reason reason)

Callback function for bt_bap_stream_qos().

Called when the QoS configure operation is completed on the server. This will be called for each stream in the group that was being QoS configured.

Parameters
streamStream the operation was performed on. May be NULL if there is no stream associated with the ASE ID sent by the server.
rsp_codeResponse code.
reasonReason code.

◆ release

void(* bt_bap_unicast_client_cb::release) (struct bt_bap_stream *stream, enum bt_bap_ascs_rsp_code rsp_code, enum bt_bap_ascs_reason reason)

Callback function for bt_bap_stream_release().

Called when the release operation is completed on the server.

Parameters
streamStream the operation was performed on. May be NULL if there is no stream associated with the ASE ID sent by the server.
rsp_codeResponse code.
reasonReason code.

◆ start

void(* bt_bap_unicast_client_cb::start) (struct bt_bap_stream *stream, enum bt_bap_ascs_rsp_code rsp_code, enum bt_bap_ascs_reason reason)

Callback function for bt_bap_stream_start().

Called when the start operation is completed on the server. This will only be called if the stream supplied to bt_bap_stream_start() is for a BT_AUDIO_DIR_SOURCE endpoint.

Parameters
streamStream the operation was performed on. May be NULL if there is no stream associated with the ASE ID sent by the server.
rsp_codeResponse code.
reasonReason code.

◆ stop

void(* bt_bap_unicast_client_cb::stop) (struct bt_bap_stream *stream, enum bt_bap_ascs_rsp_code rsp_code, enum bt_bap_ascs_reason reason)

Callback function for bt_bap_stream_stop().

Called when the stop operation is completed on the server. This will only be called if the stream supplied to bt_bap_stream_stop() is for a BT_AUDIO_DIR_SOURCE endpoint.

Parameters
streamStream the operation was performed on. May be NULL if there is no stream associated with the ASE ID sent by the server.
rsp_codeResponse code.
reasonReason code.

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