Mercurial > dovecot > core-2.2
annotate src/lib-storage/index/index-storage.h @ 296:d66aa1f1fb2d HEAD
Added fast-flag for mailbox opening, which doesn't do any index compressing
or cache updating. This flag is set when mailbox is opened by APPEND, COPY
or STATUS (ie. not SELECT/EXAMINE).
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Mon, 23 Sep 2002 13:42:20 +0300 |
parents | ca6967899c05 |
children | ba058497efa9 |
rev | line source |
---|---|
0 | 1 #ifndef __INDEX_STORAGE_H |
2 #define __INDEX_STORAGE_H | |
3 | |
4 #include "mail-storage.h" | |
5 #include "mail-index.h" | |
6 #include "imap-message-cache.h" | |
7 | |
8 typedef struct _IndexMailbox IndexMailbox; | |
9 | |
10 struct _IndexMailbox { | |
11 Mailbox box; | |
12 | |
13 /* expunge messages marked as deleted, requires index to be | |
14 exclusively locked */ | |
15 int (*expunge_locked)(IndexMailbox *ibox, | |
10
82b7de533f98
s/user_data/context/ and some s/Data/Context/
Timo Sirainen <tss@iki.fi>
parents:
0
diff
changeset
|
16 MailExpungeFunc expunge_func, void *context); |
0 | 17 |
18 MailIndex *index; | |
19 ImapMessageCache *cache; | |
20 unsigned int synced_messages_count; | |
21 }; | |
22 | |
106
5fe3e04ca8d9
Added support for caching of MessagePart data. This is useful for fetching
Timo Sirainen <tss@iki.fi>
parents:
47
diff
changeset
|
23 extern ImapMessageCacheIface index_msgcache_iface; |
5fe3e04ca8d9
Added support for caching of MessagePart data. This is useful for fetching
Timo Sirainen <tss@iki.fi>
parents:
47
diff
changeset
|
24 |
223
ca6967899c05
More cleanups. lib-storage should handle "out of disk space" conditions
Timo Sirainen <tss@iki.fi>
parents:
184
diff
changeset
|
25 int mail_storage_set_index_error(IndexMailbox *ibox); |
ca6967899c05
More cleanups. lib-storage should handle "out of disk space" conditions
Timo Sirainen <tss@iki.fi>
parents:
184
diff
changeset
|
26 |
0 | 27 IndexMailbox *index_storage_init(MailStorage *storage, Mailbox *box, |
28 MailIndex *index, const char *name, | |
296
d66aa1f1fb2d
Added fast-flag for mailbox opening, which doesn't do any index compressing
Timo Sirainen <tss@iki.fi>
parents:
223
diff
changeset
|
29 int readonly, int fast); |
0 | 30 void index_storage_close(Mailbox *box); |
31 | |
223
ca6967899c05
More cleanups. lib-storage should handle "out of disk space" conditions
Timo Sirainen <tss@iki.fi>
parents:
184
diff
changeset
|
32 int index_storage_sync_if_possible(IndexMailbox *ibox); |
0 | 33 |
34 int index_mailbox_fix_custom_flags(IndexMailbox *ibox, MailFlags *flags, | |
175
73bf05a1d862
Moved custom flags handling into lib-index.
Timo Sirainen <tss@iki.fi>
parents:
171
diff
changeset
|
35 const char *custom_flags[]); |
0 | 36 |
142
524e78f870a2
index_expunge_seek_first() now separates between "not found" and "failure".
Timo Sirainen <tss@iki.fi>
parents:
106
diff
changeset
|
37 int index_expunge_seek_first(IndexMailbox *ibox, unsigned int *seq, |
524e78f870a2
index_expunge_seek_first() now separates between "not found" and "failure".
Timo Sirainen <tss@iki.fi>
parents:
106
diff
changeset
|
38 MailIndexRecord **rec); |
0 | 39 |
40 int index_storage_save_into_fd(MailStorage *storage, int fd, const char *path, | |
184 | 41 IOBuffer *buf, uoff_t data_size); |
0 | 42 |
106
5fe3e04ca8d9
Added support for caching of MessagePart data. This is useful for fetching
Timo Sirainen <tss@iki.fi>
parents:
47
diff
changeset
|
43 void *index_msgcache_get_context(MailIndex *index, MailIndexRecord *rec); |
5fe3e04ca8d9
Added support for caching of MessagePart data. This is useful for fetching
Timo Sirainen <tss@iki.fi>
parents:
47
diff
changeset
|
44 |
0 | 45 /* Mailbox methods: */ |
46 int index_storage_copy(Mailbox *box, Mailbox *destbox, | |
47 const char *messageset, int uidset); | |
48 int index_storage_expunge(Mailbox *box); | |
49 int index_storage_get_status(Mailbox *box, MailboxStatusItems items, | |
50 MailboxStatus *status); | |
51 int index_storage_sync(Mailbox *box, unsigned int *messages, int expunge, | |
52 MailExpungeFunc expunge_func, | |
53 MailFlagUpdateFunc flag_func, | |
10
82b7de533f98
s/user_data/context/ and some s/Data/Context/
Timo Sirainen <tss@iki.fi>
parents:
0
diff
changeset
|
54 void *context); |
0 | 55 int index_storage_update_flags(Mailbox *box, const char *messageset, int uidset, |
56 MailFlags flags, const char *custom_flags[], | |
57 ModifyType modify_type, | |
10
82b7de533f98
s/user_data/context/ and some s/Data/Context/
Timo Sirainen <tss@iki.fi>
parents:
0
diff
changeset
|
58 MailFlagUpdateFunc func, void *context, |
0 | 59 int *all_found); |
60 int index_storage_fetch(Mailbox *box, MailFetchData *fetch_data, | |
61 IOBuffer *outbuf, int *all_found); | |
62 int index_storage_search(Mailbox *box, MailSearchArg *args, | |
63 IOBuffer *outbuf, int uid_result); | |
64 | |
65 #endif |