00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
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