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-tree-private.h | |
parent | Initial commit. (diff) | |
download | dovecot-f7548d6d28c313cf80e6f3ef89aed16a19815df1.tar.xz dovecot-f7548d6d28c313cf80e6f3ef89aed16a19815df1.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-tree-private.h')
-rw-r--r-- | src/doveadm/dsync/dsync-mailbox-tree-private.h | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/src/doveadm/dsync/dsync-mailbox-tree-private.h b/src/doveadm/dsync/dsync-mailbox-tree-private.h new file mode 100644 index 0000000..0614151 --- /dev/null +++ b/src/doveadm/dsync/dsync-mailbox-tree-private.h @@ -0,0 +1,38 @@ +#ifndef DSYNC_MAILBOX_TREE_PRIVATE_H +#define DSYNC_MAILBOX_TREE_PRIVATE_H + +#include "dsync-mailbox-tree.h" + +struct dsync_mailbox_tree { + pool_t pool; + char sep, sep_str[2], remote_sep, alt_char; + char escape_char, remote_escape_char; + /* root node isn't part of the real mailbox tree. its name is "" and + it has no siblings */ + struct dsync_mailbox_node root; + + unsigned int iter_count; + + ARRAY(struct dsync_mailbox_delete) deletes; + + /* guid_128_t => struct dsync_mailbox_node */ + HASH_TABLE(uint8_t *, struct dsync_mailbox_node *) name128_hash; + HASH_TABLE(uint8_t *, struct dsync_mailbox_node *) name128_remotesep_hash; + HASH_TABLE(uint8_t *, struct dsync_mailbox_node *) guid_hash; +}; + +void dsync_mailbox_tree_build_name128_hash(struct dsync_mailbox_tree *tree); + +int dsync_mailbox_node_name_cmp(struct dsync_mailbox_node *const *n1, + struct dsync_mailbox_node *const *n2); + +void dsync_mailbox_tree_node_attach(struct dsync_mailbox_node *node, + struct dsync_mailbox_node *parent); +void dsync_mailbox_tree_node_detach(struct dsync_mailbox_node *node); + +struct dsync_mailbox_tree * +dsync_mailbox_tree_dup(const struct dsync_mailbox_tree *src); +bool dsync_mailbox_trees_equal(struct dsync_mailbox_tree *tree1, + struct dsync_mailbox_tree *tree2); + +#endif |