mailbox-list-private.h revision 5069b6adc4acb0efb3c6e87e778b820bae9bae9b
#ifndef MAILBOX_LIST_PRIVATE_H
#define MAILBOX_LIST_PRIVATE_H
#include "mailbox-log.h"
#include "mailbox-list-notify.h"
#include "mail-namespace.h"
#include "mailbox-list.h"
#include "mailbox-list-iter.h"
#include "mail-storage-settings.h"
#define MAILBOX_LIST_NAME_MAILDIRPLUSPLUS "maildir++"
#define MAILBOX_LIST_NAME_IMAPDIR "imapdir"
#define MAILBOX_LIST_NAME_FS "fs"
#define MAILBOX_LIST_NAME_INDEX "index"
#define MAILBOX_LIST_NAME_NONE "none"
#define MAILBOX_LIST_INDEX_DEFAULT_PREFIX "dovecot.list.index"
#define MAILBOX_LOG_FILE_NAME "dovecot.mailbox.log"
struct stat;
struct dirent;
struct fs;
struct imap_match_glob;
struct mailbox_tree_context;
struct mailbox_list_notify;
struct mailbox_list_notify_rec;
#define MAILBOX_INFO_FLAGS_FINISHED(flags) \
MAILBOX_NONEXISTENT)) != 0)
struct mailbox_list_vfuncs {
struct mailbox_list *(*alloc)(void);
struct mail_storage **storage_r);
const char *storage_name);
const char *vname);
struct mailbox_list_iterate_context *
const char *const *patterns,
enum mailbox_list_iter_flags flags);
const struct mailbox_info *
enum mailbox_list_file_type type,
enum mailbox_info_flags *flags_r);
If it does, mailbox deletion assumes it can safely delete it. */
/* Read subscriptions from src_list, but place them into
dest_list->subscriptions. Set errors to dest_list. */
struct mailbox_list *dest_list);
struct mailbox_list_notify **notify_r);
const struct mailbox_list_notify_rec **rec_r);
};
struct mailbox_list_module_register {
unsigned int id;
};
union mailbox_list_module_context {
struct mailbox_list_vfuncs super;
struct mailbox_list_module_register *reg;
};
struct mailbox_list {
const char *name;
enum mailbox_list_properties props;
struct mailbox_list_vfuncs v, *vlast;
/* private: */
struct mail_namespace *ns;
struct mailbox_list_settings set;
const struct mail_storage_settings *mail_set;
enum mailbox_list_flags flags;
/* may not be set yet, use mailbox_list_get_permissions() to access */
struct mailbox_permissions root_permissions;
struct mailbox_tree_context *subscriptions;
struct mailbox_log *changelog;
bool guid_cache_errors;
/* Last error set in mailbox_list_set_critical(). */
char *last_internal_error;
char *error_string;
enum mail_error error;
bool temporary_error;
bool index_root_dir_created:1;
bool guid_cache_updated:1;
bool guid_cache_invalidated:1;
bool last_error_is_internal:1;
};
struct mailbox_list_module_register *reg;
};
struct mailbox_list_iterate_context {
struct mailbox_list *list;
enum mailbox_list_iter_flags flags;
bool failed;
bool index_iteration;
struct imap_match_glob *glob;
struct mailbox_info specialuse_info;
};
struct mailbox_list_iter_update_context {
struct mailbox_list_iterate_context *iter_ctx;
struct mailbox_tree_context *tree_ctx;
struct imap_match_glob *glob;
bool update_only:1;
bool match_parents:1;
};
/* Modules should use do "my_id = mailbox_list_module_id++" and
use objects' module_contexts[id] for their own purposes. */
extern struct mailbox_list_module_register mailbox_list_module_register;
void mailbox_lists_init(void);
void mailbox_lists_deinit(void);
struct mailbox_list_settings *set_r,
const char **error_r);
const char *
const char *
const char *maildir_name);
const char *
const char *
const char *vname);
const char *storage_name);
enum mailbox_list_path_type type);
enum mailbox_list_path_type type,
const char **path_r);
const char *name);
const char *name);
const struct mailbox_info *
const char *dir_path,
const struct dirent *d);
const char **name);
const struct mailbox_permissions *src,
enum mailbox_log_record_type type,
const guid_128_t guid_128);
const struct mailbox_info *
const struct mailbox_info *_info);
#endif