diff options
author | Max Kellermann <max@duempel.org> | 2012-08-15 23:28:19 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2012-08-16 00:04:14 +0200 |
commit | 3b8532f3fb379c7ecc6b64eecbbf9c824d18e875 (patch) | |
tree | 3313a43df3f120b74166749fdd75b07fa89846ba /src/db/SimpleDatabasePlugin.hxx | |
parent | f45616e5f6f7d6aa0fb5ca90a0599eacddf1166b (diff) |
DatabasePlugin: add method ReturnSong()
Allow the plugin to allocate the GetSong() return value.
Diffstat (limited to 'src/db/SimpleDatabasePlugin.hxx')
-rw-r--r-- | src/db/SimpleDatabasePlugin.hxx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/db/SimpleDatabasePlugin.hxx b/src/db/SimpleDatabasePlugin.hxx index 7e3f5d2d..2ea5c492 100644 --- a/src/db/SimpleDatabasePlugin.hxx +++ b/src/db/SimpleDatabasePlugin.hxx @@ -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, |