libmpdclient 2.14

queue.h
Go to the documentation of this file.
1 /* libmpdclient
2 (c) 2003-2017 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 "compiler.h"
41 #include "tag.h"
42
43 #include <stdbool.h>
44
45 struct mpd_connection;
46
47 #ifdef __cplusplus
48 extern "C" {
49 #endif
50
55 bool
56 mpd_send_list_queue_meta(struct mpd_connection *connection);
57
69 bool
70 mpd_send_list_queue_range_meta(struct mpd_connection *connection,
71 unsigned start, unsigned end);
72
80 bool
81 mpd_send_get_queue_song_pos(struct mpd_connection *connection, unsigned pos);
82
90 mpd_malloc
91 struct mpd_song *
92 mpd_run_get_queue_song_pos(struct mpd_connection *connection, unsigned pos);
93
101 bool
102 mpd_send_get_queue_song_id(struct mpd_connection *connection, unsigned id);
103
111 mpd_malloc
112 struct mpd_song *
113 mpd_run_get_queue_song_id(struct mpd_connection *connection, unsigned id);
114
123 bool
124 mpd_send_queue_changes_meta(struct mpd_connection *connection,
125 unsigned version);
126
139 bool
140 mpd_send_queue_changes_meta_range(struct mpd_connection *connection,
141 unsigned version,
142 unsigned start, unsigned end);
143
153 bool
154 mpd_send_queue_changes_brief(struct mpd_connection *connection,
155 unsigned version);
156
169 bool
170 mpd_send_queue_changes_brief_range(struct mpd_connection *connection,
171 unsigned version,
172 unsigned start, unsigned end);
173
183 bool
184 mpd_recv_queue_change_brief(struct mpd_connection *connection,
185 unsigned *position_r, unsigned *id_r);
186
190 bool
191 mpd_send_add(struct mpd_connection *connection, const char *file);
192
200 bool
201 mpd_run_add(struct mpd_connection *connection, const char *uri);
202
206 bool
207 mpd_send_add_id(struct mpd_connection *connection, const char *file);
208
217 bool
218 mpd_send_add_id_to(struct mpd_connection *connection, const char *uri,
219 unsigned to);
220
227 int
228 mpd_recv_song_id(struct mpd_connection *connection);
229
235 int
236 mpd_run_add_id(struct mpd_connection *connection, const char *file);
237
246 int
247 mpd_run_add_id_to(struct mpd_connection *connection, const char *uri,
248 unsigned to);
249
256 bool
257 mpd_send_delete(struct mpd_connection *connection, unsigned pos);
258
266 bool
267 mpd_run_delete(struct mpd_connection *connection, unsigned pos);
268
280 bool
281 mpd_send_delete_range(struct mpd_connection *connection,
282 unsigned start, unsigned end);
283
295 bool
296 mpd_run_delete_range(struct mpd_connection *connection,
297 unsigned start, unsigned end);
298
305 bool
306 mpd_send_delete_id(struct mpd_connection *connection, unsigned id);
307
315 bool
316 mpd_run_delete_id(struct mpd_connection *connection, unsigned id);
317
323 bool
324 mpd_send_shuffle(struct mpd_connection *connection);
325
331 bool
332 mpd_run_shuffle(struct mpd_connection *connection);
333
344 bool
345 mpd_send_shuffle_range(struct mpd_connection *connection, unsigned start, unsigned end);
346
357 bool
358 mpd_run_shuffle_range(struct mpd_connection *connection,
359 unsigned start, unsigned end);
360
366 bool
367 mpd_send_clear(struct mpd_connection *connection);
368
374 bool
375 mpd_run_clear(struct mpd_connection *connection);
376
384 bool
385 mpd_send_move(struct mpd_connection *connection, unsigned from, unsigned to);
386
394 bool
395 mpd_run_move(struct mpd_connection *connection, unsigned from, unsigned to);
396
404 bool
405 mpd_send_move_id(struct mpd_connection *connection, unsigned from, unsigned to);
406
414 bool
415 mpd_run_move_id(struct mpd_connection *connection, unsigned from, unsigned to);
416
429 bool
430 mpd_send_move_range(struct mpd_connection *connection,
431 unsigned start, unsigned end, unsigned to);
432
445 bool
446 mpd_run_move_range(struct mpd_connection *connection,
447 unsigned start, unsigned end, unsigned to);
448
456 bool
457 mpd_send_swap(struct mpd_connection *connection, unsigned pos1, unsigned pos2);
458
466 bool
467 mpd_run_swap(struct mpd_connection *connection, unsigned pos1, unsigned pos2);
468
476 bool
477 mpd_send_swap_id(struct mpd_connection *connection, unsigned id1, unsigned id2);
478
486 bool
487 mpd_run_swap_id(struct mpd_connection *connection, unsigned id1, unsigned id2);
488
499 bool
500 mpd_send_add_tag_id(struct mpd_connection *connection, unsigned id,
501 enum mpd_tag_type tag, const char *value);
502
513 bool
514 mpd_run_add_tag_id(struct mpd_connection *connection, unsigned id,
515 enum mpd_tag_type tag, const char *value);
516
526 bool
527 mpd_send_clear_tag_id(struct mpd_connection *connection, unsigned id,
528 enum mpd_tag_type tag);
529
539 bool
540 mpd_run_clear_tag_id(struct mpd_connection *connection, unsigned id,
541 enum mpd_tag_type tag);
542
551 bool
552 mpd_send_clear_all_tags_id(struct mpd_connection *connection, unsigned id);
553
562 bool
563 mpd_run_clear_all_tags_id(struct mpd_connection *connection, unsigned id);
564
574 bool
575 mpd_send_prio(struct mpd_connection *connection, int priority,
576 unsigned position);
577
587 bool
588 mpd_run_prio(struct mpd_connection *connection, int priority,
589 unsigned position);
590
603 bool
604 mpd_send_prio_range(struct mpd_connection *connection, int priority,
605 unsigned start, unsigned end);
606
619 bool
620 mpd_run_prio_range(struct mpd_connection *connection, int priority,
621 unsigned start, unsigned end);
622
632 bool
633 mpd_send_prio_id(struct mpd_connection *connection, int priority,
634 unsigned id);
635
645 bool
646 mpd_run_prio_id(struct mpd_connection *connection, int priority,
647 unsigned id);
648
649 #ifdef __cplusplus
650 }
651 #endif
652
653 #endif
tag.h
mpd_run_add
bool mpd_run_add(struct mpd_connection *connection, const char *uri)
mpd_send_delete_id
bool mpd_send_delete_id(struct mpd_connection *connection, unsigned id)
mpd_run_delete_range
bool mpd_run_delete_range(struct mpd_connection *connection, unsigned start, unsigned end)
mpd_run_prio_id
bool mpd_run_prio_id(struct mpd_connection *connection, int priority, unsigned id)
mpd_send_move_range
bool mpd_send_move_range(struct mpd_connection *connection, unsigned start, unsigned end, unsigned to)
mpd_send_list_queue_meta
bool mpd_send_list_queue_meta(struct mpd_connection *connection)
mpd_send_list_queue_range_meta
bool mpd_send_list_queue_range_meta(struct mpd_connection *connection, unsigned start, unsigned end)
mpd_run_get_queue_song_id
mpd_malloc struct mpd_song * mpd_run_get_queue_song_id(struct mpd_connection *connection, unsigned id)
mpd_run_shuffle_range
bool mpd_run_shuffle_range(struct mpd_connection *connection, unsigned start, unsigned end)
mpd_send_clear_all_tags_id
bool mpd_send_clear_all_tags_id(struct mpd_connection *connection, unsigned id)
mpd_send_move_id
bool mpd_send_move_id(struct mpd_connection *connection, unsigned from, unsigned to)
mpd_send_swap_id
bool mpd_send_swap_id(struct mpd_connection *connection, unsigned id1, unsigned id2)
mpd_send_queue_changes_brief_range
bool mpd_send_queue_changes_brief_range(struct mpd_connection *connection, unsigned version, unsigned start, unsigned end)
mpd_send_get_queue_song_id
bool mpd_send_get_queue_song_id(struct mpd_connection *connection, unsigned id)
mpd_tag_type
mpd_tag_type
Definition: tag.h:40
mpd_run_prio
bool mpd_run_prio(struct mpd_connection *connection, int priority, unsigned position)
mpd_run_prio_range
bool mpd_run_prio_range(struct mpd_connection *connection, int priority, unsigned start, unsigned end)
mpd_send_shuffle
bool mpd_send_shuffle(struct mpd_connection *connection)
mpd_run_move
bool mpd_run_move(struct mpd_connection *connection, unsigned from, unsigned to)
mpd_send_prio
bool mpd_send_prio(struct mpd_connection *connection, int priority, unsigned position)
mpd_run_shuffle
bool mpd_run_shuffle(struct mpd_connection *connection)
mpd_run_move_id
bool mpd_run_move_id(struct mpd_connection *connection, unsigned from, unsigned to)
mpd_run_get_queue_song_pos
mpd_malloc struct mpd_song * mpd_run_get_queue_song_pos(struct mpd_connection *connection, unsigned pos)
mpd_recv_queue_change_brief
bool mpd_recv_queue_change_brief(struct mpd_connection *connection, unsigned *position_r, unsigned *id_r)
compiler.h
Compiler specific definitions.
mpd_send_get_queue_song_pos
bool mpd_send_get_queue_song_pos(struct mpd_connection *connection, unsigned pos)
mpd_recv_song_id
int mpd_recv_song_id(struct mpd_connection *connection)
mpd_run_add_tag_id
bool mpd_run_add_tag_id(struct mpd_connection *connection, unsigned id, enum mpd_tag_type tag, const char *value)
mpd_send_queue_changes_meta_range
bool mpd_send_queue_changes_meta_range(struct mpd_connection *connection, unsigned version, unsigned start, unsigned end)
mpd_run_clear_all_tags_id
bool mpd_run_clear_all_tags_id(struct mpd_connection *connection, unsigned id)
mpd_run_clear_tag_id
bool mpd_run_clear_tag_id(struct mpd_connection *connection, unsigned id, enum mpd_tag_type tag)
mpd_send_queue_changes_brief
bool mpd_send_queue_changes_brief(struct mpd_connection *connection, unsigned version)
mpd_run_swap_id
bool mpd_run_swap_id(struct mpd_connection *connection, unsigned id1, unsigned id2)
mpd_send_add_id
bool mpd_send_add_id(struct mpd_connection *connection, const char *file)
mpd_run_delete
bool mpd_run_delete(struct mpd_connection *connection, unsigned pos)
mpd_run_move_range
bool mpd_run_move_range(struct mpd_connection *connection, unsigned start, unsigned end, unsigned to)
mpd_send_move
bool mpd_send_move(struct mpd_connection *connection, unsigned from, unsigned to)
mpd_send_swap
bool mpd_send_swap(struct mpd_connection *connection, unsigned pos1, unsigned pos2)
mpd_run_delete_id
bool mpd_run_delete_id(struct mpd_connection *connection, unsigned id)
mpd_send_shuffle_range
bool mpd_send_shuffle_range(struct mpd_connection *connection, unsigned start, unsigned end)
mpd_run_add_id
int mpd_run_add_id(struct mpd_connection *connection, const char *file)
mpd_run_clear
bool mpd_run_clear(struct mpd_connection *connection)
mpd_send_delete_range
bool mpd_send_delete_range(struct mpd_connection *connection, unsigned start, unsigned end)
mpd_connection
Definition: connection.h:48
mpd_send_add_id_to
bool mpd_send_add_id_to(struct mpd_connection *connection, const char *uri, unsigned to)
mpd_send_prio_range
bool mpd_send_prio_range(struct mpd_connection *connection, int priority, unsigned start, unsigned end)
mpd_send_add
bool mpd_send_add(struct mpd_connection *connection, const char *file)
mpd_song
Definition: song.h:49
mpd_run_add_id_to
int mpd_run_add_id_to(struct mpd_connection *connection, const char *uri, unsigned to)
mpd_run_swap
bool mpd_run_swap(struct mpd_connection *connection, unsigned pos1, unsigned pos2)
mpd_send_clear
bool mpd_send_clear(struct mpd_connection *connection)
mpd_send_clear_tag_id
bool mpd_send_clear_tag_id(struct mpd_connection *connection, unsigned id, enum mpd_tag_type tag)
mpd_send_queue_changes_meta
bool mpd_send_queue_changes_meta(struct mpd_connection *connection, unsigned version)
mpd_send_delete
bool mpd_send_delete(struct mpd_connection *connection, unsigned pos)
mpd_send_prio_id
bool mpd_send_prio_id(struct mpd_connection *connection, int priority, unsigned id)
mpd_send_add_tag_id
bool mpd_send_add_tag_id(struct mpd_connection *connection, unsigned id, enum mpd_tag_type tag, const char *value)