libmpdclient  2.17
status.h
Go to the documentation of this file.
1 /* libmpdclient
2  (c) 2003-2018 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 
63 struct mpd_connection;
64 struct mpd_pair;
66 
72 struct mpd_status;
73 
74 #ifdef __cplusplus
75 extern "C" {
76 #endif
77 
85 mpd_malloc
86 struct mpd_status *
87 mpd_status_begin(void);
88 
93 void
94 mpd_status_feed(struct mpd_status *status, const struct mpd_pair *pair);
95 
102 bool
103 mpd_send_status(struct mpd_connection *connection);
104 
110 mpd_malloc
111 struct mpd_status *
112 mpd_recv_status(struct mpd_connection *connection);
113 
120 mpd_malloc
121 struct mpd_status *
122 mpd_run_status(struct mpd_connection *connection);
123 
127 void mpd_status_free(struct mpd_status * status);
128 
133 mpd_pure
134 int mpd_status_get_volume(const struct mpd_status *status);
135 
139 mpd_pure
140 bool
141 mpd_status_get_repeat(const struct mpd_status *status);
142 
146 mpd_pure
147 bool
148 mpd_status_get_random(const struct mpd_status *status);
149 
153 mpd_pure
154 bool
155 mpd_status_get_single(const struct mpd_status *status);
156 
160 mpd_pure
161 bool
162 mpd_status_get_consume(const struct mpd_status *status);
163 
168 mpd_pure
169 unsigned
170 mpd_status_get_queue_length(const struct mpd_status *status);
171 
176 mpd_pure
177 unsigned
178 mpd_status_get_queue_version(const struct mpd_status *status);
179 
183 mpd_pure
184 enum mpd_state
185 mpd_status_get_state(const struct mpd_status *status);
186 
191 mpd_pure
192 unsigned
193 mpd_status_get_crossfade(const struct mpd_status *status);
194 
200 mpd_pure
201 float
202 mpd_status_get_mixrampdb(const struct mpd_status *status);
203 
210 mpd_pure
211 float
212 mpd_status_get_mixrampdelay(const struct mpd_status *status);
213 
219 mpd_pure
220 int
221 mpd_status_get_song_pos(const struct mpd_status *status);
222 
227 mpd_pure
228 int
229 mpd_status_get_song_id(const struct mpd_status *status);
230 
237 mpd_pure
238 int
239 mpd_status_get_next_song_pos(const struct mpd_status *status);
240 
247 mpd_pure
248 int
249 mpd_status_get_next_song_id(const struct mpd_status *status);
250 
255 mpd_pure
256 unsigned
257 mpd_status_get_elapsed_time(const struct mpd_status *status);
258 
265 mpd_pure
266 unsigned
267 mpd_status_get_elapsed_ms(const struct mpd_status *status);
268 
272 mpd_pure
273 unsigned
274 mpd_status_get_total_time(const struct mpd_status *status);
275 
279 mpd_pure
280 unsigned
281 mpd_status_get_kbit_rate(const struct mpd_status *status);
282 
287 mpd_pure
288 const struct mpd_audio_format *
289 mpd_status_get_audio_format(const struct mpd_status *status);
290 
294 mpd_pure
295 unsigned
296 mpd_status_get_update_id(const struct mpd_status *status);
297 
301 mpd_pure
302 const char *
303 mpd_status_get_error(const struct mpd_status *status);
304 
305 #ifdef __cplusplus
306 }
307 #endif
308 
309 #endif
mpd_pure enum mpd_state mpd_status_get_state(const struct mpd_status *status)
mpd_pure bool mpd_status_get_single(const struct mpd_status *status)
mpd_pure float mpd_status_get_mixrampdb(const struct mpd_status *status)
bool mpd_send_status(struct mpd_connection *connection)
mpd_pure float mpd_status_get_mixrampdelay(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)
void mpd_status_free(struct mpd_status *status)
Compiler specific definitions.
mpd_pure const char * mpd_status_get_error(const struct mpd_status *status)
mpd_pure unsigned mpd_status_get_kbit_rate(const struct mpd_status *status)
mpd_pure int mpd_status_get_volume(const struct mpd_status *status)
mpd_pure unsigned mpd_status_get_queue_length(const struct mpd_status *status)
mpd_pure int mpd_status_get_next_song_pos(const struct mpd_status *status)
mpd_pure unsigned mpd_status_get_crossfade(const struct mpd_status *status)
mpd_pure int mpd_status_get_song_id(const struct mpd_status *status)
mpd_state
Definition: status.h:49
mpd_pure bool mpd_status_get_repeat(const struct mpd_status *status)
mpd_pure unsigned mpd_status_get_update_id(const struct mpd_status *status)
void mpd_status_feed(struct mpd_status *status, const struct mpd_pair *pair)
mpd_pure const struct mpd_audio_format * mpd_status_get_audio_format(const struct mpd_status *status)
mpd_pure unsigned mpd_status_get_queue_version(const struct mpd_status *status)
mpd_malloc struct mpd_status * mpd_recv_status(struct mpd_connection *connection)
mpd_malloc struct mpd_status * mpd_status_begin(void)
mpd_pure bool mpd_status_get_consume(const struct mpd_status *status)
mpd_pure bool mpd_status_get_random(const struct mpd_status *status)
mpd_pure int mpd_status_get_next_song_id(const struct mpd_status *status)
mpd_malloc struct mpd_status * mpd_run_status(struct mpd_connection *connection)
mpd_pure int mpd_status_get_song_pos(const struct mpd_status *status)
Definition: pair.h:41
mpd_pure unsigned mpd_status_get_total_time(const struct mpd_status *status)