aboutsummaryrefslogtreecommitdiffstats
path: root/src/Playlist.hxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-02-02 14:37:52 +0100
committerMax Kellermann <max@duempel.org>2014-02-03 23:32:10 +0100
commitca36ac2ba196ee2bbe4b54ee9a71d49174803277 (patch)
treed365b1ac7872e1785befdcebf254885c1c27a268 /src/Playlist.hxx
parentba675d6a55769a6e82a6efaa2f4a812a4eea2362 (diff)
downloadmpd-ca36ac2ba196ee2bbe4b54ee9a71d49174803277.tar.gz
mpd-ca36ac2ba196ee2bbe4b54ee9a71d49174803277.tar.xz
mpd-ca36ac2ba196ee2bbe4b54ee9a71d49174803277.zip
SongLoader: new class that merges duplicate code
There was quite a lot of duplicate code for loading DetachedSong objects, with different semantics for "securely" loading local files.
Diffstat (limited to 'src/Playlist.hxx')
-rw-r--r--src/Playlist.hxx12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/Playlist.hxx b/src/Playlist.hxx
index 45f1e2dfc..09980155e 100644
--- a/src/Playlist.hxx
+++ b/src/Playlist.hxx
@@ -28,6 +28,7 @@ struct PlayerControl;
class DetachedSong;
class Database;
class Error;
+class SongLoader;
struct playlist {
/**
@@ -149,17 +150,8 @@ public:
DetachedSong &&song,
unsigned *added_id=nullptr);
- /**
- * Appends a local file (outside the music database) to the
- * playlist.
- *
- * Note: the caller is responsible for checking permissions.
- */
- PlaylistResult AppendFile(PlayerControl &pc,
- const char *path_utf8,
- unsigned *added_id=nullptr);
-
PlaylistResult AppendURI(PlayerControl &pc,
+ const SongLoader &loader,
const char *uri_utf8,
unsigned *added_id=nullptr);