view src/doveadm/dsync/dsync-transaction-log-scan.h @ 14584:b2076acc3715

Initial version of dsync rewrite. * doveadm backup not implemented at all yet * syncing mailbox renames is somewhat broken (at least renaming \noselect mailboxes) * saving/restoring "state" is implemented by dsync brain, but not by doveadm. this should be easy to do, just need to figure out how the replication code wants it.
author Timo Sirainen <tss@iki.fi>
date Tue, 22 May 2012 23:17:31 +0300
parents
children 8eae4e205c82
line wrap: on
line source

#ifndef DSYNC_TRANSACTION_LOG_SCAN_H
#define DSYNC_TRANSACTION_LOG_SCAN_H

struct mail_index_view;
struct dsync_transaction_log_scan;

int dsync_transaction_log_scan_init(struct mail_index_view *view,
				    uint32_t highest_wanted_uid,
				    uint64_t modseq,
				    struct dsync_transaction_log_scan **scan_r);
struct hash_table *
dsync_transaction_log_scan_get_hash(struct dsync_transaction_log_scan *scan);
/* Returns TRUE if the entire transaction log was scanned */
bool dsync_transaction_log_scan_has_all_changes(struct dsync_transaction_log_scan *scan);
/* If the given UID has been expunged after the initial log scan, create/update
   a change record for it and return it. */
struct dsync_mail_change *
dsync_transaction_log_scan_find_new_expunge(struct dsync_transaction_log_scan *scan,
					    uint32_t uid);
void dsync_transaction_log_scan_deinit(struct dsync_transaction_log_scan **scan);

#endif