mailbox-list-index-iter.c revision e0aff4c7e3336ec4b5edbcfc3a72e1e118603ee2
/* Copyright (c) 2006-2012 Dovecot authors, see the included COPYING file */
#include "lib.h"
#include "str.h"
#include "imap-match.h"
#include "mail-storage.h"
#include "mailbox-list-subscriptions.h"
#include "mailbox-list-index.h"
{
/* for now we don't use indexes when listing subscriptions,
because it needs to list also the nonexistent subscribed
mailboxes, which don't exist in the index. */
return FALSE;
}
/* no indexing wanted with raw lists */
return FALSE;
}
/* refresh failed */
return FALSE;
}
return TRUE;
}
struct mailbox_list_iterate_context *
const char *const *patterns,
enum mailbox_list_iter_flags flags)
{
struct mailbox_list_index_iterate_context *ctx;
if (!iter_use_index(ctx)) {
/* no indexing */
} else {
/* listing mailboxes from index */
ilist->iter_refcount++;
}
}
static void
{
MAILBOX_LIST_ITER_RETURN_SUBSCRIBED)) != 0) {
}
mailbox_free(&box);
}
static void
bool follow_children)
{
} else {
ctx->parent_len--;
}
/* last one */
return;
}
}
}
}
static bool
{
return TRUE;
return TRUE;
return TRUE;
return FALSE;
}
const struct mailbox_info *
{
struct mailbox_list_index_iterate_context *ctx =
(struct mailbox_list_index_iterate_context *)_ctx;
bool follow_children;
enum imap_match_result match;
/* index isn't being used */
}
/* listing mailboxes from index */
IMAP_MATCH_CHILDREN)) != 0;
/* listing only subscriptions, but there are no
subscribed children. */
}
}
return NULL;
}
{
struct mailbox_list_index_iterate_context *ctx =
(struct mailbox_list_index_iterate_context *)_ctx;
else {
ilist->iter_refcount--;
}
return ret;
}