libmpdclient 2.20
status.h
Go to the documentation of this file.
1/* libmpdclient
2 (c) 2003-2019 The Music Player Daemon Project
3 This project's homepage is: http://www.musicpd.org
4
5 Redistribution and use in source and binary forms, with or without
6 modification, are permitted provided that the following conditions
7 are met:
8
9 - Redistributions of source code must retain the above copyright
10 notice, this list of conditions and the following disclaimer.
11
12 - Redistributions in binary form must reproduce the above copyright
13 notice, this list of conditions and the following disclaimer in the
14 documentation and/or other materials provided with the distribution.
15
16 - Neither the name of the Music Player Daemon nor the names of its
17 contributors may be used to endorse or promote products derived from
18 this software without specific prior written permission.
19
20 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21 ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23 A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
24 CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
25 EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
26 PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
27 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
28 LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
29 NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
30 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31*/
32
39#ifndef MPD_STATUS_H
40#define MPD_STATUS_H
41
42#include "compiler.h"
43
44#include <stdbool.h>
45
52
55
58
61};
62
71
74
83
86};
87
88struct mpd_connection;
89struct mpd_pair;
90struct mpd_audio_format;
91
97struct mpd_status;
98
99#ifdef __cplusplus
100extern "C" {
101#endif
102
110mpd_malloc
111struct mpd_status *
113
118void
119mpd_status_feed(struct mpd_status *status, const struct mpd_pair *pair);
120
127bool
128mpd_send_status(struct mpd_connection *connection);
129
135mpd_malloc
136struct mpd_status *
137mpd_recv_status(struct mpd_connection *connection);
138
145mpd_malloc
146struct mpd_status *
147mpd_run_status(struct mpd_connection *connection);
148
152void mpd_status_free(struct mpd_status * status);
153
158mpd_pure
159int mpd_status_get_volume(const struct mpd_status *status);
160
164mpd_pure
165bool
166mpd_status_get_repeat(const struct mpd_status *status);
167
171mpd_pure
172bool
173mpd_status_get_random(const struct mpd_status *status);
174
185mpd_pure
188
196mpd_pure
197bool
198mpd_status_get_single(const struct mpd_status *status);
199
203mpd_pure
204bool
205mpd_status_get_consume(const struct mpd_status *status);
206
211mpd_pure
212unsigned
214
219mpd_pure
220unsigned
222
226mpd_pure
227enum mpd_state
228mpd_status_get_state(const struct mpd_status *status);
229
234mpd_pure
235unsigned
237
243mpd_pure
244float
246
253mpd_pure
254float
256
263mpd_pure
264int
266
271mpd_pure
272int
273mpd_status_get_song_id(const struct mpd_status *status);
274
281mpd_pure
282int
284
291mpd_pure
292int
294
303mpd_pure
304unsigned
306
313mpd_pure
314unsigned
316
320mpd_pure
321unsigned
323
327mpd_pure
328unsigned
330
335mpd_pure
336const struct mpd_audio_format *
338
342mpd_pure
343unsigned
345
350mpd_pure
351const char *
353
357mpd_pure
358const char *
359mpd_status_get_error(const struct mpd_status *status);
360
361#ifdef __cplusplus
362}
363#endif
364
365#endif
const char * mpd_status_get_partition(const struct mpd_status *status)
enum mpd_single_state mpd_status_get_single_state(const struct mpd_status *status)
int mpd_status_get_volume(const struct mpd_status *status)
unsigned mpd_status_get_queue_length(const struct mpd_status *status)
int mpd_status_get_song_id(const struct mpd_status *status)
bool mpd_status_get_consume(const struct mpd_status *status)
mpd_single_state
Definition: status.h:68
@ MPD_SINGLE_UNKNOWN
Definition: status.h:85
@ MPD_SINGLE_ONESHOT
Definition: status.h:82
@ MPD_SINGLE_OFF
Definition: status.h:70
@ MPD_SINGLE_ON
Definition: status.h:73
unsigned mpd_status_get_total_time(const struct mpd_status *status)
bool mpd_status_get_random(const struct mpd_status *status)
bool mpd_send_status(struct mpd_connection *connection)
unsigned mpd_status_get_kbit_rate(const struct mpd_status *status)
float mpd_status_get_mixrampdb(const struct mpd_status *status)
unsigned mpd_status_get_queue_version(const struct mpd_status *status)
unsigned mpd_status_get_update_id(const struct mpd_status *status)
int mpd_status_get_next_song_id(const struct mpd_status *status)
struct mpd_status * mpd_status_begin(void)
mpd_state
Definition: status.h:49
@ MPD_STATE_STOP
Definition: status.h:54
@ MPD_STATE_UNKNOWN
Definition: status.h:51
@ MPD_STATE_PLAY
Definition: status.h:57
@ MPD_STATE_PAUSE
Definition: status.h:60
void mpd_status_feed(struct mpd_status *status, const struct mpd_pair *pair)
const char * mpd_status_get_error(const struct mpd_status *status)
unsigned mpd_status_get_elapsed_time(const struct mpd_status *status)
enum mpd_state mpd_status_get_state(const struct mpd_status *status)
unsigned mpd_status_get_crossfade(const struct mpd_status *status)
struct mpd_status * mpd_run_status(struct mpd_connection *connection)
float mpd_status_get_mixrampdelay(const struct mpd_status *status)
int mpd_status_get_next_song_pos(const struct mpd_status *status)
bool mpd_status_get_single(const struct mpd_status *status)
int mpd_status_get_song_pos(const struct mpd_status *status)
void mpd_status_free(struct mpd_status *status)
bool mpd_status_get_repeat(const struct mpd_status *status)
const struct mpd_audio_format * mpd_status_get_audio_format(const struct mpd_status *status)
struct mpd_status * mpd_recv_status(struct mpd_connection *connection)
unsigned mpd_status_get_elapsed_ms(const struct mpd_status *status)
Definition: pair.h:41