libmpdclient  2.7
mpd/playlist.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    - Neither the name of the Music Player Daemon nor the names of its
00017    contributors may be used to endorse or promote products derived from
00018    this software without specific prior written permission.
00019 
00020    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
00021    ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
00022    LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
00023    A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR
00024    CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
00025    EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
00026    PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
00027    PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
00028    LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
00029    NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
00030    SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00031 */
00032 
00041 #ifndef LIBMPDCLIENT_PLAYLIST_H
00042 #define LIBMPDCLIENT_PLAYLIST_H
00043 
00044 #include <mpd/compiler.h>
00045 
00046 #include <stdbool.h>
00047 #include <time.h>
00048 
00049 struct mpd_pair;
00050 struct mpd_connection;
00051 
00059 struct mpd_playlist;
00060 
00061 #ifdef __cplusplus
00062 extern "C" {
00063 #endif
00064 
00068 void
00069 mpd_playlist_free(struct mpd_playlist *playlist);
00070 
00076 mpd_malloc
00077 struct mpd_playlist *
00078 mpd_playlist_dup(const struct mpd_playlist *playlist);
00079 
00084 mpd_pure
00085 const char *
00086 mpd_playlist_get_path(const struct mpd_playlist *playlist);
00087 
00092 mpd_pure
00093 time_t
00094 mpd_playlist_get_last_modified(const struct mpd_playlist *playlist);
00095 
00104 mpd_malloc
00105 struct mpd_playlist *
00106 mpd_playlist_begin(const struct mpd_pair *pair);
00107 
00116 bool
00117 mpd_playlist_feed(struct mpd_playlist *playlist, const struct mpd_pair *pair);
00118 
00125 bool
00126 mpd_send_list_playlists(struct mpd_connection *connection);
00127 
00134 mpd_malloc
00135 struct mpd_playlist *
00136 mpd_recv_playlist(struct mpd_connection *connection);
00137 
00145 bool
00146 mpd_send_list_playlist(struct mpd_connection *connection, const char *name);
00147 
00155 bool
00156 mpd_send_list_playlist_meta(struct mpd_connection *connection, const char *name);
00157 
00158 bool
00159 mpd_send_playlist_clear(struct mpd_connection *connection, const char *name);
00160 
00161 bool
00162 mpd_run_playlist_clear(struct mpd_connection *connection, const char *name);
00163 
00164 bool
00165 mpd_send_playlist_add(struct mpd_connection *connection, const char *name,
00166                       const char *path);
00167 
00168 bool
00169 mpd_run_playlist_add(struct mpd_connection *connection,
00170                      const char *name, const char *path);
00171 
00172 bool
00173 mpd_send_playlist_move(struct mpd_connection *connection, const char *name,
00174                        unsigned from, unsigned to);
00175 
00176 bool
00177 mpd_send_playlist_delete(struct mpd_connection *connection, const char *name,
00178                          unsigned pos);
00179 
00180 bool
00181 mpd_run_playlist_delete(struct mpd_connection *connection,
00182                         const char *name, unsigned pos);
00183 
00184 bool
00185 mpd_send_save(struct mpd_connection *connection, const char *name);
00186 
00187 bool
00188 mpd_run_save(struct mpd_connection *connection, const char *name);
00189 
00190 bool
00191 mpd_send_load(struct mpd_connection *connection, const char *name);
00192 
00193 bool
00194 mpd_run_load(struct mpd_connection *connection, const char *name);
00195 
00196 bool
00197 mpd_send_rename(struct mpd_connection *connection,
00198                 const char *from, const char *to);
00199 
00200 bool
00201 mpd_run_rename(struct mpd_connection *connection,
00202                const char *from, const char *to);
00203 
00204 bool
00205 mpd_send_rm(struct mpd_connection *connection, const char *name);
00206 
00207 bool
00208 mpd_run_rm(struct mpd_connection *connection, const char *name);
00209 
00210 #ifdef __cplusplus
00211 }
00212 #endif
00213 
00214 #endif