mail-index-transaction-private.h revision ef4d0eafab4d26bba047551db1e23ceff8aa9404
#ifndef MAIL_INDEX_TRANSACTION_PRIVATE_H
#define MAIL_INDEX_TRANSACTION_PRIVATE_H
#include "seq-range-array.h"
#include "mail-transaction-log.h"
};
/* mask is in bytes, not bits */
unsigned char *mask;
unsigned char *data;
};
struct mail_index_transaction_vfuncs {
void (*reset)(struct mail_index_transaction *t);
int (*commit)(struct mail_index_transaction *t,
struct mail_index_transaction_commit_result *result_r);
void (*rollback)(struct mail_index_transaction *t);
};
struct mail_index_module_register *reg;
};
struct mail_index_flag_update {
};
struct mail_index_transaction {
int refcount;
struct mail_index_transaction_vfuncs v;
struct mail_index_view *view;
struct mail_index_view *latest_view;
/* NOTE: If you add anything new, remember to update
mail_index_transaction_reset_v() to reset it. */
unsigned char pre_hdr_change[sizeof(struct mail_index_header)];
unsigned char pre_hdr_mask[sizeof(struct mail_index_header)];
unsigned char post_hdr_change[sizeof(struct mail_index_header)];
unsigned char post_hdr_mask[sizeof(struct mail_index_header)];
/* Module-specific contexts. */
unsigned int no_appends:1;
unsigned int sync_transaction:1;
unsigned int appends_nonsorted:1;
unsigned int expunges_nonsorted:1;
unsigned int drop_unnecessary_flag_updates:1;
unsigned int pre_hdr_changed:1;
unsigned int post_hdr_changed:1;
unsigned int reset:1;
unsigned int index_deleted:1;
unsigned int index_undeleted:1;
unsigned int commit_deleted_index:1;
/* non-extension updates. flag updates don't change this because
they may be added and removed, so be sure to check that the updates
array is non-empty also. */
unsigned int log_updates:1;
/* extension updates */
unsigned int log_ext_updates:1;
};
#define MAIL_INDEX_TRANSACTION_HAS_CHANGES(t) \
((t)->log_updates || (t)->log_ext_updates || \
(t)->index_deleted || (t)->index_undeleted)
extern void (*hook_mail_index_transaction_created)
(struct mail_index_transaction *t);
struct mail_index_record *
void mail_index_transaction_ref(struct mail_index_transaction *t);
void mail_index_transaction_unref(struct mail_index_transaction **t);
void mail_index_transaction_reset_v(struct mail_index_transaction *t);
void mail_index_transaction_sort_appends(struct mail_index_transaction *t);
void mail_index_transaction_sort_expunges(struct mail_index_transaction *t);
void mail_index_transaction_set_log_updates(struct mail_index_transaction *t);
void mail_index_update_day_headers(struct mail_index_transaction *t);
unsigned int
unsigned int left_idx,
unsigned int right_idx,
void mail_index_transaction_lookup_latest_keywords(struct mail_index_transaction *t,
bool mail_index_cancel_flag_updates(struct mail_index_transaction *t,
bool mail_index_cancel_keyword_updates(struct mail_index_transaction *t,
void mail_index_transaction_finish(struct mail_index_transaction *t);
void mail_index_transaction_export(struct mail_index_transaction *t,
struct mail_transaction_log_append_ctx *append_ctx);
const struct mail_transaction_expunge_guid *e2);
unsigned int
unsigned int left_idx,
unsigned int right_idx,
void mail_index_ext_using_reset_id(struct mail_index_transaction *t,
#endif