view src/doveadm/dsync/dsync-mailbox-state.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 9669c9a8984f
children
line wrap: on
line source

#ifndef DSYNC_MAILBOX_STATE_H
#define DSYNC_MAILBOX_STATE_H

#include "guid.h"

struct dsync_mailbox_state {
	guid_128_t mailbox_guid;
	uint32_t last_uidvalidity;
	uint32_t last_common_uid;
	uint64_t last_common_modseq;
	uint64_t last_common_pvt_modseq;
	uint32_t last_messages_count;
	bool changes_during_sync;
};
ARRAY_DEFINE_TYPE(dsync_mailbox_state, struct dsync_mailbox_state);
HASH_TABLE_DEFINE_TYPE(dsync_mailbox_state, uint8_t *, struct dsync_mailbox_state *);

void dsync_mailbox_states_export(const HASH_TABLE_TYPE(dsync_mailbox_state) states,
				 string_t *output);
int dsync_mailbox_states_import(HASH_TABLE_TYPE(dsync_mailbox_state) states,
				pool_t pool, const char *input,
				const char **error_r);

#endif