DatabasePlugin: add method ReturnSong()

Allow the plugin to allocate the GetSong() return value.
This commit is contained in:
Max Kellermann
2012-08-15 23:28:19 +02:00
parent f45616e5f6
commit 3b8532f3fb
13 changed files with 85 additions and 14 deletions

View File

@@ -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.
*/