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

@@ -38,6 +38,10 @@ class SimpleDatabase : public Database {
time_t mtime;
#ifndef NDEBUG
unsigned borrowed_song_count;
#endif
public:
gcc_pure
struct directory *GetRoot() {
@@ -61,6 +65,8 @@ public:
virtual struct song *GetSong(const char *uri_utf8,
GError **error_r) const override;
virtual void ReturnSong(struct song *song) const;
virtual bool Visit(const DatabaseSelection &selection,
VisitDirectory visit_directory,
VisitSong visit_song,