aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/notmuch.h
diff options
context:
space:
mode:
authorGravatar Carl Worth <cworth@cworth.org>2010-01-09 17:38:23 -0800
committerGravatar Carl Worth <cworth@cworth.org>2010-01-09 17:38:23 -0800
commitc340c1bd1140c0a1b7e0f24ef3ebac806f5fc3e6 (patch)
treef9b2fa23adbe5b62812a87327704d141fe7247fc /lib/notmuch.h
parentccf2e0cc4211c276da1db43cdca7ee11018c391d (diff)
notmuch new: Print upgrade progress report as a percentage.
Previously we were printing a number of messages upgraded so far. The original motivation for this was to accurately reflect the fact that there are two passes, (so each message is processed twice and it's not accurate to represent with a single count). But as it turns out, the second pass takes zero time (relatively speaking) so we're still not accounting for it. If nothing else, the percentage-based reporting makes for a cleaner API for the progress_notify function.
Diffstat (limited to 'lib/notmuch.h')
-rw-r--r--lib/notmuch.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/notmuch.h b/lib/notmuch.h
index d8508dfd..15c9db40 100644
--- a/lib/notmuch.h
+++ b/lib/notmuch.h
@@ -204,15 +204,14 @@ notmuch_database_needs_upgrade (notmuch_database_t *database);
*
* 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 'count' as the number of messages upgraded
- * so far and 'total' the overall number of messages that will be
- * converted.
+ * 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.
*/
notmuch_status_t
notmuch_database_upgrade (notmuch_database_t *database,
void (*progress_notify) (void *closure,
- unsigned int count,
- unsigned int total),
+ double progress),
void *closure);
/* Retrieve a directory object from the database for 'path'.