libmpdclient  2.19
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 
49 enum mpd_state {
52 
55 
58 
61 };
62 
71 
74 
83 
86 };
87 
88 struct mpd_connection;
89 struct mpd_pair;
91 
97 struct mpd_status;
98 
99 #ifdef __cplusplus
100 extern "C" {
101 #endif
102 
110 mpd_malloc
111 struct mpd_status *
112 mpd_status_begin(void);
113 
118 void
119 mpd_status_feed(struct mpd_status *status, const struct mpd_pair *pair);
120 
127 bool
128 mpd_send_status(struct mpd_connection *connection);
129 
135 mpd_malloc
136 struct mpd_status *
137 mpd_recv_status(struct mpd_connection *connection);
138 
145 mpd_malloc
146 struct mpd_status *
147 mpd_run_status(struct mpd_connection *connection);
148 
152 void mpd_status_free(struct mpd_status * status);
153 
158 mpd_pure
159 int mpd_status_get_volume(const struct mpd_status *status);
160 
164 mpd_pure
165 bool
166 mpd_status_get_repeat(const struct mpd_status *status);
167 
171 mpd_pure
172 bool
173 mpd_status_get_random(const struct mpd_status *status);
174 
185 mpd_pure
186 enum mpd_single_state
187 mpd_status_get_single_state(const struct mpd_status *status);
188 
196 mpd_pure
197 bool
198 mpd_status_get_single(const struct mpd_status *status);
199 
203 mpd_pure
204 bool
205 mpd_status_get_consume(const struct mpd_status *status);
206 
211 mpd_pure
212 unsigned
213 mpd_status_get_queue_length(const struct mpd_status *status);
214 
219 mpd_pure
220 unsigned
221 mpd_status_get_queue_version(const struct mpd_status *status);
222 
226 mpd_pure
227 enum mpd_state
228 mpd_status_get_state(const struct mpd_status *status);
229 
234 mpd_pure
235 unsigned
236 mpd_status_get_crossfade(const struct mpd_status *status);
237 
243 mpd_pure
244 float
245 mpd_status_get_mixrampdb(const struct mpd_status *status);
246 
253 mpd_pure
254 float
255 mpd_status_get_mixrampdelay(const struct mpd_status *status);
256 
263 mpd_pure
264 int
265 mpd_status_get_song_pos(const struct mpd_status *status);
266 
271 mpd_pure
272 int
273 mpd_status_get_song_id(const struct mpd_status *status);
274 
281 mpd_pure
282 int
283 mpd_status_get_next_song_pos(const struct mpd_status *status);
284 
291 mpd_pure
292 int
293 mpd_status_get_next_song_id(const struct mpd_status *status);
294 
303 mpd_pure
304 unsigned
305 mpd_status_get_elapsed_time(const struct mpd_status *status);
306 
313 mpd_pure
314 unsigned
315 mpd_status_get_elapsed_ms(const struct mpd_status *status);
316 
320 mpd_pure
321 unsigned
322 mpd_status_get_total_time(const struct mpd_status *status);
323 
327 mpd_pure
328 unsigned
329 mpd_status_get_kbit_rate(const struct mpd_status *status);
330 
335 mpd_pure
336 const struct mpd_audio_format *
337 mpd_status_get_audio_format(const struct mpd_status *status);
338 
342 mpd_pure
343 unsigned
344 mpd_status_get_update_id(const struct mpd_status *status);
345 
350 mpd_pure
351 const char *
352 mpd_status_get_partition(const struct mpd_status *status);
353 
357 mpd_pure
358 const char *
359 mpd_status_get_error(const struct mpd_status *status);
360 
361 #ifdef __cplusplus
362 }
363 #endif
364 
365 #endif
int mpd_status_get_song_pos(const struct mpd_status *status)
unsigned mpd_status_get_total_time(const struct mpd_status *status)
unsigned mpd_status_get_crossfade(const struct mpd_status *status)
const struct mpd_audio_format * mpd_status_get_audio_format(const struct mpd_status *status)
enum mpd_state mpd_status_get_state(const struct mpd_status *status)
unsigned mpd_status_get_elapsed_time(const struct mpd_status *status)
bool mpd_send_status(struct mpd_connection *connection)
unsigned mpd_status_get_queue_version(const struct mpd_status *status)
bool mpd_status_get_consume(const struct mpd_status *status)
unsigned mpd_status_get_kbit_rate(const struct mpd_status *status)
void mpd_status_free(struct mpd_status *status)
bool mpd_status_get_repeat(const struct mpd_status *status)
bool mpd_status_get_random(const struct mpd_status *status)
const char * mpd_status_get_error(const struct mpd_status *status)
unsigned mpd_status_get_queue_length(const struct mpd_status *status)
unsigned mpd_status_get_elapsed_ms(const struct mpd_status *status)
int mpd_status_get_volume(const struct mpd_status *status)
int mpd_status_get_song_id(const struct mpd_status *status)
mpd_state
Definition: status.h:49
int mpd_status_get_next_song_id(const struct mpd_status *status)
void mpd_status_feed(struct mpd_status *status, const struct mpd_pair *pair)
struct mpd_status * mpd_run_status(struct mpd_connection *connection)
enum mpd_single_state mpd_status_get_single_state(const struct mpd_status *status)
struct mpd_status * mpd_status_begin(void)
unsigned mpd_status_get_update_id(const struct mpd_status *status)
bool mpd_status_get_single(const struct mpd_status *status)
float mpd_status_get_mixrampdb(const struct mpd_status *status)
const char * mpd_status_get_partition(const struct mpd_status *status)
int mpd_status_get_next_song_pos(const struct mpd_status *status)
Definition: pair.h:41
struct mpd_status * mpd_recv_status(struct mpd_connection *connection)
float mpd_status_get_mixrampdelay(const struct mpd_status *status)
mpd_single_state
Definition: status.h:68