From ca36ac2ba196ee2bbe4b54ee9a71d49174803277 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sun, 2 Feb 2014 14:37:52 +0100 Subject: SongLoader: new class that merges duplicate code There was quite a lot of duplicate code for loading DetachedSong objects, with different semantics for "securely" loading local files. --- src/playlist/PlaylistSong.hxx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/playlist/PlaylistSong.hxx') diff --git a/src/playlist/PlaylistSong.hxx b/src/playlist/PlaylistSong.hxx index 2a47b28db..278df46a8 100644 --- a/src/playlist/PlaylistSong.hxx +++ b/src/playlist/PlaylistSong.hxx @@ -20,18 +20,17 @@ #ifndef MPD_PLAYLIST_SONG_HXX #define MPD_PLAYLIST_SONG_HXX +class SongLoader; class DetachedSong; /** * Verifies the song, returns false if it is unsafe. Translate the * song to a song within the database, if it is a local file. * - * @param secure if true, then local files are only allowed if they - * are relative to base_uri * @return true on success, false if the song should not be used */ bool playlist_check_translate_song(DetachedSong &song, const char *base_uri, - bool secure); + const SongLoader &loader); #endif -- cgit v1.2.3