aboutsummaryrefslogtreecommitdiffstats
path: root/src/DatabasePlugin.hxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2012-08-15 23:28:19 +0200
committerMax Kellermann <max@duempel.org>2012-08-16 00:04:14 +0200
commit3b8532f3fb379c7ecc6b64eecbbf9c824d18e875 (patch)
tree3313a43df3f120b74166749fdd75b07fa89846ba /src/DatabasePlugin.hxx
parentf45616e5f6f7d6aa0fb5ca90a0599eacddf1166b (diff)
downloadmpd-3b8532f3fb379c7ecc6b64eecbbf9c824d18e875.tar.gz
mpd-3b8532f3fb379c7ecc6b64eecbbf9c824d18e875.tar.xz
mpd-3b8532f3fb379c7ecc6b64eecbbf9c824d18e875.zip
DatabasePlugin: add method ReturnSong()
Allow the plugin to allocate the GetSong() return value.
Diffstat (limited to '')
-rw-r--r--src/DatabasePlugin.hxx9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/DatabasePlugin.hxx b/src/DatabasePlugin.hxx
index 37df7f654..a175b3cd9 100644
--- a/src/DatabasePlugin.hxx
+++ b/src/DatabasePlugin.hxx
@@ -85,7 +85,8 @@ public:
virtual void Close() {}
/**
- * Look up a song (including tag data) in the database.
+ * Look up a song (including tag data) in the database. When
+ * you don't need this anymore, call ReturnSong().
*
* @param uri_utf8 the URI of the song within the music
* directory (UTF-8)
@@ -94,6 +95,12 @@ public:
GError **error_r) const = 0;
/**
+ * Mark the song object as "unused". Call this on objects
+ * returned by GetSong().
+ */
+ virtual void ReturnSong(struct song *song) const = 0;
+
+ /**
* Visit the selected entities.
*/
virtual bool Visit(const DatabaseSelection &selection,