libmpdclient
2.7
|
00001 /* libmpdclient 00002 (c) 2003-2010 The Music Player Daemon Project 00003 This project's homepage is: http://www.musicpd.org 00004 00005 Redistribution and use in source and binary forms, with or without 00006 modification, are permitted provided that the following conditions 00007 are met: 00008 00009 - Redistributions of source code must retain the above copyright 00010 notice, this list of conditions and the following disclaimer. 00011 00012 - Redistributions in binary form must reproduce the above copyright 00013 notice, this list of conditions and the following disclaimer in the 00014 documentation and/or other materials provided with the distribution. 00015 00016 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 00017 ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 00018 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 00019 A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR 00020 CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 00021 EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 00022 PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 00023 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 00024 LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 00025 NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 00026 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00027 */ 00028 00037 #ifndef MPD_QUEUE_H 00038 #define MPD_QUEUE_H 00039 00040 #include <mpd/compiler.h> 00041 00042 #include <stdbool.h> 00043 00044 struct mpd_connection; 00045 00046 #ifdef __cplusplus 00047 extern "C" { 00048 #endif 00049 00054 bool 00055 mpd_send_list_queue_meta(struct mpd_connection *connection); 00056 00065 bool 00066 mpd_send_list_queue_range_meta(struct mpd_connection *connection, 00067 unsigned start, unsigned end); 00068 00076 bool 00077 mpd_send_get_queue_song_pos(struct mpd_connection *connection, unsigned pos); 00078 00086 mpd_malloc 00087 struct mpd_song * 00088 mpd_run_get_queue_song_pos(struct mpd_connection *connection, unsigned pos); 00089 00097 bool 00098 mpd_send_get_queue_song_id(struct mpd_connection *connection, unsigned id); 00099 00107 mpd_malloc 00108 struct mpd_song * 00109 mpd_run_get_queue_song_id(struct mpd_connection *connection, unsigned id); 00110 00119 bool 00120 mpd_send_queue_changes_meta(struct mpd_connection *connection, 00121 unsigned version); 00122 00132 bool 00133 mpd_send_queue_changes_brief(struct mpd_connection *connection, 00134 unsigned version); 00135 00145 bool 00146 mpd_recv_queue_change_brief(struct mpd_connection *connection, 00147 unsigned *position_r, unsigned *id_r); 00148 00152 bool 00153 mpd_send_add(struct mpd_connection *connection, const char *file); 00154 00162 bool 00163 mpd_run_add(struct mpd_connection *connection, const char *uri); 00164 00168 bool 00169 mpd_send_add_id(struct mpd_connection *connection, const char *file); 00170 00179 bool 00180 mpd_send_add_id_to(struct mpd_connection *connection, const char *uri, 00181 unsigned to); 00182 00189 int 00190 mpd_recv_song_id(struct mpd_connection *connection); 00191 00197 int 00198 mpd_run_add_id(struct mpd_connection *connection, const char *file); 00199 00208 int 00209 mpd_run_add_id_to(struct mpd_connection *connection, const char *uri, 00210 unsigned to); 00211 00218 bool 00219 mpd_send_delete(struct mpd_connection *connection, unsigned pos); 00220 00228 bool 00229 mpd_run_delete(struct mpd_connection *connection, unsigned pos); 00230 00239 bool 00240 mpd_send_delete_range(struct mpd_connection *connection, 00241 unsigned start, unsigned end); 00242 00251 bool 00252 mpd_run_delete_range(struct mpd_connection *connection, 00253 unsigned start, unsigned end); 00254 00261 bool 00262 mpd_send_delete_id(struct mpd_connection *connection, unsigned id); 00263 00271 bool 00272 mpd_run_delete_id(struct mpd_connection *connection, unsigned id); 00273 00279 bool 00280 mpd_send_shuffle(struct mpd_connection *connection); 00281 00287 bool 00288 mpd_run_shuffle(struct mpd_connection *connection); 00289 00297 bool 00298 mpd_send_shuffle_range(struct mpd_connection *connection, unsigned start, unsigned end); 00299 00307 bool 00308 mpd_run_shuffle_range(struct mpd_connection *connection, 00309 unsigned start, unsigned end); 00310 00316 bool 00317 mpd_send_clear(struct mpd_connection *connection); 00318 00324 bool 00325 mpd_run_clear(struct mpd_connection *connection); 00326 00334 bool 00335 mpd_send_move(struct mpd_connection *connection, unsigned from, unsigned to); 00336 00344 bool 00345 mpd_run_move(struct mpd_connection *connection, unsigned from, unsigned to); 00346 00354 bool 00355 mpd_send_move_id(struct mpd_connection *connection, unsigned from, unsigned to); 00356 00364 bool 00365 mpd_run_move_id(struct mpd_connection *connection, unsigned from, unsigned to); 00366 00376 bool 00377 mpd_send_move_range(struct mpd_connection *connection, 00378 unsigned start, unsigned end, unsigned to); 00379 00389 bool 00390 mpd_run_move_range(struct mpd_connection *connection, 00391 unsigned start, unsigned end, unsigned to); 00392 00400 bool 00401 mpd_send_swap(struct mpd_connection *connection, unsigned pos1, unsigned pos2); 00402 00410 bool 00411 mpd_run_swap(struct mpd_connection *connection, unsigned pos1, unsigned pos2); 00412 00420 bool 00421 mpd_send_swap_id(struct mpd_connection *connection, unsigned id1, unsigned id2); 00422 00430 bool 00431 mpd_run_swap_id(struct mpd_connection *connection, unsigned id1, unsigned id2); 00432 00440 bool 00441 mpd_send_prio(struct mpd_connection *connection, int priority, 00442 unsigned position); 00443 00452 bool 00453 mpd_run_prio(struct mpd_connection *connection, int priority, 00454 unsigned position); 00455 00463 bool 00464 mpd_send_prio_range(struct mpd_connection *connection, int priority, 00465 unsigned start, unsigned end); 00466 00474 bool 00475 mpd_run_prio_range(struct mpd_connection *connection, int priority, 00476 unsigned start, unsigned end); 00477 00485 bool 00486 mpd_send_prio_id(struct mpd_connection *connection, int priority, 00487 unsigned id); 00488 00496 bool 00497 mpd_run_prio_id(struct mpd_connection *connection, int priority, 00498 unsigned id); 00499 00500 #ifdef __cplusplus 00501 } 00502 #endif 00503 00504 #endif