libmpdclient 2.22
playlist.h
Go to the documentation of this file.
1/* libmpdclient
2 (c) 2003-2019 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#include "position.h"
46
47#include <stdbool.h>
48#include <time.h>
49
50struct mpd_pair;
51struct mpd_connection;
52
60struct mpd_playlist;
61
62#ifdef __cplusplus
63extern "C" {
64#endif
65
69void
71
77mpd_malloc
78struct mpd_playlist *
79mpd_playlist_dup(const struct mpd_playlist *playlist);
80
85mpd_pure
86const char *
87mpd_playlist_get_path(const struct mpd_playlist *playlist);
88
93mpd_pure
94time_t
96
105mpd_malloc
106struct mpd_playlist *
107mpd_playlist_begin(const struct mpd_pair *pair);
108
117bool
118mpd_playlist_feed(struct mpd_playlist *playlist, const struct mpd_pair *pair);
119
129bool
131
138mpd_malloc
139struct mpd_playlist *
141
150bool
151mpd_send_list_playlist(struct mpd_connection *connection, const char *name);
152
161bool
162mpd_send_list_playlist_meta(struct mpd_connection *connection, const char *name);
163
171bool
172mpd_send_playlist_clear(struct mpd_connection *connection, const char *name);
173
181bool
182mpd_run_playlist_clear(struct mpd_connection *connection, const char *name);
183
193bool
194mpd_send_playlist_add(struct mpd_connection *connection, const char *name,
195 const char *path);
196
205bool
207 const char *name, const char *path);
208
221bool
222mpd_send_playlist_add_to(struct mpd_connection *connection, const char *name,
223 const char *uri, unsigned to);
224
236bool
238 const char *name, const char *uri, unsigned to);
239
249bool
250mpd_send_playlist_move(struct mpd_connection *connection, const char *name,
251 unsigned from, unsigned to);
252
264bool
265mpd_run_playlist_move(struct mpd_connection *connection, const char *name,
266 unsigned from, unsigned to);
267
281bool
282mpd_send_playlist_move_range(struct mpd_connection *connection, const char *name,
283 unsigned start, unsigned end, unsigned to);
284
298bool
299mpd_run_playlist_move_range(struct mpd_connection *connection, const char *name,
300 unsigned start, unsigned end, unsigned to);
301
310bool
311mpd_send_playlist_delete(struct mpd_connection *connection, const char *name,
312 unsigned pos);
313
322bool
324 const char *name, unsigned pos);
325
337bool
338mpd_send_playlist_delete_range(struct mpd_connection *connection, const char *name,
339 unsigned start, unsigned end);
340
352bool
354 const char *name, unsigned start, unsigned end);
355
364bool
365mpd_send_save(struct mpd_connection *connection, const char *name);
366
374bool
375mpd_run_save(struct mpd_connection *connection, const char *name);
376
386bool
387mpd_send_load(struct mpd_connection *connection, const char *name);
388
398bool
399mpd_run_load(struct mpd_connection *connection, const char *name);
400
413bool
414mpd_send_load_range(struct mpd_connection *connection, const char *name,
415 unsigned start, unsigned end);
416
429bool
430mpd_run_load_range(struct mpd_connection *connection, const char *name,
431 unsigned start, unsigned end);
432
448bool
449mpd_send_load_range_to(struct mpd_connection *connection, const char *name,
450 unsigned start, unsigned end, unsigned to, enum mpd_position_whence whence);
451
466bool
467mpd_run_load_range_to(struct mpd_connection *connection, const char *name,
468 unsigned start, unsigned end, unsigned to, enum mpd_position_whence whence);
469
478bool
480 const char *from, const char *to);
481
490bool
492 const char *from, const char *to);
493
501bool
502mpd_send_rm(struct mpd_connection *connection, const char *name);
503
511bool
512mpd_run_rm(struct mpd_connection *connection, const char *name);
513
514#ifdef __cplusplus
515}
516#endif
517
518#endif
bool mpd_run_playlist_add(struct mpd_connection *connection, const char *name, const char *path)
bool mpd_run_save(struct mpd_connection *connection, const char *name)
bool mpd_send_list_playlist_meta(struct mpd_connection *connection, const char *name)
bool mpd_send_rename(struct mpd_connection *connection, const char *from, const char *to)
bool mpd_send_save(struct mpd_connection *connection, const char *name)
void mpd_playlist_free(struct mpd_playlist *playlist)
bool mpd_playlist_feed(struct mpd_playlist *playlist, const struct mpd_pair *pair)
bool mpd_run_playlist_delete(struct mpd_connection *connection, const char *name, unsigned pos)
const char * mpd_playlist_get_path(const struct mpd_playlist *playlist)
bool mpd_send_playlist_add_to(struct mpd_connection *connection, const char *name, const char *uri, unsigned to)
bool mpd_run_load_range(struct mpd_connection *connection, const char *name, unsigned start, unsigned end)
bool mpd_send_load_range_to(struct mpd_connection *connection, const char *name, unsigned start, unsigned end, unsigned to, enum mpd_position_whence whence)
time_t mpd_playlist_get_last_modified(const struct mpd_playlist *playlist)
bool mpd_run_playlist_delete_range(struct mpd_connection *connection, const char *name, unsigned start, unsigned end)
bool mpd_send_playlist_move(struct mpd_connection *connection, const char *name, unsigned from, unsigned to)
bool mpd_run_playlist_move(struct mpd_connection *connection, const char *name, unsigned from, unsigned to)
bool mpd_send_playlist_delete(struct mpd_connection *connection, const char *name, unsigned pos)
bool mpd_send_playlist_move_range(struct mpd_connection *connection, const char *name, unsigned start, unsigned end, unsigned to)
bool mpd_run_load(struct mpd_connection *connection, const char *name)
bool mpd_run_playlist_add_to(struct mpd_connection *connection, const char *name, const char *uri, unsigned to)
bool mpd_send_playlist_clear(struct mpd_connection *connection, const char *name)
bool mpd_send_list_playlists(struct mpd_connection *connection)
bool mpd_run_playlist_move_range(struct mpd_connection *connection, const char *name, unsigned start, unsigned end, unsigned to)
bool mpd_send_playlist_delete_range(struct mpd_connection *connection, const char *name, unsigned start, unsigned end)
struct mpd_playlist * mpd_playlist_begin(const struct mpd_pair *pair)
bool mpd_run_rm(struct mpd_connection *connection, const char *name)
bool mpd_send_list_playlist(struct mpd_connection *connection, const char *name)
bool mpd_run_playlist_clear(struct mpd_connection *connection, const char *name)
bool mpd_send_load_range(struct mpd_connection *connection, const char *name, unsigned start, unsigned end)
bool mpd_send_load(struct mpd_connection *connection, const char *name)
bool mpd_run_load_range_to(struct mpd_connection *connection, const char *name, unsigned start, unsigned end, unsigned to, enum mpd_position_whence whence)
bool mpd_send_playlist_add(struct mpd_connection *connection, const char *name, const char *path)
bool mpd_run_rename(struct mpd_connection *connection, const char *from, const char *to)
struct mpd_playlist * mpd_playlist_dup(const struct mpd_playlist *playlist)
struct mpd_playlist * mpd_recv_playlist(struct mpd_connection *connection)
bool mpd_send_rm(struct mpd_connection *connection, const char *name)
MPD client library.
mpd_position_whence
Definition: position.h:42
Definition: pair.h:41