myMPD status API
More...
Go to the source code of this file.
|
| unsigned | mympd_api_get_elapsed_seconds (struct mpd_status *status) |
| |
| sds | mympd_api_status_print (struct t_partition_state *partition_state, struct t_cache *album_cache, sds buffer, struct mpd_status *status) |
| |
| sds | mympd_api_status_updatedb_state (struct t_partition_state *partition_state, sds buffer) |
| |
| unsigned | mympd_api_status_updatedb_id (struct t_partition_state *partition_state) |
| |
| sds | mympd_api_status_volume_get (struct t_partition_state *partition_state, sds buffer, unsigned request_id, enum jsonrpc_response_types response_type) |
| |
| sds | mympd_api_status_get (struct t_partition_state *partition_state, struct t_cache *album_cache, sds buffer, unsigned request_id, enum jsonrpc_response_types response_type) |
| |
| bool | mympd_api_status_clear_error (struct t_partition_state *partition_state, sds *buffer, enum mympd_cmd_ids cmd_id, unsigned request_id) |
| |
| sds | mympd_api_status_current_song (struct t_mympd_state *mympd_state, struct t_partition_state *partition_state, sds buffer, unsigned request_id) |
| |
◆ mympd_api_get_elapsed_seconds()
| unsigned mympd_api_get_elapsed_seconds |
( |
struct mpd_status * |
status | ) |
|
Public functions Replacement for deprecated mpd_status_get_elapsed_time
- Parameters
-
| status | pointer to mpd_status struct |
- Returns
- elapsed seconds
◆ mympd_api_status_clear_error()
Clears the mpd player error returned by the status command.
- Parameters
-
| partition_state | pointer to partition state |
| buffer | already allocated sds string to append the error response |
| cmd_id | jsonrpc method |
| request_id | jsonrpc request id |
- Returns
- true on success, else false
◆ mympd_api_status_current_song()
Gets the current playing song as jsonrpc response
- Parameters
-
| mympd_state | pointer to mympd state |
| partition_state | pointer to partition state |
| buffer | already allocated sds string to append the response |
| request_id | jsonrpc request id |
- Returns
- pointer to buffer
◆ mympd_api_status_get()
Gets the mpd status, updates internal myMPD states and returns a jsonrpc notify or response
- Parameters
-
| partition_state | pointer to partition state |
| album_cache | pointer to album cache |
| buffer | already allocated sds string to append the response |
| request_id | jsonrpc request id |
| response_type | jsonrpc response type: RESPONSE_TYPE_RESPONSE or RESPONSE_TYPE_NOTIFY |
- Returns
- pointer to buffer
◆ mympd_api_status_print()
| sds mympd_api_status_print |
( |
struct t_partition_state * |
partition_state, |
|
|
struct t_cache * |
album_cache, |
|
|
sds |
buffer, |
|
|
struct mpd_status * |
status |
|
) |
| |
Prints the mpd_status as jsonrpc object string
- Parameters
-
| partition_state | pointer to partition state |
| album_cache | pointer to album cache |
| buffer | already allocated sds string to append the response |
| status | pointer to mpd_status struct |
- Returns
- pointer to buffer
◆ mympd_api_status_updatedb_id()
Gets the update database id
- Parameters
-
| partition_state | pointer to partition state |
- Returns
- database update id
◆ mympd_api_status_updatedb_state()
| sds mympd_api_status_updatedb_state |
( |
struct t_partition_state * |
partition_state, |
|
|
sds |
buffer |
|
) |
| |
Gets the update database status from mpd as jsonrpc notification
- Parameters
-
| partition_state | pointer to partition state |
| buffer | already allocated sds string to append the response |
- Returns
- pointer to buffer
◆ mympd_api_status_volume_get()
Gets the mpd volume as jsonrpc notify
- Parameters
-
| partition_state | pointer to partition state |
| buffer | already allocated sds string to append the response |
| request_id | jsonrpc request id |
| response_type | jsonrpc response type: RESPONSE_TYPE_RESPONSE or RESPONSE_TYPE_NOTIFY |
- Returns
- pointer to buffer