|
Zephyr API Documentation 4.3.0-rc1
A Scalable Open Source RTOS
|
The connecting callback. More...
#include <zephyr/bluetooth/classic/a2dp.h>
Data Fields | |
| void(* | connected )(struct bt_a2dp *a2dp, int err) |
| A a2dp connection has been established. | |
| void(* | disconnected )(struct bt_a2dp *a2dp) |
| A a2dp connection has been disconnected. | |
| int(* | config_req )(struct bt_a2dp *a2dp, struct bt_a2dp_ep *ep, struct bt_a2dp_codec_cfg *codec_cfg, struct bt_a2dp_stream **stream, uint8_t *rsp_err_code) |
| Endpoint config request callback. | |
| int(* | reconfig_req )(struct bt_a2dp_stream *stream, struct bt_a2dp_codec_cfg *codec_cfg, uint8_t *rsp_err_code) |
| Endpoint config request callback. | |
| void(* | config_rsp )(struct bt_a2dp_stream *stream, uint8_t rsp_err_code) |
| Callback function for bt_a2dp_stream_config() and bt_a2dp_stream_reconfig() | |
| int(* | establish_req )(struct bt_a2dp_stream *stream, uint8_t *rsp_err_code) |
| Stream establishment request callback. | |
| void(* | establish_rsp )(struct bt_a2dp_stream *stream, uint8_t rsp_err_code) |
| Callback function for bt_a2dp_stream_establish() | |
| int(* | release_req )(struct bt_a2dp_stream *stream, uint8_t *rsp_err_code) |
| Stream release request callback. | |
| void(* | release_rsp )(struct bt_a2dp_stream *stream, uint8_t rsp_err_code) |
| Callback function for bt_a2dp_stream_release() | |
| int(* | start_req )(struct bt_a2dp_stream *stream, uint8_t *rsp_err_code) |
| Stream start request callback. | |
| void(* | start_rsp )(struct bt_a2dp_stream *stream, uint8_t rsp_err_code) |
| Callback function for bt_a2dp_stream_start() | |
| int(* | suspend_req )(struct bt_a2dp_stream *stream, uint8_t *rsp_err_code) |
| Stream suspend request callback. | |
| void(* | suspend_rsp )(struct bt_a2dp_stream *stream, uint8_t rsp_err_code) |
| Callback function for bt_a2dp_stream_suspend() | |
| int(* | abort_req )(struct bt_a2dp_stream *stream, uint8_t *rsp_err_code) |
| Stream abort request callback. | |
| void(* | abort_rsp )(struct bt_a2dp_stream *stream, uint8_t rsp_err_code) |
| Callback function for bt_a2dp_stream_abort() | |
| int(* | get_config_req )(struct bt_a2dp_stream *stream, uint8_t *rsp_err_code) |
| Stream get config callback. | |
| void(* | get_config_rsp )(struct bt_a2dp_stream *stream, struct bt_a2dp_codec_cfg *codec_cfg, uint8_t rsp_err_code) |
| Callback function for bt_a2dp_stream_get_config() | |
The connecting callback.
| int(* bt_a2dp_cb::abort_req) (struct bt_a2dp_stream *stream, uint8_t *rsp_err_code) |
Stream abort request callback.
The callback is called whenever an stream is requested to be aborted.
| [in] | stream | Pointer to stream object. |
| [out] | rsp_err_code | give the error code if response error. bt_a2dp_err_code or bt_avdtp_err_code |
| void(* bt_a2dp_cb::abort_rsp) (struct bt_a2dp_stream *stream, uint8_t rsp_err_code) |
Callback function for bt_a2dp_stream_abort()
Called when the abort operation is completed.
| [in] | stream | Pointer to stream object. |
| [in] | rsp_err_code | the remote responded error code bt_a2dp_err_code or bt_avdtp_err_code |
| int(* bt_a2dp_cb::config_req) (struct bt_a2dp *a2dp, struct bt_a2dp_ep *ep, struct bt_a2dp_codec_cfg *codec_cfg, struct bt_a2dp_stream **stream, uint8_t *rsp_err_code) |
Endpoint config request callback.
The callback is called whenever an endpoint is requested to be configured.
| a2dp | a2dp connection object. | |
| [in] | ep | Local Audio Endpoint being configured. |
| [in] | codec_cfg | Codec configuration. |
| [out] | stream | Pointer to stream that will be configured for the endpoint. |
| [out] | rsp_err_code | give the error code if response error. bt_a2dp_err_code or bt_avdtp_err_code |
| void(* bt_a2dp_cb::config_rsp) (struct bt_a2dp_stream *stream, uint8_t rsp_err_code) |
Callback function for bt_a2dp_stream_config() and bt_a2dp_stream_reconfig()
Called when the codec configure operation is completed.
| [in] | stream | Pointer to stream object. |
| [in] | rsp_err_code | the remote responded error code bt_a2dp_err_code or bt_avdtp_err_code |
| void(* bt_a2dp_cb::connected) (struct bt_a2dp *a2dp, int err) |
A a2dp connection has been established.
This callback notifies the application of a a2dp connection. It means the AVDTP L2CAP connection. In case the err parameter is non-zero it means that the connection establishment failed.
| a2dp | a2dp connection object. |
| err | error code. |
| void(* bt_a2dp_cb::disconnected) (struct bt_a2dp *a2dp) |
A a2dp connection has been disconnected.
This callback notifies the application that a a2dp connection has been disconnected.
| a2dp | a2dp connection object. |
| int(* bt_a2dp_cb::establish_req) (struct bt_a2dp_stream *stream, uint8_t *rsp_err_code) |
Stream establishment request callback.
The callback is called whenever an stream is requested to be established (open cmd and create the stream l2cap channel).
| [in] | stream | Pointer to stream object. |
| [out] | rsp_err_code | give the error code if response error. bt_a2dp_err_code or bt_avdtp_err_code |
| void(* bt_a2dp_cb::establish_rsp) (struct bt_a2dp_stream *stream, uint8_t rsp_err_code) |
Callback function for bt_a2dp_stream_establish()
Called when the establishment operation is completed. (open cmd and create the stream l2cap channel).
| [in] | stream | Pointer to stream object. |
| [in] | rsp_err_code | the remote responded error code bt_a2dp_err_code or bt_avdtp_err_code |
| int(* bt_a2dp_cb::get_config_req) (struct bt_a2dp_stream *stream, uint8_t *rsp_err_code) |
Stream get config callback.
The callback is called whenever an stream is requested to response configured configuration.
| [in] | stream | Pointer to stream object. |
| [out] | rsp_err_code | give the error code if response error. bt_a2dp_err_code or bt_avdtp_err_code |
| void(* bt_a2dp_cb::get_config_rsp) (struct bt_a2dp_stream *stream, struct bt_a2dp_codec_cfg *codec_cfg, uint8_t rsp_err_code) |
Callback function for bt_a2dp_stream_get_config()
Called when the get configuration operation is completed.
| [in] | stream | Pointer to stream object. |
| [in] | codec_cfg | the codec configuration that is got |
| [in] | rsp_err_code | the remote responded error code bt_a2dp_err_code or bt_avdtp_err_code |
| int(* bt_a2dp_cb::reconfig_req) (struct bt_a2dp_stream *stream, struct bt_a2dp_codec_cfg *codec_cfg, uint8_t *rsp_err_code) |
Endpoint config request callback.
The callback is called whenever an endpoint is requested to be reconfigured.
| [in] | stream | Pointer to stream object. |
| [out] | rsp_err_code | give the error code if response error. bt_a2dp_err_code or bt_avdtp_err_code |
| int(* bt_a2dp_cb::release_req) (struct bt_a2dp_stream *stream, uint8_t *rsp_err_code) |
Stream release request callback.
The callback is called whenever an stream is requested to be released (release cmd and release the l2cap channel)
| [in] | stream | Pointer to stream object. |
| [out] | rsp_err_code | give the error code if response error. bt_a2dp_err_code or bt_avdtp_err_code |
| void(* bt_a2dp_cb::release_rsp) (struct bt_a2dp_stream *stream, uint8_t rsp_err_code) |
Callback function for bt_a2dp_stream_release()
Called when the release operation is completed. (release cmd and release the l2cap channel)
| [in] | stream | Pointer to stream object. |
| [in] | rsp_err_code | the remote responded error code bt_a2dp_err_code or bt_avdtp_err_code |
| int(* bt_a2dp_cb::start_req) (struct bt_a2dp_stream *stream, uint8_t *rsp_err_code) |
Stream start request callback.
The callback is called whenever an stream is requested to be started.
| [in] | stream | Pointer to stream object. |
| [out] | rsp_err_code | give the error code if response error. bt_a2dp_err_code or bt_avdtp_err_code |
| void(* bt_a2dp_cb::start_rsp) (struct bt_a2dp_stream *stream, uint8_t rsp_err_code) |
Callback function for bt_a2dp_stream_start()
Called when the start operation is completed.
| [in] | stream | Pointer to stream object. |
| [in] | rsp_err_code | the remote responded error code bt_a2dp_err_code or bt_avdtp_err_code |
| int(* bt_a2dp_cb::suspend_req) (struct bt_a2dp_stream *stream, uint8_t *rsp_err_code) |
Stream suspend request callback.
The callback is called whenever an stream is requested to be suspended.
| [in] | stream | Pointer to stream object. |
| [out] | rsp_err_code | give the error code if response error. bt_a2dp_err_code or bt_avdtp_err_code |
| void(* bt_a2dp_cb::suspend_rsp) (struct bt_a2dp_stream *stream, uint8_t rsp_err_code) |
Callback function for bt_a2dp_stream_suspend()
Called when the suspend operation is completed.
| [in] | stream | Pointer to stream object. |
| [in] | rsp_err_code | the remote responded error code bt_a2dp_err_code or bt_avdtp_err_code |