db/Interface: add virtual method Update()

For database plugins that don't use the UpdateService.
This commit is contained in:
Max Kellermann
2014-07-29 23:14:25 +02:00
parent 0c47685e02
commit aa0f06d6b7
2 changed files with 36 additions and 0 deletions

View File

@@ -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.