/* Copyright (c) 2013-2018 Dovecot authors, see the included COPYING file */
#include "lib.h"
#include "array.h"
#include "hash.h"
#include "str.h"
#include "sort.h"
#include "mailbox-list-private.h"
#include "dsync-mailbox-tree-private.h"
struct dsync_mailbox_tree_iter {
};
{
return tree;
}
{
}
static struct dsync_mailbox_node *
{
return nodes;
}
return NULL;
}
struct dsync_mailbox_node *
const char *full_name)
{
T_BEGIN {
const char *const *path;
} T_END;
return node;
}
struct dsync_mailbox_node *parent)
{
}
{
struct dsync_mailbox_node **p;
if (*p == node) {
break;
}
}
}
struct dsync_mailbox_node *
{
T_BEGIN {
const char *const *path;
/* find the existing part */
break;
}
/* create the rest */
}
} T_END;
return node;
}
static void
{
}
const struct dsync_mailbox_node *node)
{
}
const struct dsync_mailbox_tree *tree,
const struct dsync_mailbox_node *node)
{
/* remove the trailing separator */
}
const struct dsync_mailbox_node *src)
{
sizeof(dest->mailbox_guid));
}
struct dsync_mailbox_tree_iter *
{
tree->iter_count++;
return iter;
}
{
else {
}
}
const char **full_name_r,
struct dsync_mailbox_node **node_r)
{
else {
return FALSE;
}
}
return TRUE;
}
{
}
{
const char *name;
}
}
static const char *
{
else
}
}
static void
{
const char *name;
T_BEGIN {
const char *remote_name =
} T_END;
}
}
struct dsync_mailbox_node *node,
struct dsync_mailbox_node **old_node_r)
{
return 0;
return -1;
return 0;
}
struct dsync_mailbox_node **dup_node1_r,
struct dsync_mailbox_node **dup_node2_r)
{
const char *name;
int ret = 0;
}
*dup_node1_r = node;
*dup_node2_r = old_node;
ret = -1;
}
}
return ret;
}
struct dsync_mailbox_node *
const guid_128_t guid)
{
}
const struct dsync_mailbox_delete *
unsigned int *count_r)
{
}
struct dsync_mailbox_node *
const struct dsync_mailbox_delete *del)
{
/* find node by GUID */
}
/* find node by name. this is a bit tricky, since the hierarchy
separator may differ from ours. */
} else {
}
}
char remote_sep)
{
}
static void
const struct dsync_mailbox_node *src,
{
if (prefix_len > 0) {
prefix_len++;
}
sizeof(node->mailbox_guid));
}
}
}
struct dsync_mailbox_tree *
{
return dest;
}
struct dsync_mailbox_node *const *n2)
{
}
static bool
const struct dsync_mailbox_node *node2)
{
sizeof(node1->mailbox_guid)) == 0 &&
}
static bool
struct dsync_mailbox_node *node2)
{
/* this function is used only for unit tests, so performance doesn't
really matter */
unsigned int i, count;
if (i != count)
return FALSE;
if (count == 0)
return TRUE;
/* sort the trees by name */
snodes1[i] = n;
snodes2[i] = n;
for (i = 0; i < count; i++) {
return FALSE;
snodes2[i]->first_child))
return FALSE;
}
return TRUE;
}
struct dsync_mailbox_tree *tree2)
{
bool ret;
T_BEGIN {
} T_END;
return ret;
}
{
return t_strdup_printf("guid=%s uid_validity=%u uid_next=%u subs=%s last_change=%ld last_subs=%ld",
(long)node->last_renamed_or_created,
(long)node->last_subscription_change);
}
const char *
{
switch (type) {
return "mailbox";
return "dir";
return "unsubscribe";
}
i_unreached();
}