diff options
author | Max Kellermann <max@duempel.org> | 2014-02-07 21:29:31 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-02-07 21:30:49 +0100 |
commit | 77de23311792b6df7fb7b82ea5db3bc6643196fc (patch) | |
tree | 1459f8ca28253c75211c3217034bc2d3250d4094 /src/playlist/PlaylistRegistry.cxx | |
parent | 02b67edaf5c24a44d1dacce0533f2851cfbe35e7 (diff) | |
download | mpd-77de23311792b6df7fb7b82ea5db3bc6643196fc.tar.gz mpd-77de23311792b6df7fb7b82ea5db3bc6643196fc.tar.xz mpd-77de23311792b6df7fb7b82ea5db3bc6643196fc.zip |
Playlist{Any,Registry,Mapper}: move functions to PlaylistStream.cxx
Diffstat (limited to 'src/playlist/PlaylistRegistry.cxx')
-rw-r--r-- | src/playlist/PlaylistRegistry.cxx | 32 |
1 files changed, 1 insertions, 31 deletions
diff --git a/src/playlist/PlaylistRegistry.cxx b/src/playlist/PlaylistRegistry.cxx index 6b594e3c5..9439039ef 100644 --- a/src/playlist/PlaylistRegistry.cxx +++ b/src/playlist/PlaylistRegistry.cxx @@ -20,7 +20,6 @@ #include "config.h" #include "PlaylistRegistry.hxx" #include "PlaylistPlugin.hxx" -#include "CloseSongEnumerator.hxx" #include "plugins/ExtM3uPlaylistPlugin.hxx" #include "plugins/M3uPlaylistPlugin.hxx" #include "plugins/XspfPlaylistPlugin.hxx" @@ -221,7 +220,7 @@ playlist_list_open_stream_mime(InputStream &is, const char *full_mime) return playlist_list_open_stream_mime2(is, mime.c_str()); } -static SongEnumerator * +SongEnumerator * playlist_list_open_stream_suffix(InputStream &is, const char *suffix) { assert(suffix != nullptr); @@ -278,32 +277,3 @@ playlist_suffix_supported(const char *suffix) return false; } - -SongEnumerator * -playlist_list_open_path(const char *path_fs, Mutex &mutex, Cond &cond) -{ - const char *suffix; - - assert(path_fs != nullptr); - - suffix = uri_get_suffix(path_fs); - if (suffix == nullptr || !playlist_suffix_supported(suffix)) - return nullptr; - - Error error; - InputStream *is = InputStream::OpenReady(path_fs, mutex, cond, error); - if (is == nullptr) { - if (error.IsDefined()) - LogError(error); - - return nullptr; - } - - auto playlist = playlist_list_open_stream_suffix(*is, suffix); - if (playlist != nullptr) - playlist = new CloseSongEnumerator(playlist, is); - else - is->Close(); - - return playlist; -} |