summaryrefslogtreecommitdiff
path: root/src/db/DatabaseSong.hxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-02-07 00:29:07 +0100
committerMax Kellermann <max@duempel.org>2014-02-07 00:42:14 +0100
commitc13810ebaa7075284691eb2add089ba407dfd1ea (patch)
tree1ebeb2104ee4a3e73f49416267aec2e79943821b /src/db/DatabaseSong.hxx
parent19a982cf693e660ce296a29a9830f1e94d9f1b4c (diff)
Mapper: move map_song_detach() to db/DatabaseSong.cxx
Use Storage::MapUTF8() internally, don't use global variables.
Diffstat (limited to 'src/db/DatabaseSong.hxx')
-rw-r--r--src/db/DatabaseSong.hxx13
1 files changed, 12 insertions, 1 deletions
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,11 +22,21 @@
#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