Zephyr API Documentation
3.6.99
A Scalable Open Source RTOS
|
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. | |
Callbacks to a controller, from the media proxy.
Given by a controller when registering
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()
player | Media player instance pointer |
err | Error value. 0 on success, GATT error on positive value or errno on negative value. |
result | The result received |
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()
player | Media player instance pointer |
err | Error value. 0 on success, GATT error on positive value or errno on negative value. |
cmd | The command sent |
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()
player | Media player instance pointer |
err | Error value. 0 on success, GATT error on positive value or errno on negative value. |
opcodes | The supported command opcodes (bitmap) |
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()
player | Media player instance pointer |
err | Error value. 0 on success, GATT error on positive value or errno on negative value. |
ccid | The content control ID |
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()
player | Media player instance pointer |
err | Error value. 0 on success, GATT error on positive value or errno on negative value. |
id | The ID of the current group object in Object Transfer Service (48 bits) |
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()
player | Media player instance pointer |
err | Error value. 0 on success, GATT error on positive value or errno on negative value. |
id | The ID (48 bits) attempted to write |
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()
player | Media player instance pointer |
err | Error value. 0 on success, GATT error on positive value or errno on negative value. |
id | The ID of the current track object in Object Transfer Service (48 bits) |
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()
player | Media player instance pointer |
err | Error value. 0 on success, GATT error on positive value or errno on negative value. |
id | The ID (48 bits) attempted to write |
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()
player | Media player instance pointer |
err | Error value. 0 on success, GATT error on positive value or errno on negative value. |
id | The ID of the Icon object in the Object Transfer Service (48 bits) |
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()
player | Media player instance pointer |
err | Error value. 0 on success, GATT error on positive value or errno on negative value. |
url | The URL of the icon |
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.
player | Media player instance pointer |
err | Error value. 0 on success, or errno on negative value. |
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()
player | Media player instance pointer |
err | Error value. 0 on success, GATT error on positive value or errno on negative value. |
state | The media player state |
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()
player | Media player instance pointer |
err | Error value. 0 on success, GATT error on positive value or errno on negative value. |
id | The ID of the next track object in Object Transfer Service (48 bits) |
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()
player | Media player instance pointer |
err | Error value. 0 on success, GATT error on positive value or errno on negative value. |
id | The ID (48 bits) attempted to write |
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()
player | Media player instance pointer |
err | Error value. 0 on success, GATT error on positive value or errno on negative value. |
id | The ID of the parent group object in Object Transfer Service (48 bits) |
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()
player | Media player instance pointer |
err | Error value. 0 on success, GATT error on positive value or errno on negative value. |
speed | The playback speed parameter |
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()
player | Media player instance pointer |
err | Error value. 0 on success, GATT error on positive value or errno on negative value. |
speed | The playback speed parameter attempted to write |
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()
player | Media player instance pointer |
err | Error value. 0 on success, GATT error on positive value or errno on negative value. |
name | The name of the media player |
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()
player | Media player instance pointer |
err | Error value. 0 on success, GATT error on positive value or errno on negative value. |
order | The playing order |
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()
player | Media player instance pointer |
err | Error value. 0 on success, GATT error on positive value or errno on negative value. |
order | The playing order attempted to write |
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()
player | Media player instance pointer |
err | Error value. 0 on success, GATT error on positive value or errno on negative value. |
orders | The playing orders supported |
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().
player | Media player instance pointer |
err | Error value. 0 on success, GATT error on positive value or errno on negative value. |
result_code | Search result code |
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
player | Media player instance pointer |
err | Error value. 0 on success, GATT error on positive value or errno on negative value. |
id | The ID of the search results object in Object Transfer Service (48 bits) |
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()
player | Media player instance pointer |
err | Error value. 0 on success, GATT error on positive value or errno on negative value. |
search | The search sent |
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()
player | Media player instance pointer |
err | Error value. 0 on success, GATT error on positive value or errno on negative value. |
speed | The seeking speed factor |
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
player | Media player instance pointer |
err | Error value. 0 on success, GATT error on positive value or errno on negative value. |
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()
player | Media player instance pointer |
err | Error value. 0 on success, GATT error on positive value or errno on negative value. |
duration | The duration of the current track |
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()
player | Media player instance pointer |
err | Error value. 0 on success, GATT error on positive value or errno on negative value. |
position | The player's position in the track |
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().
player | Media player instance pointer |
err | Error value. 0 on success, GATT error on positive value or errno on negative value. |
position | The position given attempted to write |
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()
player | Media player instance pointer |
err | Error value. 0 on success, GATT error on positive value or errno on negative value. |
id | The ID of the track segments object in Object Transfer Service (48 bits) |
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()
player | Media player instance pointer |
err | Error value. 0 on success, GATT error on positive value or errno on negative value. |
title | The title of the current track |