dovecot-2.0: lib-index: Added mail_index_sync_has_expunges()

dovecot at dovecot.org dovecot at dovecot.org
Mon Jun 28 18:31:45 EEST 2010


details:   http://hg.dovecot.org/dovecot-2.0/rev/b2aca3e50f44
changeset: 11646:b2aca3e50f44
user:      Timo Sirainen <tss at iki.fi>
date:      Mon Jun 28 16:31:39 2010 +0100
description:
lib-index: Added mail_index_sync_has_expunges()

diffstat:

 src/lib-index/mail-index-sync.c |  6 ++++++
 src/lib-index/mail-index.h      |  2 ++
 2 files changed, 8 insertions(+), 0 deletions(-)

diffs (28 lines):

diff -r f4238836c566 -r b2aca3e50f44 src/lib-index/mail-index-sync.c
--- a/src/lib-index/mail-index-sync.c	Mon Jun 28 16:25:35 2010 +0100
+++ b/src/lib-index/mail-index-sync.c	Mon Jun 28 16:31:39 2010 +0100
@@ -496,6 +496,12 @@
 	return 1;
 }
 
+bool mail_index_sync_has_expunges(struct mail_index_sync_ctx *ctx)
+{
+	return array_is_created(&ctx->sync_trans->expunges) &&
+		array_count(&ctx->sync_trans->expunges) > 0;
+}
+
 static bool mail_index_sync_view_have_any(struct mail_index_view *view,
 					  enum mail_index_sync_flags flags)
 {
diff -r f4238836c566 -r b2aca3e50f44 src/lib-index/mail-index.h
--- a/src/lib-index/mail-index.h	Mon Jun 28 16:25:35 2010 +0100
+++ b/src/lib-index/mail-index.h	Mon Jun 28 16:31:39 2010 +0100
@@ -340,6 +340,8 @@
 			  struct mail_index_sync_rec *sync_rec);
 /* Returns TRUE if there's more to sync. */
 bool mail_index_sync_have_more(struct mail_index_sync_ctx *ctx);
+/* Returns TRUE if sync has any expunges to handle. */
+bool mail_index_sync_has_expunges(struct mail_index_sync_ctx *ctx);
 /* Reset syncing to initial state after mail_index_sync_begin(), so you can
    go through all the sync records again with mail_index_sync_next(). */
 void mail_index_sync_reset(struct mail_index_sync_ctx *ctx);


More information about the dovecot-cvs mailing list