libmpdclient 2.9

- Main Page
- Classes
- Files

- File List
- File Members

status.h
Go to the documentation of this file.
1 /* libmpdclient
2 (c) 2003-2010 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 <mpd/compiler.h>
43
44 #include <stdbool.h>
45
49 enum mpd_state {
51 MPD_STATE_UNKNOWN = 0,
52
54 MPD_STATE_STOP = 1,
55
57 MPD_STATE_PLAY = 2,
58
60 MPD_STATE_PAUSE = 3,
61 };
62
63 struct mpd_connection;
64 struct mpd_pair;
65 struct mpd_audio_format;
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
198 mpd_pure
199 float
200 mpd_status_get_mixrampdb(const struct mpd_status *status);
201
206 mpd_pure
207 float
208 mpd_status_get_mixrampdelay(const struct mpd_status *status);
209
215 mpd_pure
216 int
217 mpd_status_get_song_pos(const struct mpd_status *status);
218
223 mpd_pure
224 int
225 mpd_status_get_song_id(const struct mpd_status *status);
226
231 mpd_pure
232 int
233 mpd_status_get_next_song_pos(const struct mpd_status *status);
234
239 mpd_pure
240 int
241 mpd_status_get_next_song_id(const struct mpd_status *status);
242
247 mpd_pure
248 unsigned
249 mpd_status_get_elapsed_time(const struct mpd_status *status);
250
255 mpd_pure
256 unsigned
257 mpd_status_get_elapsed_ms(const struct mpd_status *status);
258
262 mpd_pure
263 unsigned
264 mpd_status_get_total_time(const struct mpd_status *status);
265
269 mpd_pure
270 unsigned
271 mpd_status_get_kbit_rate(const struct mpd_status *status);
272
277 mpd_pure
278 const struct mpd_audio_format *
279 mpd_status_get_audio_format(const struct mpd_status *status);
280
284 mpd_pure
285 unsigned
286 mpd_status_get_update_id(const struct mpd_status *status);
287
291 mpd_pure
292 const char *
293 mpd_status_get_error(const struct mpd_status *status);
294
295 #ifdef __cplusplus
296 }
297 #endif
298
299 #endif