view src/lib-storage/index/cydir/cydir-sync.h @ 6267:3a1eed408cad HEAD

mailbox_transaction_commit_get_uids() now returns also UIDVALIDITY. It's the only usable way to get it returned correctly. Removed maildir-specific mailbox_get_status() handling, it's supposed to return the current state of the mailbox, not the latest state. It was useful only for returning non-zero UIDVALIDITY for newly created mailboxes, and that's no longer needed.
author Timo Sirainen <tss@iki.fi>
date Sun, 12 Aug 2007 15:10:35 +0300
parents 453128e12b11
children e4eb71ae8e96
line wrap: on
line source

#ifndef __CYDIR_SYNC_H
#define __CYDIR_SYNC_H

enum mailbox_sync_flags;
struct mailbox;

struct cydir_sync_context {
	struct cydir_mailbox *mbox;
        struct mail_index_sync_ctx *index_sync_ctx;
	struct mail_index_view *sync_view;
	struct mail_index_transaction *trans;

	string_t *path;
	unsigned int path_dir_prefix_len;
	uint32_t uid_validity;
};

int cydir_sync_begin(struct cydir_mailbox *mbox,
		     struct cydir_sync_context **ctx_r);
int cydir_sync_finish(struct cydir_sync_context **ctx, bool success);
int cydir_sync(struct cydir_mailbox *mbox);

struct mailbox_sync_context *
cydir_storage_sync_init(struct mailbox *box, enum mailbox_sync_flags flags);

#endif