mailbox-list-private.h revision 697ff56bf3cdc9e7989ea2a70accf866b14b64d1
1c633f71ec2060e5bfa500a97f34cd881a958ecdTimo Sirainen#define MAILBOX_LIST_NAME_MAILDIRPLUSPLUS "maildir++"
1c633f71ec2060e5bfa500a97f34cd881a958ecdTimo Sirainen#define MAILBOX_LOG_FILE_NAME "dovecot.mailbox.log"
1c633f71ec2060e5bfa500a97f34cd881a958ecdTimo Sirainen#define T_MAILBOX_LIST_ERR_NOT_FOUND(list, name) \
1c633f71ec2060e5bfa500a97f34cd881a958ecdTimo Sirainen t_strdup_printf(MAIL_ERRSTR_MAILBOX_NOT_FOUND, \
1c633f71ec2060e5bfa500a97f34cd881a958ecdTimo Sirainen (((flags) & (MAILBOX_SELECT | MAILBOX_NOSELECT | \
1c633f71ec2060e5bfa500a97f34cd881a958ecdTimo Sirainen int (*init)(struct mailbox_list *list, const char **error_r);
1c633f71ec2060e5bfa500a97f34cd881a958ecdTimo Sirainen int (*get_storage)(struct mailbox_list **list, const char *vname,
1c633f71ec2060e5bfa500a97f34cd881a958ecdTimo Sirainen char (*get_hierarchy_sep)(struct mailbox_list *list);
1c633f71ec2060e5bfa500a97f34cd881a958ecdTimo Sirainen const char *(*get_vname)(struct mailbox_list *list,
1c633f71ec2060e5bfa500a97f34cd881a958ecdTimo Sirainen const char *(*get_storage_name)(struct mailbox_list *list,
1c633f71ec2060e5bfa500a97f34cd881a958ecdTimo Sirainen const char *vname);
1c633f71ec2060e5bfa500a97f34cd881a958ecdTimo Sirainen int (*get_path)(struct mailbox_list *list, const char *name,
1c633f71ec2060e5bfa500a97f34cd881a958ecdTimo Sirainen enum mailbox_list_path_type type, const char **path_r);
1c633f71ec2060e5bfa500a97f34cd881a958ecdTimo Sirainen const char *(*get_temp_prefix)(struct mailbox_list *list, bool global);
1c633f71ec2060e5bfa500a97f34cd881a958ecdTimo Sirainen const char *(*join_refpattern)(struct mailbox_list *list,
1c633f71ec2060e5bfa500a97f34cd881a958ecdTimo Sirainen const char *const *patterns,
1c633f71ec2060e5bfa500a97f34cd881a958ecdTimo Sirainen (*iter_next)(struct mailbox_list_iterate_context *ctx);
1c633f71ec2060e5bfa500a97f34cd881a958ecdTimo Sirainen int (*iter_deinit)(struct mailbox_list_iterate_context *ctx);
1c633f71ec2060e5bfa500a97f34cd881a958ecdTimo Sirainen int (*get_mailbox_flags)(struct mailbox_list *list,
1c633f71ec2060e5bfa500a97f34cd881a958ecdTimo Sirainen /* Returns TRUE if name is mailbox's internal file/directory.
1c633f71ec2060e5bfa500a97f34cd881a958ecdTimo Sirainen If it does, mailbox deletion assumes it can safely delete it. */
1c633f71ec2060e5bfa500a97f34cd881a958ecdTimo Sirainen bool (*is_internal_name)(struct mailbox_list *list, const char *name);
1c633f71ec2060e5bfa500a97f34cd881a958ecdTimo Sirainen /* Read subscriptions from src_list, but place them into
1c633f71ec2060e5bfa500a97f34cd881a958ecdTimo Sirainen dest_list->subscriptions. Set errors to dest_list. */
1c633f71ec2060e5bfa500a97f34cd881a958ecdTimo Sirainen int (*subscriptions_refresh)(struct mailbox_list *src_list,
1c633f71ec2060e5bfa500a97f34cd881a958ecdTimo Sirainen int (*set_subscribed)(struct mailbox_list *list,
1c633f71ec2060e5bfa500a97f34cd881a958ecdTimo Sirainen int (*delete_mailbox)(struct mailbox_list *list, const char *name);
1c633f71ec2060e5bfa500a97f34cd881a958ecdTimo Sirainen int (*delete_dir)(struct mailbox_list *list, const char *name);
1c633f71ec2060e5bfa500a97f34cd881a958ecdTimo Sirainen int (*delete_symlink)(struct mailbox_list *list, const char *name);
1c633f71ec2060e5bfa500a97f34cd881a958ecdTimo Sirainen int (*rename_mailbox)(struct mailbox_list *oldlist, const char *oldname,
1c633f71ec2060e5bfa500a97f34cd881a958ecdTimo Sirainen struct mailbox_list *newlist, const char *newname);
1c633f71ec2060e5bfa500a97f34cd881a958ecdTimo Sirainen int (*notify_next)(struct mailbox_list_notify *notify,
1c633f71ec2060e5bfa500a97f34cd881a958ecdTimo Sirainen const struct mailbox_list_notify_rec **rec_r);
1c633f71ec2060e5bfa500a97f34cd881a958ecdTimo Sirainen void (*notify_deinit)(struct mailbox_list_notify *notify);
1c633f71ec2060e5bfa500a97f34cd881a958ecdTimo Sirainen void (*notify_wait)(struct mailbox_list_notify *notify,
1c633f71ec2060e5bfa500a97f34cd881a958ecdTimo Sirainen void (*callback)(void *context), void *context);
1c633f71ec2060e5bfa500a97f34cd881a958ecdTimo Sirainen unsigned int id;
1c633f71ec2060e5bfa500a97f34cd881a958ecdTimo Sirainen/* private: */
1c633f71ec2060e5bfa500a97f34cd881a958ecdTimo Sirainen /* may not be set yet, use mailbox_list_get_permissions() to access */
1c633f71ec2060e5bfa500a97f34cd881a958ecdTimo Sirainen time_t subscriptions_mtime, subscriptions_read_time;
1c633f71ec2060e5bfa500a97f34cd881a958ecdTimo Sirainen HASH_TABLE(uint8_t *, struct mailbox_guid_cache_rec *) guid_cache;
1c633f71ec2060e5bfa500a97f34cd881a958ecdTimo Sirainen ARRAY(union mailbox_list_module_context *) module_contexts;
bool failed;
struct mailbox_list_iter_update_context {
void mailbox_lists_init(void);
void mailbox_lists_deinit(void);
const char **error_r);
const char *vname);
const char *storage_name);
const char **path_r);
const char *name);
const char *name);
const char *dir_path,
const struct dirent *d);
const char **name);