cmd-list.c revision 0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834
/* Copyright (C) 2002 Timo Sirainen */
#include "common.h"
#include "str.h"
#include "strescape.h"
#include "imap-quote.h"
#include "imap-match.h"
#include "commands.h"
#include "namespace.h"
enum {
_MAILBOX_LIST_HIDE_CHILDREN = 0x1000000,
_MAILBOX_LIST_LISTEXT = 0x0800000
};
static const char *
{
const char *str;
if (flags & MAILBOX_PLACEHOLDER) {
if ((list_flags & _MAILBOX_LIST_LISTEXT) == 0)
}
if ((flags & MAILBOX_NONEXISTENT) != 0 &&
(list_flags & _MAILBOX_LIST_LISTEXT) == 0) {
flags &= ~MAILBOX_NONEXISTENT;
}
if ((list_flags & _MAILBOX_LIST_HIDE_CHILDREN) != 0)
str = t_strconcat(
NULL);
}
enum mailbox_list_flags list_flags)
{
struct mailbox_list_context *ctx;
struct mailbox_list *list;
return FALSE;
str_truncate(str, 0);
sep);
else
}
return mail_storage_mailbox_list_deinit(ctx);
}
enum mailbox_list_flags *list_flags)
{
const char *atom;
"List options contains non-atoms.");
return FALSE;
}
else {
return FALSE;
}
args++;
}
return TRUE;
}
{
struct mail_storage *storage;
enum mailbox_list_flags list_flags;
int failed;
/* [(<options>)] <reference> <mailbox wildcards> */
return FALSE;
if (lsub) {
/* LSUB - we don't care about flags */
/* LIST - allow children flags, but don't require them */
list_flags = 0;
} else {
&list_flags))
return TRUE;
args++;
/* don't show children flags unless explicitly specified */
if ((list_flags & MAILBOX_LIST_CHILDREN) == 0)
}
return TRUE;
}
/* FIXME: really needs some work.. */
else
sep[0] = '\\';
} else {
}
/* special request to return the hierarchy delimiter */
} else {
if (*ref != '\0') {
/* join reference + mask */
/* LIST A. .B -> A.B */
mask++;
}
/* LIST A B -> A.B */
} else {
}
}
}
if (failed)
else {
"OK Lsub completed." :
"OK List completed.");
}
return TRUE;
}
{
}