libmpdclient 2.14

playlist.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 - Neither the name of the Music Player Daemon nor the names of its
17 contributors may be used to endorse or promote products derived from
18 this software without specific prior written permission.
19
20 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21 ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23 A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
24 CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
25 EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
26 PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
27 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
28 LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
29 NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
30 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 */
32
41 #ifndef LIBMPDCLIENT_PLAYLIST_H
42 #define LIBMPDCLIENT_PLAYLIST_H
43
44 #include "compiler.h"
45
46 #include <stdbool.h>
47 #include <time.h>
48
49 struct mpd_pair;
50 struct mpd_connection;
51
59 struct mpd_playlist;
60
61 #ifdef __cplusplus
62 extern "C" {
63 #endif
64
68 void
69 mpd_playlist_free(struct mpd_playlist *playlist);
70
76 mpd_malloc
77 struct mpd_playlist *
78 mpd_playlist_dup(const struct mpd_playlist *playlist);
79
84 mpd_pure
85 const char *
86 mpd_playlist_get_path(const struct mpd_playlist *playlist);
87
92 mpd_pure
93 time_t
94 mpd_playlist_get_last_modified(const struct mpd_playlist *playlist);
95
104 mpd_malloc
105 struct mpd_playlist *
106 mpd_playlist_begin(const struct mpd_pair *pair);
107
116 bool
117 mpd_playlist_feed(struct mpd_playlist *playlist, const struct mpd_pair *pair);
118
127 bool
128 mpd_send_list_playlists(struct mpd_connection *connection);
129
136 mpd_malloc
137 struct mpd_playlist *
138 mpd_recv_playlist(struct mpd_connection *connection);
139
147 bool
148 mpd_send_list_playlist(struct mpd_connection *connection, const char *name);
149
157 bool
158 mpd_send_list_playlist_meta(struct mpd_connection *connection, const char *name);
159
160 bool
161 mpd_send_playlist_clear(struct mpd_connection *connection, const char *name);
162
163 bool
164 mpd_run_playlist_clear(struct mpd_connection *connection, const char *name);
165
166 bool
167 mpd_send_playlist_add(struct mpd_connection *connection, const char *name,
168 const char *path);
169
170 bool
171 mpd_run_playlist_add(struct mpd_connection *connection,
172 const char *name, const char *path);
173
174 bool
175 mpd_send_playlist_move(struct mpd_connection *connection, const char *name,
176 unsigned from, unsigned to);
177
178 bool
179 mpd_send_playlist_delete(struct mpd_connection *connection, const char *name,
180 unsigned pos);
181
182 bool
183 mpd_run_playlist_delete(struct mpd_connection *connection,
184 const char *name, unsigned pos);
185
186 bool
187 mpd_send_save(struct mpd_connection *connection, const char *name);
188
189 bool
190 mpd_run_save(struct mpd_connection *connection, const char *name);
191
192 bool
193 mpd_send_load(struct mpd_connection *connection, const char *name);
194
195 bool
196 mpd_run_load(struct mpd_connection *connection, const char *name);
197
198 bool
199 mpd_send_rename(struct mpd_connection *connection,
200 const char *from, const char *to);
201
202 bool
203 mpd_run_rename(struct mpd_connection *connection,
204 const char *from, const char *to);
205
206 bool
207 mpd_send_rm(struct mpd_connection *connection, const char *name);
208
209 bool
210 mpd_run_rm(struct mpd_connection *connection, const char *name);
211
212 #ifdef __cplusplus
213 }
214 #endif
215
216 #endif
mpd_run_playlist_clear
bool mpd_run_playlist_clear(struct mpd_connection *connection, const char *name)
mpd_playlist
Definition: playlist.h:50
mpd_run_rename
bool mpd_run_rename(struct mpd_connection *connection, const char *from, const char *to)
mpd_playlist_feed
bool mpd_playlist_feed(struct mpd_playlist *playlist, const struct mpd_pair *pair)
mpd_send_load
bool mpd_send_load(struct mpd_connection *connection, const char *name)
mpd_run_playlist_add
bool mpd_run_playlist_add(struct mpd_connection *connection, const char *name, const char *path)
mpd_playlist_begin
mpd_malloc struct mpd_playlist * mpd_playlist_begin(const struct mpd_pair *pair)
mpd_send_playlist_move
bool mpd_send_playlist_move(struct mpd_connection *connection, const char *name, unsigned from, unsigned to)
mpd_send_playlist_delete
bool mpd_send_playlist_delete(struct mpd_connection *connection, const char *name, unsigned pos)
mpd_send_list_playlist_meta
bool mpd_send_list_playlist_meta(struct mpd_connection *connection, const char *name)
mpd_playlist_free
void mpd_playlist_free(struct mpd_playlist *playlist)
compiler.h
Compiler specific definitions.
mpd_run_rm
bool mpd_run_rm(struct mpd_connection *connection, const char *name)
mpd_playlist_get_path
mpd_pure const char * mpd_playlist_get_path(const struct mpd_playlist *playlist)
mpd_run_save
bool mpd_run_save(struct mpd_connection *connection, const char *name)
mpd_send_playlist_add
bool mpd_send_playlist_add(struct mpd_connection *connection, const char *name, const char *path)
mpd_send_list_playlist
bool mpd_send_list_playlist(struct mpd_connection *connection, const char *name)
mpd_playlist_dup
mpd_malloc struct mpd_playlist * mpd_playlist_dup(const struct mpd_playlist *playlist)
mpd_playlist_get_last_modified
mpd_pure time_t mpd_playlist_get_last_modified(const struct mpd_playlist *playlist)
mpd_send_playlist_clear
bool mpd_send_playlist_clear(struct mpd_connection *connection, const char *name)
mpd_connection
Definition: connection.h:48
mpd_run_playlist_delete
bool mpd_run_playlist_delete(struct mpd_connection *connection, const char *name, unsigned pos)
mpd_recv_playlist
mpd_malloc struct mpd_playlist * mpd_recv_playlist(struct mpd_connection *connection)
mpd_run_load
bool mpd_run_load(struct mpd_connection *connection, const char *name)
mpd_send_save
bool mpd_send_save(struct mpd_connection *connection, const char *name)
mpd_send_rename
bool mpd_send_rename(struct mpd_connection *connection, const char *from, const char *to)
mpd_send_list_playlists
bool mpd_send_list_playlists(struct mpd_connection *connection)
mpd_pair
Definition: pair.h:41
mpd_send_rm
bool mpd_send_rm(struct mpd_connection *connection, const char *name)