Function notmuch_sys::notmuch_database_upgrade
[−]
[src]
pub unsafe extern "C" fn notmuch_database_upgrade(
database: *mut notmuch_database_t,
progress_notify: Option<extern "C" fn(closure: *mut c_void, progress: c_double)>,
closure: *mut c_void
) -> notmuch_status_t
Upgrade the current database to the latest supported version.
This ensures that all current notmuch functionality will be
available on the database. After opening a database in read-write
mode, it is recommended that clients check if an upgrade is needed
(notmuch_database_needs_upgrade
) and if so, upgrade with this
function before making any modifications. If
notmuch_database_needs_upgrade
returns FALSE, this will be a no-op.
The optional progress_notify callback can be used by the caller to provide progress indication to the user. If non-NULL it will be called periodically with 'progress' as a floating-point value in the range of [0.0 .. 1.0] indicating the progress made so far in the upgrade process. The argument 'closure' is passed verbatim to any callback invoked.