|
myMPD
Internal API documentation
|
myMPD status API More...
#include "compile_time.h"#include "src/mympd_api/status.h"#include "src/lib/datetime.h"#include "src/lib/json/json_print.h"#include "src/lib/json/json_rpc.h"#include "src/lib/log.h"#include "src/lib/mympd_state.h"#include "src/lib/sds_extras.h"#include "src/lib/timer.h"#include "src/lib/utility.h"#include "src/mympd_api/extra_media.h"#include "src/mympd_api/sticker.h"#include "src/mympd_api/webradio.h"#include "src/mympd_client/errorhandler.h"#include "src/mympd_client/jukebox.h"#include "src/mympd_client/shortcuts.h"#include "src/mympd_client/tags.h"#include "src/mympd_client/volume.h"
Functions | |
| static const char * | get_playstate_name (enum mpd_state play_state) |
| 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_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_volume_get (struct t_partition_state *partition_state, sds buffer, unsigned request_id, enum jsonrpc_response_types response_type) |
| sds | mympd_api_status_current_song (struct t_mympd_state *mympd_state, struct t_partition_state *partition_state, sds buffer, unsigned request_id) |
Variables | |
| static const char * | playstate_names [] |
myMPD status API
|
static |
Private definitions
Private functions Resolves the mpd_state enum to a string
| play_state | mpd_state |
| unsigned mympd_api_get_elapsed_seconds | ( | struct mpd_status * | status | ) |
Public functions Replacement for deprecated mpd_status_get_elapsed_time
| status | pointer to mpd_status struct |
| bool mympd_api_status_clear_error | ( | struct t_partition_state * | partition_state, |
| sds * | buffer, | ||
| enum mympd_cmd_ids | cmd_id, | ||
| unsigned | request_id | ||
| ) |
Clears the mpd player error returned by the status command.
| 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 |
| sds mympd_api_status_current_song | ( | struct t_mympd_state * | mympd_state, |
| struct t_partition_state * | partition_state, | ||
| sds | buffer, | ||
| unsigned | request_id | ||
| ) |
Gets the current playing song as jsonrpc response
| 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 |
| 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 | ||
| ) |
Gets the mpd status, updates internal myMPD states and returns a jsonrpc notify or response
| 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 |
| 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
| 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 |
| unsigned mympd_api_status_updatedb_id | ( | struct t_partition_state * | partition_state | ) |
Gets the update database id
| partition_state | pointer to partition 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
| partition_state | pointer to partition state |
| buffer | already allocated sds string to append the response |
| sds mympd_api_status_volume_get | ( | struct t_partition_state * | partition_state, |
| sds | buffer, | ||
| unsigned | request_id, | ||
| enum jsonrpc_response_types | response_type | ||
| ) |
Gets the mpd volume as jsonrpc notify
| 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 |
|
static |
Array to resolv the mpd state to a string