imapc-list.c revision de0170faf63cbbc4ac90b16d8a17b779d9fac4c8
/* Copyright (c) 2011 Dovecot authors, see the included COPYING file */
#include "lib.h"
#include "imap-arg.h"
#include "imap-match.h"
#include "mailbox-tree.h"
#include "imapc-client.h"
#include "imapc-storage.h"
#include "imapc-list.h"
struct imapc_mailbox_list_iterate_context {
struct mailbox_list_iterate_context ctx;
struct mailbox_tree_iterate_context *iter;
struct imap_match_glob *glob;
struct mailbox_info info;
bool failed;
};
extern struct mailbox_list imapc_mailbox_list;
static struct mailbox_list *imapc_list_alloc(void)
{
struct imapc_mailbox_list *list;
}
{
}
void *context)
{
const char *str;
enum mail_error error;
}
}
static struct mailbox_node *
{
struct mailbox_node *node;
enum mailbox_info_flags info_flags = 0;
bool created;
return NULL;
flags++;
}
if ((info_flags & MAILBOX_NONEXISTENT) != 0)
else
return node;
}
struct imapc_storage *storage)
{
/* we haven't asked for the separator yet.
lets see if this is the reply for its request. */
return;
/* we can't handle NIL separator yet */
return;
}
}
struct imapc_storage *storage)
{
struct mailbox_node *node;
/* we haven't asked for the separator yet */
return;
}
}
{
}
enum mailbox_list_iter_flags flags)
{
struct imapc_simple_context ctx;
if ((flags & MAILBOX_LIST_ITER_SELECT_SUBSCRIBED) == 0) {
"LIST \"\" *");
} else {
"LSUB \"\" *");
}
}
static bool
const char *pattern ATTR_UNUSED)
{
return TRUE;
}
static bool
const char *name ATTR_UNUSED)
{
return TRUE;
}
static bool
const char *name ATTR_UNUSED)
{
return TRUE;
}
{
struct imapc_simple_context ctx;
"LIST \"\" \"\"");
return '/';
}
}
}
static const char *
const char *name ATTR_UNUSED,
enum mailbox_list_path_type type)
{
if (type == MAILBOX_LIST_PATH_TYPE_INDEX)
return "";
return NULL;
}
static const char *
{
i_panic("imapc: Can't return a temp prefix for '%s'",
return NULL;
}
static const char *
{
}
static struct mailbox_list_iterate_context *
enum mailbox_list_iter_flags flags)
{
struct imapc_mailbox_list_iterate_context *ctx;
struct mailbox_tree_context *tree;
char sep;
else {
}
}
static const struct mailbox_info *
{
struct imapc_mailbox_list_iterate_context *ctx =
(struct imapc_mailbox_list_iterate_context *)_ctx;
struct mailbox_node *node;
const char *name;
return NULL;
else
}
}
return NULL;
}
{
struct imapc_mailbox_list_iterate_context *ctx =
(struct imapc_mailbox_list_iterate_context *)_ctx;
return ret;
}
{
struct imapc_simple_context ctx;
}
static int
const char *name ATTR_UNUSED,
{
/* this gets called just before mailbox.create().
we don't need to do anything. */
return 0;
}
static int
{
struct imapc_simple_context ctx;
}
static int
const char *name ATTR_UNUSED)
{
return 0;
}
static int
bool rename_children)
{
struct imapc_simple_context ctx;
if (!rename_children) {
"Renaming without children not supported.");
return -1;
}
"Can't rename mailboxes across storages.");
return -1;
}
}
struct mailbox_list imapc_mailbox_list = {
.props = 0,
{
NULL,
NULL,
NULL,
}
};