mail-namespace.h revision 9874ad56b94788297fdac4eae7cba5d651b48222
#ifndef __MAIL_NAMESPACE_H
#define __MAIL_NAMESPACE_H
enum namespace_type {
};
struct mail_namespace {
struct mail_namespace *next;
enum namespace_type type;
const char *prefix;
struct mailbox_list *list;
/* FIXME: we should support multiple storages in one namespace */
struct mail_storage *storage;
};
struct mail_namespace **namespaces_r);
/* Update hierarchy separators in given name to real_sep characters. */
/* Returns namespace based on the mailbox name's prefix. Updates mailbox to
be a valid name inside the namespace (prefix is skipped, hierarchy separator
is changed to real_sep). If no namespaces were found, returns NULL. */
struct mail_namespace *
/* Like above, but ignore hidden namespaces. */
struct mail_namespace *
const char **mailbox);
/* Returns TRUE if the given namespace matches the mailbox's prefix.
Updates mailbox name to be a valid name inside the namespace. */
const char **mailbox);
/* Find a namespace with given prefix. */
struct mail_namespace *
const char *prefix);
#endif