view src/imap/imap-sync.h @ 22656:1789bf2a1e01

director: Make sure HOST-RESET-USERS isn't used with max_moving_users=0 The reset command would just hang in that case. doveadm would never have sent this, so this is just an extra sanity check.
author Timo Sirainen <timo.sirainen@dovecot.fi>
date Sun, 05 Nov 2017 23:51:56 +0200
parents 9ca924a62d0b
children
line wrap: on
line source

#ifndef IMAP_SYNC_H
#define IMAP_SYNC_H

enum imap_sync_flags {
	IMAP_SYNC_FLAG_SEND_UID	= 0x01,
	IMAP_SYNC_FLAG_SAFE	= 0x02
};

struct client;

struct imap_sync_context *
imap_sync_init(struct client *client, struct mailbox *box,
	       enum imap_sync_flags imap_flags, enum mailbox_sync_flags flags);
int imap_sync_deinit(struct imap_sync_context *ctx,
		     struct client_command_context *sync_cmd);
int imap_sync_more(struct imap_sync_context *ctx);

/* Returns TRUE if syncing would be allowed currently. */
bool imap_sync_is_allowed(struct client *client);

bool cmd_sync(struct client_command_context *cmd, enum mailbox_sync_flags flags,
	      enum imap_sync_flags imap_flags, const char *tagline);
bool cmd_sync_delayed(struct client *client) ATTR_NOWARN_UNUSED_RESULT;

#endif