aboutsummaryrefslogtreecommitdiffstats
path: root/src/DatabaseGlue.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-11-22 00:35:29 +0100
committerMax Kellermann <max@duempel.org>2013-11-22 00:35:29 +0100
commitc064e8d62f0d2b46159570f21708c2546970718d (patch)
tree42a242cec63c5c07c770db22552e77ddd1ee8a8d /src/DatabaseGlue.cxx
parent099a2cb586524cf49dd3a9a0107ce003fd2e27e5 (diff)
downloadmpd-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/DatabaseGlue.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/DatabaseGlue.cxx b/src/DatabaseGlue.cxx
index e84503713..013a3e329 100644
--- a/src/DatabaseGlue.cxx
+++ b/src/DatabaseGlue.cxx
@@ -148,12 +148,12 @@ DatabaseGlobalOpen(Error &error)
return true;
}
-time_t
-db_get_mtime(void)
+bool
+db_exists()
{
assert(db != nullptr);
assert(db_is_open);
assert(db_is_simple());
- return ((SimpleDatabase *)db)->GetLastModified();
+ return ((SimpleDatabase *)db)->GetUpdateStamp() > 0;
}