[dovecot-cvs] dovecot/src/lib-storage/index index-mail.c, 1.98,
1.99 index-mail.h, 1.39, 1.40
tss-movial at dovecot.org
tss-movial at dovecot.org
Tue May 16 12:10:36 EEST 2006
Update of /var/lib/cvs/dovecot/src/lib-storage/index
In directory talvi:/tmp/cvs-serv9938/index
Modified Files:
index-mail.c index-mail.h
Log Message:
Added mail_set_uid() to select a mail by UID.
Index: index-mail.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/index-mail.c,v
retrieving revision 1.98
retrieving revision 1.99
diff -u -d -r1.98 -r1.99
--- index-mail.c 9 May 2006 11:57:37 -0000 1.98
+++ index-mail.c 16 May 2006 09:10:31 -0000 1.99
@@ -983,6 +983,18 @@
return 0;
}
+int index_mail_set_uid(struct mail *_mail, uint32_t uid)
+{
+ struct index_mail *mail = (struct index_mail *)_mail;
+ uint32_t seq;
+
+ if (mail_index_lookup_uid_range(mail->ibox->view,
+ uid, uid, &seq, &seq) < 0)
+ return -1;
+
+ return index_mail_set_seq(_mail, seq);
+}
+
void index_mail_free(struct mail *_mail)
{
struct index_mail *mail = (struct index_mail *)_mail;
Index: index-mail.h
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/index-mail.h,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -d -r1.39 -r1.40
--- index-mail.h 9 May 2006 11:57:37 -0000 1.39
+++ index-mail.h 16 May 2006 09:10:31 -0000 1.40
@@ -130,6 +130,7 @@
enum mail_fetch_field wanted_fields,
struct mailbox_header_lookup_ctx *wanted_headers);
int index_mail_set_seq(struct mail *mail, uint32_t seq);
+int index_mail_set_uid(struct mail *mail, uint32_t uid);
void index_mail_free(struct mail *mail);
void index_mail_parse_header_init(struct index_mail *mail,
More information about the dovecot-cvs
mailing list