index-storage.h revision bf661a542d17273066e720b4f75868a1ff975a4c
f26c954658dfd7461f290f0b5d924951a6db219aJan Zeleny/* Max. mmap()ed size for a message */
f26c954658dfd7461f290f0b5d924951a6db219aJan Zeleny/* Block size when read()ing message. */
f26c954658dfd7461f290f0b5d924951a6db219aJan Zeleny /* Mailbox is locked, will abort in secs_left */
f26c954658dfd7461f290f0b5d924951a6db219aJan Zeleny /* Mailbox lock looks stale, will override in secs_left */
f26c954658dfd7461f290f0b5d924951a6db219aJan Zeleny const char *temp_prefix; /* prefix for temporary files */
d81d8d3dc151ebc95cd0e3f3b14c1cdaa48980f1Sumit Bose const char *user; /* name of user accessing the storage */
21d485184df986e1a123f70c689517386e51a5ceMichal Zidek int (*is_recent)(struct index_mailbox *ibox, uint32_t uid);
f26c954658dfd7461f290f0b5d924951a6db219aJan Zeleny const array_t *ARRAY_DEFINE_PTR(keyword_names, const char *);
f26c954658dfd7461f290f0b5d924951a6db219aJan Zeleny uint32_t recent_flags_start_seq, recent_flags_count;
f26c954658dfd7461f290f0b5d924951a6db219aJan Zeleny /* maildir sync: */
f26c954658dfd7461f290f0b5d924951a6db219aJan Zeleny time_t last_new_mtime, last_cur_mtime, last_new_sync_time;
a3c8390d19593b1e5277d95bfb4ab206d4785150Nikolai Kondrashov struct mail_cache_transaction_ctx *cache_trans;
f26c954658dfd7461f290f0b5d924951a6db219aJan Zelenyint mail_storage_set_index_error(struct index_mailbox *ibox);
75dd4b05e1dacc76dc9d5f16be31978f84a71dc5Sumit Bosevoid index_storage_lock_notify(struct index_mailbox *ibox,
75dd4b05e1dacc76dc9d5f16be31978f84a71dc5Sumit Bose unsigned int secs_left);
75dd4b05e1dacc76dc9d5f16be31978f84a71dc5Sumit Bosevoid index_storage_lock_notify_reset(struct index_mailbox *ibox);
58d02e0d3d6d48c97fccdb2ad7212e065671ad6dStephen Gallagherindex_storage_alloc(const char *index_dir, const char *mailbox_path,
75dd4b05e1dacc76dc9d5f16be31978f84a71dc5Sumit Bose const char *prefix);
a3c8390d19593b1e5277d95bfb4ab206d4785150Nikolai Kondrashovvoid index_storage_unref(struct mail_index *index);
75dd4b05e1dacc76dc9d5f16be31978f84a71dc5Sumit Bosevoid index_storage_init(struct index_storage *storage,
75dd4b05e1dacc76dc9d5f16be31978f84a71dc5Sumit Bosevoid index_storage_deinit(struct index_storage *storage);
a3c8390d19593b1e5277d95bfb4ab206d4785150Nikolai Kondrashovint index_storage_mailbox_init(struct index_mailbox *ibox,
58d02e0d3d6d48c97fccdb2ad7212e065671ad6dStephen Gallagher struct mail_index *index, const char *name,
a3c8390d19593b1e5277d95bfb4ab206d4785150Nikolai Kondrashovvoid index_storage_mailbox_free(struct mailbox *box);
58d02e0d3d6d48c97fccdb2ad7212e065671ad6dStephen Gallagherint index_storage_is_readonly(struct mailbox *box);
58d02e0d3d6d48c97fccdb2ad7212e065671ad6dStephen Gallagherint index_storage_allow_new_keywords(struct mailbox *box);
8be5e4497e5008f7807178acdfcbf97365ec4e73Stephen Gallagherint index_storage_is_inconsistent(struct mailbox *box);
c20a339d54b39120b4051f690ca759e6d079f177Stephen Gallagherindex_keywords_create(struct mailbox_transaction_context *t,
a3c8390d19593b1e5277d95bfb4ab206d4785150Nikolai Kondrashov const char *const keywords[]);
a3c8390d19593b1e5277d95bfb4ab206d4785150Nikolai Kondrashovvoid index_keywords_free(struct mailbox_transaction_context *t,
c20a339d54b39120b4051f690ca759e6d079f177Stephen Gallaghervoid index_mailbox_set_recent(struct index_mailbox *ibox, uint32_t seq);
c20a339d54b39120b4051f690ca759e6d079f177Stephen Gallagherint index_mailbox_is_recent(struct index_mailbox *ibox, uint32_t seq);
a3c8390d19593b1e5277d95bfb4ab206d4785150Nikolai Kondrashovunsigned int index_storage_get_recent_count(struct mail_index_view *view);
a3c8390d19593b1e5277d95bfb4ab206d4785150Nikolai Kondrashovvoid index_mailbox_check_add(struct index_mailbox *ibox,
58d02e0d3d6d48c97fccdb2ad7212e065671ad6dStephen Gallaghervoid index_mailbox_check_remove_all(struct index_mailbox *ibox);
58d02e0d3d6d48c97fccdb2ad7212e065671ad6dStephen Gallagherindex_mailbox_sync_init(struct mailbox *box, enum mailbox_sync_flags flags,
58d02e0d3d6d48c97fccdb2ad7212e065671ad6dStephen Gallagherint index_mailbox_sync_next(struct mailbox_sync_context *ctx,
a3c8390d19593b1e5277d95bfb4ab206d4785150Nikolai Kondrashovint index_mailbox_sync_deinit(struct mailbox_sync_context *ctx,
a3c8390d19593b1e5277d95bfb4ab206d4785150Nikolai Kondrashovint index_storage_sync(struct mailbox *box, enum mailbox_sync_flags flags);
58d02e0d3d6d48c97fccdb2ad7212e065671ad6dStephen Gallaghervoid index_storage_set_callbacks(struct mail_storage *storage,
83bf46f4066e3d5e838a32357c201de9bd6ecdfdNikolai Kondrashovconst char *index_storage_get_last_error(struct mail_storage *storage,
58d02e0d3d6d48c97fccdb2ad7212e065671ad6dStephen Gallagherint index_storage_get_status(struct mailbox *box,
f26c954658dfd7461f290f0b5d924951a6db219aJan Zelenyint index_storage_get_status_locked(struct index_mailbox *ibox,
83bf46f4066e3d5e838a32357c201de9bd6ecdfdNikolai Kondrashovint index_storage_get_uids(struct mailbox *box, uint32_t uid1, uint32_t uid2,
f26c954658dfd7461f290f0b5d924951a6db219aJan Zelenyindex_header_lookup_init(struct mailbox *box, const char *const headers[]);
1d93029624d708119bbf803e6647a2cbb271f001Sumit Bosevoid index_header_lookup_deinit(struct mailbox_header_lookup_ctx *ctx);
1d93029624d708119bbf803e6647a2cbb271f001Sumit Boseint index_storage_search_get_sorting(struct mailbox *box,
56e88cd5f3501566778b138e4934ee8e7f3fa674Lukas Slebodnikindex_storage_search_init(struct mailbox_transaction_context *t,
56e88cd5f3501566778b138e4934ee8e7f3fa674Lukas Slebodnik const char *charset, struct mail_search_arg *args,
56e88cd5f3501566778b138e4934ee8e7f3fa674Lukas Slebodnikint index_storage_search_deinit(struct mail_search_context *ctx);
56e88cd5f3501566778b138e4934ee8e7f3fa674Lukas Slebodnikint index_storage_search_next(struct mail_search_context *ctx,
1d93029624d708119bbf803e6647a2cbb271f001Sumit Bosevoid index_transaction_init(struct index_transaction_context *t,
108db0e3b9e06e530364ef8228634f5e3f6bd3b5Jakub Hrozekint index_transaction_commit(struct mailbox_transaction_context *t);