view src/doveadm/dsync/dsync-mailbox-export.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 5d90e2aa1ba8
line wrap: on
line source

#ifndef DSYNC_MAILBOX_EXPORT_H
#define DSYNC_MAILBOX_EXPORT_H

enum dsync_mailbox_exporter_flags {
	DSYNC_MAILBOX_EXPORTER_FLAG_AUTO_EXPORT_MAILS	= 0x01,
	DSYNC_MAILBOX_EXPORTER_FLAG_MAILS_HAVE_GUIDS	= 0x02
};

struct dsync_mailbox_exporter *
dsync_mailbox_export_init(struct mailbox *box,
			  struct dsync_transaction_log_scan *log_scan,
			  uint32_t last_common_uid,
			  uint64_t last_common_modseq,
			  enum dsync_mailbox_exporter_flags flags);
const struct dsync_mail_change *
dsync_mailbox_export_next(struct dsync_mailbox_exporter *exporter);

void dsync_mailbox_export_want_mail(struct dsync_mailbox_exporter *exporter,
				    const struct dsync_mail_request *request);
const struct dsync_mail *
dsync_mailbox_export_next_mail(struct dsync_mailbox_exporter *exporter);

int dsync_mailbox_export_deinit(struct dsync_mailbox_exporter **exporter,
				const char **error_r);

#endif