[dovecot-cvs] dovecot/src/lib-storage mail-storage.h, 1.77, 1.78 proxy-mail.c, 1.5, 1.6

cras at dovecot.org cras at dovecot.org
Sat Aug 28 13:32:19 EEST 2004


Update of /home/cvs/dovecot/src/lib-storage
In directory talvi:/tmp/cvs-serv21625/lib-storage

Modified Files:
	mail-storage.h proxy-mail.c 
Log Message:
Added mail.get_physical_size().



Index: mail-storage.h
===================================================================
RCS file: /home/cvs/dovecot/src/lib-storage/mail-storage.h,v
retrieving revision 1.77
retrieving revision 1.78
diff -u -d -r1.77 -r1.78
--- mail-storage.h	22 Aug 2004 09:17:08 -0000	1.77
+++ mail-storage.h	28 Aug 2004 10:32:17 -0000	1.78
@@ -70,10 +70,11 @@
 
 	MAIL_FETCH_RECEIVED_DATE	= 0x00000004,
 	MAIL_FETCH_DATE			= 0x00000008,
-	MAIL_FETCH_SIZE			= 0x00000010,
+	MAIL_FETCH_VIRTUAL_SIZE		= 0x00000010,
+	MAIL_FETCH_PHYSICAL_SIZE	= 0x00000020,
 
-	MAIL_FETCH_STREAM_HEADER	= 0x00000020,
-	MAIL_FETCH_STREAM_BODY		= 0x00000040,
+	MAIL_FETCH_STREAM_HEADER	= 0x00000040,
+	MAIL_FETCH_STREAM_BODY		= 0x00000080,
 
 	/* specials: */
 	MAIL_FETCH_IMAP_BODY		= 0x00001000,
@@ -366,7 +367,10 @@
 	time_t (*get_date)(struct mail *mail, int *timezone);
 	/* Get the full virtual size of mail (IMAP RFC822.SIZE).
 	   Returns (uoff_t)-1 if error occured */
-	uoff_t (*get_size)(struct mail *mail);
+	uoff_t (*get_virtual_size)(struct mail *mail);
+	/* Get the full physical size of mail.
+	   Returns (uoff_t)-1 if error occured */
+	uoff_t (*get_physical_size)(struct mail *mail);
 
 	/* Get value for single header field */
 	const char *(*get_header)(struct mail *mail, const char *field);

Index: proxy-mail.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib-storage/proxy-mail.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- proxy-mail.c	18 Jul 2004 02:25:07 -0000	1.5
+++ proxy-mail.c	28 Aug 2004 10:32:17 -0000	1.6
@@ -31,11 +31,18 @@
 	return p->mail->get_date(p->mail, timezone);
 }
 
-static uoff_t _get_size(struct mail *mail)
+static uoff_t _get_virtual_size(struct mail *mail)
 {
 	struct proxy_mail *p = (struct proxy_mail *) mail;
 
-	return p->mail->get_size(p->mail);
+	return p->mail->get_virtual_size(p->mail);
+}
+
+static uoff_t _get_physical_size(struct mail *mail)
+{
+	struct proxy_mail *p = (struct proxy_mail *) mail;
+
+	return p->mail->get_physical_size(p->mail);
 }
 
 static const char *_get_header(struct mail *mail, const char *field)
@@ -97,7 +104,8 @@
 	pm->get_parts = _get_parts;
 	pm->get_received_date = _get_received_date;
 	pm->get_date = _get_date;
-	pm->get_size = _get_size;
+	pm->get_virtual_size = _get_virtual_size;
+	pm->get_physical_size = _get_physical_size;
 	pm->get_header = _get_header;
 	pm->get_headers = _get_headers;
 	pm->get_stream = _get_stream;



More information about the dovecot-cvs mailing list