1
#ifndef DSYNC_MAILBOX_TREE_PRIVATE_H
2
#define DSYNC_MAILBOX_TREE_PRIVATE_H
4
#include "dsync-mailbox-tree.h"
6
struct dsync_mailbox_tree {
8
char sep, sep_str[2], remote_sep, alt_char;
9
/* root node isn't part of the real mailbox tree. its name is "" and
11
struct dsync_mailbox_node root;
13
unsigned int iter_count;
15
ARRAY(struct dsync_mailbox_delete) deletes;
17
/* guid_128_t => struct dsync_mailbox_node */
18
HASH_TABLE(uint8_t *, struct dsync_mailbox_node *) name128_hash;
19
HASH_TABLE(uint8_t *, struct dsync_mailbox_node *) name128_remotesep_hash;
20
HASH_TABLE(uint8_t *, struct dsync_mailbox_node *) guid_hash;
23
void dsync_mailbox_tree_build_name128_hash(struct dsync_mailbox_tree *tree);
25
int dsync_mailbox_node_name_cmp(struct dsync_mailbox_node *const *n1,
26
struct dsync_mailbox_node *const *n2);
28
void dsync_mailbox_tree_node_attach(struct dsync_mailbox_node *node,
29
struct dsync_mailbox_node *parent);
30
void dsync_mailbox_tree_node_detach(struct dsync_mailbox_node *node);
32
struct dsync_mailbox_tree *
33
dsync_mailbox_tree_dup(const struct dsync_mailbox_tree *src);
34
bool dsync_mailbox_trees_equal(struct dsync_mailbox_tree *tree1,
35
struct dsync_mailbox_tree *tree2);