Zephyr API Documentation 4.0.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
bt_a2dp_cb Struct Reference

The connecting callback. More...

#include <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.
 
void(* config_rsp )(struct bt_a2dp_stream *stream, uint8_t rsp_err_code)
 Callback function for bt_a2dp_stream_config()
 
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)
 Endpoint suspend request callback.
 
void(* suspend_rsp )(struct bt_a2dp_stream *stream, uint8_t rsp_err_code)
 Callback function for bt_a2dp_stream_suspend()
 
int(* reconfig_req )(struct bt_a2dp_stream *stream, uint8_t *rsp_err_code)
 Endpoint config request callback.
 
void(* reconfig_rsp )(struct bt_a2dp_stream *stream, uint8_t rsp_err_code)
 Callback function for bt_a2dp_stream_reconfig()
 

Detailed Description

The connecting callback.

Field Documentation

◆ config_req

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.

Parameters
a2dpa2dp connection object.
[in]epLocal Audio Endpoint being configured.
[in]codec_cfgCodec configuration.
[out]streamPointer to stream that will be configured for the endpoint.
[out]rsp_err_codegive the error code if response error. bt_a2dp_err_code or bt_avdtp_err_code
Returns
0 in case of success or negative value in case of error.

◆ config_rsp

void(* bt_a2dp_cb::config_rsp) (struct bt_a2dp_stream *stream, uint8_t rsp_err_code)

Callback function for bt_a2dp_stream_config()

Called when the codec configure operation is completed.

Parameters
[in]streamPointer to stream object.
[in]rsp_err_codethe remote responded error code bt_a2dp_err_code or bt_avdtp_err_code

◆ connected

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.

Parameters
a2dpa2dp connection object.
errerror code.

◆ disconnected

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.

Parameters
a2dpa2dp connection object.

◆ establish_req

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).

Parameters
[in]streamPointer to stream object.
[out]rsp_err_codegive the error code if response error. bt_a2dp_err_code or bt_avdtp_err_code
Returns
0 in case of success or negative value in case of error.

◆ establish_rsp

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).

Parameters
[in]streamPointer to stream object.
[in]rsp_err_codethe remote responded error code bt_a2dp_err_code or bt_avdtp_err_code

◆ reconfig_req

int(* bt_a2dp_cb::reconfig_req) (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 reconfigured.

Parameters
[in]streamPointer to stream object.
[out]rsp_err_codegive the error code if response error. bt_a2dp_err_code or bt_avdtp_err_code
Returns
0 in case of success or negative value in case of error.

◆ reconfig_rsp

void(* bt_a2dp_cb::reconfig_rsp) (struct bt_a2dp_stream *stream, uint8_t rsp_err_code)

Callback function for bt_a2dp_stream_reconfig()

Called when the reconfig operation is completed.

Parameters
[in]streamPointer to stream object.
[in]rsp_err_codethe remote responded error code bt_a2dp_err_code or bt_avdtp_err_code

◆ release_req

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)

Parameters
[in]streamPointer to stream object.
[out]rsp_err_codegive the error code if response error. bt_a2dp_err_code or bt_avdtp_err_code
Returns
0 in case of success or negative value in case of error.

◆ release_rsp

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)

Parameters
[in]streamPointer to stream object.
[in]rsp_err_codethe remote responded error code bt_a2dp_err_code or bt_avdtp_err_code

◆ start_req

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.

Parameters
[in]streamPointer to stream object.
[out]rsp_err_codegive the error code if response error. bt_a2dp_err_code or bt_avdtp_err_code
Returns
0 in case of success or negative value in case of error.

◆ start_rsp

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.

Parameters
[in]streamPointer to stream object.
[in]rsp_err_codethe remote responded error code bt_a2dp_err_code or bt_avdtp_err_code

◆ suspend_req

int(* bt_a2dp_cb::suspend_req) (struct bt_a2dp_stream *stream, uint8_t *rsp_err_code)

Endpoint suspend request callback.

The callback is called whenever an stream is requested to be suspended.

Parameters
[in]streamPointer to stream object.
[out]rsp_err_codegive the error code if response error. bt_a2dp_err_code or bt_avdtp_err_code
Returns
0 in case of success or negative value in case of error.

◆ suspend_rsp

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.

Parameters
[in]streamPointer to stream object.
[in]rsp_err_codethe remote responded error code bt_a2dp_err_code or bt_avdtp_err_code

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