diff options
author | Max Kellermann <max@duempel.org> | 2013-09-05 09:37:54 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2013-09-05 09:40:55 +0200 |
commit | 8929f88e6d78d538d943e80b66fcf21706e53974 (patch) | |
tree | 01232fd55f40dfa1cded59cb28a79b257ebb19e4 /test | |
parent | 5348808bf594de927cc64eebae9118d6971343b1 (diff) | |
download | mpd-8929f88e6d78d538d943e80b66fcf21706e53974.tar.gz mpd-8929f88e6d78d538d943e80b66fcf21706e53974.tar.xz mpd-8929f88e6d78d538d943e80b66fcf21706e53974.zip |
PlaylistPlugin: add interface SongEnumerator
Replaces struct playlist_provider.
Diffstat (limited to '')
-rw-r--r-- | test/dump_playlist.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/dump_playlist.cxx b/test/dump_playlist.cxx index c42a2c52b..45719fab0 100644 --- a/test/dump_playlist.cxx +++ b/test/dump_playlist.cxx @@ -20,6 +20,7 @@ #include "config.h" #include "TagSave.hxx" #include "Song.hxx" +#include "SongEnumerator.hxx" #include "Directory.hxx" #include "InputStream.hxx" #include "ConfigGlobal.hxx" @@ -141,7 +142,6 @@ int main(int argc, char **argv) { const char *uri; struct input_stream *is = NULL; - struct playlist_provider *playlist; Song *song; if (argc != 3) { @@ -186,7 +186,7 @@ int main(int argc, char **argv) Mutex mutex; Cond cond; - playlist = playlist_list_open_uri(uri, mutex, cond); + auto playlist = playlist_list_open_uri(uri, mutex, cond); if (playlist == NULL) { /* open the stream and wait until it becomes ready */ @@ -213,7 +213,7 @@ int main(int argc, char **argv) /* dump the playlist */ - while ((song = playlist_plugin_read(playlist)) != NULL) { + while ((song = playlist->NextSong()) != NULL) { g_print("%s\n", song->uri); if (song->end_ms > 0) @@ -235,7 +235,7 @@ int main(int argc, char **argv) /* deinitialize everything */ - playlist_plugin_close(playlist); + delete playlist; if (is != NULL) is->Close(); |