status.h
Go to the documentation of this file.
/* libmpdclient
(c) 2003-2015 The Music Player Daemon Project
This project's homepage is: http://www.musicpd.org
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
- Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
- Neither the name of the Music Player Daemon nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef MPD_STATUS_H
#define MPD_STATUS_H
#include <mpd/compiler.h>
#include <stdbool.h>
enum mpd_state {
MPD_STATE_UNKNOWN = 0,
MPD_STATE_STOP = 1,
MPD_STATE_PLAY = 2,
MPD_STATE_PAUSE = 3,
};
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
bool
mpd_status_get_single(const struct mpd_status *status);
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_error(const struct mpd_status *status);
#ifdef __cplusplus
}
#endif
#endif
mpd_status_get_state
mpd_pure enum mpd_state mpd_status_get_state(const struct mpd_status *status)
MPD_STATE_PLAY
Definition: status.h:57
mpd_status_get_single
mpd_pure bool mpd_status_get_single(const struct mpd_status *status)
mpd_status_get_mixrampdb
mpd_pure float mpd_status_get_mixrampdb(const struct mpd_status *status)
mpd_audio_format
Definition: audio_format.h:55
mpd_send_status
bool mpd_send_status(struct mpd_connection *connection)
mpd_status_get_mixrampdelay
mpd_pure float mpd_status_get_mixrampdelay(const struct mpd_status *status)
mpd_status_get_elapsed_time
mpd_pure unsigned mpd_status_get_elapsed_time(const struct mpd_status *status)
mpd_status_get_elapsed_ms
mpd_pure unsigned mpd_status_get_elapsed_ms(const struct mpd_status *status)
mpd_status_free
void mpd_status_free(struct mpd_status *status)
compiler.h
Compiler specific definitions.
mpd_status_get_error
mpd_pure const char * mpd_status_get_error(const struct mpd_status *status)
mpd_status_get_kbit_rate
mpd_pure unsigned mpd_status_get_kbit_rate(const struct mpd_status *status)
mpd_status_get_volume
mpd_pure int mpd_status_get_volume(const struct mpd_status *status)
mpd_status_get_queue_length
mpd_pure unsigned mpd_status_get_queue_length(const struct mpd_status *status)
mpd_status_get_next_song_pos
mpd_pure int mpd_status_get_next_song_pos(const struct mpd_status *status)
mpd_status_get_crossfade
mpd_pure unsigned mpd_status_get_crossfade(const struct mpd_status *status)
mpd_status_get_song_id
mpd_pure int mpd_status_get_song_id(const struct mpd_status *status)
MPD_STATE_UNKNOWN
Definition: status.h:51
MPD_STATE_STOP
Definition: status.h:54
mpd_state
mpd_state
Definition: status.h:49
mpd_status_get_repeat
mpd_pure bool mpd_status_get_repeat(const struct mpd_status *status)
MPD_STATE_PAUSE
Definition: status.h:60
mpd_status_get_update_id
mpd_pure unsigned mpd_status_get_update_id(const struct mpd_status *status)
mpd_status_feed
void mpd_status_feed(struct mpd_status *status, const struct mpd_pair *pair)
mpd_status_get_audio_format
mpd_pure const struct mpd_audio_format * mpd_status_get_audio_format(const struct mpd_status *status)
mpd_status_get_queue_version
mpd_pure unsigned mpd_status_get_queue_version(const struct mpd_status *status)
mpd_recv_status
mpd_malloc struct mpd_status * mpd_recv_status(struct mpd_connection *connection)
mpd_connection
Definition: connection.h:48
mpd_status_begin
mpd_malloc struct mpd_status * mpd_status_begin(void)
mpd_status_get_consume
mpd_pure bool mpd_status_get_consume(const struct mpd_status *status)
mpd_status_get_random
mpd_pure bool mpd_status_get_random(const struct mpd_status *status)
mpd_status_get_next_song_id
mpd_pure int mpd_status_get_next_song_id(const struct mpd_status *status)
mpd_run_status
mpd_malloc struct mpd_status * mpd_run_status(struct mpd_connection *connection)
mpd_status_get_song_pos
mpd_pure int mpd_status_get_song_pos(const struct mpd_status *status)
mpd_pair
Definition: pair.h:41
mpd_status
Definition: status.h:65
mpd_status_get_total_time
mpd_pure unsigned mpd_status_get_total_time(const struct mpd_status *status)