libmpdclient  2.8
queue.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  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17  ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
20  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
21  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
22  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
23  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
24  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
25  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
26  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 */
28 
37 #ifndef MPD_QUEUE_H
38 #define MPD_QUEUE_H
39 
40 #include <mpd/compiler.h>
41 
42 #include <stdbool.h>
43 
44 struct mpd_connection;
45 
46 #ifdef __cplusplus
47 extern "C" {
48 #endif
49 
54 bool
55 mpd_send_list_queue_meta(struct mpd_connection *connection);
56 
66 bool
68  unsigned start, unsigned end);
69 
77 bool
78 mpd_send_get_queue_song_pos(struct mpd_connection *connection, unsigned pos);
79 
87 mpd_malloc
88 struct mpd_song *
89 mpd_run_get_queue_song_pos(struct mpd_connection *connection, unsigned pos);
90 
98 bool
99 mpd_send_get_queue_song_id(struct mpd_connection *connection, unsigned id);
100 
108 mpd_malloc
109 struct mpd_song *
110 mpd_run_get_queue_song_id(struct mpd_connection *connection, unsigned id);
111 
120 bool
122  unsigned version);
123 
133 bool
135  unsigned version);
136 
146 bool
148  unsigned *position_r, unsigned *id_r);
149 
153 bool
154 mpd_send_add(struct mpd_connection *connection, const char *file);
155 
163 bool
164 mpd_run_add(struct mpd_connection *connection, const char *uri);
165 
169 bool
170 mpd_send_add_id(struct mpd_connection *connection, const char *file);
171 
180 bool
181 mpd_send_add_id_to(struct mpd_connection *connection, const char *uri,
182  unsigned to);
183 
190 int
191 mpd_recv_song_id(struct mpd_connection *connection);
192 
198 int
199 mpd_run_add_id(struct mpd_connection *connection, const char *file);
200 
209 int
210 mpd_run_add_id_to(struct mpd_connection *connection, const char *uri,
211  unsigned to);
212 
219 bool
220 mpd_send_delete(struct mpd_connection *connection, unsigned pos);
221 
229 bool
230 mpd_run_delete(struct mpd_connection *connection, unsigned pos);
231 
241 bool
242 mpd_send_delete_range(struct mpd_connection *connection,
243  unsigned start, unsigned end);
244 
254 bool
255 mpd_run_delete_range(struct mpd_connection *connection,
256  unsigned start, unsigned end);
257 
264 bool
265 mpd_send_delete_id(struct mpd_connection *connection, unsigned id);
266 
274 bool
275 mpd_run_delete_id(struct mpd_connection *connection, unsigned id);
276 
282 bool
283 mpd_send_shuffle(struct mpd_connection *connection);
284 
290 bool
291 mpd_run_shuffle(struct mpd_connection *connection);
292 
301 bool
302 mpd_send_shuffle_range(struct mpd_connection *connection, unsigned start, unsigned end);
303 
312 bool
313 mpd_run_shuffle_range(struct mpd_connection *connection,
314  unsigned start, unsigned end);
315 
321 bool
322 mpd_send_clear(struct mpd_connection *connection);
323 
329 bool
330 mpd_run_clear(struct mpd_connection *connection);
331 
339 bool
340 mpd_send_move(struct mpd_connection *connection, unsigned from, unsigned to);
341 
349 bool
350 mpd_run_move(struct mpd_connection *connection, unsigned from, unsigned to);
351 
359 bool
360 mpd_send_move_id(struct mpd_connection *connection, unsigned from, unsigned to);
361 
369 bool
370 mpd_run_move_id(struct mpd_connection *connection, unsigned from, unsigned to);
371 
382 bool
383 mpd_send_move_range(struct mpd_connection *connection,
384  unsigned start, unsigned end, unsigned to);
385 
396 bool
397 mpd_run_move_range(struct mpd_connection *connection,
398  unsigned start, unsigned end, unsigned to);
399 
407 bool
408 mpd_send_swap(struct mpd_connection *connection, unsigned pos1, unsigned pos2);
409 
417 bool
418 mpd_run_swap(struct mpd_connection *connection, unsigned pos1, unsigned pos2);
419 
427 bool
428 mpd_send_swap_id(struct mpd_connection *connection, unsigned id1, unsigned id2);
429 
437 bool
438 mpd_run_swap_id(struct mpd_connection *connection, unsigned id1, unsigned id2);
439 
447 bool
448 mpd_send_prio(struct mpd_connection *connection, int priority,
449  unsigned position);
450 
460 bool
461 mpd_run_prio(struct mpd_connection *connection, int priority,
462  unsigned position);
463 
473 bool
474 mpd_send_prio_range(struct mpd_connection *connection, int priority,
475  unsigned start, unsigned end);
476 
487 bool
488 mpd_run_prio_range(struct mpd_connection *connection, int priority,
489  unsigned start, unsigned end);
490 
498 bool
499 mpd_send_prio_id(struct mpd_connection *connection, int priority,
500  unsigned id);
501 
509 bool
510 mpd_run_prio_id(struct mpd_connection *connection, int priority,
511  unsigned id);
512 
513 #ifdef __cplusplus
514 }
515 #endif
516 
517 #endif