changeset 7653:f8e902acfbae HEAD

Renamed mailbox_get_uids() to mailbox_get_seq_range().
author Timo Sirainen <tss@iki.fi>
date Sat, 07 Jun 2008 01:06:28 +0300
parents 959fcc5e9068
children 1004a3555a03
files src/imap/imap-sync.c src/imap/imap-thread.c src/lib-storage/index/cydir/cydir-storage.c src/lib-storage/index/dbox/dbox-storage.c src/lib-storage/index/index-fetch.c src/lib-storage/index/index-storage.h src/lib-storage/index/maildir/maildir-storage.c src/lib-storage/index/mbox/mbox-storage.c src/lib-storage/index/raw/raw-storage.c src/lib-storage/mail-search.c src/lib-storage/mail-storage-private.h src/lib-storage/mail-storage.c src/lib-storage/mail-storage.h src/plugins/fts/fts-search.c src/plugins/fts/fts-storage.c src/plugins/lazy-expunge/lazy-expunge-plugin.c
diffstat 16 files changed, 32 insertions(+), 29 deletions(-) [+]
line wrap: on
line diff
--- a/src/imap/imap-sync.c	Sat Jun 07 00:56:02 2008 +0300
+++ b/src/imap/imap-sync.c	Sat Jun 07 01:06:28 2008 +0300
@@ -52,8 +52,8 @@
 		range = array_get(uids, &count);
 		t_array_init(&seqs, count);
 		for (i = 0; i < count; i++) {
-			mailbox_get_uids(box, range[i].seq1, range[i].seq2,
-					 &seq1, &seq2);
+			mailbox_get_seq_range(box, range[i].seq1, range[i].seq2,
+					      &seq1, &seq2);
 			/* since we have to notify about expunged messages,
 			   we expect that all the referenced UIDs exist */
 			i_assert(seq1 != 0);
--- a/src/imap/imap-thread.c	Sat Jun 07 00:56:02 2008 +0300
+++ b/src/imap/imap-thread.c	Sat Jun 07 01:06:28 2008 +0300
@@ -697,7 +697,7 @@
 		if (!ctx->id_is_uid)
 			seq = id;
 		else
-			mailbox_get_uids(ctx->box, id, id, &seq, &seq);
+			mailbox_get_seq_range(ctx->box, id, id, &seq, &seq);
 
 		if (seq != 0) {
 			mail_set_seq(ctx->mail, seq);
--- a/src/lib-storage/index/cydir/cydir-storage.c	Sat Jun 07 00:56:02 2008 +0300
+++ b/src/lib-storage/index/cydir/cydir-storage.c	Sat Jun 07 01:06:28 2008 +0300
@@ -430,7 +430,7 @@
 		index_transaction_rollback,
 		index_keywords_create,
 		index_keywords_free,
-		index_storage_get_uids,
+		index_storage_get_seq_range,
 		index_storage_get_expunged_uids,
 		index_mail_alloc,
 		index_header_lookup_init,
--- a/src/lib-storage/index/dbox/dbox-storage.c	Sat Jun 07 00:56:02 2008 +0300
+++ b/src/lib-storage/index/dbox/dbox-storage.c	Sat Jun 07 01:06:28 2008 +0300
@@ -679,7 +679,7 @@
 		index_transaction_rollback,
 		index_keywords_create,
 		index_keywords_free,
-		index_storage_get_uids,
+		index_storage_get_seq_range,
 		index_storage_get_expunged_uids,
 		dbox_mail_alloc,
 		index_header_lookup_init,
--- a/src/lib-storage/index/index-fetch.c	Sat Jun 07 00:56:02 2008 +0300
+++ b/src/lib-storage/index/index-fetch.c	Sat Jun 07 01:06:28 2008 +0300
@@ -6,9 +6,9 @@
 #include "index-storage.h"
 #include "index-mail.h"
 
-void index_storage_get_uids(struct mailbox *box,
-			    uint32_t uid1, uint32_t uid2,
-			    uint32_t *seq1_r, uint32_t *seq2_r)
+void index_storage_get_seq_range(struct mailbox *box,
+				 uint32_t uid1, uint32_t uid2,
+				 uint32_t *seq1_r, uint32_t *seq2_r)
 {
 	struct index_mailbox *ibox = (struct index_mailbox *)box;
 
--- a/src/lib-storage/index/index-storage.h	Sat Jun 07 00:56:02 2008 +0300
+++ b/src/lib-storage/index/index-storage.h	Sat Jun 07 01:06:28 2008 +0300
@@ -144,8 +144,9 @@
 void index_storage_get_status(struct mailbox *box,
 			      enum mailbox_status_items items,
 			      struct mailbox_status *status_r);
-void index_storage_get_uids(struct mailbox *box, uint32_t uid1, uint32_t uid2,
-			    uint32_t *seq1_r, uint32_t *seq2_r);
+void index_storage_get_seq_range(struct mailbox *box,
+				 uint32_t uid1, uint32_t uid2,
+				 uint32_t *seq1_r, uint32_t *seq2_r);
 bool index_storage_get_expunged_uids(struct mailbox *box, uint64_t modseq,
 				     const ARRAY_TYPE(seq_range) *uids,
 				     ARRAY_TYPE(seq_range) *expunged_uids);
--- a/src/lib-storage/index/maildir/maildir-storage.c	Sat Jun 07 00:56:02 2008 +0300
+++ b/src/lib-storage/index/maildir/maildir-storage.c	Sat Jun 07 01:06:28 2008 +0300
@@ -1037,7 +1037,7 @@
 		index_transaction_rollback,
 		index_keywords_create,
 		index_keywords_free,
-		index_storage_get_uids,
+		index_storage_get_seq_range,
 		index_storage_get_expunged_uids,
 		index_mail_alloc,
 		index_header_lookup_init,
--- a/src/lib-storage/index/mbox/mbox-storage.c	Sat Jun 07 00:56:02 2008 +0300
+++ b/src/lib-storage/index/mbox/mbox-storage.c	Sat Jun 07 01:06:28 2008 +0300
@@ -987,7 +987,7 @@
 		index_transaction_rollback,
 		index_keywords_create,
 		index_keywords_free,
-		index_storage_get_uids,
+		index_storage_get_seq_range,
 		index_storage_get_expunged_uids,
 		index_mail_alloc,
 		index_header_lookup_init,
--- a/src/lib-storage/index/raw/raw-storage.c	Sat Jun 07 00:56:02 2008 +0300
+++ b/src/lib-storage/index/raw/raw-storage.c	Sat Jun 07 01:06:28 2008 +0300
@@ -287,7 +287,7 @@
 		index_transaction_rollback,
 		index_keywords_create,
 		index_keywords_free,
-		index_storage_get_uids,
+		index_storage_get_seq_range,
 		index_storage_get_expunged_uids,
 		index_mail_alloc,
 		index_header_lookup_init,
--- a/src/lib-storage/mail-search.c	Sat Jun 07 00:56:02 2008 +0300
+++ b/src/lib-storage/mail-search.c	Sat Jun 07 01:06:28 2008 +0300
@@ -40,14 +40,16 @@
 	/* put them back to the range as sequences */
 	array_clear(&arg->value.seqset);
 	for (i = 0; i < count; i++) {
-		mailbox_get_uids(box, uids[i].seq1, uids[i].seq2, &seq1, &seq2);
+		mailbox_get_seq_range(box, uids[i].seq1, uids[i].seq2,
+				      &seq1, &seq2);
 		if (seq1 != 0) {
 			seq_range_array_add_range(&arg->value.seqset,
 						  seq1, seq2);
 		}
 		if (uids[i].seq2 == (uint32_t)-1) {
 			/* make sure the last message is in the range */
-			mailbox_get_uids(box, 1, (uint32_t)-1, &seq1, &seq2);
+			mailbox_get_seq_range(box, 1, (uint32_t)-1,
+					      &seq1, &seq2);
 			seq_range_array_add(&arg->value.seqset, 0, seq2);
 		}
 	}
--- a/src/lib-storage/mail-storage-private.h	Sat Jun 07 00:56:02 2008 +0300
+++ b/src/lib-storage/mail-storage-private.h	Sat Jun 07 01:06:28 2008 +0300
@@ -123,8 +123,8 @@
 			       bool skip_invalid);
 	void (*keywords_free)(struct mail_keywords *keywords);
 
-	void (*get_uids)(struct mailbox *box, uint32_t uid1, uint32_t uid2,
-			 uint32_t *seq1_r, uint32_t *seq2_r);
+	void (*get_seq_range)(struct mailbox *box, uint32_t uid1, uint32_t uid2,
+			      uint32_t *seq1_r, uint32_t *seq2_r);
 	bool (*get_expunged_uids)(struct mailbox *box, uint64_t modseq,
 				  const ARRAY_TYPE(seq_range) *uids,
 				  ARRAY_TYPE(seq_range) *expunged_uids);
--- a/src/lib-storage/mail-storage.c	Sat Jun 07 00:56:02 2008 +0300
+++ b/src/lib-storage/mail-storage.c	Sat Jun 07 01:06:28 2008 +0300
@@ -603,10 +603,10 @@
 	box->v.keywords_free(keywords);
 }
 
-void mailbox_get_uids(struct mailbox *box, uint32_t uid1, uint32_t uid2,
-		      uint32_t *seq1_r, uint32_t *seq2_r)
+void mailbox_get_seq_range(struct mailbox *box, uint32_t uid1, uint32_t uid2,
+			   uint32_t *seq1_r, uint32_t *seq2_r)
 {
-	box->v.get_uids(box, uid1, uid2, seq1_r, seq2_r);
+	box->v.get_seq_range(box, uid1, uid2, seq1_r, seq2_r);
 }
 
 bool mailbox_get_expunged_uids(struct mailbox *box, uint64_t modseq,
--- a/src/lib-storage/mail-storage.h	Sat Jun 07 00:56:02 2008 +0300
+++ b/src/lib-storage/mail-storage.h	Sat Jun 07 01:06:28 2008 +0300
@@ -366,8 +366,8 @@
 			   struct mail_keywords **keywords);
 
 /* Convert uid range to sequence range. */
-void mailbox_get_uids(struct mailbox *box, uint32_t uid1, uint32_t uid2,
-		      uint32_t *seq1_r, uint32_t *seq2_r);
+void mailbox_get_seq_range(struct mailbox *box, uint32_t uid1, uint32_t uid2,
+			   uint32_t *seq1_r, uint32_t *seq2_r);
 /* Get list of UIDs expunged after modseq and within the given range.
    UIDs that have been expunged after the last mailbox sync aren't returned.
    Returns TRUE if ok, FALSE if modseq is lower than we can check for. */
--- a/src/plugins/fts/fts-search.c	Sat Jun 07 00:56:02 2008 +0300
+++ b/src/plugins/fts/fts-search.c	Sat Jun 07 01:06:28 2008 +0300
@@ -21,8 +21,8 @@
 	range = array_get(uid_range, &count);
 	i_array_init(seq_range, count);
 	for (i = 0; i < count; i++) {
-		mailbox_get_uids(box, range[i].seq1, range[i].seq2,
-				 &seq1, &seq2);
+		mailbox_get_seq_range(box, range[i].seq1, range[i].seq2,
+				      &seq1, &seq2);
 		if (seq1 != 0)
 			seq_range_array_add_range(seq_range, seq1, seq2);
 	}
--- a/src/plugins/fts/fts-storage.c	Sat Jun 07 00:56:02 2008 +0300
+++ b/src/plugins/fts/fts-storage.c	Sat Jun 07 01:06:28 2008 +0300
@@ -176,7 +176,7 @@
 	if (fts_backend_get_last_uid(backend, &last_uid) < 0)
 		return -1;
 
-	mailbox_get_uids(t->box, last_uid+1, (uint32_t)-1, &seq1, &seq2);
+	mailbox_get_seq_range(t->box, last_uid+1, (uint32_t)-1, &seq1, &seq2);
 	if (seq1 == 0) {
 		/* no new messages */
 		return 0;
@@ -193,8 +193,8 @@
 		i_assert(last_uid < last_uid_locked);
 
 		last_uid = last_uid_locked;
-		mailbox_get_uids(t->box, last_uid+1, (uint32_t)-1,
-				 &seq1, &seq2);
+		mailbox_get_seq_range(t->box, last_uid+1, (uint32_t)-1,
+				      &seq1, &seq2);
 		if (seq1 == 0) {
 			/* no new messages */
 			(void)fts_backend_build_deinit(&build);
--- a/src/plugins/lazy-expunge/lazy-expunge-plugin.c	Sat Jun 07 00:56:02 2008 +0300
+++ b/src/plugins/lazy-expunge/lazy-expunge-plugin.c	Sat Jun 07 01:06:28 2008 +0300
@@ -182,8 +182,8 @@
 
 	range = array_get(&lt->expunge_seqs, &count);
 	for (i = 0; i < count && ret == 0; i++) {
-		mailbox_get_uids(srcbox, range[i].seq1, range[i].seq2,
-				 &seq1, &seq2);
+		mailbox_get_seq_range(srcbox, range[i].seq1, range[i].seq2,
+				      &seq1, &seq2);
 		for (uid = range[i].seq1; uid <= range[i].seq2; uid++) {
 			if (maildir_file_do(msrcbox, uid, lazy_expunge_move,
 					    &ctx) < 0) {