libmpdclient 2.22
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
96
99
108
111};
112
113struct mpd_connection;
114struct mpd_pair;
115struct mpd_audio_format;
116
122struct mpd_status;
123
124#ifdef __cplusplus
125extern "C" {
126#endif
127
135mpd_malloc
136struct mpd_status *
138
143void
144mpd_status_feed(struct mpd_status *status, const struct mpd_pair *pair);
145
152bool
153mpd_send_status(struct mpd_connection *connection);
154
160mpd_malloc
161struct mpd_status *
162mpd_recv_status(struct mpd_connection *connection);
163
170mpd_malloc
171struct mpd_status *
172mpd_run_status(struct mpd_connection *connection);
173
177void mpd_status_free(struct mpd_status * status);
178
183mpd_pure
184int mpd_status_get_volume(const struct mpd_status *status);
185
189mpd_pure
190bool
191mpd_status_get_repeat(const struct mpd_status *status);
192
196mpd_pure
197bool
198mpd_status_get_random(const struct mpd_status *status);
199
210mpd_pure
213
221const char *
223
233
241mpd_pure
242bool
243mpd_status_get_single(const struct mpd_status *status);
244
254mpd_pure
257
265const char *
267
277
285mpd_pure
286bool
287mpd_status_get_consume(const struct mpd_status *status);
288
293mpd_pure
294unsigned
296
301mpd_pure
302unsigned
304
308mpd_pure
309enum mpd_state
310mpd_status_get_state(const struct mpd_status *status);
311
316mpd_pure
317unsigned
319
325mpd_pure
326float
328
335mpd_pure
336float
338
345mpd_pure
346int
348
353mpd_pure
354int
355mpd_status_get_song_id(const struct mpd_status *status);
356
363mpd_pure
364int
366
373mpd_pure
374int
376
385mpd_pure
386unsigned
388
395mpd_pure
396unsigned
398
402mpd_pure
403unsigned
405
409mpd_pure
410unsigned
412
417mpd_pure
418const struct mpd_audio_format *
420
424mpd_pure
425unsigned
427
432mpd_pure
433const char *
435
439mpd_pure
440const char *
441mpd_status_get_error(const struct mpd_status *status);
442
443#ifdef __cplusplus
444}
445#endif
446
447#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)
mpd_consume_state
Definition: status.h:93
@ MPD_CONSUME_UNKNOWN
Definition: status.h:110
@ MPD_CONSUME_ONESHOT
Definition: status.h:107
@ MPD_CONSUME_OFF
Definition: status.h:95
@ MPD_CONSUME_ON
Definition: status.h:98
bool mpd_status_get_random(const struct mpd_status *status)
enum mpd_single_state mpd_parse_single_state(const char *p)
bool mpd_send_status(struct mpd_connection *connection)
enum mpd_consume_state mpd_status_get_consume_state(const struct mpd_status *status)
unsigned mpd_status_get_kbit_rate(const struct mpd_status *status)
float mpd_status_get_mixrampdb(const struct mpd_status *status)
enum mpd_consume_state mpd_parse_consume_state(const char *p)
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)
const char * mpd_lookup_single_state(enum mpd_single_state state)
const char * mpd_lookup_consume_state(enum mpd_consume_state state)
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