[dovecot-cvs] dovecot/src/lib-storage mail-storage-private.h, 1.14, 1.15 mail-storage.c, 1.36, 1.37 mail-storage.h, 1.91, 1.92

cras at dovecot.org cras at dovecot.org
Tue Mar 29 16:33:10 EEST 2005


Update of /var/lib/cvs/dovecot/src/lib-storage
In directory talvi:/tmp/cvs-serv3658/lib-storage

Modified Files:
	mail-storage-private.h mail-storage.c mail-storage.h 
Log Message:
Added input stream parameter to mailbox_open(). With mbox it now allows
opening a read-only mbox using a stream.



Index: mail-storage-private.h
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/mail-storage-private.h,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- mail-storage-private.h	15 Mar 2005 19:01:51 -0000	1.14
+++ mail-storage-private.h	29 Mar 2005 13:33:07 -0000	1.15
@@ -20,6 +20,7 @@
 
 	struct mailbox *(*mailbox_open)(struct mail_storage *storage,
 					const char *name,
+					struct istream *input,
 					enum mailbox_open_flags flags);
 
 	int (*mailbox_create)(struct mail_storage *storage, const char *name,

Index: mail-storage.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/mail-storage.c,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -d -r1.36 -r1.37
--- mail-storage.c	15 Mar 2005 19:01:51 -0000	1.36
+++ mail-storage.c	29 Mar 2005 13:33:07 -0000	1.37
@@ -288,10 +288,11 @@
 	return storage->v.get_last_error(storage, syntax_error_r);
 }
 
-struct mailbox *mailbox_open(struct mail_storage *storage,
-			     const char *name, enum mailbox_open_flags flags)
+struct mailbox *mailbox_open(struct mail_storage *storage, const char *name,
+			     struct istream *input,
+			     enum mailbox_open_flags flags)
 {
-	return storage->v.mailbox_open(storage, name, flags);
+	return storage->v.mailbox_open(storage, name, input, flags);
 }
 
 int mailbox_close(struct mailbox *box)

Index: mail-storage.h
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/mail-storage.h,v
retrieving revision 1.91
retrieving revision 1.92
diff -u -d -r1.91 -r1.92
--- mail-storage.h	15 Mar 2005 19:01:51 -0000	1.91
+++ mail-storage.h	29 Mar 2005 13:33:07 -0000	1.92
@@ -13,10 +13,15 @@
 };
 
 enum mailbox_open_flags {
+	/* Mailbox must not be modified even if asked */
 	MAILBOX_OPEN_READONLY		= 0x01,
+	/* Any extra time consuming operations shouldn't be performed
+	   (eg. when opening mailbox just for STATUS). */
 	MAILBOX_OPEN_FAST		= 0x02,
+	/* Don't reset MAIL_RECENT flags when syncing */
 	MAILBOX_OPEN_KEEP_RECENT	= 0x04,
-	MAILBOX_OPEN_KEEP_HEADER_MD5	= 0x04
+	/* Remember message headers' MD5 sum */
+	MAILBOX_OPEN_KEEP_HEADER_MD5	= 0x08
 };
 
 enum mailbox_list_flags {
@@ -266,15 +271,15 @@
 const char *mail_storage_get_last_error(struct mail_storage *storage,
 					int *syntax_error_r);
 
-/* Open a mailbox. If readonly is TRUE, mailbox must not be
-   modified in any way even when it's asked. If fast is TRUE,
-   any extra time consuming operations shouldn't be performed
-   (eg. when opening mailbox just for STATUS).
+/* Open a mailbox. If input stream is given, mailbox is opened read-only
+   using it as a backend. If storage doesn't support stream backends and its
+   tried to be used, NULL is returned.
 
    Note that append and copy may open the selected mailbox again
    with possibly different readonly-state. */
-struct mailbox *mailbox_open(struct mail_storage *storage,
-			     const char *name, enum mailbox_open_flags flags);
+struct mailbox *mailbox_open(struct mail_storage *storage, const char *name,
+			     struct istream *input,
+			     enum mailbox_open_flags flags);
 /* Close the box. Returns FALSE if some cleanup errors occured, but
    the mailbox was closed anyway. */
 int mailbox_close(struct mailbox *box);



More information about the dovecot-cvs mailing list