libmpdclient 2.22
playlist.h
Go to the documentation of this file.
1// SPDX-License-Identifier: BSD-3-Clause
2// Copyright The Music Player Daemon Project
3
12#ifndef LIBMPDCLIENT_PLAYLIST_H
13#define LIBMPDCLIENT_PLAYLIST_H
14
15#include "compiler.h"
16#include "position.h"
17
18#include <stdbool.h>
19#include <time.h>
20
21struct mpd_pair;
22struct mpd_connection;
23
31struct mpd_playlist;
32
41
44
47
50};
51
52#ifdef __cplusplus
53extern "C" {
54#endif
55
59void
61
67mpd_malloc
68struct mpd_playlist *
69mpd_playlist_dup(const struct mpd_playlist *playlist);
70
75mpd_pure
76const char *
77mpd_playlist_get_path(const struct mpd_playlist *playlist);
78
83mpd_pure
84time_t
86
95mpd_malloc
96struct mpd_playlist *
97mpd_playlist_begin(const struct mpd_pair *pair);
98
107bool
108mpd_playlist_feed(struct mpd_playlist *playlist, const struct mpd_pair *pair);
109
119bool
121
128mpd_malloc
129struct mpd_playlist *
131
140bool
141mpd_send_list_playlist(struct mpd_connection *connection, const char *name);
142
151bool
152mpd_send_list_playlist_meta(struct mpd_connection *connection, const char *name);
153
161bool
162mpd_send_playlist_clear(struct mpd_connection *connection, const char *name);
163
171bool
172mpd_run_playlist_clear(struct mpd_connection *connection, const char *name);
173
183bool
184mpd_send_playlist_add(struct mpd_connection *connection, const char *name,
185 const char *path);
186
195bool
197 const char *name, const char *path);
198
211bool
212mpd_send_playlist_add_to(struct mpd_connection *connection, const char *name,
213 const char *uri, unsigned to);
214
226bool
228 const char *name, const char *uri, unsigned to);
229
239bool
240mpd_send_playlist_move(struct mpd_connection *connection, const char *name,
241 unsigned from, unsigned to);
242
254bool
255mpd_run_playlist_move(struct mpd_connection *connection, const char *name,
256 unsigned from, unsigned to);
257
271bool
272mpd_send_playlist_move_range(struct mpd_connection *connection, const char *name,
273 unsigned start, unsigned end, unsigned to);
274
288bool
289mpd_run_playlist_move_range(struct mpd_connection *connection, const char *name,
290 unsigned start, unsigned end, unsigned to);
291
300bool
301mpd_send_playlist_delete(struct mpd_connection *connection, const char *name,
302 unsigned pos);
303
312bool
314 const char *name, unsigned pos);
315
327bool
328mpd_send_playlist_delete_range(struct mpd_connection *connection, const char *name,
329 unsigned start, unsigned end);
330
342bool
344 const char *name, unsigned start, unsigned end);
345
354bool
355mpd_send_save(struct mpd_connection *connection, const char *name);
356
364bool
365mpd_run_save(struct mpd_connection *connection, const char *name);
366
382bool
383mpd_send_save_queue(struct mpd_connection *connection, const char *name,
384 enum mpd_queue_save_mode mode);
385
396bool
397mpd_run_save_queue(struct mpd_connection *connection, const char *name,
398 enum mpd_queue_save_mode mode);
399
407const char *
409
419
429bool
430mpd_send_load(struct mpd_connection *connection, const char *name);
431
441bool
442mpd_run_load(struct mpd_connection *connection, const char *name);
443
456bool
457mpd_send_load_range(struct mpd_connection *connection, const char *name,
458 unsigned start, unsigned end);
459
472bool
473mpd_run_load_range(struct mpd_connection *connection, const char *name,
474 unsigned start, unsigned end);
475
491bool
492mpd_send_load_range_to(struct mpd_connection *connection, const char *name,
493 unsigned start, unsigned end, unsigned to, enum mpd_position_whence whence);
494
509bool
510mpd_run_load_range_to(struct mpd_connection *connection, const char *name,
511 unsigned start, unsigned end, unsigned to, enum mpd_position_whence whence);
512
521bool
523 const char *from, const char *to);
524
533bool
535 const char *from, const char *to);
536
544bool
545mpd_send_rm(struct mpd_connection *connection, const char *name);
546
554bool
555mpd_run_rm(struct mpd_connection *connection, const char *name);
556
557#ifdef __cplusplus
558}
559#endif
560
561#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)
const char * mpd_lookup_queue_save_mode(enum mpd_queue_save_mode mode)
bool mpd_send_load_range_to(struct mpd_connection *connection, const char *name, unsigned start, unsigned end, unsigned to, enum mpd_position_whence whence)
mpd_queue_save_mode
Definition playlist.h:38
@ MPD_QUEUE_SAVE_MODE_CREATE
Definition playlist.h:40
@ MPD_QUEUE_SAVE_MODE_UNKNOWN
Definition playlist.h:49
@ MPD_QUEUE_SAVE_MODE_REPLACE
Definition playlist.h:43
@ MPD_QUEUE_SAVE_MODE_APPEND
Definition playlist.h:46
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_save_queue(struct mpd_connection *connection, const char *name, enum mpd_queue_save_mode mode)
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)
enum mpd_queue_save_mode mpd_parse_queue_save_mode(const char *mode)
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_send_save_queue(struct mpd_connection *connection, const char *name, enum mpd_queue_save_mode mode)
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:13