status.h
Go to the documentation of this file.
// SPDX-License-Identifier: BSD-3-Clause
// Copyright The Music Player Daemon Project
#ifndef MPD_STATUS_H
#define MPD_STATUS_H
#include "compiler.h"
#include <stdbool.h>
enum mpd_state {
MPD_STATE_UNKNOWN = 0,
MPD_STATE_STOP = 1,
MPD_STATE_PLAY = 2,
MPD_STATE_PAUSE = 3,
};
enum mpd_single_state {
MPD_SINGLE_OFF = 0,
MPD_SINGLE_ON,
MPD_SINGLE_ONESHOT,
MPD_SINGLE_UNKNOWN,
};
enum mpd_consume_state {
MPD_CONSUME_OFF = 0,
MPD_CONSUME_ON,
MPD_CONSUME_ONESHOT,
MPD_CONSUME_UNKNOWN,
};
struct mpd_connection;
struct mpd_pair;
struct mpd_audio_format;
struct mpd_status;
#ifdef __cplusplus
extern "C" {
#endif
mpd_malloc
struct mpd_status *
mpd_status_begin(void);
void
mpd_status_feed(struct mpd_status *status, const struct mpd_pair *pair);
bool
mpd_send_status(struct mpd_connection *connection);
mpd_malloc
struct mpd_status *
mpd_recv_status(struct mpd_connection *connection);
mpd_malloc
struct mpd_status *
mpd_run_status(struct mpd_connection *connection);
void mpd_status_free(struct mpd_status * status);
mpd_pure
int mpd_status_get_volume(const struct mpd_status *status);
mpd_pure
bool
mpd_status_get_repeat(const struct mpd_status *status);
mpd_pure
bool
mpd_status_get_random(const struct mpd_status *status);
mpd_pure
enum mpd_single_state
mpd_status_get_single_state(const struct mpd_status *status);
const char *
mpd_lookup_single_state(enum mpd_single_state state);
enum mpd_single_state
mpd_parse_single_state(const char *p);
mpd_pure
bool
mpd_status_get_single(const struct mpd_status *status);
mpd_pure
enum mpd_consume_state
mpd_status_get_consume_state(const struct mpd_status *status);
const char *
mpd_lookup_consume_state(enum mpd_consume_state state);
enum mpd_consume_state
mpd_parse_consume_state(const char *p);
mpd_pure
bool
mpd_status_get_consume(const struct mpd_status *status);
mpd_pure
unsigned
mpd_status_get_queue_length(const struct mpd_status *status);
mpd_pure
unsigned
mpd_status_get_queue_version(const struct mpd_status *status);
mpd_pure
enum mpd_state
mpd_status_get_state(const struct mpd_status *status);
mpd_pure
unsigned
mpd_status_get_crossfade(const struct mpd_status *status);
mpd_pure
float
mpd_status_get_mixrampdb(const struct mpd_status *status);
mpd_pure
float
mpd_status_get_mixrampdelay(const struct mpd_status *status);
mpd_pure
int
mpd_status_get_song_pos(const struct mpd_status *status);
mpd_pure
int
mpd_status_get_song_id(const struct mpd_status *status);
mpd_pure
int
mpd_status_get_next_song_pos(const struct mpd_status *status);
mpd_pure
int
mpd_status_get_next_song_id(const struct mpd_status *status);
mpd_pure
unsigned
mpd_status_get_elapsed_time(const struct mpd_status *status);
mpd_pure
unsigned
mpd_status_get_elapsed_ms(const struct mpd_status *status);
mpd_pure
unsigned
mpd_status_get_total_time(const struct mpd_status *status);
mpd_pure
unsigned
mpd_status_get_kbit_rate(const struct mpd_status *status);
mpd_pure
const struct mpd_audio_format *
mpd_status_get_audio_format(const struct mpd_status *status);
mpd_pure
unsigned
mpd_status_get_update_id(const struct mpd_status *status);
mpd_pure
const char *
mpd_status_get_partition(const struct mpd_status *status);
mpd_pure
const char *
mpd_status_get_error(const struct mpd_status *status);
#ifdef __cplusplus
}
#endif
#endif
mpd_status_get_partition
const char * mpd_status_get_partition(const struct mpd_status *status)
mpd_status_get_single_state
enum mpd_single_state mpd_status_get_single_state(const struct mpd_status *status)
mpd_status_get_volume
int mpd_status_get_volume(const struct mpd_status *status)
mpd_status_get_queue_length
unsigned mpd_status_get_queue_length(const struct mpd_status *status)
mpd_status_get_song_id
int mpd_status_get_song_id(const struct mpd_status *status)
mpd_status_get_consume
bool mpd_status_get_consume(const struct mpd_status *status)
mpd_single_state
mpd_single_state
Definition status.h:39
MPD_SINGLE_UNKNOWN
@ MPD_SINGLE_UNKNOWN
Definition status.h:56
MPD_SINGLE_ONESHOT
@ MPD_SINGLE_ONESHOT
Definition status.h:53
MPD_SINGLE_OFF
@ MPD_SINGLE_OFF
Definition status.h:41
MPD_SINGLE_ON
@ MPD_SINGLE_ON
Definition status.h:44
mpd_status_get_total_time
unsigned mpd_status_get_total_time(const struct mpd_status *status)
mpd_consume_state
mpd_consume_state
Definition status.h:64
MPD_CONSUME_UNKNOWN
@ MPD_CONSUME_UNKNOWN
Definition status.h:81
MPD_CONSUME_ONESHOT
@ MPD_CONSUME_ONESHOT
Definition status.h:78
MPD_CONSUME_OFF
@ MPD_CONSUME_OFF
Definition status.h:66
MPD_CONSUME_ON
@ MPD_CONSUME_ON
Definition status.h:69
mpd_status_get_random
bool mpd_status_get_random(const struct mpd_status *status)
mpd_parse_single_state
enum mpd_single_state mpd_parse_single_state(const char *p)
mpd_send_status
bool mpd_send_status(struct mpd_connection *connection)
mpd_status_get_consume_state
enum mpd_consume_state mpd_status_get_consume_state(const struct mpd_status *status)
mpd_status_get_kbit_rate
unsigned mpd_status_get_kbit_rate(const struct mpd_status *status)
mpd_status_get_mixrampdb
float mpd_status_get_mixrampdb(const struct mpd_status *status)
mpd_parse_consume_state
enum mpd_consume_state mpd_parse_consume_state(const char *p)
mpd_status_get_queue_version
unsigned mpd_status_get_queue_version(const struct mpd_status *status)
mpd_status_get_update_id
unsigned mpd_status_get_update_id(const struct mpd_status *status)
mpd_status_get_next_song_id
int mpd_status_get_next_song_id(const struct mpd_status *status)
mpd_status_begin
struct mpd_status * mpd_status_begin(void)
mpd_state
mpd_state
Definition status.h:20
MPD_STATE_STOP
@ MPD_STATE_STOP
Definition status.h:25
MPD_STATE_UNKNOWN
@ MPD_STATE_UNKNOWN
Definition status.h:22
MPD_STATE_PLAY
@ MPD_STATE_PLAY
Definition status.h:28
MPD_STATE_PAUSE
@ MPD_STATE_PAUSE
Definition status.h:31
mpd_status_feed
void mpd_status_feed(struct mpd_status *status, const struct mpd_pair *pair)
mpd_status_get_error
const char * mpd_status_get_error(const struct mpd_status *status)
mpd_status_get_elapsed_time
unsigned mpd_status_get_elapsed_time(const struct mpd_status *status)
mpd_status_get_state
enum mpd_state mpd_status_get_state(const struct mpd_status *status)
mpd_lookup_single_state
const char * mpd_lookup_single_state(enum mpd_single_state state)
mpd_lookup_consume_state
const char * mpd_lookup_consume_state(enum mpd_consume_state state)
mpd_status_get_crossfade
unsigned mpd_status_get_crossfade(const struct mpd_status *status)
mpd_run_status
struct mpd_status * mpd_run_status(struct mpd_connection *connection)
mpd_status_get_mixrampdelay
float mpd_status_get_mixrampdelay(const struct mpd_status *status)
mpd_status_get_next_song_pos
int mpd_status_get_next_song_pos(const struct mpd_status *status)
mpd_status_get_single
bool mpd_status_get_single(const struct mpd_status *status)
mpd_status_get_song_pos
int mpd_status_get_song_pos(const struct mpd_status *status)
mpd_status_free
void mpd_status_free(struct mpd_status *status)
mpd_status_get_repeat
bool mpd_status_get_repeat(const struct mpd_status *status)
mpd_status_get_audio_format
const struct mpd_audio_format * mpd_status_get_audio_format(const struct mpd_status *status)
mpd_recv_status
struct mpd_status * mpd_recv_status(struct mpd_connection *connection)
mpd_status_get_elapsed_ms
unsigned mpd_status_get_elapsed_ms(const struct mpd_status *status)
mpd_audio_format
Definition audio_format.h:37
mpd_connection
mpd_pair
Definition pair.h:16
mpd_status