Mercurial > dovecot > core-2.2
annotate src/lib-storage/index/index-storage.h @ 3279:b698ae839a18 HEAD
Moved mbox/maildir-specific variables from struct index_mailbox to
mbox_mailbox and maildir_mailbox.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Fri, 08 Apr 2005 16:13:45 +0300 |
parents | 6a179bf1272e |
children | 2c72492dfd91 |
rev | line source |
---|---|
0 | 1 #ifndef __INDEX_STORAGE_H |
2 #define __INDEX_STORAGE_H | |
3 | |
1978
6303ef092c5b
mbox code compiles again, but syncing is only partially implemented so
Timo Sirainen <tss@iki.fi>
parents:
1958
diff
changeset
|
4 #include "file-dotlock.h" |
1915
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
1845
diff
changeset
|
5 #include "mail-storage-private.h" |
0 | 6 #include "mail-index.h" |
7 | |
1915
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
1845
diff
changeset
|
8 /* Max. mmap()ed size for a message */ |
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
1845
diff
changeset
|
9 #define MAIL_MMAP_BLOCK_SIZE (1024*256) |
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
1845
diff
changeset
|
10 /* Block size when read()ing message. */ |
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
1845
diff
changeset
|
11 #define MAIL_READ_BLOCK_SIZE (1024*8) |
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
1845
diff
changeset
|
12 |
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
1845
diff
changeset
|
13 #define MAILBOX_FULL_SYNC_INTERVAL 5 |
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
1845
diff
changeset
|
14 |
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
1845
diff
changeset
|
15 enum mailbox_lock_notify_type { |
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
1845
diff
changeset
|
16 MAILBOX_LOCK_NOTIFY_NONE, |
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
1845
diff
changeset
|
17 |
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
1845
diff
changeset
|
18 /* Mailbox is locked, will abort in secs_left */ |
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
1845
diff
changeset
|
19 MAILBOX_LOCK_NOTIFY_MAILBOX_ABORT, |
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
1845
diff
changeset
|
20 /* Mailbox lock looks stale, will override in secs_left */ |
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
1845
diff
changeset
|
21 MAILBOX_LOCK_NOTIFY_MAILBOX_OVERRIDE |
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
1845
diff
changeset
|
22 }; |
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
1845
diff
changeset
|
23 |
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
1845
diff
changeset
|
24 struct index_storage { |
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
1845
diff
changeset
|
25 struct mail_storage storage; |
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
1845
diff
changeset
|
26 |
3209
923ff19873d4
Major mail-storage API changes. It's now a bit cleaner and much more plugin
Timo Sirainen <tss@iki.fi>
parents:
3138
diff
changeset
|
27 const char *dir; /* root directory */ |
923ff19873d4
Major mail-storage API changes. It's now a bit cleaner and much more plugin
Timo Sirainen <tss@iki.fi>
parents:
3138
diff
changeset
|
28 const char *index_dir; |
923ff19873d4
Major mail-storage API changes. It's now a bit cleaner and much more plugin
Timo Sirainen <tss@iki.fi>
parents:
3138
diff
changeset
|
29 const char *control_dir; |
923ff19873d4
Major mail-storage API changes. It's now a bit cleaner and much more plugin
Timo Sirainen <tss@iki.fi>
parents:
3138
diff
changeset
|
30 const char *inbox_path; /* INBOX location */ |
923ff19873d4
Major mail-storage API changes. It's now a bit cleaner and much more plugin
Timo Sirainen <tss@iki.fi>
parents:
3138
diff
changeset
|
31 const char *temp_prefix; /* prefix for temporary files */ |
1915
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
1845
diff
changeset
|
32 |
3209
923ff19873d4
Major mail-storage API changes. It's now a bit cleaner and much more plugin
Timo Sirainen <tss@iki.fi>
parents:
3138
diff
changeset
|
33 const char *user; /* name of user accessing the storage */ |
1915
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
1845
diff
changeset
|
34 |
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
1845
diff
changeset
|
35 struct mail_storage_callbacks *callbacks; |
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
1845
diff
changeset
|
36 void *callback_context; |
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
1845
diff
changeset
|
37 }; |
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
1845
diff
changeset
|
38 |
903
fd8888f6f037
Naming style changes, finally got tired of most of the typedefs. Also the
Timo Sirainen <tss@iki.fi>
parents:
764
diff
changeset
|
39 struct index_mailbox { |
fd8888f6f037
Naming style changes, finally got tired of most of the typedefs. Also the
Timo Sirainen <tss@iki.fi>
parents:
764
diff
changeset
|
40 struct mailbox box; |
1915
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
1845
diff
changeset
|
41 struct index_storage *storage; |
450
925d6eb5f8be
MailStorage interface change. We now let storage call several sync-functions
Timo Sirainen <tss@iki.fi>
parents:
410
diff
changeset
|
42 |
903
fd8888f6f037
Naming style changes, finally got tired of most of the typedefs. Also the
Timo Sirainen <tss@iki.fi>
parents:
764
diff
changeset
|
43 struct mail_index *index; |
1915
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
1845
diff
changeset
|
44 struct mail_index_view *view; |
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
1845
diff
changeset
|
45 struct mail_cache *cache; |
3209
923ff19873d4
Major mail-storage API changes. It's now a bit cleaner and much more plugin
Timo Sirainen <tss@iki.fi>
parents:
3138
diff
changeset
|
46 struct mail_vfuncs *mail_vfuncs; |
600
3b44bc64afd4
mailbox_check_interval setting: Dovecot can notify client of new mail in
Timo Sirainen <tss@iki.fi>
parents:
570
diff
changeset
|
47 |
2317
0cf316c77b1b
Recent flags should be fully working now with maildir.
Timo Sirainen <tss@iki.fi>
parents:
2275
diff
changeset
|
48 int (*is_recent)(struct index_mailbox *ibox, uint32_t uid); |
1947 | 49 |
3279
b698ae839a18
Moved mbox/maildir-specific variables from struct index_mailbox to
Timo Sirainen <tss@iki.fi>
parents:
3260
diff
changeset
|
50 uint32_t md5hdr_ext_idx; |
b698ae839a18
Moved mbox/maildir-specific variables from struct index_mailbox to
Timo Sirainen <tss@iki.fi>
parents:
3260
diff
changeset
|
51 |
2322
aae574ed7f4c
Broke mailbox_sync() into iterator.
Timo Sirainen <tss@iki.fi>
parents:
2317
diff
changeset
|
52 struct timeout *notify_to; |
aae574ed7f4c
Broke mailbox_sync() into iterator.
Timo Sirainen <tss@iki.fi>
parents:
2317
diff
changeset
|
53 struct index_notify_file *notify_files; |
aae574ed7f4c
Broke mailbox_sync() into iterator.
Timo Sirainen <tss@iki.fi>
parents:
2317
diff
changeset
|
54 struct index_notify_io *notify_ios; |
aae574ed7f4c
Broke mailbox_sync() into iterator.
Timo Sirainen <tss@iki.fi>
parents:
2317
diff
changeset
|
55 time_t notify_last_check, notify_last_sent; |
aae574ed7f4c
Broke mailbox_sync() into iterator.
Timo Sirainen <tss@iki.fi>
parents:
2317
diff
changeset
|
56 unsigned int min_notify_interval; |
aae574ed7f4c
Broke mailbox_sync() into iterator.
Timo Sirainen <tss@iki.fi>
parents:
2317
diff
changeset
|
57 mailbox_notify_callback_t *notify_callback; |
aae574ed7f4c
Broke mailbox_sync() into iterator.
Timo Sirainen <tss@iki.fi>
parents:
2317
diff
changeset
|
58 void *notify_context; |
600
3b44bc64afd4
mailbox_check_interval setting: Dovecot can notify client of new mail in
Timo Sirainen <tss@iki.fi>
parents:
570
diff
changeset
|
59 |
1915
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
1845
diff
changeset
|
60 time_t next_lock_notify; /* temporary */ |
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
1845
diff
changeset
|
61 enum mailbox_lock_notify_type last_notify_type; |
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
1845
diff
changeset
|
62 |
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
1845
diff
changeset
|
63 uint32_t commit_log_file_seq; |
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
1845
diff
changeset
|
64 uoff_t commit_log_file_offset; |
450
925d6eb5f8be
MailStorage interface change. We now let storage call several sync-functions
Timo Sirainen <tss@iki.fi>
parents:
410
diff
changeset
|
65 |
3254
a2943c050571
Keywords are now stored in X-Keywords headers in mbox. Did several related
Timo Sirainen <tss@iki.fi>
parents:
3209
diff
changeset
|
66 const array_t *ARRAY_DEFINE_PTR(keyword_names, const char *); |
2559
ad139af4ac12
Cache field indexes are cache file specific, not globals.
Timo Sirainen <tss@iki.fi>
parents:
2511
diff
changeset
|
67 struct mail_cache_field *cache_fields; |
2317
0cf316c77b1b
Recent flags should be fully working now with maildir.
Timo Sirainen <tss@iki.fi>
parents:
2275
diff
changeset
|
68 buffer_t *recent_flags; |
0cf316c77b1b
Recent flags should be fully working now with maildir.
Timo Sirainen <tss@iki.fi>
parents:
2275
diff
changeset
|
69 uint32_t recent_flags_start_seq, recent_flags_count; |
2322
aae574ed7f4c
Broke mailbox_sync() into iterator.
Timo Sirainen <tss@iki.fi>
parents:
2317
diff
changeset
|
70 uint32_t synced_recent_count; |
aae574ed7f4c
Broke mailbox_sync() into iterator.
Timo Sirainen <tss@iki.fi>
parents:
2317
diff
changeset
|
71 time_t sync_last_check; |
2317
0cf316c77b1b
Recent flags should be fully working now with maildir.
Timo Sirainen <tss@iki.fi>
parents:
2275
diff
changeset
|
72 |
1642
72c6e848f583
API changes: Don't keep variables in mailbox class.
Timo Sirainen <tss@iki.fi>
parents:
1640
diff
changeset
|
73 unsigned int readonly:1; |
2039
f0925b2271e1
Added pop3_mails_keep_recent option. Fixed recent assert crash.
Timo Sirainen <tss@iki.fi>
parents:
1987
diff
changeset
|
74 unsigned int keep_recent:1; |
2317
0cf316c77b1b
Recent flags should be fully working now with maildir.
Timo Sirainen <tss@iki.fi>
parents:
2275
diff
changeset
|
75 unsigned int recent_flags_synced:1; |
450
925d6eb5f8be
MailStorage interface change. We now let storage call several sync-functions
Timo Sirainen <tss@iki.fi>
parents:
410
diff
changeset
|
76 unsigned int sent_diskspace_warning:1; |
1640
db14aa8e2b5c
API change for expunging messages. Not exactly what I wanted, but good
Timo Sirainen <tss@iki.fi>
parents:
1639
diff
changeset
|
77 unsigned int sent_readonly_flags_warning:1; |
2322
aae574ed7f4c
Broke mailbox_sync() into iterator.
Timo Sirainen <tss@iki.fi>
parents:
2317
diff
changeset
|
78 unsigned int notify_pending:1; |
1915
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
1845
diff
changeset
|
79 unsigned int mail_read_mmaped:1; |
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
1845
diff
changeset
|
80 }; |
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
1845
diff
changeset
|
81 |
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
1845
diff
changeset
|
82 struct index_transaction_context { |
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
1845
diff
changeset
|
83 struct mailbox_transaction_context mailbox_ctx; |
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
1845
diff
changeset
|
84 struct index_mailbox *ibox; |
3209
923ff19873d4
Major mail-storage API changes. It's now a bit cleaner and much more plugin
Timo Sirainen <tss@iki.fi>
parents:
3138
diff
changeset
|
85 enum mailbox_transaction_flags flags; |
2224
a816e2d88406
Added mail_index_transaction_get_updated_view() which can be used to access
Timo Sirainen <tss@iki.fi>
parents:
2206
diff
changeset
|
86 |
1915
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
1845
diff
changeset
|
87 struct mail_index_transaction *trans; |
2224
a816e2d88406
Added mail_index_transaction_get_updated_view() which can be used to access
Timo Sirainen <tss@iki.fi>
parents:
2206
diff
changeset
|
88 struct mail_index_view *trans_view; |
a816e2d88406
Added mail_index_transaction_get_updated_view() which can be used to access
Timo Sirainen <tss@iki.fi>
parents:
2206
diff
changeset
|
89 struct mail_cache_view *cache_view; |
1915
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
1845
diff
changeset
|
90 struct mail_cache_transaction_ctx *cache_trans; |
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
1845
diff
changeset
|
91 |
2275
c68a3c9f6d73
Cache file compression works now and compressed cache file is reopened.
Timo Sirainen <tss@iki.fi>
parents:
2242
diff
changeset
|
92 unsigned int cache_trans_failed:1; |
0 | 93 }; |
94 | |
903
fd8888f6f037
Naming style changes, finally got tired of most of the typedefs. Also the
Timo Sirainen <tss@iki.fi>
parents:
764
diff
changeset
|
95 int mail_storage_set_index_error(struct index_mailbox *ibox); |
1978
6303ef092c5b
mbox code compiles again, but syncing is only partially implemented so
Timo Sirainen <tss@iki.fi>
parents:
1958
diff
changeset
|
96 |
6303ef092c5b
mbox code compiles again, but syncing is only partially implemented so
Timo Sirainen <tss@iki.fi>
parents:
1958
diff
changeset
|
97 void index_storage_lock_notify(struct index_mailbox *ibox, |
6303ef092c5b
mbox code compiles again, but syncing is only partially implemented so
Timo Sirainen <tss@iki.fi>
parents:
1958
diff
changeset
|
98 enum mailbox_lock_notify_type notify_type, |
6303ef092c5b
mbox code compiles again, but syncing is only partially implemented so
Timo Sirainen <tss@iki.fi>
parents:
1958
diff
changeset
|
99 unsigned int secs_left); |
6303ef092c5b
mbox code compiles again, but syncing is only partially implemented so
Timo Sirainen <tss@iki.fi>
parents:
1958
diff
changeset
|
100 void index_storage_lock_notify_reset(struct index_mailbox *ibox); |
223
ca6967899c05
More cleanups. lib-storage should handle "out of disk space" conditions
Timo Sirainen <tss@iki.fi>
parents:
184
diff
changeset
|
101 |
1790
b101e678e7ac
Fixes memory/fd leaking with INDEX=MEMORY.
Timo Sirainen <tss@iki.fi>
parents:
1732
diff
changeset
|
102 struct mail_index * |
2118
11febaee5e9b
Save mbox offsets to index file using extra_records. Some other fixes.
Timo Sirainen <tss@iki.fi>
parents:
2062
diff
changeset
|
103 index_storage_alloc(const char *index_dir, const char *mailbox_path, |
11febaee5e9b
Save mbox offsets to index file using extra_records. Some other fixes.
Timo Sirainen <tss@iki.fi>
parents:
2062
diff
changeset
|
104 const char *prefix); |
903
fd8888f6f037
Naming style changes, finally got tired of most of the typedefs. Also the
Timo Sirainen <tss@iki.fi>
parents:
764
diff
changeset
|
105 void index_storage_unref(struct mail_index *index); |
1546
9c9ce9c71509
Close index files before deleting the mailbox.
Timo Sirainen <tss@iki.fi>
parents:
1429
diff
changeset
|
106 void index_storage_destroy_unrefed(void); |
450
925d6eb5f8be
MailStorage interface change. We now let storage call several sync-functions
Timo Sirainen <tss@iki.fi>
parents:
410
diff
changeset
|
107 |
3033
146897976cfa
Added mail_debug setting. Moved full_filesystem_access from global variable
Timo Sirainen <tss@iki.fi>
parents:
3016
diff
changeset
|
108 void index_storage_init(struct index_storage *storage, |
3260
6a179bf1272e
Moved several getenv()s from lib-storage to main code. deliver binary was
Timo Sirainen <tss@iki.fi>
parents:
3254
diff
changeset
|
109 enum mail_storage_flags flags, |
6a179bf1272e
Moved several getenv()s from lib-storage to main code. deliver binary was
Timo Sirainen <tss@iki.fi>
parents:
3254
diff
changeset
|
110 enum mail_storage_lock_method lock_method); |
1915
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
1845
diff
changeset
|
111 void index_storage_deinit(struct index_storage *storage); |
1600
993fe64a5e20
Destroy all unused indexes 10 seconds after use. Before we destroyed them
Timo Sirainen <tss@iki.fi>
parents:
1552
diff
changeset
|
112 |
3209
923ff19873d4
Major mail-storage API changes. It's now a bit cleaner and much more plugin
Timo Sirainen <tss@iki.fi>
parents:
3138
diff
changeset
|
113 int index_storage_mailbox_init(struct index_mailbox *ibox, |
923ff19873d4
Major mail-storage API changes. It's now a bit cleaner and much more plugin
Timo Sirainen <tss@iki.fi>
parents:
3138
diff
changeset
|
114 struct mail_index *index, const char *name, |
923ff19873d4
Major mail-storage API changes. It's now a bit cleaner and much more plugin
Timo Sirainen <tss@iki.fi>
parents:
3138
diff
changeset
|
115 enum mailbox_open_flags flags); |
1915
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
1845
diff
changeset
|
116 void index_storage_mailbox_free(struct mailbox *box); |
0 | 117 |
1642
72c6e848f583
API changes: Don't keep variables in mailbox class.
Timo Sirainen <tss@iki.fi>
parents:
1640
diff
changeset
|
118 int index_storage_is_readonly(struct mailbox *box); |
1958 | 119 int index_storage_allow_new_keywords(struct mailbox *box); |
1915
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
1845
diff
changeset
|
120 int index_storage_is_inconsistent(struct mailbox *box); |
0 | 121 |
3016
61c8d205d887
Initial support for keywords. Syncing to mbox/maildir doesn't work yet.
Timo Sirainen <tss@iki.fi>
parents:
2987
diff
changeset
|
122 struct mail_keywords * |
61c8d205d887
Initial support for keywords. Syncing to mbox/maildir doesn't work yet.
Timo Sirainen <tss@iki.fi>
parents:
2987
diff
changeset
|
123 index_keywords_create(struct mailbox_transaction_context *t, |
61c8d205d887
Initial support for keywords. Syncing to mbox/maildir doesn't work yet.
Timo Sirainen <tss@iki.fi>
parents:
2987
diff
changeset
|
124 const char *const keywords[]); |
3138
fbe844061fe2
Internal changes in how keywords are handled. struct mail_keywords isn't
Timo Sirainen <tss@iki.fi>
parents:
3106
diff
changeset
|
125 void index_keywords_free(struct mailbox_transaction_context *t, |
fbe844061fe2
Internal changes in how keywords are handled. struct mail_keywords isn't
Timo Sirainen <tss@iki.fi>
parents:
3106
diff
changeset
|
126 struct mail_keywords *keywords); |
0 | 127 |
2317
0cf316c77b1b
Recent flags should be fully working now with maildir.
Timo Sirainen <tss@iki.fi>
parents:
2275
diff
changeset
|
128 void index_mailbox_set_recent(struct index_mailbox *ibox, uint32_t seq); |
0cf316c77b1b
Recent flags should be fully working now with maildir.
Timo Sirainen <tss@iki.fi>
parents:
2275
diff
changeset
|
129 int index_mailbox_is_recent(struct index_mailbox *ibox, uint32_t seq); |
0cf316c77b1b
Recent flags should be fully working now with maildir.
Timo Sirainen <tss@iki.fi>
parents:
2275
diff
changeset
|
130 |
1915
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
1845
diff
changeset
|
131 unsigned int index_storage_get_recent_count(struct mail_index_view *view); |
325
ba058497efa9
Send RECENT after all EXISTS replies. Check for new mail in mailbox after
Timo Sirainen <tss@iki.fi>
parents:
296
diff
changeset
|
132 |
1730
8480f945e270
IDLE uses now IO_*_NOTIFY to get instant notifying of mails.
Timo Sirainen <tss@iki.fi>
parents:
1672
diff
changeset
|
133 void index_mailbox_check_add(struct index_mailbox *ibox, |
8480f945e270
IDLE uses now IO_*_NOTIFY to get instant notifying of mails.
Timo Sirainen <tss@iki.fi>
parents:
1672
diff
changeset
|
134 const char *path, int dir); |
1172 | 135 void index_mailbox_check_remove_all(struct index_mailbox *ibox); |
903
fd8888f6f037
Naming style changes, finally got tired of most of the typedefs. Also the
Timo Sirainen <tss@iki.fi>
parents:
764
diff
changeset
|
136 |
2322
aae574ed7f4c
Broke mailbox_sync() into iterator.
Timo Sirainen <tss@iki.fi>
parents:
2317
diff
changeset
|
137 struct mailbox_sync_context * |
aae574ed7f4c
Broke mailbox_sync() into iterator.
Timo Sirainen <tss@iki.fi>
parents:
2317
diff
changeset
|
138 index_mailbox_sync_init(struct mailbox *box, enum mailbox_sync_flags flags, |
aae574ed7f4c
Broke mailbox_sync() into iterator.
Timo Sirainen <tss@iki.fi>
parents:
2317
diff
changeset
|
139 int failed); |
aae574ed7f4c
Broke mailbox_sync() into iterator.
Timo Sirainen <tss@iki.fi>
parents:
2317
diff
changeset
|
140 int index_mailbox_sync_next(struct mailbox_sync_context *ctx, |
aae574ed7f4c
Broke mailbox_sync() into iterator.
Timo Sirainen <tss@iki.fi>
parents:
2317
diff
changeset
|
141 struct mailbox_sync_rec *sync_rec_r); |
aae574ed7f4c
Broke mailbox_sync() into iterator.
Timo Sirainen <tss@iki.fi>
parents:
2317
diff
changeset
|
142 int index_mailbox_sync_deinit(struct mailbox_sync_context *ctx, |
aae574ed7f4c
Broke mailbox_sync() into iterator.
Timo Sirainen <tss@iki.fi>
parents:
2317
diff
changeset
|
143 struct mailbox_status *status_r); |
aae574ed7f4c
Broke mailbox_sync() into iterator.
Timo Sirainen <tss@iki.fi>
parents:
2317
diff
changeset
|
144 |
1915
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
1845
diff
changeset
|
145 int index_storage_sync(struct mailbox *box, enum mailbox_sync_flags flags); |
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
1845
diff
changeset
|
146 |
903
fd8888f6f037
Naming style changes, finally got tired of most of the typedefs. Also the
Timo Sirainen <tss@iki.fi>
parents:
764
diff
changeset
|
147 void index_storage_set_callbacks(struct mail_storage *storage, |
fd8888f6f037
Naming style changes, finally got tired of most of the typedefs. Also the
Timo Sirainen <tss@iki.fi>
parents:
764
diff
changeset
|
148 struct mail_storage_callbacks *callbacks, |
674
b7aefd0d7611
Locking changes triggered a bit larger cleanup :) If we have to wait for a
Timo Sirainen <tss@iki.fi>
parents:
633
diff
changeset
|
149 void *context); |
2225
5947497c3e40
get_last_error() wasn't virtualizable
Timo Sirainen <tss@iki.fi>
parents:
2224
diff
changeset
|
150 const char *index_storage_get_last_error(struct mail_storage *storage, |
5947497c3e40
get_last_error() wasn't virtualizable
Timo Sirainen <tss@iki.fi>
parents:
2224
diff
changeset
|
151 int *syntax_error_r); |
903
fd8888f6f037
Naming style changes, finally got tired of most of the typedefs. Also the
Timo Sirainen <tss@iki.fi>
parents:
764
diff
changeset
|
152 int index_storage_get_status(struct mailbox *box, |
fd8888f6f037
Naming style changes, finally got tired of most of the typedefs. Also the
Timo Sirainen <tss@iki.fi>
parents:
764
diff
changeset
|
153 enum mailbox_status_items items, |
fd8888f6f037
Naming style changes, finally got tired of most of the typedefs. Also the
Timo Sirainen <tss@iki.fi>
parents:
764
diff
changeset
|
154 struct mailbox_status *status); |
2322
aae574ed7f4c
Broke mailbox_sync() into iterator.
Timo Sirainen <tss@iki.fi>
parents:
2317
diff
changeset
|
155 int index_storage_get_status_locked(struct index_mailbox *ibox, |
aae574ed7f4c
Broke mailbox_sync() into iterator.
Timo Sirainen <tss@iki.fi>
parents:
2317
diff
changeset
|
156 enum mailbox_status_items items, |
aae574ed7f4c
Broke mailbox_sync() into iterator.
Timo Sirainen <tss@iki.fi>
parents:
2317
diff
changeset
|
157 struct mailbox_status *status_r); |
988
8028c4dcf38f
mail-storage.h interface changes, affects pretty much everything.
Timo Sirainen <tss@iki.fi>
parents:
939
diff
changeset
|
158 |
1915
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
1845
diff
changeset
|
159 int index_storage_get_uids(struct mailbox *box, uint32_t uid1, uint32_t uid2, |
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
1845
diff
changeset
|
160 uint32_t *seq1_r, uint32_t *seq2_r); |
988
8028c4dcf38f
mail-storage.h interface changes, affects pretty much everything.
Timo Sirainen <tss@iki.fi>
parents:
939
diff
changeset
|
161 |
2327
7d02e2a7672d
Header caching redesigned. New design allows caching decisions per field, so
Timo Sirainen <tss@iki.fi>
parents:
2322
diff
changeset
|
162 struct mailbox_header_lookup_ctx * |
7d02e2a7672d
Header caching redesigned. New design allows caching decisions per field, so
Timo Sirainen <tss@iki.fi>
parents:
2322
diff
changeset
|
163 index_header_lookup_init(struct mailbox *box, const char *const headers[]); |
7d02e2a7672d
Header caching redesigned. New design allows caching decisions per field, so
Timo Sirainen <tss@iki.fi>
parents:
2322
diff
changeset
|
164 void index_header_lookup_deinit(struct mailbox_header_lookup_ctx *ctx); |
7d02e2a7672d
Header caching redesigned. New design allows caching decisions per field, so
Timo Sirainen <tss@iki.fi>
parents:
2322
diff
changeset
|
165 |
988
8028c4dcf38f
mail-storage.h interface changes, affects pretty much everything.
Timo Sirainen <tss@iki.fi>
parents:
939
diff
changeset
|
166 int index_storage_search_get_sorting(struct mailbox *box, |
8028c4dcf38f
mail-storage.h interface changes, affects pretty much everything.
Timo Sirainen <tss@iki.fi>
parents:
939
diff
changeset
|
167 enum mail_sort_type *sort_program); |
8028c4dcf38f
mail-storage.h interface changes, affects pretty much everything.
Timo Sirainen <tss@iki.fi>
parents:
939
diff
changeset
|
168 struct mail_search_context * |
1915
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
1845
diff
changeset
|
169 index_storage_search_init(struct mailbox_transaction_context *t, |
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
1845
diff
changeset
|
170 const char *charset, struct mail_search_arg *args, |
3209
923ff19873d4
Major mail-storage API changes. It's now a bit cleaner and much more plugin
Timo Sirainen <tss@iki.fi>
parents:
3138
diff
changeset
|
171 const enum mail_sort_type *sort_program); |
1915
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
1845
diff
changeset
|
172 int index_storage_search_deinit(struct mail_search_context *ctx); |
3209
923ff19873d4
Major mail-storage API changes. It's now a bit cleaner and much more plugin
Timo Sirainen <tss@iki.fi>
parents:
3138
diff
changeset
|
173 int index_storage_search_next(struct mail_search_context *ctx, |
923ff19873d4
Major mail-storage API changes. It's now a bit cleaner and much more plugin
Timo Sirainen <tss@iki.fi>
parents:
3138
diff
changeset
|
174 struct mail *mail); |
0 | 175 |
2224
a816e2d88406
Added mail_index_transaction_get_updated_view() which can be used to access
Timo Sirainen <tss@iki.fi>
parents:
2206
diff
changeset
|
176 void index_transaction_init(struct index_transaction_context *t, |
3209
923ff19873d4
Major mail-storage API changes. It's now a bit cleaner and much more plugin
Timo Sirainen <tss@iki.fi>
parents:
3138
diff
changeset
|
177 struct index_mailbox *ibox, |
923ff19873d4
Major mail-storage API changes. It's now a bit cleaner and much more plugin
Timo Sirainen <tss@iki.fi>
parents:
3138
diff
changeset
|
178 enum mailbox_transaction_flags flags); |
1915
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
1845
diff
changeset
|
179 int index_transaction_commit(struct mailbox_transaction_context *t); |
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
1845
diff
changeset
|
180 void index_transaction_rollback(struct mailbox_transaction_context *t); |
1638
e95c0e462591
API change for updating message flags.
Timo Sirainen <tss@iki.fi>
parents:
1637
diff
changeset
|
181 |
0 | 182 #endif |