playlist.h
Go to the documentation of this file.
// SPDX-License-Identifier: BSD-3-Clause
// Copyright The Music Player Daemon Project
#ifndef LIBMPDCLIENT_PLAYLIST_H
#define LIBMPDCLIENT_PLAYLIST_H
#include "compiler.h"
#include "position.h"
#include <stdbool.h>
#include <time.h>
struct mpd_pair;
struct mpd_connection;
struct mpd_playlist;
enum mpd_queue_save_mode {
MPD_QUEUE_SAVE_MODE_CREATE = 0,
MPD_QUEUE_SAVE_MODE_REPLACE,
MPD_QUEUE_SAVE_MODE_APPEND,
MPD_QUEUE_SAVE_MODE_UNKNOWN
};
#ifdef __cplusplus
extern "C" {
#endif
void
mpd_playlist_free(struct mpd_playlist *playlist);
mpd_malloc
struct mpd_playlist *
mpd_playlist_dup(const struct mpd_playlist *playlist);
mpd_pure
const char *
mpd_playlist_get_path(const struct mpd_playlist *playlist);
mpd_pure
time_t
mpd_playlist_get_last_modified(const struct mpd_playlist *playlist);
mpd_malloc
struct mpd_playlist *
mpd_playlist_begin(const struct mpd_pair *pair);
bool
mpd_playlist_feed(struct mpd_playlist *playlist, const struct mpd_pair *pair);
bool
mpd_send_list_playlists(struct mpd_connection *connection);
mpd_malloc
struct mpd_playlist *
mpd_recv_playlist(struct mpd_connection *connection);
bool
mpd_send_list_playlist(struct mpd_connection *connection, const char *name);
bool
mpd_send_list_playlist_range(struct mpd_connection *connection, const char *name,
unsigned start, unsigned end);
bool
mpd_send_list_playlist_meta(struct mpd_connection *connection, const char *name);
bool
mpd_send_list_playlist_range_meta(struct mpd_connection *connection, const char *name,
unsigned start, unsigned end);
bool
mpd_send_playlist_clear(struct mpd_connection *connection, const char *name);
bool
mpd_run_playlist_clear(struct mpd_connection *connection, const char *name);
bool
mpd_send_playlist_add(struct mpd_connection *connection, const char *name,
const char *path);
bool
mpd_run_playlist_add(struct mpd_connection *connection,
const char *name, const char *path);
bool
mpd_send_playlist_add_to(struct mpd_connection *connection, const char *name,
const char *uri, unsigned to);
bool
mpd_run_playlist_add_to(struct mpd_connection *connection,
const char *name, const char *uri, unsigned to);
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_move_range(struct mpd_connection *connection, const char *name,
unsigned start, unsigned end, unsigned to);
bool
mpd_run_playlist_move_range(struct mpd_connection *connection, const char *name,
unsigned start, unsigned end, unsigned to);
bool
mpd_send_playlist_delete(struct mpd_connection *connection, const char *name,
unsigned pos);
bool
mpd_run_playlist_delete(struct mpd_connection *connection,
const char *name, unsigned pos);
bool
mpd_send_playlist_delete_range(struct mpd_connection *connection, const char *name,
unsigned start, unsigned end);
bool
mpd_run_playlist_delete_range(struct mpd_connection *connection,
const char *name, unsigned start, unsigned end);
bool
mpd_send_save(struct mpd_connection *connection, const char *name);
bool
mpd_run_save(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_save_queue(struct mpd_connection *connection, const char *name,
enum mpd_queue_save_mode mode);
const char *
mpd_lookup_queue_save_mode(enum mpd_queue_save_mode mode);
enum mpd_queue_save_mode
mpd_parse_queue_save_mode(const char *mode);
bool
mpd_send_load(struct mpd_connection *connection, const char *name);
bool
mpd_run_load(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_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);
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_rename(struct mpd_connection *connection,
const char *from, const char *to);
bool
mpd_run_rename(struct mpd_connection *connection,
const char *from, const char *to);
bool
mpd_send_rm(struct mpd_connection *connection, const char *name);
bool
mpd_run_rm(struct mpd_connection *connection, const char *name);
bool
mpd_send_playlistlength(struct mpd_connection *connection, const char *name);
bool
mpd_playlist_search_begin(struct mpd_connection *connection, const char *name,
const char *expression);
bool
mpd_playlist_search_add_window(struct mpd_connection *connection,
unsigned start, unsigned end);
bool
mpd_playlist_search_commit(struct mpd_connection *connection);
void
mpd_playlist_search_cancel(struct mpd_connection *connection);
#ifdef __cplusplus
}
#endif
#endif
mpd_run_playlist_add
bool mpd_run_playlist_add(struct mpd_connection *connection, const char *name, const char *path)
mpd_run_save
bool mpd_run_save(struct mpd_connection *connection, const char *name)
mpd_send_list_playlist_meta
bool mpd_send_list_playlist_meta(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_save
bool mpd_send_save(struct mpd_connection *connection, const char *name)
mpd_playlist_free
void mpd_playlist_free(struct mpd_playlist *playlist)
mpd_playlist_search_add_window
bool mpd_playlist_search_add_window(struct mpd_connection *connection, unsigned start, unsigned end)
mpd_playlist_feed
bool mpd_playlist_feed(struct mpd_playlist *playlist, const struct mpd_pair *pair)
mpd_send_playlistlength
bool mpd_send_playlistlength(struct mpd_connection *connection, const char *name)
mpd_run_playlist_delete
bool mpd_run_playlist_delete(struct mpd_connection *connection, const char *name, unsigned pos)
mpd_playlist_get_path
const char * mpd_playlist_get_path(const struct mpd_playlist *playlist)
mpd_send_playlist_add_to
bool mpd_send_playlist_add_to(struct mpd_connection *connection, const char *name, const char *uri, unsigned to)
mpd_run_load_range
bool mpd_run_load_range(struct mpd_connection *connection, const char *name, unsigned start, unsigned end)
mpd_lookup_queue_save_mode
const char * mpd_lookup_queue_save_mode(enum mpd_queue_save_mode mode)
mpd_send_load_range_to
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
mpd_queue_save_mode
Definition playlist.h:38
MPD_QUEUE_SAVE_MODE_CREATE
@ MPD_QUEUE_SAVE_MODE_CREATE
Definition playlist.h:40
MPD_QUEUE_SAVE_MODE_UNKNOWN
@ MPD_QUEUE_SAVE_MODE_UNKNOWN
Definition playlist.h:49
MPD_QUEUE_SAVE_MODE_REPLACE
@ MPD_QUEUE_SAVE_MODE_REPLACE
Definition playlist.h:43
MPD_QUEUE_SAVE_MODE_APPEND
@ MPD_QUEUE_SAVE_MODE_APPEND
Definition playlist.h:46
mpd_playlist_get_last_modified
time_t mpd_playlist_get_last_modified(const struct mpd_playlist *playlist)
mpd_run_playlist_delete_range
bool mpd_run_playlist_delete_range(struct mpd_connection *connection, const char *name, unsigned start, unsigned end)
mpd_send_playlist_move
bool mpd_send_playlist_move(struct mpd_connection *connection, const char *name, unsigned from, unsigned to)
mpd_playlist_search_begin
bool mpd_playlist_search_begin(struct mpd_connection *connection, const char *name, const char *expression)
mpd_run_save_queue
bool mpd_run_save_queue(struct mpd_connection *connection, const char *name, enum mpd_queue_save_mode mode)
mpd_run_playlist_move
bool mpd_run_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_parse_queue_save_mode
enum mpd_queue_save_mode mpd_parse_queue_save_mode(const char *mode)
mpd_send_playlist_move_range
bool mpd_send_playlist_move_range(struct mpd_connection *connection, const char *name, unsigned start, unsigned end, unsigned to)
mpd_run_load
bool mpd_run_load(struct mpd_connection *connection, const char *name)
mpd_send_list_playlist_range_meta
bool mpd_send_list_playlist_range_meta(struct mpd_connection *connection, const char *name, unsigned start, unsigned end)
mpd_run_playlist_add_to
bool mpd_run_playlist_add_to(struct mpd_connection *connection, const char *name, const char *uri, unsigned to)
mpd_send_playlist_clear
bool mpd_send_playlist_clear(struct mpd_connection *connection, const char *name)
mpd_send_list_playlist_range
bool mpd_send_list_playlist_range(struct mpd_connection *connection, const char *name, unsigned start, unsigned end)
mpd_send_list_playlists
bool mpd_send_list_playlists(struct mpd_connection *connection)
mpd_run_playlist_move_range
bool mpd_run_playlist_move_range(struct mpd_connection *connection, const char *name, unsigned start, unsigned end, unsigned to)
mpd_send_playlist_delete_range
bool mpd_send_playlist_delete_range(struct mpd_connection *connection, const char *name, unsigned start, unsigned end)
mpd_playlist_begin
struct mpd_playlist * mpd_playlist_begin(const struct mpd_pair *pair)
mpd_run_rm
bool mpd_run_rm(struct mpd_connection *connection, const char *name)
mpd_send_list_playlist
bool mpd_send_list_playlist(struct mpd_connection *connection, const char *name)
mpd_run_playlist_clear
bool mpd_run_playlist_clear(struct mpd_connection *connection, const char *name)
mpd_send_load_range
bool mpd_send_load_range(struct mpd_connection *connection, const char *name, unsigned start, unsigned end)
mpd_send_load
bool mpd_send_load(struct mpd_connection *connection, const char *name)
mpd_send_save_queue
bool mpd_send_save_queue(struct mpd_connection *connection, const char *name, enum mpd_queue_save_mode mode)
mpd_playlist_search_commit
bool mpd_playlist_search_commit(struct mpd_connection *connection)
mpd_run_load_range_to
bool mpd_run_load_range_to(struct mpd_connection *connection, const char *name, unsigned start, unsigned end, unsigned to, enum mpd_position_whence whence)
mpd_playlist_search_cancel
void mpd_playlist_search_cancel(struct mpd_connection *connection)
mpd_send_playlist_add
bool mpd_send_playlist_add(struct mpd_connection *connection, const char *name, const char *path)
mpd_run_rename
bool mpd_run_rename(struct mpd_connection *connection, const char *from, const char *to)
mpd_playlist_dup
struct mpd_playlist * mpd_playlist_dup(const struct mpd_playlist *playlist)
mpd_recv_playlist
struct mpd_playlist * mpd_recv_playlist(struct mpd_connection *connection)
mpd_send_rm
bool mpd_send_rm(struct mpd_connection *connection, const char *name)
position.h
MPD client library.
mpd_position_whence
mpd_position_whence
Definition position.h:13
mpd_connection
mpd_pair
Definition pair.h:16
mpd_playlist