mailbox-list.c revision b1f37113a5760bee842c5a7678bb5fa6f5bd8b60
c25356d5978632df6203437e1953bcb29e0c736fTimo Sirainen/* Copyright (c) 2006-2011 Dovecot authors, see the included COPYING file */
#include "mailbox-tree.h"
#include "mail-storage.h"
#include "mail-storage-hooks.h"
#include "mailbox-list-private.h"
#include <time.h>
#include <ctype.h>
#include <unistd.h>
#include <dirent.h>
void mailbox_lists_init(void)
void mailbox_lists_deinit(void)
unsigned int i, count;
for (i = 0; i < count; i++) {
*idx_r = i;
return TRUE;
return FALSE;
unsigned int idx;
unsigned int idx;
const struct mailbox_list *
unsigned int idx;
return NULL;
return *class_p;
unsigned int idx;
args++;
args++;
args++;
return str;
const char **error_r)
value++;
const char *p, *error;
location++;
location++;
if (p == NULL)
vname++;
const char *vname)
return storage_name;
return storage_name;
if (*p == ns_sep)
*p = list_sep;
return ret;
const char *vname)
unsigned int num;
const char *storage_name)
return vname;
for (i = 0; i < name_len; i++) {
return vname;
struct mail_namespace *
return mode;
struct mail_user *
path);
if (p == NULL) {
path);
if (p == NULL)
const char *expanded_full)
const char *ret;
slash_count++;
slash2_count++;
if (slash_count == 0)
slash_count--;
if (slash_count != 0)
if (slash2_count == 0)
slash2_count--;
if (slash2_count != 0)
return ret;
if (p == NULL)
if (p == unexpanded)
const char *pattern)
bool ret;
T_BEGIN {
} T_END;
return ret;
const char *name)
bool ret;
return TRUE;
T_BEGIN {
} T_END;
return ret;
const char *name)
int ret;
return FALSE;
else T_BEGIN {
} T_END;
const char *path;
switch (type) {
i_unreached();
return pattern;
const char *pattern;
int ret;
return ret;
unsigned int len;
*flags_r = 0;
int ret;
if (ret < 0) {
switch (existence) {
case MAILBOX_EXISTENCE_NONE:
case MAILBOX_EXISTENCE_SELECT:
const char *vname;
fname++;
flags_r);
const char *path;
const char *gid_origin;
return TRUE;
return FALSE;
return TRUE;
int ret;
return ret;
return TRUE;
levels++;
level_len = 0;
level_len++;
return TRUE;
return TRUE;
return FALSE;
#ifdef HAVE_DIRENT_D_TYPE
switch (d->d_type) {
case DT_UNKNOWN:
case DT_REG:
case DT_DIR:
case DT_LNK:
return type;
return FALSE;
return FALSE;
return TRUE;
const char **name)
unsigned int len;
return FALSE;
return FALSE;
return FALSE;
return FALSE;
return TRUE;
path);
if (p == NULL)
const char *name)
const char *str;
const char *error_string;
return FALSE;
return TRUE;