Mercurial > dovecot > core-2.2
diff src/lib-index/mail-cache-private.h @ 2853:512dd7d76cdc HEAD
Removed cache_offset from mail_index_record and changed it to use extension
instead. Added possibility to register sync and expunge handlers for
extensions. Changed the way extension resets work: all extension updates
which were committed without having seen the reset are ignored.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Sat, 06 Nov 2004 19:20:18 +0200 |
parents | ec5601f71ba0 |
children | bf1e718e7370 |
line wrap: on
line diff
--- a/src/lib-index/mail-cache-private.h Fri Nov 05 17:36:38 2004 +0200 +++ b/src/lib-index/mail-cache-private.h Sat Nov 06 19:20:18 2004 +0200 @@ -115,6 +115,7 @@ struct mail_cache { struct mail_index *index; + uint32_t ext_id; char *filepath; int fd; @@ -142,7 +143,7 @@ struct mail_cache_view { struct mail_cache *cache; - struct mail_index_view *view; + struct mail_index_view *view, *trans_view; struct mail_cache_transaction_ctx *transaction; uint32_t trans_seq1, trans_seq2; @@ -183,9 +184,6 @@ int mail_cache_transaction_commit(struct mail_cache_transaction_ctx *ctx); void mail_cache_transaction_rollback(struct mail_cache_transaction_ctx *ctx); -int mail_cache_transaction_lookup(struct mail_cache_transaction_ctx *ctx, - uint32_t seq, uint32_t *offset_r); - int mail_cache_map(struct mail_cache *cache, size_t offset, size_t size); void mail_cache_file_close(struct mail_cache *cache); int mail_cache_reopen(struct mail_cache *cache); @@ -201,6 +199,12 @@ void mail_cache_decision_add(struct mail_cache_view *view, uint32_t seq, uint32_t field); +int mail_cache_expunge_handler(struct mail_index_sync_map_ctx *sync_ctx, + uint32_t seq, const void *data, void **context); +int mail_cache_sync_handler(struct mail_index_sync_map_ctx *sync_ctx, + uint32_t seq, void *old_data, const void *new_data, + void **context); + void mail_cache_set_syscall_error(struct mail_cache *cache, const char *function);