aboutsummaryrefslogtreecommitdiffstats
path: root/src/playlist
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/MemorySongEnumerator.cxx (renamed from src/playlist/MemoryPlaylistProvider.cxx)45
-rw-r--r--src/MemorySongEnumerator.hxx (renamed from src/playlist/MemoryPlaylistProvider.hxx)11
-rw-r--r--src/playlist/AsxPlaylistPlugin.cxx11
-rw-r--r--src/playlist/CuePlaylistPlugin.cxx43
-rw-r--r--src/playlist/DespotifyPlaylistPlugin.cxx9
-rw-r--r--src/playlist/EmbeddedCuePlaylistPlugin.cxx38
-rw-r--r--src/playlist/ExtM3uPlaylistPlugin.cxx40
-rw-r--r--src/playlist/LastFMPlaylistPlugin.cxx42
-rw-r--r--src/playlist/M3uPlaylistPlugin.cxx32
-rw-r--r--src/playlist/PlsPlaylistPlugin.cxx9
-rw-r--r--src/playlist/RssPlaylistPlugin.cxx11
-rw-r--r--src/playlist/SoundCloudPlaylistPlugin.cxx9
-rw-r--r--src/playlist/XspfPlaylistPlugin.cxx11
13 files changed, 100 insertions, 211 deletions
diff --git a/src/playlist/MemoryPlaylistProvider.cxx b/src/MemorySongEnumerator.cxx
index c2b6d9312..7c9d05daa 100644
--- a/src/playlist/MemoryPlaylistProvider.cxx
+++ b/src/MemorySongEnumerator.cxx
@@ -18,50 +18,13 @@
*/
#include "config.h"
-#include "MemoryPlaylistProvider.hxx"
-#include "Song.hxx"
+#include "MemorySongEnumerator.hxx"
-static void
-memory_playlist_close(struct playlist_provider *_playlist)
-{
- MemoryPlaylistProvider *playlist = (MemoryPlaylistProvider *)_playlist;
-
- delete playlist;
-}
-
-static Song *
-memory_playlist_read(struct playlist_provider *_playlist)
-{
- MemoryPlaylistProvider *playlist = (MemoryPlaylistProvider *)_playlist;
-
- return playlist->Read();
-}
-
-static constexpr struct playlist_plugin memory_playlist_plugin = {
- nullptr,
-
- nullptr,
- nullptr,
- nullptr,
- nullptr,
- memory_playlist_close,
- memory_playlist_read,
-
- nullptr,
- nullptr,
- nullptr,
-};
-
-MemoryPlaylistProvider::MemoryPlaylistProvider(std::forward_list<SongPointer> &&_songs)
- :songs(std::move(_songs)) {
- playlist_provider_init(this, &memory_playlist_plugin);
-}
-
-inline Song *
-MemoryPlaylistProvider::Read()
+Song *
+MemorySongEnumerator::NextSong()
{
if (songs.empty())
- return NULL;
+ return nullptr;
auto result = songs.front().Steal();
songs.pop_front();
diff --git a/src/playlist/MemoryPlaylistProvider.hxx b/src/MemorySongEnumerator.hxx
index efbc46fe1..46086a064 100644
--- a/src/playlist/MemoryPlaylistProvider.hxx
+++ b/src/MemorySongEnumerator.hxx
@@ -20,20 +20,19 @@
#ifndef MPD_MEMORY_PLAYLIST_PROVIDER_HXX
#define MPD_MEMORY_PLAYLIST_PROVIDER_HXX
-#include "PlaylistPlugin.hxx"
+#include "SongEnumerator.hxx"
#include "SongPointer.hxx"
#include <forward_list>
-struct Song;
-
-class MemoryPlaylistProvider : public playlist_provider {
+class MemorySongEnumerator final : public SongEnumerator {
std::forward_list<SongPointer> songs;
public:
- MemoryPlaylistProvider(std::forward_list<SongPointer> &&_songs);
+ MemorySongEnumerator(std::forward_list<SongPointer> &&_songs)
+ :songs(std::move(_songs)) {}
- Song *Read();
+ virtual Song *NextSong() override;
};
#endif
diff --git a/src/playlist/AsxPlaylistPlugin.cxx b/src/playlist/AsxPlaylistPlugin.cxx
index c0fc15e07..6920ec268 100644
--- a/src/playlist/AsxPlaylistPlugin.cxx
+++ b/src/playlist/AsxPlaylistPlugin.cxx
@@ -19,7 +19,8 @@
#include "config.h"
#include "AsxPlaylistPlugin.hxx"
-#include "MemoryPlaylistProvider.hxx"
+#include "PlaylistPlugin.hxx"
+#include "MemorySongEnumerator.hxx"
#include "InputStream.hxx"
#include "Song.hxx"
#include "Tag.hxx"
@@ -201,7 +202,7 @@ asx_parser_destroy(gpointer data)
*
*/
-static struct playlist_provider *
+static SongEnumerator *
asx_open_stream(struct input_stream *is)
{
AsxParser parser;
@@ -249,8 +250,8 @@ asx_open_stream(struct input_stream *is)
}
parser.songs.reverse();
- MemoryPlaylistProvider *playlist =
- new MemoryPlaylistProvider(std::move(parser.songs));
+ MemorySongEnumerator *playlist =
+ new MemorySongEnumerator(std::move(parser.songs));
g_markup_parse_context_free(context);
@@ -274,8 +275,6 @@ const struct playlist_plugin asx_playlist_plugin = {
nullptr,
nullptr,
asx_open_stream,
- nullptr,
- nullptr,
nullptr,
asx_suffixes,
diff --git a/src/playlist/CuePlaylistPlugin.cxx b/src/playlist/CuePlaylistPlugin.cxx
index aa84b1c4a..1c1433a6a 100644
--- a/src/playlist/CuePlaylistPlugin.cxx
+++ b/src/playlist/CuePlaylistPlugin.cxx
@@ -20,67 +20,54 @@
#include "config.h"
#include "CuePlaylistPlugin.hxx"
#include "PlaylistPlugin.hxx"
+#include "SongEnumerator.hxx"
#include "Tag.hxx"
#include "Song.hxx"
#include "cue/CueParser.hxx"
#include "TextInputStream.hxx"
-#include <glib.h>
#include <assert.h>
#include <string.h>
#undef G_LOG_DOMAIN
#define G_LOG_DOMAIN "cue"
-struct CuePlaylist {
- struct playlist_provider base;
-
+class CuePlaylist final : public SongEnumerator {
struct input_stream *is;
TextInputStream tis;
CueParser parser;
+ public:
CuePlaylist(struct input_stream *_is)
:is(_is), tis(is) {
- playlist_provider_init(&base, &cue_playlist_plugin);
}
- ~CuePlaylist() {
- }
+ virtual Song *NextSong() override;
};
-static struct playlist_provider *
+static SongEnumerator *
cue_playlist_open_stream(struct input_stream *is)
{
- CuePlaylist *playlist = new CuePlaylist(is);
- return &playlist->base;
-}
-
-static void
-cue_playlist_close(struct playlist_provider *_playlist)
-{
- CuePlaylist *playlist = (CuePlaylist *)_playlist;
- delete playlist;
+ return new CuePlaylist(is);
}
-static Song *
-cue_playlist_read(struct playlist_provider *_playlist)
+Song *
+CuePlaylist::NextSong()
{
- CuePlaylist *playlist = (CuePlaylist *)_playlist;
-
- Song *song = playlist->parser.Get();
+ Song *song = parser.Get();
if (song != NULL)
return song;
std::string line;
- while (playlist->tis.ReadLine(line)) {
- playlist->parser.Feed(line.c_str());
- song = playlist->parser.Get();
+ while (tis.ReadLine(line)) {
+ parser.Feed(line.c_str());
+ song = parser.Get();
if (song != NULL)
return song;
}
- playlist->parser.Finish();
- return playlist->parser.Get();
+ parser.Finish();
+ return parser.Get();
}
static const char *const cue_playlist_suffixes[] = {
@@ -100,8 +87,6 @@ const struct playlist_plugin cue_playlist_plugin = {
nullptr,
nullptr,
cue_playlist_open_stream,
- cue_playlist_close,
- cue_playlist_read,
nullptr,
cue_playlist_suffixes,
diff --git a/src/playlist/DespotifyPlaylistPlugin.cxx b/src/playlist/DespotifyPlaylistPlugin.cxx
index 5759a10c0..3e6527ea7 100644
--- a/src/playlist/DespotifyPlaylistPlugin.cxx
+++ b/src/playlist/DespotifyPlaylistPlugin.cxx
@@ -20,7 +20,8 @@
#include "config.h"
#include "DespotifyPlaylistPlugin.hxx"
#include "DespotifyUtils.hxx"
-#include "MemoryPlaylistProvider.hxx"
+#include "PlaylistPlugin.hxx"
+#include "MemorySongEnumerator.hxx"
#include "Tag.hxx"
#include "Song.hxx"
@@ -86,7 +87,7 @@ parse_playlist(struct despotify_session *session,
return true;
}
-static struct playlist_provider *
+static SongEnumerator *
despotify_playlist_open_uri(const char *url,
gcc_unused Mutex &mutex, gcc_unused Cond &cond)
{
@@ -122,7 +123,7 @@ despotify_playlist_open_uri(const char *url,
return nullptr;
songs.reverse();
- return new MemoryPlaylistProvider(std::move(songs));
+ return new MemorySongEnumerator(std::move(songs));
}
static const char *const despotify_schemes[] = {
@@ -137,8 +138,6 @@ const struct playlist_plugin despotify_playlist_plugin = {
nullptr,
despotify_playlist_open_uri,
nullptr,
- nullptr,
- nullptr,
despotify_schemes,
nullptr,
diff --git a/src/playlist/EmbeddedCuePlaylistPlugin.cxx b/src/playlist/EmbeddedCuePlaylistPlugin.cxx
index 237bccdd5..8c5309ac1 100644
--- a/src/playlist/EmbeddedCuePlaylistPlugin.cxx
+++ b/src/playlist/EmbeddedCuePlaylistPlugin.cxx
@@ -26,6 +26,7 @@
#include "config.h"
#include "EmbeddedCuePlaylistPlugin.hxx"
#include "PlaylistPlugin.hxx"
+#include "SongEnumerator.hxx"
#include "Tag.hxx"
#include "TagHandler.hxx"
#include "tag/TagId3.hxx"
@@ -41,9 +42,8 @@
#undef G_LOG_DOMAIN
#define G_LOG_DOMAIN "cue"
-struct EmbeddedCuePlaylist {
- struct playlist_provider base;
-
+class EmbeddedCuePlaylist final : public SongEnumerator {
+public:
/**
* This is an override for the CUE's "FILE". An embedded CUE
* sheet must always point to the song file it is contained
@@ -63,18 +63,18 @@ struct EmbeddedCuePlaylist {
CueParser *parser;
+public:
EmbeddedCuePlaylist()
:filename(nullptr), cuesheet(nullptr), parser(nullptr) {
- playlist_provider_init(&base, &embcue_playlist_plugin);
}
- ~EmbeddedCuePlaylist() {
+ virtual ~EmbeddedCuePlaylist() {
delete parser;
g_free(cuesheet);
g_free(filename);
}
- Song *Read();
+ virtual Song *NextSong() override;
};
static void
@@ -93,7 +93,7 @@ static const struct tag_handler embcue_tag_handler = {
embcue_tag_pair,
};
-static struct playlist_provider *
+static SongEnumerator *
embcue_playlist_open_uri(const char *uri,
gcc_unused Mutex &mutex,
gcc_unused Cond &cond)
@@ -122,19 +122,11 @@ embcue_playlist_open_uri(const char *uri,
playlist->next = playlist->cuesheet;
playlist->parser = new CueParser();
- return &playlist->base;
-}
-
-static void
-embcue_playlist_close(struct playlist_provider *_playlist)
-{
- EmbeddedCuePlaylist *playlist = (EmbeddedCuePlaylist *)_playlist;
-
- delete playlist;
+ return playlist;
}
-inline Song *
-EmbeddedCuePlaylist::Read()
+Song *
+EmbeddedCuePlaylist::NextSong()
{
Song *song = parser->Get();
if (song != NULL)
@@ -165,14 +157,6 @@ EmbeddedCuePlaylist::Read()
return song;
}
-static Song *
-embcue_playlist_read(struct playlist_provider *_playlist)
-{
- EmbeddedCuePlaylist *playlist = (EmbeddedCuePlaylist *)_playlist;
-
- return playlist->Read();
-}
-
static const char *const embcue_playlist_suffixes[] = {
/* a few codecs that are known to be supported; there are
probably many more */
@@ -192,8 +176,6 @@ const struct playlist_plugin embcue_playlist_plugin = {
nullptr,
embcue_playlist_open_uri,
nullptr,
- embcue_playlist_close,
- embcue_playlist_read,
embcue_playlist_suffixes,
nullptr,
diff --git a/src/playlist/ExtM3uPlaylistPlugin.cxx b/src/playlist/ExtM3uPlaylistPlugin.cxx
index 440dcd432..ff3fcbd7e 100644
--- a/src/playlist/ExtM3uPlaylistPlugin.cxx
+++ b/src/playlist/ExtM3uPlaylistPlugin.cxx
@@ -20,6 +20,7 @@
#include "config.h"
#include "ExtM3uPlaylistPlugin.hxx"
#include "PlaylistPlugin.hxx"
+#include "SongEnumerator.hxx"
#include "Song.hxx"
#include "Tag.hxx"
#include "util/StringUtil.hxx"
@@ -30,40 +31,36 @@
#include <string.h>
#include <stdlib.h>
-struct ExtM3uPlaylist {
- struct playlist_provider base;
-
+class ExtM3uPlaylist final : public SongEnumerator {
TextInputStream tis;
+public:
ExtM3uPlaylist(input_stream *is)
:tis(is) {
- playlist_provider_init(&base, &extm3u_playlist_plugin);
}
+
+ bool CheckFirstLine() {
+ std::string line;
+ return tis.ReadLine(line) &&
+ strcmp(line.c_str(), "#EXTM3U") == 0;
+ }
+
+ virtual Song *NextSong() override;
};
-static struct playlist_provider *
+static SongEnumerator *
extm3u_open_stream(struct input_stream *is)
{
ExtM3uPlaylist *playlist = new ExtM3uPlaylist(is);
- std::string line;
- if (!playlist->tis.ReadLine(line)
- || strcmp(line.c_str(), "#EXTM3U") != 0) {
+ if (!playlist->CheckFirstLine()) {
/* no EXTM3U header: fall back to the plain m3u
plugin */
delete playlist;
return NULL;
}
- return &playlist->base;
-}
-
-static void
-extm3u_close(struct playlist_provider *_playlist)
-{
- ExtM3uPlaylist *playlist = (ExtM3uPlaylist *)_playlist;
-
- delete playlist;
+ return playlist;
}
/**
@@ -106,17 +103,16 @@ extm3u_parse_tag(const char *line)
return tag;
}
-static Song *
-extm3u_read(struct playlist_provider *_playlist)
+Song *
+ExtM3uPlaylist::NextSong()
{
- ExtM3uPlaylist *playlist = (ExtM3uPlaylist *)_playlist;
Tag *tag = NULL;
std::string line;
const char *line_s;
Song *song;
do {
- if (!playlist->tis.ReadLine(line)) {
+ if (!tis.ReadLine(line)) {
delete tag;
return NULL;
}
@@ -155,8 +151,6 @@ const struct playlist_plugin extm3u_playlist_plugin = {
nullptr,
nullptr,
extm3u_open_stream,
- extm3u_close,
- extm3u_read,
nullptr,
extm3u_suffixes,
diff --git a/src/playlist/LastFMPlaylistPlugin.cxx b/src/playlist/LastFMPlaylistPlugin.cxx
index a727a21a4..2cc538e1e 100644
--- a/src/playlist/LastFMPlaylistPlugin.cxx
+++ b/src/playlist/LastFMPlaylistPlugin.cxx
@@ -21,6 +21,7 @@
#include "LastFMPlaylistPlugin.hxx"
#include "PlaylistPlugin.hxx"
#include "PlaylistRegistry.hxx"
+#include "SongEnumerator.hxx"
#include "ConfigData.hxx"
#include "Song.hxx"
#include "InputStream.hxx"
@@ -31,22 +32,24 @@
#include <assert.h>
#include <string.h>
-struct LastfmPlaylist {
- struct playlist_provider base;
-
+class LastfmPlaylist final : public SongEnumerator {
struct input_stream *is;
- struct playlist_provider *xspf;
+ SongEnumerator *const xspf;
- LastfmPlaylist(input_stream *_is, playlist_provider *_xspf)
+public:
+ LastfmPlaylist(input_stream *_is, SongEnumerator *_xspf)
:is(_is), xspf(_xspf) {
- playlist_provider_init(&base, &lastfm_playlist_plugin);
}
- ~LastfmPlaylist() {
- playlist_plugin_close(xspf);
+ virtual ~LastfmPlaylist() {
+ delete xspf;
is->Close();
}
+
+ virtual Song *NextSong() override {
+ return xspf->NextSong();
+ }
};
static struct {
@@ -161,7 +164,7 @@ lastfm_find(const char *response, const char *name)
}
}
-static struct playlist_provider *
+static SongEnumerator *
lastfm_open_uri(const char *uri, Mutex &mutex, Cond &cond)
{
char *p, *q, *response, *session;
@@ -256,24 +259,7 @@ lastfm_open_uri(const char *uri, Mutex &mutex, Cond &cond)
/* create the playlist object */
- const auto playlist = new LastfmPlaylist(is, xspf);
- return &playlist->base;
-}
-
-static void
-lastfm_close(struct playlist_provider *_playlist)
-{
- LastfmPlaylist *playlist = (LastfmPlaylist *)_playlist;
-
- delete playlist;
-}
-
-static Song *
-lastfm_read(struct playlist_provider *_playlist)
-{
- LastfmPlaylist *playlist = (LastfmPlaylist *)_playlist;
-
- return playlist_plugin_read(playlist->xspf);
+ return new LastfmPlaylist(is, xspf);
}
static const char *const lastfm_schemes[] = {
@@ -288,8 +274,6 @@ const struct playlist_plugin lastfm_playlist_plugin = {
lastfm_finish,
lastfm_open_uri,
nullptr,
- lastfm_close,
- lastfm_read,
lastfm_schemes,
nullptr,
diff --git a/src/playlist/M3uPlaylistPlugin.cxx b/src/playlist/M3uPlaylistPlugin.cxx
index d9f1e4737..8854be8d7 100644
--- a/src/playlist/M3uPlaylistPlugin.cxx
+++ b/src/playlist/M3uPlaylistPlugin.cxx
@@ -20,47 +20,37 @@
#include "config.h"
#include "M3uPlaylistPlugin.hxx"
#include "PlaylistPlugin.hxx"
+#include "SongEnumerator.hxx"
#include "Song.hxx"
#include "TextInputStream.hxx"
#include <glib.h>
-struct M3uPlaylist {
- struct playlist_provider base;
-
+class M3uPlaylist final : public SongEnumerator {
TextInputStream tis;
+public:
M3uPlaylist(input_stream *is)
:tis(is) {
- playlist_provider_init(&base, &m3u_playlist_plugin);
}
+
+ virtual Song *NextSong() override;
};
-static struct playlist_provider *
+static SongEnumerator *
m3u_open_stream(struct input_stream *is)
{
- M3uPlaylist *playlist = new M3uPlaylist(is);
-
- return &playlist->base;
-}
-
-static void
-m3u_close(struct playlist_provider *_playlist)
-{
- M3uPlaylist *playlist = (M3uPlaylist *)_playlist;
-
- delete playlist;
+ return new M3uPlaylist(is);
}
-static Song *
-m3u_read(struct playlist_provider *_playlist)
+Song *
+M3uPlaylist::NextSong()
{
- M3uPlaylist *playlist = (M3uPlaylist *)_playlist;
std::string line;
const char *line_s;
do {
- if (!playlist->tis.ReadLine(line))
+ if (!tis.ReadLine(line))
return NULL;
line_s = line.c_str();
@@ -89,8 +79,6 @@ const struct playlist_plugin m3u_playlist_plugin = {
nullptr,
nullptr,
m3u_open_stream,
- m3u_close,
- m3u_read,
nullptr,
m3u_suffixes,
diff --git a/src/playlist/PlsPlaylistPlugin.cxx b/src/playlist/PlsPlaylistPlugin.cxx
index 4a0fde45f..946fe9c55 100644
--- a/src/playlist/PlsPlaylistPlugin.cxx
+++ b/src/playlist/PlsPlaylistPlugin.cxx
@@ -19,7 +19,8 @@
#include "config.h"
#include "PlsPlaylistPlugin.hxx"
-#include "MemoryPlaylistProvider.hxx"
+#include "PlaylistPlugin.hxx"
+#include "MemorySongEnumerator.hxx"
#include "InputStream.hxx"
#include "Song.hxx"
#include "Tag.hxx"
@@ -101,7 +102,7 @@ pls_parser(GKeyFile *keyfile, std::forward_list<SongPointer> &songs)
}
-static struct playlist_provider *
+static SongEnumerator *
pls_open_stream(struct input_stream *is)
{
GError *error = NULL;
@@ -150,7 +151,7 @@ pls_open_stream(struct input_stream *is)
g_key_file_free(keyfile);
songs.reverse();
- return new MemoryPlaylistProvider(std::move(songs));
+ return new MemorySongEnumerator(std::move(songs));
}
static const char *const pls_suffixes[] = {
@@ -170,8 +171,6 @@ const struct playlist_plugin pls_playlist_plugin = {
nullptr,
nullptr,
pls_open_stream,
- nullptr,
- nullptr,
nullptr,
pls_suffixes,
diff --git a/src/playlist/RssPlaylistPlugin.cxx b/src/playlist/RssPlaylistPlugin.cxx
index c045b4df2..97c0d806b 100644
--- a/src/playlist/RssPlaylistPlugin.cxx
+++ b/src/playlist/RssPlaylistPlugin.cxx
@@ -19,7 +19,8 @@
#include "config.h"
#include "RssPlaylistPlugin.hxx"
-#include "MemoryPlaylistProvider.hxx"
+#include "PlaylistPlugin.hxx"
+#include "MemorySongEnumerator.hxx"
#include "InputStream.hxx"
#include "Song.hxx"
#include "Tag.hxx"
@@ -198,7 +199,7 @@ rss_parser_destroy(gpointer data)
*
*/
-static struct playlist_provider *
+static SongEnumerator *
rss_open_stream(struct input_stream *is)
{
RssParser parser;
@@ -246,8 +247,8 @@ rss_open_stream(struct input_stream *is)
}
parser.songs.reverse();
- MemoryPlaylistProvider *playlist =
- new MemoryPlaylistProvider(std::move(parser.songs));
+ MemorySongEnumerator *playlist =
+ new MemorySongEnumerator(std::move(parser.songs));
g_markup_parse_context_free(context);
@@ -272,8 +273,6 @@ const struct playlist_plugin rss_playlist_plugin = {
nullptr,
nullptr,
rss_open_stream,
- nullptr,
- nullptr,
nullptr,
rss_suffixes,
diff --git a/src/playlist/SoundCloudPlaylistPlugin.cxx b/src/playlist/SoundCloudPlaylistPlugin.cxx
index 5679062cf..f822382fc 100644
--- a/src/playlist/SoundCloudPlaylistPlugin.cxx
+++ b/src/playlist/SoundCloudPlaylistPlugin.cxx
@@ -19,7 +19,8 @@
#include "config.h"
#include "SoundCloudPlaylistPlugin.hxx"
-#include "MemoryPlaylistProvider.hxx"
+#include "PlaylistPlugin.hxx"
+#include "MemorySongEnumerator.hxx"
#include "ConfigData.hxx"
#include "InputStream.hxx"
#include "Song.hxx"
@@ -315,7 +316,7 @@ soundcloud_parse_json(const char *url, yajl_handle hand,
* soundcloud://url/<url or path of soundcloud page>
*/
-static struct playlist_provider *
+static SongEnumerator *
soundcloud_open_uri(const char *uri, Mutex &mutex, Cond &cond)
{
char *s, *p;
@@ -389,7 +390,7 @@ soundcloud_open_uri(const char *uri, Mutex &mutex, Cond &cond)
return NULL;
data.songs.reverse();
- return new MemoryPlaylistProvider(std::move(data.songs));
+ return new MemorySongEnumerator(std::move(data.songs));
}
static const char *const soundcloud_schemes[] = {
@@ -404,8 +405,6 @@ const struct playlist_plugin soundcloud_playlist_plugin = {
soundcloud_finish,
soundcloud_open_uri,
nullptr,
- nullptr,
- nullptr,
soundcloud_schemes,
nullptr,
diff --git a/src/playlist/XspfPlaylistPlugin.cxx b/src/playlist/XspfPlaylistPlugin.cxx
index 667f484b2..002a03f8a 100644
--- a/src/playlist/XspfPlaylistPlugin.cxx
+++ b/src/playlist/XspfPlaylistPlugin.cxx
@@ -19,7 +19,8 @@
#include "config.h"
#include "XspfPlaylistPlugin.hxx"
-#include "MemoryPlaylistProvider.hxx"
+#include "PlaylistPlugin.hxx"
+#include "MemorySongEnumerator.hxx"
#include "InputStream.hxx"
#include "Tag.hxx"
#include "util/Error.hxx"
@@ -217,7 +218,7 @@ xspf_parser_destroy(gpointer data)
*
*/
-static struct playlist_provider *
+static SongEnumerator *
xspf_open_stream(struct input_stream *is)
{
XspfParser parser;
@@ -265,8 +266,8 @@ xspf_open_stream(struct input_stream *is)
}
parser.songs.reverse();
- MemoryPlaylistProvider *playlist =
- new MemoryPlaylistProvider(std::move(parser.songs));
+ MemorySongEnumerator *playlist =
+ new MemorySongEnumerator(std::move(parser.songs));
g_markup_parse_context_free(context);
@@ -290,8 +291,6 @@ const struct playlist_plugin xspf_playlist_plugin = {
nullptr,
nullptr,
xspf_open_stream,
- nullptr,
- nullptr,
nullptr,
xspf_suffixes,