aboutsummaryrefslogtreecommitdiff
path: root/src/db/SimpleDatabasePlugin.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/db/SimpleDatabasePlugin.hxx
parentf45616e5f6f7d6aa0fb5ca90a0599eacddf1166b (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.hxx6
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,