X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=lib%2Fnotmuch.h;h=8639b383f3352c2e7842fc47de94101b9f490860;hp=b1f5bfa161f77853b8c4e40a90605c6595e1ab91;hb=98ee460eaa98f1428aecf03dd39fcf314e6f62c0;hpb=7f57b747b95eece465d10fd0acba20cc3dd868f1 diff --git a/lib/notmuch.h b/lib/notmuch.h index b1f5bfa1..8639b383 100644 --- a/lib/notmuch.h +++ b/lib/notmuch.h @@ -467,6 +467,24 @@ notmuch_database_begin_atomic (notmuch_database_t *notmuch); notmuch_status_t notmuch_database_end_atomic (notmuch_database_t *notmuch); +/** + * Return the committed database revision and UUID. + * + * The database revision number increases monotonically with each + * commit to the database. Hence, all messages and message changes + * committed to the database (that is, visible to readers) have a last + * modification revision <= the committed database revision. Any + * messages committed in the future will be assigned a modification + * revision > the committed database revision. + * + * The UUID is a NUL-terminated opaque string that uniquely identifies + * this database. Two revision numbers are only comparable if they + * have the same database UUID. + */ +unsigned long +notmuch_database_get_revision (notmuch_database_t *notmuch, + const char **uuid); + /** * Retrieve a directory object from the database for 'path'. *