[dovecot-cvs] dovecot/src/lib-storage mail-storage-private.h, 1.31,
1.32 mail-storage.h, 1.111, 1.112 mail.c, 1.5, 1.6
tss-movial at dovecot.org
tss-movial at dovecot.org
Thu Jun 29 14:08:52 EEST 2006
Update of /var/lib/cvs/dovecot/src/lib-storage
In directory talvi:/tmp/cvs-serv13610
Modified Files:
mail-storage-private.h mail-storage.h mail.c
Log Message:
Added mail_get_save_date() and some cleanups.
Index: mail-storage-private.h
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/mail-storage-private.h,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -d -r1.31 -r1.32
--- mail-storage-private.h 28 Jun 2006 16:31:06 -0000 1.31
+++ mail-storage-private.h 29 Jun 2006 11:08:50 -0000 1.32
@@ -178,8 +178,9 @@
const char *const *(*get_keywords)(struct mail *mail);
const struct message_part *(*get_parts)(struct mail *mail);
- time_t (*get_received_date)(struct mail *mail);
time_t (*get_date)(struct mail *mail, int *timezone);
+ time_t (*get_received_date)(struct mail *mail);
+ time_t (*get_save_date)(struct mail *mail);
uoff_t (*get_virtual_size)(struct mail *mail);
uoff_t (*get_physical_size)(struct mail *mail);
Index: mail-storage.h
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/mail-storage.h,v
retrieving revision 1.111
retrieving revision 1.112
diff -u -d -r1.111 -r1.112
--- mail-storage.h 28 Jun 2006 13:10:48 -0000 1.111
+++ mail-storage.h 29 Jun 2006 11:08:50 -0000 1.112
@@ -107,13 +107,14 @@
MAIL_FETCH_FLAGS = 0x00000001,
MAIL_FETCH_MESSAGE_PARTS = 0x00000002,
- MAIL_FETCH_RECEIVED_DATE = 0x00000004,
- MAIL_FETCH_DATE = 0x00000008,
- MAIL_FETCH_VIRTUAL_SIZE = 0x00000010,
- MAIL_FETCH_PHYSICAL_SIZE = 0x00000020,
+ MAIL_FETCH_STREAM_HEADER = 0x00000004,
+ MAIL_FETCH_STREAM_BODY = 0x00000008,
- MAIL_FETCH_STREAM_HEADER = 0x00000040,
- MAIL_FETCH_STREAM_BODY = 0x00000080,
+ MAIL_FETCH_DATE = 0x00000010,
+ MAIL_FETCH_RECEIVED_DATE = 0x00000020,
+ MAIL_FETCH_SAVE_DATE = 0x00000040,
+ MAIL_FETCH_PHYSICAL_SIZE = 0x00000080,
+ MAIL_FETCH_VIRTUAL_SIZE = 0x00000100,
/* specials: */
MAIL_FETCH_IMAP_BODY = 0x00001000,
@@ -436,18 +437,21 @@
int mail_set_seq(struct mail *mail, uint32_t seq);
int mail_set_uid(struct mail *mail, uint32_t uid);
-/* Get the time message was received (IMAP INTERNALDATE).
- Returns (time_t)-1 if error occurred. */
-time_t mail_get_received_date(struct mail *mail);
-/* Get the Date-header in mail. Timezone is in minutes.
+/* Get the Date-header of the mail. Timezone is in minutes.
Returns (time_t)-1 if error occurred, 0 if field wasn't found or
couldn't be parsed. */
time_t mail_get_date(struct mail *mail, int *timezone);
+/* Get the time when the mail was received (IMAP INTERNALDATE).
+ Returns (time_t)-1 if error occurred. */
+time_t mail_get_received_date(struct mail *mail);
+/* Get the time when the mail was saved into this mailbox. This time may not
+ always be entirely reliable. Returns (time_t)-1 if error occurred. */
+time_t mail_get_save_date(struct mail *mail);
-/* Get the full virtual size of mail (IMAP RFC822.SIZE).
- Returns (uoff_t)-1 if error occurred */
+/* Get the space used by the mail as seen by the reader. Linefeeds are always
+ counted as being CR+LF. Returns (uoff_t)-1 if error occurred */
uoff_t mail_get_virtual_size(struct mail *mail);
-/* Get the full physical size of mail.
+/* Get the space used by the mail in disk.
Returns (uoff_t)-1 if error occurred */
uoff_t mail_get_physical_size(struct mail *mail);
Index: mail.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/mail.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- mail.c 16 May 2006 09:10:27 -0000 1.5
+++ mail.c 29 Jun 2006 11:08:50 -0000 1.6
@@ -61,6 +61,13 @@
return p->v.get_received_date(mail);
}
+time_t mail_get_save_date(struct mail *mail)
+{
+ struct mail_private *p = (struct mail_private *)mail;
+
+ return p->v.get_save_date(mail);
+}
+
time_t mail_get_date(struct mail *mail, int *timezone)
{
struct mail_private *p = (struct mail_private *)mail;
More information about the dovecot-cvs
mailing list