cmd-list.c revision b79fcd97b1ce9b413139f71170dc821d3ee3bdee
/* Copyright (C) 2002 Timo Sirainen */
#include "common.h"
#include "strescape.h"
#include "commands.h"
struct list_node {
char *name; /* escaped */
enum mailbox_flags flags;
};
struct list_context {
struct mail_storage *storage;
};
{
const char *str;
NULL);
}
{
continue;
t_push();
/* escaping is done here to make sure we don't try to escape
the separator char */
/* find the node */
break;
}
/* not found, create it */
}
t_pop();
if (*path == '\0')
break;
}
return *node;
}
{
t_push();
/* Send INBOX always uppercased */
name = "INBOX";
else
/* node->name should already be escaped */
t_pop();
}
}
struct mailbox_list_context *ctx,
{
struct mailbox_list *list;
t_push();
name = "INBOX";
else
t_pop();
}
}
struct mailbox_list_context *ctx,
{
struct mailbox_list *list;
/* set the flags, this also overrides the
NOSELECT flag set by list_node_get() */
}
}
int subscribed, const char *sep)
{
struct mailbox_list_context *ctx;
const char *cmd;
int sorted;
&sorted);
return FALSE;
else
}
{
int failed;
if (IS_ESCAPED_CHAR(sep_chr)) {
sep[0] = '\\';
} else {
}
/* <reference> <mailbox wildcards> */
return FALSE;
/* 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;
}
{
}