From aa0f06d6b712b1fe40536714ecdb2dd968417be3 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 29 Jul 2014 23:14:25 +0200 Subject: db/Interface: add virtual method Update() For database plugins that don't use the UpdateService. --- src/db/Interface.hxx | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/db/Interface.hxx') diff --git a/src/db/Interface.hxx b/src/db/Interface.hxx index 5fc9265e2..152928c79 100644 --- a/src/db/Interface.hxx +++ b/src/db/Interface.hxx @@ -115,6 +115,18 @@ public: DatabaseStats &stats, Error &error) const = 0; + /** + * Update the database. Returns the job id on success, 0 on + * error (with #Error set) and 0 if not implemented (#Error + * not set). + */ + virtual unsigned Update(gcc_unused const char *uri_utf8, + gcc_unused bool discard, + gcc_unused Error &error) { + /* not implemented: return 0 and don't set an Error */ + return 0; + } + /** * Returns the time stamp of the last database update. * Returns 0 if that is not not known/available. -- cgit v1.2.3