aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-01-23 23:30:12 +0100
committerMax Kellermann <max@duempel.org>2014-01-23 23:30:12 +0100
commitf1f19841bdd291c055f59b6603f69278c66366d8 (patch)
tree96d674b367234c966df4055686566354a0852072
parent655ad344140ee250f8becf67544dbe035a3460b1 (diff)
downloadmpd-f1f19841bdd291c055f59b6603f69278c66366d8.tar.gz
mpd-f1f19841bdd291c055f59b6603f69278c66366d8.tar.xz
mpd-f1f19841bdd291c055f59b6603f69278c66366d8.zip
playlist/*: move to playlist/plugins/
-rw-r--r--Makefile.am60
-rw-r--r--src/CommandLine.cxx4
-rw-r--r--src/Main.cxx2
-rw-r--r--src/PlaylistPrint.cxx45
-rw-r--r--src/PlaylistPrint.hxx12
-rw-r--r--src/UpdateWalk.cxx2
-rw-r--r--src/command/PlaylistCommands.cxx3
-rw-r--r--src/playlist/MemorySongEnumerator.cxx (renamed from src/MemorySongEnumerator.cxx)0
-rw-r--r--src/playlist/MemorySongEnumerator.hxx (renamed from src/MemorySongEnumerator.hxx)0
-rw-r--r--src/playlist/PlaylistAny.cxx (renamed from src/PlaylistAny.cxx)0
-rw-r--r--src/playlist/PlaylistAny.hxx (renamed from src/PlaylistAny.hxx)0
-rw-r--r--src/playlist/PlaylistMapper.cxx (renamed from src/PlaylistMapper.cxx)0
-rw-r--r--src/playlist/PlaylistMapper.hxx (renamed from src/PlaylistMapper.hxx)0
-rw-r--r--src/playlist/PlaylistPlugin.hxx (renamed from src/PlaylistPlugin.hxx)0
-rw-r--r--src/playlist/PlaylistQueue.cxx (renamed from src/PlaylistQueue.cxx)0
-rw-r--r--src/playlist/PlaylistQueue.hxx (renamed from src/PlaylistQueue.hxx)0
-rw-r--r--src/playlist/PlaylistRegistry.cxx (renamed from src/PlaylistRegistry.cxx)20
-rw-r--r--src/playlist/PlaylistRegistry.hxx (renamed from src/PlaylistRegistry.hxx)0
-rw-r--r--src/playlist/PlaylistSong.cxx (renamed from src/PlaylistSong.cxx)0
-rw-r--r--src/playlist/PlaylistSong.hxx (renamed from src/PlaylistSong.hxx)0
-rw-r--r--src/playlist/Print.cxx71
-rw-r--r--src/playlist/Print.hxx36
-rw-r--r--src/playlist/SongEnumerator.hxx (renamed from src/SongEnumerator.hxx)0
-rw-r--r--src/playlist/plugins/AsxPlaylistPlugin.cxx (renamed from src/playlist/AsxPlaylistPlugin.cxx)4
-rw-r--r--src/playlist/plugins/AsxPlaylistPlugin.hxx (renamed from src/playlist/AsxPlaylistPlugin.hxx)0
-rw-r--r--src/playlist/plugins/CuePlaylistPlugin.cxx (renamed from src/playlist/CuePlaylistPlugin.cxx)4
-rw-r--r--src/playlist/plugins/CuePlaylistPlugin.hxx (renamed from src/playlist/CuePlaylistPlugin.hxx)0
-rw-r--r--src/playlist/plugins/DespotifyPlaylistPlugin.cxx (renamed from src/playlist/DespotifyPlaylistPlugin.cxx)4
-rw-r--r--src/playlist/plugins/DespotifyPlaylistPlugin.hxx (renamed from src/playlist/DespotifyPlaylistPlugin.hxx)0
-rw-r--r--src/playlist/plugins/EmbeddedCuePlaylistPlugin.cxx (renamed from src/playlist/EmbeddedCuePlaylistPlugin.cxx)4
-rw-r--r--src/playlist/plugins/EmbeddedCuePlaylistPlugin.hxx (renamed from src/playlist/EmbeddedCuePlaylistPlugin.hxx)0
-rw-r--r--src/playlist/plugins/ExtM3uPlaylistPlugin.cxx (renamed from src/playlist/ExtM3uPlaylistPlugin.cxx)4
-rw-r--r--src/playlist/plugins/ExtM3uPlaylistPlugin.hxx (renamed from src/playlist/ExtM3uPlaylistPlugin.hxx)0
-rw-r--r--src/playlist/plugins/M3uPlaylistPlugin.cxx (renamed from src/playlist/M3uPlaylistPlugin.cxx)4
-rw-r--r--src/playlist/plugins/M3uPlaylistPlugin.hxx (renamed from src/playlist/M3uPlaylistPlugin.hxx)0
-rw-r--r--src/playlist/plugins/PlsPlaylistPlugin.cxx (renamed from src/playlist/PlsPlaylistPlugin.cxx)4
-rw-r--r--src/playlist/plugins/PlsPlaylistPlugin.hxx (renamed from src/playlist/PlsPlaylistPlugin.hxx)0
-rw-r--r--src/playlist/plugins/RssPlaylistPlugin.cxx (renamed from src/playlist/RssPlaylistPlugin.cxx)4
-rw-r--r--src/playlist/plugins/RssPlaylistPlugin.hxx (renamed from src/playlist/RssPlaylistPlugin.hxx)0
-rw-r--r--src/playlist/plugins/SoundCloudPlaylistPlugin.cxx (renamed from src/playlist/SoundCloudPlaylistPlugin.cxx)4
-rw-r--r--src/playlist/plugins/SoundCloudPlaylistPlugin.hxx (renamed from src/playlist/SoundCloudPlaylistPlugin.hxx)0
-rw-r--r--src/playlist/plugins/XspfPlaylistPlugin.cxx (renamed from src/playlist/XspfPlaylistPlugin.cxx)4
-rw-r--r--src/playlist/plugins/XspfPlaylistPlugin.hxx (renamed from src/playlist/XspfPlaylistPlugin.hxx)0
-rw-r--r--test/dump_playlist.cxx6
-rw-r--r--test/test_translate_song.cxx2
45 files changed, 178 insertions, 125 deletions
diff --git a/Makefile.am b/Makefile.am
index 94a8fb3e8..371d46a1b 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -179,11 +179,12 @@ src_mpd_SOURCES = \
src/PlaylistTag.cxx \
src/PlaylistPrint.cxx src/PlaylistPrint.hxx \
src/PlaylistSave.cxx src/PlaylistSave.hxx \
- src/PlaylistMapper.cxx src/PlaylistMapper.hxx \
- src/PlaylistAny.cxx src/PlaylistAny.hxx \
- src/PlaylistSong.cxx src/PlaylistSong.hxx \
+ src/playlist/PlaylistMapper.cxx src/playlist/PlaylistMapper.hxx \
+ src/playlist/PlaylistAny.cxx src/playlist/PlaylistAny.hxx \
+ src/playlist/PlaylistSong.cxx src/playlist/PlaylistSong.hxx \
src/PlaylistState.cxx src/PlaylistState.hxx \
- src/PlaylistQueue.cxx src/PlaylistQueue.hxx \
+ src/playlist/PlaylistQueue.cxx src/playlist/PlaylistQueue.hxx \
+ src/playlist/Print.cxx src/playlist/Print.hxx \
src/PlaylistVector.cxx src/PlaylistVector.hxx \
src/PlaylistInfo.hxx \
src/PlaylistDatabase.cxx src/PlaylistDatabase.hxx \
@@ -1042,18 +1043,19 @@ endif
#
libplaylist_plugins_a_SOURCES = \
- src/PlaylistPlugin.hxx \
- src/SongEnumerator.hxx \
- src/MemorySongEnumerator.cxx src/MemorySongEnumerator.hxx \
- src/playlist/ExtM3uPlaylistPlugin.cxx \
- src/playlist/ExtM3uPlaylistPlugin.hxx \
- src/playlist/M3uPlaylistPlugin.cxx \
- src/playlist/M3uPlaylistPlugin.hxx \
- src/playlist/CuePlaylistPlugin.cxx \
- src/playlist/CuePlaylistPlugin.hxx \
- src/playlist/EmbeddedCuePlaylistPlugin.cxx \
- src/playlist/EmbeddedCuePlaylistPlugin.hxx \
- src/PlaylistRegistry.cxx src/PlaylistRegistry.hxx
+ src/playlist/PlaylistPlugin.hxx \
+ src/playlist/SongEnumerator.hxx \
+ src/playlist/MemorySongEnumerator.cxx \
+ src/playlist/MemorySongEnumerator.hxx \
+ src/playlist/plugins/ExtM3uPlaylistPlugin.cxx \
+ src/playlist/plugins/ExtM3uPlaylistPlugin.hxx \
+ src/playlist/plugins/M3uPlaylistPlugin.cxx \
+ src/playlist/plugins/M3uPlaylistPlugin.hxx \
+ src/playlist/plugins/CuePlaylistPlugin.cxx \
+ src/playlist/plugins/CuePlaylistPlugin.hxx \
+ src/playlist/plugins/EmbeddedCuePlaylistPlugin.cxx \
+ src/playlist/plugins/EmbeddedCuePlaylistPlugin.hxx \
+ src/playlist/PlaylistRegistry.cxx src/playlist/PlaylistRegistry.hxx
libplaylist_plugins_a_CPPFLAGS = $(AM_CPPFLAGS) \
$(EXPAT_CFLAGS) \
$(YAJL_CFLAGS) \
@@ -1066,32 +1068,32 @@ PLAYLIST_LIBS = \
if ENABLE_DESPOTIFY
libplaylist_plugins_a_SOURCES += \
- src/playlist/DespotifyPlaylistPlugin.cxx \
- src/playlist/DespotifyPlaylistPlugin.hxx
+ src/playlist/plugins/DespotifyPlaylistPlugin.cxx \
+ src/playlist/plugins/DespotifyPlaylistPlugin.hxx
endif
if ENABLE_SOUNDCLOUD
libplaylist_plugins_a_SOURCES += \
- src/playlist/SoundCloudPlaylistPlugin.cxx \
- src/playlist/SoundCloudPlaylistPlugin.hxx
+ src/playlist/plugins/SoundCloudPlaylistPlugin.cxx \
+ src/playlist/plugins/SoundCloudPlaylistPlugin.hxx
PLAYLIST_LIBS += $(YAJL_LIBS)
endif
if HAVE_EXPAT
libplaylist_plugins_a_SOURCES += \
src/Expat.cxx src/Expat.hxx \
- src/playlist/XspfPlaylistPlugin.cxx \
- src/playlist/XspfPlaylistPlugin.hxx \
- src/playlist/AsxPlaylistPlugin.cxx \
- src/playlist/AsxPlaylistPlugin.hxx \
- src/playlist/RssPlaylistPlugin.cxx \
- src/playlist/RssPlaylistPlugin.hxx
+ src/playlist/plugins/XspfPlaylistPlugin.cxx \
+ src/playlist/plugins/XspfPlaylistPlugin.hxx \
+ src/playlist/plugins/AsxPlaylistPlugin.cxx \
+ src/playlist/plugins/AsxPlaylistPlugin.hxx \
+ src/playlist/plugins/RssPlaylistPlugin.cxx \
+ src/playlist/plugins/RssPlaylistPlugin.hxx
endif
if HAVE_GLIB
libplaylist_plugins_a_SOURCES += \
- src/playlist/PlsPlaylistPlugin.cxx \
- src/playlist/PlsPlaylistPlugin.hxx
+ src/playlist/plugins/PlsPlaylistPlugin.cxx \
+ src/playlist/plugins/PlsPlaylistPlugin.hxx
endif
#
@@ -1634,7 +1636,7 @@ test_test_archive_LDADD = \
$(CPPUNIT_LIBS)
test_test_translate_song_SOURCES = \
- src/PlaylistSong.cxx \
+ src/playlist/PlaylistSong.cxx \
src/DetachedSong.cxx \
src/Log.cxx \
test/test_translate_song.cxx
diff --git a/src/CommandLine.cxx b/src/CommandLine.cxx
index 9430d0df8..0667844f6 100644
--- a/src/CommandLine.cxx
+++ b/src/CommandLine.cxx
@@ -31,8 +31,8 @@
#include "OutputPlugin.hxx"
#include "InputRegistry.hxx"
#include "InputPlugin.hxx"
-#include "PlaylistRegistry.hxx"
-#include "PlaylistPlugin.hxx"
+#include "playlist/PlaylistRegistry.hxx"
+#include "playlist/PlaylistPlugin.hxx"
#include "fs/AllocatedPath.hxx"
#include "fs/Traits.hxx"
#include "fs/FileSystem.hxx"
diff --git a/src/Main.cxx b/src/Main.cxx
index 10a9091a1..8808a78d9 100644
--- a/src/Main.cxx
+++ b/src/Main.cxx
@@ -51,7 +51,7 @@
#include "fs/AllocatedPath.hxx"
#include "fs/Config.hxx"
#include "fs/StandardDirectory.hxx"
-#include "PlaylistRegistry.hxx"
+#include "playlist/PlaylistRegistry.hxx"
#include "ZeroconfGlue.hxx"
#include "DecoderList.hxx"
#include "AudioConfig.hxx"
diff --git a/src/PlaylistPrint.cxx b/src/PlaylistPrint.cxx
index 38d63f4e8..63972f712 100644
--- a/src/PlaylistPrint.cxx
+++ b/src/PlaylistPrint.cxx
@@ -20,11 +20,8 @@
#include "config.h"
#include "PlaylistPrint.hxx"
#include "PlaylistFile.hxx"
-#include "PlaylistAny.hxx"
-#include "PlaylistSong.hxx"
#include "Playlist.hxx"
#include "QueuePrint.hxx"
-#include "SongEnumerator.hxx"
#include "SongPrint.hxx"
#include "DatabaseGlue.hxx"
#include "DatabasePlugin.hxx"
@@ -145,45 +142,3 @@ spl_print(Client &client, const char *name_utf8, bool detail,
return true;
}
-
-static void
-playlist_provider_print(Client &client, const char *uri,
- SongEnumerator &e, bool detail)
-{
- const std::string base_uri = uri != nullptr
- ? PathTraitsUTF8::GetParent(uri)
- : std::string(".");
-
- DetachedSong *song;
- while ((song = e.NextSong()) != nullptr) {
- if (playlist_check_translate_song(*song, base_uri.c_str(),
- false)) {
- if (detail)
- song_print_info(client, *song);
- else
- song_print_uri(client, *song);
- }
-
- delete song;
- }
-}
-
-bool
-playlist_file_print(Client &client, const char *uri, bool detail)
-{
- Mutex mutex;
- Cond cond;
-
- InputStream *is;
- SongEnumerator *playlist = playlist_open_any(uri, mutex, cond, &is);
- if (playlist == nullptr)
- return false;
-
- playlist_provider_print(client, uri, *playlist, detail);
- delete playlist;
-
- if (is != nullptr)
- is->Close();
-
- return true;
-}
diff --git a/src/PlaylistPrint.hxx b/src/PlaylistPrint.hxx
index a1cf185cc..38a4cc7cf 100644
--- a/src/PlaylistPrint.hxx
+++ b/src/PlaylistPrint.hxx
@@ -1,4 +1,3 @@
-
/*
* Copyright (C) 2003-2014 The Music Player Daemon Project
* http://www.musicpd.org
@@ -96,15 +95,4 @@ bool
spl_print(Client &client, const char *name_utf8, bool detail,
Error &error);
-/**
- * Send the playlist file to the client.
- *
- * @param client the client which requested the playlist
- * @param uri the URI of the playlist file in UTF-8 encoding
- * @param detail true if all details should be printed
- * @return true on success, false if the playlist does not exist
- */
-bool
-playlist_file_print(Client &client, const char *uri, bool detail);
-
#endif
diff --git a/src/UpdateWalk.cxx b/src/UpdateWalk.cxx
index fa3611b1b..430e63af0 100644
--- a/src/UpdateWalk.cxx
+++ b/src/UpdateWalk.cxx
@@ -29,7 +29,7 @@
#include "Directory.hxx"
#include "Song.hxx"
#include "PlaylistVector.hxx"
-#include "PlaylistRegistry.hxx"
+#include "playlist/PlaylistRegistry.hxx"
#include "Mapper.hxx"
#include "ExcludeList.hxx"
#include "ConfigGlobal.hxx"
diff --git a/src/command/PlaylistCommands.cxx b/src/command/PlaylistCommands.cxx
index e3f7faa05..2f203678b 100644
--- a/src/command/PlaylistCommands.cxx
+++ b/src/command/PlaylistCommands.cxx
@@ -25,7 +25,8 @@
#include "PlaylistSave.hxx"
#include "PlaylistFile.hxx"
#include "PlaylistVector.hxx"
-#include "PlaylistQueue.hxx"
+#include "playlist/PlaylistQueue.hxx"
+#include "playlist/Print.hxx"
#include "TimePrint.hxx"
#include "Client.hxx"
#include "protocol/ArgParser.hxx"
diff --git a/src/MemorySongEnumerator.cxx b/src/playlist/MemorySongEnumerator.cxx
index c3127c2bf..c3127c2bf 100644
--- a/src/MemorySongEnumerator.cxx
+++ b/src/playlist/MemorySongEnumerator.cxx
diff --git a/src/MemorySongEnumerator.hxx b/src/playlist/MemorySongEnumerator.hxx
index e87a4f6dd..e87a4f6dd 100644
--- a/src/MemorySongEnumerator.hxx
+++ b/src/playlist/MemorySongEnumerator.hxx
diff --git a/src/PlaylistAny.cxx b/src/playlist/PlaylistAny.cxx
index 8d748cada..8d748cada 100644
--- a/src/PlaylistAny.cxx
+++ b/src/playlist/PlaylistAny.cxx
diff --git a/src/PlaylistAny.hxx b/src/playlist/PlaylistAny.hxx
index c472afb31..c472afb31 100644
--- a/src/PlaylistAny.hxx
+++ b/src/playlist/PlaylistAny.hxx
diff --git a/src/PlaylistMapper.cxx b/src/playlist/PlaylistMapper.cxx
index 0df0bc61f..0df0bc61f 100644
--- a/src/PlaylistMapper.cxx
+++ b/src/playlist/PlaylistMapper.cxx
diff --git a/src/PlaylistMapper.hxx b/src/playlist/PlaylistMapper.hxx
index a460cb124..a460cb124 100644
--- a/src/PlaylistMapper.hxx
+++ b/src/playlist/PlaylistMapper.hxx
diff --git a/src/PlaylistPlugin.hxx b/src/playlist/PlaylistPlugin.hxx
index d3c44f1f4..d3c44f1f4 100644
--- a/src/PlaylistPlugin.hxx
+++ b/src/playlist/PlaylistPlugin.hxx
diff --git a/src/PlaylistQueue.cxx b/src/playlist/PlaylistQueue.cxx
index 0a45920e3..0a45920e3 100644
--- a/src/PlaylistQueue.cxx
+++ b/src/playlist/PlaylistQueue.cxx
diff --git a/src/PlaylistQueue.hxx b/src/playlist/PlaylistQueue.hxx
index 075191ced..075191ced 100644
--- a/src/PlaylistQueue.hxx
+++ b/src/playlist/PlaylistQueue.hxx
diff --git a/src/PlaylistRegistry.cxx b/src/playlist/PlaylistRegistry.cxx
index 2fd3a71a6..94244f14c 100644
--- a/src/PlaylistRegistry.cxx
+++ b/src/playlist/PlaylistRegistry.cxx
@@ -20,16 +20,16 @@
#include "config.h"
#include "PlaylistRegistry.hxx"
#include "PlaylistPlugin.hxx"
-#include "playlist/ExtM3uPlaylistPlugin.hxx"
-#include "playlist/M3uPlaylistPlugin.hxx"
-#include "playlist/XspfPlaylistPlugin.hxx"
-#include "playlist/DespotifyPlaylistPlugin.hxx"
-#include "playlist/SoundCloudPlaylistPlugin.hxx"
-#include "playlist/PlsPlaylistPlugin.hxx"
-#include "playlist/AsxPlaylistPlugin.hxx"
-#include "playlist/RssPlaylistPlugin.hxx"
-#include "playlist/CuePlaylistPlugin.hxx"
-#include "playlist/EmbeddedCuePlaylistPlugin.hxx"
+#include "plugins/ExtM3uPlaylistPlugin.hxx"
+#include "plugins/M3uPlaylistPlugin.hxx"
+#include "plugins/XspfPlaylistPlugin.hxx"
+#include "plugins/DespotifyPlaylistPlugin.hxx"
+#include "plugins/SoundCloudPlaylistPlugin.hxx"
+#include "plugins/PlsPlaylistPlugin.hxx"
+#include "plugins/AsxPlaylistPlugin.hxx"
+#include "plugins/RssPlaylistPlugin.hxx"
+#include "plugins/CuePlaylistPlugin.hxx"
+#include "plugins/EmbeddedCuePlaylistPlugin.hxx"
#include "InputStream.hxx"
#include "util/UriUtil.hxx"
#include "util/StringUtil.hxx"
diff --git a/src/PlaylistRegistry.hxx b/src/playlist/PlaylistRegistry.hxx
index 0079fa68e..0079fa68e 100644
--- a/src/PlaylistRegistry.hxx
+++ b/src/playlist/PlaylistRegistry.hxx
diff --git a/src/PlaylistSong.cxx b/src/playlist/PlaylistSong.cxx
index bcbdc30be..bcbdc30be 100644
--- a/src/PlaylistSong.cxx
+++ b/src/playlist/PlaylistSong.cxx
diff --git a/src/PlaylistSong.hxx b/src/playlist/PlaylistSong.hxx
index 2a47b28db..2a47b28db 100644
--- a/src/PlaylistSong.hxx
+++ b/src/playlist/PlaylistSong.hxx
diff --git a/src/playlist/Print.cxx b/src/playlist/Print.cxx
new file mode 100644
index 000000000..7f13d5544
--- /dev/null
+++ b/src/playlist/Print.cxx
@@ -0,0 +1,71 @@
+/*
+ * Copyright (C) 2003-2014 The Music Player Daemon Project
+ * http://www.musicpd.org
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#include "config.h"
+#include "Print.hxx"
+#include "PlaylistAny.hxx"
+#include "PlaylistSong.hxx"
+#include "SongEnumerator.hxx"
+#include "SongPrint.hxx"
+#include "InputStream.hxx"
+#include "DetachedSong.hxx"
+#include "fs/Traits.hxx"
+#include "thread/Cond.hxx"
+
+static void
+playlist_provider_print(Client &client, const char *uri,
+ SongEnumerator &e, bool detail)
+{
+ const std::string base_uri = uri != nullptr
+ ? PathTraitsUTF8::GetParent(uri)
+ : std::string(".");
+
+ DetachedSong *song;
+ while ((song = e.NextSong()) != nullptr) {
+ if (playlist_check_translate_song(*song, base_uri.c_str(),
+ false)) {
+ if (detail)
+ song_print_info(client, *song);
+ else
+ song_print_uri(client, *song);
+ }
+
+ delete song;
+ }
+}
+
+bool
+playlist_file_print(Client &client, const char *uri, bool detail)
+{
+ Mutex mutex;
+ Cond cond;
+
+ InputStream *is;
+ SongEnumerator *playlist = playlist_open_any(uri, mutex, cond, &is);
+ if (playlist == nullptr)
+ return false;
+
+ playlist_provider_print(client, uri, *playlist, detail);
+ delete playlist;
+
+ if (is != nullptr)
+ is->Close();
+
+ return true;
+}
diff --git a/src/playlist/Print.hxx b/src/playlist/Print.hxx
new file mode 100644
index 000000000..c2fff5475
--- /dev/null
+++ b/src/playlist/Print.hxx
@@ -0,0 +1,36 @@
+/*
+ * Copyright (C) 2003-2014 The Music Player Daemon Project
+ * http://www.musicpd.org
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#ifndef MPD_PLAYLIST__PRINT_HXX
+#define MPD_PLAYLIST__PRINT_HXX
+
+class Client;
+
+/**
+ * Send the playlist file to the client.
+ *
+ * @param client the client which requested the playlist
+ * @param uri the URI of the playlist file in UTF-8 encoding
+ * @param detail true if all details should be printed
+ * @return true on success, false if the playlist does not exist
+ */
+bool
+playlist_file_print(Client &client, const char *uri, bool detail);
+
+#endif
diff --git a/src/SongEnumerator.hxx b/src/playlist/SongEnumerator.hxx
index 75295add1..75295add1 100644
--- a/src/SongEnumerator.hxx
+++ b/src/playlist/SongEnumerator.hxx
diff --git a/src/playlist/AsxPlaylistPlugin.cxx b/src/playlist/plugins/AsxPlaylistPlugin.cxx
index 24eb26077..5434c8e85 100644
--- a/src/playlist/AsxPlaylistPlugin.cxx
+++ b/src/playlist/plugins/AsxPlaylistPlugin.cxx
@@ -19,8 +19,8 @@
#include "config.h"
#include "AsxPlaylistPlugin.hxx"
-#include "PlaylistPlugin.hxx"
-#include "MemorySongEnumerator.hxx"
+#include "../PlaylistPlugin.hxx"
+#include "../MemorySongEnumerator.hxx"
#include "tag/TagBuilder.hxx"
#include "util/ASCII.hxx"
#include "util/Error.hxx"
diff --git a/src/playlist/AsxPlaylistPlugin.hxx b/src/playlist/plugins/AsxPlaylistPlugin.hxx
index 63371be0f..63371be0f 100644
--- a/src/playlist/AsxPlaylistPlugin.hxx
+++ b/src/playlist/plugins/AsxPlaylistPlugin.hxx
diff --git a/src/playlist/CuePlaylistPlugin.cxx b/src/playlist/plugins/CuePlaylistPlugin.cxx
index 505c0c5d8..d52d41c07 100644
--- a/src/playlist/CuePlaylistPlugin.cxx
+++ b/src/playlist/plugins/CuePlaylistPlugin.cxx
@@ -19,8 +19,8 @@
#include "config.h"
#include "CuePlaylistPlugin.hxx"
-#include "PlaylistPlugin.hxx"
-#include "SongEnumerator.hxx"
+#include "../PlaylistPlugin.hxx"
+#include "../SongEnumerator.hxx"
#include "cue/CueParser.hxx"
#include "TextInputStream.hxx"
diff --git a/src/playlist/CuePlaylistPlugin.hxx b/src/playlist/plugins/CuePlaylistPlugin.hxx
index 4d833bfc2..4d833bfc2 100644
--- a/src/playlist/CuePlaylistPlugin.hxx
+++ b/src/playlist/plugins/CuePlaylistPlugin.hxx
diff --git a/src/playlist/DespotifyPlaylistPlugin.cxx b/src/playlist/plugins/DespotifyPlaylistPlugin.cxx
index 7d73a64bc..1e8de0130 100644
--- a/src/playlist/DespotifyPlaylistPlugin.cxx
+++ b/src/playlist/plugins/DespotifyPlaylistPlugin.cxx
@@ -20,8 +20,8 @@
#include "config.h"
#include "DespotifyPlaylistPlugin.hxx"
#include "DespotifyUtils.hxx"
-#include "PlaylistPlugin.hxx"
-#include "MemorySongEnumerator.hxx"
+#include "../PlaylistPlugin.hxx"
+#include "../MemorySongEnumerator.hxx"
#include "tag/Tag.hxx"
#include "DetachedSong.hxx"
#include "Log.hxx"
diff --git a/src/playlist/DespotifyPlaylistPlugin.hxx b/src/playlist/plugins/DespotifyPlaylistPlugin.hxx
index 6acfd40f4..6acfd40f4 100644
--- a/src/playlist/DespotifyPlaylistPlugin.hxx
+++ b/src/playlist/plugins/DespotifyPlaylistPlugin.hxx
diff --git a/src/playlist/EmbeddedCuePlaylistPlugin.cxx b/src/playlist/plugins/EmbeddedCuePlaylistPlugin.cxx
index 4d9eb4b9b..53f3feda0 100644
--- a/src/playlist/EmbeddedCuePlaylistPlugin.cxx
+++ b/src/playlist/plugins/EmbeddedCuePlaylistPlugin.cxx
@@ -25,8 +25,8 @@
#include "config.h"
#include "EmbeddedCuePlaylistPlugin.hxx"
-#include "PlaylistPlugin.hxx"
-#include "SongEnumerator.hxx"
+#include "../PlaylistPlugin.hxx"
+#include "../SongEnumerator.hxx"
#include "tag/TagHandler.hxx"
#include "tag/TagId3.hxx"
#include "tag/ApeTag.hxx"
diff --git a/src/playlist/EmbeddedCuePlaylistPlugin.hxx b/src/playlist/plugins/EmbeddedCuePlaylistPlugin.hxx
index 5eedf3f13..5eedf3f13 100644
--- a/src/playlist/EmbeddedCuePlaylistPlugin.hxx
+++ b/src/playlist/plugins/EmbeddedCuePlaylistPlugin.hxx
diff --git a/src/playlist/ExtM3uPlaylistPlugin.cxx b/src/playlist/plugins/ExtM3uPlaylistPlugin.cxx
index 1a975c081..ac27fb136 100644
--- a/src/playlist/ExtM3uPlaylistPlugin.cxx
+++ b/src/playlist/plugins/ExtM3uPlaylistPlugin.cxx
@@ -19,8 +19,8 @@
#include "config.h"
#include "ExtM3uPlaylistPlugin.hxx"
-#include "PlaylistPlugin.hxx"
-#include "SongEnumerator.hxx"
+#include "../PlaylistPlugin.hxx"
+#include "../SongEnumerator.hxx"
#include "DetachedSong.hxx"
#include "tag/Tag.hxx"
#include "tag/TagBuilder.hxx"
diff --git a/src/playlist/ExtM3uPlaylistPlugin.hxx b/src/playlist/plugins/ExtM3uPlaylistPlugin.hxx
index 5743ded43..5743ded43 100644
--- a/src/playlist/ExtM3uPlaylistPlugin.hxx
+++ b/src/playlist/plugins/ExtM3uPlaylistPlugin.hxx
diff --git a/src/playlist/M3uPlaylistPlugin.cxx b/src/playlist/plugins/M3uPlaylistPlugin.cxx
index fe7d8a17f..a87e3edc7 100644
--- a/src/playlist/M3uPlaylistPlugin.cxx
+++ b/src/playlist/plugins/M3uPlaylistPlugin.cxx
@@ -19,8 +19,8 @@
#include "config.h"
#include "M3uPlaylistPlugin.hxx"
-#include "PlaylistPlugin.hxx"
-#include "SongEnumerator.hxx"
+#include "../PlaylistPlugin.hxx"
+#include "../SongEnumerator.hxx"
#include "DetachedSong.hxx"
#include "util/StringUtil.hxx"
#include "TextInputStream.hxx"
diff --git a/src/playlist/M3uPlaylistPlugin.hxx b/src/playlist/plugins/M3uPlaylistPlugin.hxx
index f1ad14069..f1ad14069 100644
--- a/src/playlist/M3uPlaylistPlugin.hxx
+++ b/src/playlist/plugins/M3uPlaylistPlugin.hxx
diff --git a/src/playlist/PlsPlaylistPlugin.cxx b/src/playlist/plugins/PlsPlaylistPlugin.cxx
index 839098a73..0abd7172b 100644
--- a/src/playlist/PlsPlaylistPlugin.cxx
+++ b/src/playlist/plugins/PlsPlaylistPlugin.cxx
@@ -19,8 +19,8 @@
#include "config.h"
#include "PlsPlaylistPlugin.hxx"
-#include "PlaylistPlugin.hxx"
-#include "MemorySongEnumerator.hxx"
+#include "../PlaylistPlugin.hxx"
+#include "../MemorySongEnumerator.hxx"
#include "InputStream.hxx"
#include "DetachedSong.hxx"
#include "tag/TagBuilder.hxx"
diff --git a/src/playlist/PlsPlaylistPlugin.hxx b/src/playlist/plugins/PlsPlaylistPlugin.hxx
index 1a3f33873..1a3f33873 100644
--- a/src/playlist/PlsPlaylistPlugin.hxx
+++ b/src/playlist/plugins/PlsPlaylistPlugin.hxx
diff --git a/src/playlist/RssPlaylistPlugin.cxx b/src/playlist/plugins/RssPlaylistPlugin.cxx
index 550a4630e..076d82f14 100644
--- a/src/playlist/RssPlaylistPlugin.cxx
+++ b/src/playlist/plugins/RssPlaylistPlugin.cxx
@@ -19,8 +19,8 @@
#include "config.h"
#include "RssPlaylistPlugin.hxx"
-#include "PlaylistPlugin.hxx"
-#include "MemorySongEnumerator.hxx"
+#include "../PlaylistPlugin.hxx"
+#include "../MemorySongEnumerator.hxx"
#include "tag/TagBuilder.hxx"
#include "util/ASCII.hxx"
#include "util/Error.hxx"
diff --git a/src/playlist/RssPlaylistPlugin.hxx b/src/playlist/plugins/RssPlaylistPlugin.hxx
index a00a5a898..a00a5a898 100644
--- a/src/playlist/RssPlaylistPlugin.hxx
+++ b/src/playlist/plugins/RssPlaylistPlugin.hxx
diff --git a/src/playlist/SoundCloudPlaylistPlugin.cxx b/src/playlist/plugins/SoundCloudPlaylistPlugin.cxx
index bf68acd3b..fac052d19 100644
--- a/src/playlist/SoundCloudPlaylistPlugin.cxx
+++ b/src/playlist/plugins/SoundCloudPlaylistPlugin.cxx
@@ -19,8 +19,8 @@
#include "config.h"
#include "SoundCloudPlaylistPlugin.hxx"
-#include "PlaylistPlugin.hxx"
-#include "MemorySongEnumerator.hxx"
+#include "../PlaylistPlugin.hxx"
+#include "../MemorySongEnumerator.hxx"
#include "ConfigData.hxx"
#include "InputStream.hxx"
#include "tag/TagBuilder.hxx"
diff --git a/src/playlist/SoundCloudPlaylistPlugin.hxx b/src/playlist/plugins/SoundCloudPlaylistPlugin.hxx
index b355b477a..b355b477a 100644
--- a/src/playlist/SoundCloudPlaylistPlugin.hxx
+++ b/src/playlist/plugins/SoundCloudPlaylistPlugin.hxx
diff --git a/src/playlist/XspfPlaylistPlugin.cxx b/src/playlist/plugins/XspfPlaylistPlugin.cxx
index e726ad338..12888b3bc 100644
--- a/src/playlist/XspfPlaylistPlugin.cxx
+++ b/src/playlist/plugins/XspfPlaylistPlugin.cxx
@@ -19,8 +19,8 @@
#include "config.h"
#include "XspfPlaylistPlugin.hxx"
-#include "PlaylistPlugin.hxx"
-#include "MemorySongEnumerator.hxx"
+#include "../PlaylistPlugin.hxx"
+#include "../MemorySongEnumerator.hxx"
#include "DetachedSong.hxx"
#include "InputStream.hxx"
#include "tag/TagBuilder.hxx"
diff --git a/src/playlist/XspfPlaylistPlugin.hxx b/src/playlist/plugins/XspfPlaylistPlugin.hxx
index 6b08a6be6..6b08a6be6 100644
--- a/src/playlist/XspfPlaylistPlugin.hxx
+++ b/src/playlist/plugins/XspfPlaylistPlugin.hxx
diff --git a/test/dump_playlist.cxx b/test/dump_playlist.cxx
index bc8741e1b..a5a54e22c 100644
--- a/test/dump_playlist.cxx
+++ b/test/dump_playlist.cxx
@@ -20,14 +20,14 @@
#include "config.h"
#include "TagSave.hxx"
#include "DetachedSong.hxx"
-#include "SongEnumerator.hxx"
+#include "playlist/SongEnumerator.hxx"
#include "InputStream.hxx"
#include "ConfigGlobal.hxx"
#include "DecoderList.hxx"
#include "InputInit.hxx"
#include "IOThread.hxx"
-#include "PlaylistRegistry.hxx"
-#include "PlaylistPlugin.hxx"
+#include "playlist/PlaylistRegistry.hxx"
+#include "playlist/PlaylistPlugin.hxx"
#include "fs/Path.hxx"
#include "util/Error.hxx"
#include "thread/Cond.hxx"
diff --git a/test/test_translate_song.cxx b/test/test_translate_song.cxx
index 6e56e68e5..fcda35f13 100644
--- a/test/test_translate_song.cxx
+++ b/test/test_translate_song.cxx
@@ -3,7 +3,7 @@
*/
#include "config.h"
-#include "PlaylistSong.hxx"
+#include "playlist/PlaylistSong.hxx"
#include "DetachedSong.hxx"
#include "tag/TagBuilder.hxx"
#include "tag/Tag.hxx"