diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 09:51:24 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 09:51:24 +0000 |
commit | f7548d6d28c313cf80e6f3ef89aed16a19815df1 (patch) | |
tree | a3f6f2a3f247293bee59ecd28e8cd8ceb6ca064a /src/doveadm/dsync/dsync-mailbox.h | |
parent | Initial commit. (diff) | |
download | dovecot-upstream.tar.xz dovecot-upstream.zip |
Adding upstream version 1:2.3.19.1+dfsg1.upstream/1%2.3.19.1+dfsg1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/doveadm/dsync/dsync-mailbox.h')
-rw-r--r-- | src/doveadm/dsync/dsync-mailbox.h | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/src/doveadm/dsync/dsync-mailbox.h b/src/doveadm/dsync/dsync-mailbox.h new file mode 100644 index 0000000..7e81c0c --- /dev/null +++ b/src/doveadm/dsync/dsync-mailbox.h @@ -0,0 +1,44 @@ +#ifndef DSYNC_MAILBOX_H +#define DSYNC_MAILBOX_H + +#include "mail-storage.h" + +struct dsync_brain; + +/* Mailbox that is going to be synced. Its name was already sent in the + mailbox tree. */ +struct dsync_mailbox { + guid_128_t mailbox_guid; + bool mailbox_lost; + bool mailbox_ignore; + bool have_guids, have_save_guids, have_only_guid128; + + uint32_t uid_validity, uid_next, messages_count, first_recent_uid; + uint64_t highest_modseq, highest_pvt_modseq; + ARRAY_TYPE(mailbox_cache_field) cache_fields; +}; + +struct dsync_mailbox_attribute { + enum mail_attribute_type type; + const char *key; + /* if both values are NULL = not looked up yet / deleted */ + const char *value; + struct istream *value_stream; + + time_t last_change; /* 0 = unknown */ + uint64_t modseq; /* 0 = unknown */ + + bool deleted; /* attribute is known to have been deleted */ + bool exported; /* internally used by exporting */ +}; +#define DSYNC_ATTR_HAS_VALUE(attr) \ + ((attr)->value != NULL || (attr)->value_stream != NULL) + +void dsync_mailbox_attribute_dup(pool_t pool, + const struct dsync_mailbox_attribute *src, + struct dsync_mailbox_attribute *dest_r); + +int dsync_mailbox_lock(struct dsync_brain *brain, struct mailbox *box, + struct file_lock **lock_r); + +#endif |