summaryrefslogtreecommitdiffstats
path: root/src/doveadm/dsync/dsync-mailbox-state.h
blob: a01f5319a4a70bbe56a4b3da9a439dad91274bd1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#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