From 3b8532f3fb379c7ecc6b64eecbbf9c824d18e875 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 15 Aug 2012 23:28:19 +0200 Subject: DatabasePlugin: add method ReturnSong() Allow the plugin to allocate the GetSong() return value. --- src/DatabasePlugin.hxx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/DatabasePlugin.hxx') diff --git a/src/DatabasePlugin.hxx b/src/DatabasePlugin.hxx index 37df7f65..a175b3cd 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) @@ -93,6 +94,12 @@ public: virtual struct song *GetSong(const char *uri_utf8, 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. */ -- cgit v1.2.3