From 77de23311792b6df7fb7b82ea5db3bc6643196fc Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 7 Feb 2014 21:29:31 +0100 Subject: Playlist{Any,Registry,Mapper}: move functions to PlaylistStream.cxx --- src/playlist/PlaylistAny.cxx | 35 +---------------------------------- 1 file changed, 1 insertion(+), 34 deletions(-) (limited to 'src/playlist/PlaylistAny.cxx') 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 - -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) -- cgit v1.2.3