aboutsummaryrefslogtreecommitdiffstats
path: root/src/Partition.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/Partition.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/Partition.hxx')
-rw-r--r--src/Partition.hxx11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/Partition.hxx b/src/Partition.hxx
index de41162f3..57dc9a5f4 100644
--- a/src/Partition.hxx
+++ b/src/Partition.hxx
@@ -26,6 +26,7 @@
struct Instance;
class MultipleOutputs;
+class SongLoader;
/**
* A partition of the Music Player Daemon. It is a separate unit with
@@ -51,14 +52,10 @@ struct Partition {
playlist.Clear(pc);
}
- PlaylistResult AppendFile(const char *path_utf8,
- unsigned *added_id=nullptr) {
- return playlist.AppendFile(pc, path_utf8, added_id);
- }
-
- PlaylistResult AppendURI(const char *uri_utf8,
+ PlaylistResult AppendURI(const SongLoader &loader,
+ const char *uri_utf8,
unsigned *added_id=nullptr) {
- return playlist.AppendURI(pc, uri_utf8, added_id);
+ return playlist.AppendURI(pc, loader, uri_utf8, added_id);
}
PlaylistResult DeletePosition(unsigned position) {