diff options
Diffstat (limited to 'src/doveadm/dsync/dsync-mailbox-state.h')
-rw-r--r-- | src/doveadm/dsync/dsync-mailbox-state.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/doveadm/dsync/dsync-mailbox-state.h b/src/doveadm/dsync/dsync-mailbox-state.h new file mode 100644 index 0000000..a01f531 --- /dev/null +++ b/src/doveadm/dsync/dsync-mailbox-state.h @@ -0,0 +1,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 |