Mercurial > dovecot > original-hg > dovecot-1.2
comparison src/lib-index/mbox/mbox-index.h @ 160:ff05b320482c HEAD
Bigger changes.. full_virtual_size was removed from index record and
MessagePart caching is now forced. Also added per-message flags, including
binary flags which can be used to check if CRs need to be inserted into
message data.
Added mbox-rewrite support which can be used to write out mbox file with
updated flags. This still has the problem of being able to read changed
custom flags, that'll require another bigger change.
There's also several other mostly mbox related fixes.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Fri, 06 Sep 2002 16:43:58 +0300 |
parents | a946ce1f09b7 |
children | b045148bf408 |
comparison
equal
deleted
inserted
replaced
159:e0193106a95d | 160:ff05b320482c |
---|---|
6 | 6 |
7 typedef struct { | 7 typedef struct { |
8 MailFlags flags; | 8 MailFlags flags; |
9 MD5Context md5; | 9 MD5Context md5; |
10 int received; | 10 int received; |
11 const char *custom_flags[MAIL_CUSTOM_FLAGS_COUNT]; | |
11 } MboxHeaderContext; | 12 } MboxHeaderContext; |
12 | 13 |
13 MailIndex *mbox_index_alloc(const char *dir, const char *mbox_path); | 14 MailIndex *mbox_index_alloc(const char *dir, const char *mbox_path); |
14 | 15 |
15 void mbox_header_init_context(MboxHeaderContext *ctx); | 16 void mbox_header_init_context(MboxHeaderContext *ctx, |
17 const char*custom_flags[MAIL_CUSTOM_FLAGS_COUNT]); | |
16 void mbox_header_func(MessagePart *part __attr_unused__, | 18 void mbox_header_func(MessagePart *part __attr_unused__, |
17 const char *name, unsigned int name_len, | 19 const char *name, unsigned int name_len, |
18 const char *value, unsigned int value_len, | 20 const char *value, unsigned int value_len, |
19 void *context); | 21 void *context); |
22 void mbox_keywords_parse(const char *value, unsigned int len, | |
23 const char *custom_flags[MAIL_CUSTOM_FLAGS_COUNT], | |
24 void (*func)(const char *, unsigned int, int, void *), | |
25 void *context); | |
20 int mbox_skip_crlf(IOBuffer *inbuf); | 26 int mbox_skip_crlf(IOBuffer *inbuf); |
27 int mbox_mail_get_start_offset(MailIndex *index, MailIndexRecord *rec, | |
28 uoff_t *offset); | |
21 | 29 |
22 int mbox_index_rebuild(MailIndex *index); | 30 int mbox_index_rebuild(MailIndex *index); |
23 int mbox_index_sync(MailIndex *index); | 31 int mbox_index_sync(MailIndex *index); |
24 int mbox_index_fsck(MailIndex *index); | 32 int mbox_index_fsck(MailIndex *index); |
25 IOBuffer *mbox_open_mail(MailIndex *index, MailIndexRecord *rec); | 33 IOBuffer *mbox_open_mail(MailIndex *index, MailIndexRecord *rec); |
27 int mbox_index_append(MailIndex *index, IOBuffer *inbuf); | 35 int mbox_index_append(MailIndex *index, IOBuffer *inbuf); |
28 | 36 |
29 time_t mbox_from_parse_date(const char *msg, unsigned int size); | 37 time_t mbox_from_parse_date(const char *msg, unsigned int size); |
30 const char *mbox_from_create(const char *sender, time_t time); | 38 const char *mbox_from_create(const char *sender, time_t time); |
31 | 39 |
40 int mbox_index_rewrite(MailIndex *index, | |
41 const char *custom_flags[MAIL_CUSTOM_FLAGS_COUNT]); | |
42 | |
32 #endif | 43 #endif |