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

Callbacks to a controller, from the media proxy. More...

#include <media_proxy.h>

Data Fields

void(* local_player_instance )(struct media_player *player, int err)
 Media Player Instance callback.
 
void(* player_name_recv )(struct media_player *player, int err, const char *name)
 Media Player Name receive callback.
 
void(* icon_id_recv )(struct media_player *player, int err, uint64_t id)
 Media Player Icon Object ID receive callback.
 
void(* icon_url_recv )(struct media_player *player, int err, const char *url)
 Media Player Icon URL receive callback.
 
void(* track_changed_recv )(struct media_player *player, int err)
 Track changed receive callback.
 
void(* track_title_recv )(struct media_player *player, int err, const char *title)
 Track Title receive callback.
 
void(* track_duration_recv )(struct media_player *player, int err, int32_t duration)
 Track Duration receive callback.
 
void(* track_position_recv )(struct media_player *player, int err, int32_t position)
 Track Position receive callback.
 
void(* track_position_write )(struct media_player *player, int err, int32_t position)
 Track Position write callback.
 
void(* playback_speed_recv )(struct media_player *player, int err, int8_t speed)
 Playback Speed receive callback.
 
void(* playback_speed_write )(struct media_player *player, int err, int8_t speed)
 Playback Speed write callback.
 
void(* seeking_speed_recv )(struct media_player *player, int err, int8_t speed)
 Seeking Speed receive callback.
 
void(* track_segments_id_recv )(struct media_player *player, int err, uint64_t id)
 Track Segments Object ID receive callback.
 
void(* current_track_id_recv )(struct media_player *player, int err, uint64_t id)
 Current Track Object ID receive callback.
 
void(* current_track_id_write )(struct media_player *player, int err, uint64_t id)
 Current Track Object ID write callback.
 
void(* next_track_id_recv )(struct media_player *player, int err, uint64_t id)
 Next Track Object ID receive callback.
 
void(* next_track_id_write )(struct media_player *player, int err, uint64_t id)
 Next Track Object ID write callback.
 
void(* parent_group_id_recv )(struct media_player *player, int err, uint64_t id)
 Parent Group Object ID receive callback.
 
void(* current_group_id_recv )(struct media_player *player, int err, uint64_t id)
 Current Group Object ID receive callback.
 
void(* current_group_id_write )(struct media_player *player, int err, uint64_t id)
 Current Group Object ID write callback.
 
void(* playing_order_recv )(struct media_player *player, int err, uint8_t order)
 Playing Order receive callback.
 
void(* playing_order_write )(struct media_player *player, int err, uint8_t order)
 Playing Order write callback.
 
void(* playing_orders_supported_recv )(struct media_player *player, int err, uint16_t orders)
 Playing Orders Supported receive callback.
 
void(* media_state_recv )(struct media_player *player, int err, uint8_t state)
 Media State receive callback.
 
void(* command_send )(struct media_player *player, int err, const struct mpl_cmd *cmd)
 Command send callback.
 
void(* command_recv )(struct media_player *player, int err, const struct mpl_cmd_ntf *result)
 Command result receive callback.
 
void(* commands_supported_recv )(struct media_player *player, int err, uint32_t opcodes)
 Commands supported receive callback.
 
void(* search_send )(struct media_player *player, int err, const struct mpl_search *search)
 Search send callback.
 
void(* search_recv )(struct media_player *player, int err, uint8_t result_code)
 Search result code receive callback.
 
void(* search_results_id_recv )(struct media_player *player, int err, uint64_t id)
 Search Results Object ID receive callback See also media_proxy_ctrl_get_search_results_id()
 
void(* content_ctrl_id_recv )(struct media_player *player, int err, uint8_t ccid)
 Content Control ID receive callback.
 

Detailed Description

Callbacks to a controller, from the media proxy.

Given by a controller when registering

Field Documentation

◆ command_recv

void(* media_proxy_ctrl_cbs::command_recv) (struct media_player *player, int err, const struct mpl_cmd_ntf *result)

Command result receive callback.

Called when a command result has been received See also media_proxy_ctrl_send_command()

Parameters
playerMedia player instance pointer
errError value. 0 on success, GATT error on positive value or errno on negative value.
resultThe result received

◆ command_send

void(* media_proxy_ctrl_cbs::command_send) (struct media_player *player, int err, const struct mpl_cmd *cmd)

Command send callback.

Called when a command has been sent See also media_proxy_ctrl_send_command()

Parameters
playerMedia player instance pointer
errError value. 0 on success, GATT error on positive value or errno on negative value.
cmdThe command sent

◆ commands_supported_recv

void(* media_proxy_ctrl_cbs::commands_supported_recv) (struct media_player *player, int err, uint32_t opcodes)

Commands supported receive callback.

Called when the Commands Supported is read or changed See also media_proxy_ctrl_get_commands_supported()

Parameters
playerMedia player instance pointer
errError value. 0 on success, GATT error on positive value or errno on negative value.
opcodesThe supported command opcodes (bitmap)

◆ content_ctrl_id_recv

void(* media_proxy_ctrl_cbs::content_ctrl_id_recv) (struct media_player *player, int err, uint8_t ccid)

Content Control ID receive callback.

Called when the Content Control ID is read See also media_proxy_ctrl_get_content_ctrl_id()

Parameters
playerMedia player instance pointer
errError value. 0 on success, GATT error on positive value or errno on negative value.
ccidThe content control ID

◆ current_group_id_recv

void(* media_proxy_ctrl_cbs::current_group_id_recv) (struct media_player *player, int err, uint64_t id)

Current Group Object ID receive callback.

Called when the Current Group Object ID is read or changed See also media_proxy_ctrl_get_current_group_id() and media_proxy_ctrl_set_current_group_id()

Parameters
playerMedia player instance pointer
errError value. 0 on success, GATT error on positive value or errno on negative value.
idThe ID of the current group object in Object Transfer Service (48 bits)

◆ current_group_id_write

void(* media_proxy_ctrl_cbs::current_group_id_write) (struct media_player *player, int err, uint64_t id)

Current Group Object ID write callback.

Called when the Current Group Object ID is written See also media_proxy_ctrl_set_current_group_id()

Parameters
playerMedia player instance pointer
errError value. 0 on success, GATT error on positive value or errno on negative value.
idThe ID (48 bits) attempted to write

◆ current_track_id_recv

void(* media_proxy_ctrl_cbs::current_track_id_recv) (struct media_player *player, int err, uint64_t id)

Current Track Object ID receive callback.

Called when the Current Track Object ID is read or changed See also media_proxy_ctrl_get_current_track_id() and media_proxy_ctrl_set_current_track_id()

Parameters
playerMedia player instance pointer
errError value. 0 on success, GATT error on positive value or errno on negative value.
idThe ID of the current track object in Object Transfer Service (48 bits)

◆ current_track_id_write

void(* media_proxy_ctrl_cbs::current_track_id_write) (struct media_player *player, int err, uint64_t id)

Current Track Object ID write callback.

Called when the Current Track Object ID is written See also media_proxy_ctrl_set_current_track_id()

Parameters
playerMedia player instance pointer
errError value. 0 on success, GATT error on positive value or errno on negative value.
idThe ID (48 bits) attempted to write

◆ icon_id_recv

void(* media_proxy_ctrl_cbs::icon_id_recv) (struct media_player *player, int err, uint64_t id)

Media Player Icon Object ID receive callback.

Called when the Media Player Icon Object ID is read See also media_proxy_ctrl_get_icon_id()

Parameters
playerMedia player instance pointer
errError value. 0 on success, GATT error on positive value or errno on negative value.
idThe ID of the Icon object in the Object Transfer Service (48 bits)

◆ icon_url_recv

void(* media_proxy_ctrl_cbs::icon_url_recv) (struct media_player *player, int err, const char *url)

Media Player Icon URL receive callback.

Called when the Media Player Icon URL is read See also media_proxy_ctrl_get_icon_url()

Parameters
playerMedia player instance pointer
errError value. 0 on success, GATT error on positive value or errno on negative value.
urlThe URL of the icon

◆ local_player_instance

void(* media_proxy_ctrl_cbs::local_player_instance) (struct media_player *player, int err)

Media Player Instance callback.

Called when the local Media Player instance is registered or read (TODO). Also called if the local player instance is already registered when the controller is registered. Provides the controller with the pointer to the local player instance.

Parameters
playerMedia player instance pointer
errError value. 0 on success, or errno on negative value.

◆ media_state_recv

void(* media_proxy_ctrl_cbs::media_state_recv) (struct media_player *player, int err, uint8_t state)

Media State receive callback.

Called when the Media State is read or changed See also media_proxy_ctrl_get_media_state() and media_proxy_ctrl_send_command()

Parameters
playerMedia player instance pointer
errError value. 0 on success, GATT error on positive value or errno on negative value.
stateThe media player state

◆ next_track_id_recv

void(* media_proxy_ctrl_cbs::next_track_id_recv) (struct media_player *player, int err, uint64_t id)

Next Track Object ID receive callback.

Called when the Next Track Object ID is read or changed See also media_proxy_ctrl_get_next_track_id() and media_proxy_ctrl_set_next_track_id()

Parameters
playerMedia player instance pointer
errError value. 0 on success, GATT error on positive value or errno on negative value.
idThe ID of the next track object in Object Transfer Service (48 bits)

◆ next_track_id_write

void(* media_proxy_ctrl_cbs::next_track_id_write) (struct media_player *player, int err, uint64_t id)

Next Track Object ID write callback.

Called when the Next Track Object ID is written See also media_proxy_ctrl_set_next_track_id()

Parameters
playerMedia player instance pointer
errError value. 0 on success, GATT error on positive value or errno on negative value.
idThe ID (48 bits) attempted to write

◆ parent_group_id_recv

void(* media_proxy_ctrl_cbs::parent_group_id_recv) (struct media_player *player, int err, uint64_t id)

Parent Group Object ID receive callback.

Called when the Parent Group Object ID is read or changed See also media_proxy_ctrl_get_parent_group_id()

Parameters
playerMedia player instance pointer
errError value. 0 on success, GATT error on positive value or errno on negative value.
idThe ID of the parent group object in Object Transfer Service (48 bits)

◆ playback_speed_recv

void(* media_proxy_ctrl_cbs::playback_speed_recv) (struct media_player *player, int err, int8_t speed)

Playback Speed receive callback.

Called when the Playback Speed is read or changed See also media_proxy_ctrl_get_playback_speed() and media_proxy_ctrl_set_playback_speed()

Parameters
playerMedia player instance pointer
errError value. 0 on success, GATT error on positive value or errno on negative value.
speedThe playback speed parameter

◆ playback_speed_write

void(* media_proxy_ctrl_cbs::playback_speed_write) (struct media_player *player, int err, int8_t speed)

Playback Speed write callback.

Called when the Playback Speed is written See also media_proxy_ctrl_set_playback_speed()

Parameters
playerMedia player instance pointer
errError value. 0 on success, GATT error on positive value or errno on negative value.
speedThe playback speed parameter attempted to write

◆ player_name_recv

void(* media_proxy_ctrl_cbs::player_name_recv) (struct media_player *player, int err, const char *name)

Media Player Name receive callback.

Called when the Media Player Name is read or changed See also media_proxy_ctrl_name_get()

Parameters
playerMedia player instance pointer
errError value. 0 on success, GATT error on positive value or errno on negative value.
nameThe name of the media player

◆ playing_order_recv

void(* media_proxy_ctrl_cbs::playing_order_recv) (struct media_player *player, int err, uint8_t order)

Playing Order receive callback.

Called when the Playing Order is read or changed See also media_proxy_ctrl_get_playing_order() and media_proxy_ctrl_set_playing_order()

Parameters
playerMedia player instance pointer
errError value. 0 on success, GATT error on positive value or errno on negative value.
orderThe playing order

◆ playing_order_write

void(* media_proxy_ctrl_cbs::playing_order_write) (struct media_player *player, int err, uint8_t order)

Playing Order write callback.

Called when the Playing Order is written See also media_proxy_ctrl_set_playing_order()

Parameters
playerMedia player instance pointer
errError value. 0 on success, GATT error on positive value or errno on negative value.
orderThe playing order attempted to write

◆ playing_orders_supported_recv

void(* media_proxy_ctrl_cbs::playing_orders_supported_recv) (struct media_player *player, int err, uint16_t orders)

Playing Orders Supported receive callback.

Called when the Playing Orders Supported is read See also media_proxy_ctrl_get_playing_orders_supported()

Parameters
playerMedia player instance pointer
errError value. 0 on success, GATT error on positive value or errno on negative value.
ordersThe playing orders supported

◆ search_recv

void(* media_proxy_ctrl_cbs::search_recv) (struct media_player *player, int err, uint8_t result_code)

Search result code receive callback.

Called when a search result code has been received See also media_proxy_ctrl_send_search()

The search result code tells whether the search was successful or not. For a successful search, the actual results of the search (i.e. what was found as a result of the search)can be accessed using the Search Results Object ID. The Search Results Object ID has a separate callback - search_results_id_recv().

Parameters
playerMedia player instance pointer
errError value. 0 on success, GATT error on positive value or errno on negative value.
result_codeSearch result code

◆ search_results_id_recv

void(* media_proxy_ctrl_cbs::search_results_id_recv) (struct media_player *player, int err, uint64_t id)

Search Results Object ID receive callback See also media_proxy_ctrl_get_search_results_id()

Called when the Search Results Object ID is read or changed

Parameters
playerMedia player instance pointer
errError value. 0 on success, GATT error on positive value or errno on negative value.
idThe ID of the search results object in Object Transfer Service (48 bits)

◆ search_send

void(* media_proxy_ctrl_cbs::search_send) (struct media_player *player, int err, const struct mpl_search *search)

Search send callback.

Called when a search has been sent See also media_proxy_ctrl_send_search()

Parameters
playerMedia player instance pointer
errError value. 0 on success, GATT error on positive value or errno on negative value.
searchThe search sent

◆ seeking_speed_recv

void(* media_proxy_ctrl_cbs::seeking_speed_recv) (struct media_player *player, int err, int8_t speed)

Seeking Speed receive callback.

Called when the Seeking Speed is read or changed See also media_proxy_ctrl_get_seeking_speed()

Parameters
playerMedia player instance pointer
errError value. 0 on success, GATT error on positive value or errno on negative value.
speedThe seeking speed factor

◆ track_changed_recv

void(* media_proxy_ctrl_cbs::track_changed_recv) (struct media_player *player, int err)

Track changed receive callback.

Called when the Current Track is changed

Parameters
playerMedia player instance pointer
errError value. 0 on success, GATT error on positive value or errno on negative value.

◆ track_duration_recv

void(* media_proxy_ctrl_cbs::track_duration_recv) (struct media_player *player, int err, int32_t duration)

Track Duration receive callback.

Called when the Track Duration is read or changed See also media_proxy_ctrl_get_track_duration()

Parameters
playerMedia player instance pointer
errError value. 0 on success, GATT error on positive value or errno on negative value.
durationThe duration of the current track

◆ track_position_recv

void(* media_proxy_ctrl_cbs::track_position_recv) (struct media_player *player, int err, int32_t position)

Track Position receive callback.

Called when the Track Position is read or changed See also media_proxy_ctrl_get_track_position() and media_proxy_ctrl_set_track_position()

Parameters
playerMedia player instance pointer
errError value. 0 on success, GATT error on positive value or errno on negative value.
positionThe player's position in the track

◆ track_position_write

void(* media_proxy_ctrl_cbs::track_position_write) (struct media_player *player, int err, int32_t position)

Track Position write callback.

Called when the Track Position is written See also media_proxy_ctrl_set_track_position().

Parameters
playerMedia player instance pointer
errError value. 0 on success, GATT error on positive value or errno on negative value.
positionThe position given attempted to write

◆ track_segments_id_recv

void(* media_proxy_ctrl_cbs::track_segments_id_recv) (struct media_player *player, int err, uint64_t id)

Track Segments Object ID receive callback.

Called when the Track Segments Object ID is read See also media_proxy_ctrl_get_track_segments_id()

Parameters
playerMedia player instance pointer
errError value. 0 on success, GATT error on positive value or errno on negative value.
idThe ID of the track segments object in Object Transfer Service (48 bits)

◆ track_title_recv

void(* media_proxy_ctrl_cbs::track_title_recv) (struct media_player *player, int err, const char *title)

Track Title receive callback.

Called when the Track Title is read or changed See also media_proxy_ctrl_get_track_title()

Parameters
playerMedia player instance pointer
errError value. 0 on success, GATT error on positive value or errno on negative value.
titleThe title of the current track

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