index-storage.h revision f3bb2fbe87425dc89a839908985af496f7f65702
#ifndef INDEX_STORAGE_H
#define INDEX_STORAGE_H
#include "file-dotlock.h"
#include "mail-storage-private.h"
#include "mail-index-private.h"
#define MAILBOX_FULL_SYNC_INTERVAL 5
enum mailbox_lock_notify_type {
/* Mailbox is locked, will abort in secs_left */
/* Mailbox lock looks stale, will override in secs_left */
};
struct index_transaction_context {
struct mail_index_transaction_vfuncs super;
int mail_ref_count;
struct mail_index_transaction *trans;
struct mail_index_view *trans_view;
struct mail_cache_view *cache_view;
struct mail_cache_transaction_ctx *cache_trans;
};
struct index_mailbox {
struct mail_index *index;
struct mail_index_view *view;
struct mail_cache *cache;
struct mail_vfuncs *mail_vfuncs;
struct index_notify_file *notify_files;
struct index_notify_io *notify_ios;
struct mail_cache_field *cache_fields;
/* we've discovered there aren't enough permissions to modify mailbox */
unsigned int backend_readonly:1;
unsigned int move_to_memory:1;
};
unsigned int secs_left);
void index_storage_destroy_unrefed(void);
enum mailbox_flags flags,
const char *index_prefix);
enum mailbox_feature feature);
const struct mailbox_update *update);
struct mail_keywords *
const char **error_r);
struct mail_index_view *view,
const char *path);
enum mailbox_sync_flags flags);
struct mailbox_sync_context *
bool failed);
struct mailbox_sync_rec *sync_rec_r);
struct mailbox_status *status_r);
enum mailbox_status_items items,
struct mailbox_status *status_r);
struct mailbox_header_lookup_ctx *
struct mail_search_context *
struct mail_search_args *args,
const enum mail_sort_type *sort_program);
struct mailbox_transaction_context *
enum mailbox_transaction_flags flags);
enum mailbox_transaction_flags flags);
int index_transaction_commit(struct mailbox_transaction_context *t,
struct mail_transaction_commit_changes *changes_r);
void index_transaction_rollback(struct mailbox_transaction_context *t);
const char *name);
#endif