aboutsummaryrefslogtreecommitdiffstats
path: root/src/playlist.h
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-10-15 22:35:13 +0200
committerMax Kellermann <max@duempel.org>2008-10-15 22:35:13 +0200
commit8c0060fae44a94bdfe978d8d4a66589f5a03a074 (patch)
treefde581584c25e5e74d8a8336f54dc61d4a5f67db /src/playlist.h
parent0b44cad2ce2c6433f395650a5a70cf8b3473673c (diff)
downloadmpd-8c0060fae44a94bdfe978d8d4a66589f5a03a074.tar.gz
mpd-8c0060fae44a94bdfe978d8d4a66589f5a03a074.tar.xz
mpd-8c0060fae44a94bdfe978d8d4a66589f5a03a074.zip
playlist: added support for adding songs not in the music database
Clients which have authenticated via unix socket may add local files to the MPD playlist, provided that they own the file.
Diffstat (limited to '')
-rw-r--r--src/playlist.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/playlist.h b/src/playlist.h
index e50f57bc4..e104a48e2 100644
--- a/src/playlist.h
+++ b/src/playlist.h
@@ -32,6 +32,7 @@ struct client;
enum playlist_result {
PLAYLIST_RESULT_SUCCESS,
PLAYLIST_RESULT_ERRNO,
+ PLAYLIST_RESULT_DENIED,
PLAYLIST_RESULT_NO_SUCH_SONG,
PLAYLIST_RESULT_NO_SUCH_LIST,
PLAYLIST_RESULT_LIST_EXISTS,
@@ -72,6 +73,13 @@ void clearPlaylist(void);
int clearStoredPlaylist(const char *utf8file);
+/**
+ * Appends a local file (outside the music database) to the playlist,
+ * but only if the file's owner is equal to the specified uid.
+ */
+enum playlist_result
+playlist_append_file(const char *path, int uid, int *added_id);
+
enum playlist_result addToPlaylist(const char *file, int *added_id);
int addToStoredPlaylist(const char *file, const char *utf8file);