diff options
author | Max Kellermann <max@duempel.org> | 2013-11-22 00:35:29 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2013-11-22 00:35:29 +0100 |
commit | c064e8d62f0d2b46159570f21708c2546970718d (patch) | |
tree | 42a242cec63c5c07c770db22552e77ddd1ee8a8d /src/DatabasePlugin.hxx | |
parent | 099a2cb586524cf49dd3a9a0107ce003fd2e27e5 (diff) | |
download | mpd-c064e8d62f0d2b46159570f21708c2546970718d.tar.gz mpd-c064e8d62f0d2b46159570f21708c2546970718d.tar.xz mpd-c064e8d62f0d2b46159570f21708c2546970718d.zip |
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.
Diffstat (limited to '')
-rw-r--r-- | src/DatabasePlugin.hxx | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/DatabasePlugin.hxx b/src/DatabasePlugin.hxx index 629dff329..ccf899389 100644 --- a/src/DatabasePlugin.hxx +++ b/src/DatabasePlugin.hxx @@ -30,6 +30,8 @@ #include "tag/TagType.h" #include "Compiler.h" +#include <time.h> + struct config_param; struct DatabaseSelection; struct db_visitor; @@ -132,6 +134,13 @@ public: virtual bool GetStats(const DatabaseSelection &selection, DatabaseStats &stats, Error &error) const = 0; + + /** + * Returns the time stamp of the last database update. + * Returns 0 if that is not not known/available. + */ + gcc_pure + virtual time_t GetUpdateStamp() const = 0; }; struct DatabasePlugin { |