aboutsummaryrefslogtreecommitdiffstats
path: root/src/db/SimpleDatabasePlugin.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/db/SimpleDatabasePlugin.hxx')
-rw-r--r--src/db/SimpleDatabasePlugin.hxx19
1 files changed, 13 insertions, 6 deletions
diff --git a/src/db/SimpleDatabasePlugin.hxx b/src/db/SimpleDatabasePlugin.hxx
index dfe981dd8..509b91e4e 100644
--- a/src/db/SimpleDatabasePlugin.hxx
+++ b/src/db/SimpleDatabasePlugin.hxx
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2003-2013 The Music Player Daemon Project
+ * Copyright (C) 2003-2014 The Music Player Daemon Project
* http://www.musicpd.org
*
* This program is free software; you can redistribute it and/or modify
@@ -22,6 +22,7 @@
#include "DatabasePlugin.hxx"
#include "fs/AllocatedPath.hxx"
+#include "LightSong.hxx"
#include "Compiler.h"
#include <cassert>
@@ -36,8 +37,13 @@ class SimpleDatabase : public Database {
time_t mtime;
+ /**
+ * A buffer for GetSong().
+ */
+ mutable LightSong light_song;
+
#ifndef NDEBUG
- unsigned borrowed_song_count;
+ mutable unsigned borrowed_song_count;
#endif
SimpleDatabase()
@@ -53,15 +59,16 @@ public:
bool Save(Error &error);
- static Database *Create(const config_param &param,
+ static Database *Create(EventLoop &loop, DatabaseListener &listener,
+ const config_param &param,
Error &error);
virtual bool Open(Error &error) override;
virtual void Close() override;
- virtual Song *GetSong(const char *uri_utf8,
- Error &error) const override;
- virtual void ReturnSong(Song *song) const;
+ virtual const LightSong *GetSong(const char *uri_utf8,
+ Error &error) const override;
+ virtual void ReturnSong(const LightSong *song) const;
virtual bool Visit(const DatabaseSelection &selection,
VisitDirectory visit_directory,