libmpdclient 2.8

/root/rpmbuild/BUILD/libmpdclient-2.8/include/mpd/queue.h

Go to the documentation of this file.
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 
00066 bool
00067 mpd_send_list_queue_range_meta(struct mpd_connection *connection,
00068                                unsigned start, unsigned end);
00069 
00077 bool
00078 mpd_send_get_queue_song_pos(struct mpd_connection *connection, unsigned pos);
00079 
00087 mpd_malloc
00088 struct mpd_song *
00089 mpd_run_get_queue_song_pos(struct mpd_connection *connection, unsigned pos);
00090 
00098 bool
00099 mpd_send_get_queue_song_id(struct mpd_connection *connection, unsigned id);
00100 
00108 mpd_malloc
00109 struct mpd_song *
00110 mpd_run_get_queue_song_id(struct mpd_connection *connection, unsigned id);
00111 
00120 bool
00121 mpd_send_queue_changes_meta(struct mpd_connection *connection,
00122                             unsigned version);
00123 
00133 bool
00134 mpd_send_queue_changes_brief(struct mpd_connection *connection,
00135                              unsigned version);
00136 
00146 bool
00147 mpd_recv_queue_change_brief(struct mpd_connection *connection,
00148                             unsigned *position_r, unsigned *id_r);
00149 
00153 bool
00154 mpd_send_add(struct mpd_connection *connection, const char *file);
00155 
00163 bool
00164 mpd_run_add(struct mpd_connection *connection, const char *uri);
00165 
00169 bool
00170 mpd_send_add_id(struct mpd_connection *connection, const char *file);
00171 
00180 bool
00181 mpd_send_add_id_to(struct mpd_connection *connection, const char *uri,
00182                    unsigned to);
00183 
00190 int
00191 mpd_recv_song_id(struct mpd_connection *connection);
00192 
00198 int
00199 mpd_run_add_id(struct mpd_connection *connection, const char *file);
00200 
00209 int
00210 mpd_run_add_id_to(struct mpd_connection *connection, const char *uri,
00211                   unsigned to);
00212 
00219 bool
00220 mpd_send_delete(struct mpd_connection *connection, unsigned pos);
00221 
00229 bool
00230 mpd_run_delete(struct mpd_connection *connection, unsigned pos);
00231 
00241 bool
00242 mpd_send_delete_range(struct mpd_connection *connection,
00243                       unsigned start, unsigned end);
00244 
00254 bool
00255 mpd_run_delete_range(struct mpd_connection *connection,
00256                       unsigned start, unsigned end);
00257 
00264 bool
00265 mpd_send_delete_id(struct mpd_connection *connection, unsigned id);
00266 
00274 bool
00275 mpd_run_delete_id(struct mpd_connection *connection, unsigned id);
00276 
00282 bool
00283 mpd_send_shuffle(struct mpd_connection *connection);
00284 
00290 bool
00291 mpd_run_shuffle(struct mpd_connection *connection);
00292 
00301 bool
00302 mpd_send_shuffle_range(struct mpd_connection *connection, unsigned start, unsigned end);
00303 
00312 bool
00313 mpd_run_shuffle_range(struct mpd_connection *connection,
00314                       unsigned start, unsigned end);
00315 
00321 bool
00322 mpd_send_clear(struct mpd_connection *connection);
00323 
00329 bool
00330 mpd_run_clear(struct mpd_connection *connection);
00331 
00339 bool
00340 mpd_send_move(struct mpd_connection *connection, unsigned from, unsigned to);
00341 
00349 bool
00350 mpd_run_move(struct mpd_connection *connection, unsigned from, unsigned to);
00351 
00359 bool
00360 mpd_send_move_id(struct mpd_connection *connection, unsigned from, unsigned to);
00361 
00369 bool
00370 mpd_run_move_id(struct mpd_connection *connection, unsigned from, unsigned to);
00371 
00382 bool
00383 mpd_send_move_range(struct mpd_connection *connection,
00384                     unsigned start, unsigned end, unsigned to);
00385 
00396 bool
00397 mpd_run_move_range(struct mpd_connection *connection,
00398                     unsigned start, unsigned end, unsigned to);
00399 
00407 bool
00408 mpd_send_swap(struct mpd_connection *connection, unsigned pos1, unsigned pos2);
00409 
00417 bool
00418 mpd_run_swap(struct mpd_connection *connection, unsigned pos1, unsigned pos2);
00419 
00427 bool
00428 mpd_send_swap_id(struct mpd_connection *connection, unsigned id1, unsigned id2);
00429 
00437 bool
00438 mpd_run_swap_id(struct mpd_connection *connection, unsigned id1, unsigned id2);
00439 
00447 bool
00448 mpd_send_prio(struct mpd_connection *connection, int priority,
00449               unsigned position);
00450 
00460 bool
00461 mpd_run_prio(struct mpd_connection *connection, int priority,
00462              unsigned position);
00463 
00473 bool
00474 mpd_send_prio_range(struct mpd_connection *connection, int priority,
00475                     unsigned start, unsigned end);
00476 
00487 bool
00488 mpd_run_prio_range(struct mpd_connection *connection, int priority,
00489                    unsigned start, unsigned end);
00490 
00498 bool
00499 mpd_send_prio_id(struct mpd_connection *connection, int priority,
00500                  unsigned id);
00501 
00509 bool
00510 mpd_run_prio_id(struct mpd_connection *connection, int priority,
00511                 unsigned id);
00512 
00513 #ifdef __cplusplus
00514 }
00515 #endif
00516 
00517 #endif