aboutsummaryrefslogtreecommitdiffstats
path: root/src/playlist/PlaylistAny.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-02-07 21:29:31 +0100
committerMax Kellermann <max@duempel.org>2014-02-07 21:30:49 +0100
commit77de23311792b6df7fb7b82ea5db3bc6643196fc (patch)
tree1459f8ca28253c75211c3217034bc2d3250d4094 /src/playlist/PlaylistAny.cxx
parent02b67edaf5c24a44d1dacce0533f2851cfbe35e7 (diff)
downloadmpd-77de23311792b6df7fb7b82ea5db3bc6643196fc.tar.gz
mpd-77de23311792b6df7fb7b82ea5db3bc6643196fc.tar.xz
mpd-77de23311792b6df7fb7b82ea5db3bc6643196fc.zip
Playlist{Any,Registry,Mapper}: move functions to PlaylistStream.cxx
Diffstat (limited to 'src/playlist/PlaylistAny.cxx')
-rw-r--r--src/playlist/PlaylistAny.cxx35
1 files changed, 1 insertions, 34 deletions
diff --git a/src/playlist/PlaylistAny.cxx b/src/playlist/PlaylistAny.cxx
index 671802e7d..457de18b3 100644
--- a/src/playlist/PlaylistAny.cxx
+++ b/src/playlist/PlaylistAny.cxx
@@ -19,42 +19,9 @@
#include "config.h"
#include "PlaylistAny.hxx"
+#include "PlaylistStream.hxx"
#include "PlaylistMapper.hxx"
-#include "PlaylistRegistry.hxx"
-#include "CloseSongEnumerator.hxx"
#include "util/UriUtil.hxx"
-#include "util/Error.hxx"
-#include "input/InputStream.hxx"
-#include "Log.hxx"
-
-#include <assert.h>
-
-static SongEnumerator *
-playlist_open_remote(const char *uri, Mutex &mutex, Cond &cond)
-{
- assert(uri_has_scheme(uri));
-
- SongEnumerator *playlist = playlist_list_open_uri(uri, mutex, cond);
- if (playlist != nullptr)
- return playlist;
-
- Error error;
- InputStream *is = InputStream::OpenReady(uri, mutex, cond, error);
- if (is == nullptr) {
- if (error.IsDefined())
- FormatError(error, "Failed to open %s", uri);
-
- return nullptr;
- }
-
- playlist = playlist_list_open_stream(*is, uri);
- if (playlist == nullptr) {
- is->Close();
- return nullptr;
- }
-
- return new CloseSongEnumerator(playlist, is);
-}
SongEnumerator *
playlist_open_any(const char *uri, Mutex &mutex, Cond &cond)