[dovecot-cvs] dovecot/src/lib-storage mail-storage.h,1.61,1.62 proxy-mailbox.c,1.3,1.4

cras at procontrol.fi cras at procontrol.fi
Sun Oct 26 22:13:17 EET 2003


Update of /home/cvs/dovecot/src/lib-storage
In directory danu:/tmp/cvs-serv11799/lib-storage

Modified Files:
	mail-storage.h proxy-mailbox.c 
Log Message:
Removed fetch_init/fetch_next from mail-storage. search_* makes it
unnecessary



Index: mail-storage.h
===================================================================
RCS file: /home/cvs/dovecot/src/lib-storage/mail-storage.h,v
retrieving revision 1.61
retrieving revision 1.62
diff -u -d -r1.61 -r1.62
--- mail-storage.h	26 Oct 2003 18:05:42 -0000	1.61
+++ mail-storage.h	26 Oct 2003 20:13:15 -0000	1.62
@@ -253,21 +253,6 @@
 	void (*auto_sync)(struct mailbox *box, enum mailbox_sync_flags flags,
 			  unsigned int min_newmail_notify_interval);
 
-	/* Initialize new fetch request. wanted_fields isn't required, but it
-	   can be used for optimizations. update_flags must be set to TRUE, if
-	   you want to call mail->update_flags() */
-	struct mail_fetch_context *
-		(*fetch_init)(struct mailbox *box,
-			      enum mail_fetch_field wanted_fields,
-			      const char *const *wanted_headers,
-			      const char *messageset, int uidset);
-	/* Deinitialize fetch request. all_found is set to TRUE if all of the
-	   fetched messages were found (ie. not just deleted). */
-	int (*fetch_deinit)(struct mail_fetch_context *ctx, int *all_found);
-	/* Fetch the next message. Returned mail object can be used until
-	   the next call to fetch_next() or fetch_deinit(). */
-	struct mail *(*fetch_next)(struct mail_fetch_context *ctx);
-
 	/* Simplified fetching for a single UID or sequence. Must be called
 	   between fetch_init() .. fetch_deinit() or
 	   search_init() .. search_deinit() */
@@ -296,8 +281,9 @@
 			       const enum mail_sort_type *sort_program,
 			       enum mail_fetch_field wanted_fields,
 			       const char *const wanted_headers[]);
-	/* Deinitialize search request. */
-	int (*search_deinit)(struct mail_search_context *ctx);
+	/* Deinitialize search request. all_found is set to TRUE if all of the
+	   messages in search range were found. */
+	int (*search_deinit)(struct mail_search_context *ctx, int *all_found);
 	/* Search the next message. Returned mail object can be used until
 	   the next call to search_next() or search_deinit(). */
 	struct mail *(*search_next)(struct mail_search_context *ctx);

Index: proxy-mailbox.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib-storage/proxy-mailbox.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- proxy-mailbox.c	24 Aug 2003 12:45:33 -0000	1.3
+++ proxy-mailbox.c	26 Oct 2003 20:13:15 -0000	1.4
@@ -54,17 +54,6 @@
 	p->box->auto_sync(p->box, flags, min_newmail_notify_interval);
 }
 
-static struct mail_fetch_context *
-_fetch_init(struct mailbox *box, enum mail_fetch_field wanted_fields,
-	    const char *const *wanted_headers,
-	    const char *messageset, int uidset)
-{
-	struct proxy_mailbox *p = (struct proxy_mailbox *) box;
-
-	return p->box->fetch_init(p->box, wanted_fields, wanted_headers,
-				  messageset, uidset);
-}
-
 static struct mail *_fetch_uid(struct mailbox *box, unsigned int uid,
 			       enum mail_fetch_field wanted_fields)
 {
@@ -142,8 +131,6 @@
 	pb->name = box->name;
 	pb->storage = box->storage;
 
-	pb->fetch_deinit = box->fetch_deinit;
-	pb->fetch_next = box->fetch_next;
 	pb->search_deinit = box->search_deinit;
 	pb->search_next = box->search_next;
 	pb->save_deinit = box->save_deinit;
@@ -159,7 +146,6 @@
 	pb->get_status = _get_status;
 	pb->sync = _sync;
 	pb->auto_sync = _auto_sync;
-	pb->fetch_init = _fetch_init;
 	pb->fetch_uid = _fetch_uid;
 	pb->fetch_seq = _fetch_seq;
 	pb->search_get_sorting = _search_get_sorting;



More information about the dovecot-cvs mailing list