From c064e8d62f0d2b46159570f21708c2546970718d Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 22 Nov 2013 00:35:29 +0100 Subject: DatabasePlugin: add method GetUpdateStamp() Refactor SimpleDatabase::GetLastModified() to be generic for all plugins. Remove the SimpleDatabase assumption from db_stats_print(), allowing it to be implemented by all database plugins. --- src/db/SimpleDatabasePlugin.hxx | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'src/db/SimpleDatabasePlugin.hxx') diff --git a/src/db/SimpleDatabasePlugin.hxx b/src/db/SimpleDatabasePlugin.hxx index 24e150a97..dfe981dd8 100644 --- a/src/db/SimpleDatabasePlugin.hxx +++ b/src/db/SimpleDatabasePlugin.hxx @@ -26,8 +26,6 @@ #include -#include - struct Directory; class SimpleDatabase : public Database { @@ -55,11 +53,6 @@ public: bool Save(Error &error); - gcc_pure - time_t GetLastModified() const { - return mtime; - } - static Database *Create(const config_param ¶m, Error &error); @@ -85,6 +78,10 @@ public: DatabaseStats &stats, Error &error) const override; + virtual time_t GetUpdateStamp() const override { + return mtime; + } + protected: bool Configure(const config_param ¶m, Error &error); -- cgit v1.2.3