From c13810ebaa7075284691eb2add089ba407dfd1ea Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 7 Feb 2014 00:29:07 +0100 Subject: Mapper: move map_song_detach() to db/DatabaseSong.cxx Use Storage::MapUTF8() internally, don't use global variables. --- src/db/DatabaseSong.hxx | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'src/db/DatabaseSong.hxx') diff --git a/src/db/DatabaseSong.hxx b/src/db/DatabaseSong.hxx index 1197068bc..4daaf4047 100644 --- a/src/db/DatabaseSong.hxx +++ b/src/db/DatabaseSong.hxx @@ -22,10 +22,20 @@ #include "Compiler.h" +struct LightSong; class Database; +class Storage; class DetachedSong; class Error; +/** + * "Detach" the #Song object, i.e. convert it to a #DetachedSong + * instance. + */ +gcc_pure +DetachedSong +DatabaseDetachSong(const Storage &storage, const LightSong &song); + /** * Look up a song in the database and convert it to a #DetachedSong * instance. The caller is responsible for freeing it. @@ -34,6 +44,7 @@ class Error; */ gcc_malloc gcc_nonnull_all DetachedSong * -DatabaseDetachSong(const Database &db, const char *uri, Error &error); +DatabaseDetachSong(const Database &db, const Storage &storage, const char *uri, + Error &error); #endif -- cgit v1.2.3