mailbox-list-private.h revision b31ddaad0c05e2c63cfe45eae28094829e2a5c57
812ac1e2570c600a086c09b24d250224a822a97dTimo Sirainen const char **name, struct mail_storage **storage_r);
812ac1e2570c600a086c09b24d250224a822a97dTimo Sirainen bool (*is_valid_pattern)(struct mailbox_list *list,
812ac1e2570c600a086c09b24d250224a822a97dTimo Sirainen const char *pattern);
812ac1e2570c600a086c09b24d250224a822a97dTimo Sirainen bool (*is_valid_existing_name)(struct mailbox_list *list,
812ac1e2570c600a086c09b24d250224a822a97dTimo Sirainen const char *name);
812ac1e2570c600a086c09b24d250224a822a97dTimo Sirainen bool (*is_valid_create_name)(struct mailbox_list *list,
812ac1e2570c600a086c09b24d250224a822a97dTimo Sirainen const char *name);
812ac1e2570c600a086c09b24d250224a822a97dTimo Sirainen const char *(*get_path)(struct mailbox_list *list, const char *name,
79454ba23ef6baf56997cd3cc23123eb69ae4f4cTimo Sirainen int (*get_mailbox_name_status)(struct mailbox_list *list,
847aeef259d42e2f14cf126699e28291e6e1fb53Timo Sirainen const char *(*get_temp_prefix)(struct mailbox_list *list, bool global);
812ac1e2570c600a086c09b24d250224a822a97dTimo Sirainen const char *(*join_refpattern)(struct mailbox_list *list,
812ac1e2570c600a086c09b24d250224a822a97dTimo Sirainen const char *const *patterns,
e4f1a5fdad77884e1de516521504c15dc936fa9dTimo Sirainen (*iter_next)(struct mailbox_list_iterate_context *ctx);
e4f1a5fdad77884e1de516521504c15dc936fa9dTimo Sirainen int (*iter_deinit)(struct mailbox_list_iterate_context *ctx);
e4f1a5fdad77884e1de516521504c15dc936fa9dTimo Sirainen /* Returns -1 if error, 0 if it's not a valid mailbox, 1 if it is.
812ac1e2570c600a086c09b24d250224a822a97dTimo Sirainen flags may be updated (especially the children flags). */
812ac1e2570c600a086c09b24d250224a822a97dTimo Sirainen int (*iter_is_mailbox)(struct mailbox_list_iterate_context *ctx,
847aeef259d42e2f14cf126699e28291e6e1fb53Timo Sirainen int (*set_subscribed)(struct mailbox_list *list,
812ac1e2570c600a086c09b24d250224a822a97dTimo Sirainen int (*delete_mailbox)(struct mailbox_list *list, const char *name);
812ac1e2570c600a086c09b24d250224a822a97dTimo Sirainen int (*rename_mailbox)(struct mailbox_list *list, const char *oldname,
812ac1e2570c600a086c09b24d250224a822a97dTimo Sirainen const char *newname);
847aeef259d42e2f14cf126699e28291e6e1fb53Timo Sirainen /* called by rename_mailbox() just before running the actual rename() */
847aeef259d42e2f14cf126699e28291e6e1fb53Timo Sirainen int (*rename_mailbox_pre)(struct mailbox_list *list,
b014857be9961acf2d37ef7b76d941b20cc8c2d1Timo Sirainen unsigned int id;
2ac5f36aa7c2e7a07ba8815d43a6d7483f62e74cTimo Sirainen/* private: */
812ac1e2570c600a086c09b24d250224a822a97dTimo Sirainen /* -1 if not set yet. use mailbox_list_get_permissions() to set them */
812ac1e2570c600a086c09b24d250224a822a97dTimo Sirainen ARRAY_DEFINE(module_contexts, union mailbox_list_module_context *);
847aeef259d42e2f14cf126699e28291e6e1fb53Timo Sirainen struct mailbox_list_iterate_context *iter_ctx;
812ac1e2570c600a086c09b24d250224a822a97dTimo Sirainen enum mailbox_info_flags leaf_flags, parent_flags;
2a3fc652e13a574ca14ff2405b5c29a59232db49Timo Sirainen/* Modules should use do "my_id = mailbox_list_module_id++" and
2a3fc652e13a574ca14ff2405b5c29a59232db49Timo Sirainen use objects' module_contexts[id] for their own purposes. */
812ac1e2570c600a086c09b24d250224a822a97dTimo Sirainenextern struct mailbox_list_module_register mailbox_list_module_register;
812ac1e2570c600a086c09b24d250224a822a97dTimo Sirainenextern void (*hook_mailbox_list_created)(struct mailbox_list *list);
812ac1e2570c600a086c09b24d250224a822a97dTimo Sirainenint mailbox_list_settings_parse(const char *data,
812ac1e2570c600a086c09b24d250224a822a97dTimo Sirainen const char **error_r);
847aeef259d42e2f14cf126699e28291e6e1fb53Timo Sirainenint mailbox_list_delete_index_control(struct mailbox_list *list,
847aeef259d42e2f14cf126699e28291e6e1fb53Timo Sirainen const char *name);
79454ba23ef6baf56997cd3cc23123eb69ae4f4cTimo Sirainenvoid mailbox_list_iter_update(struct mailbox_list_iter_update_context *ctx,
d65a556a5ec078cd7f1d0060adb16fc860d66b27Timo Sirainen const char *name);
d65a556a5ec078cd7f1d0060adb16fc860d66b27Timo Sirainenbool mailbox_list_name_is_too_large(const char *name, char sep);
6307d76096764e66bddc63d4a3e5a1aa19cc528fJosef 'Jeff' Sipekenum mailbox_list_file_type mailbox_list_get_file_type(const struct dirent *d);
847aeef259d42e2f14cf126699e28291e6e1fb53Timo Sirainenbool mailbox_list_try_get_absolute_path(struct mailbox_list *list,
72388282bf6718c39af34cfcf51438910f9d62daTimo Sirainen const char **name);
72388282bf6718c39af34cfcf51438910f9d62daTimo Sirainenvoid mailbox_list_clear_error(struct mailbox_list *list);
d9076f5939edf5d20a261494b1a861dcbb0d32e2Timo Sirainenvoid mailbox_list_set_error(struct mailbox_list *list,
72388282bf6718c39af34cfcf51438910f9d62daTimo Sirainenvoid mailbox_list_set_critical(struct mailbox_list *list, const char *fmt, ...)
72388282bf6718c39af34cfcf51438910f9d62daTimo Sirainenvoid mailbox_list_set_internal_error(struct mailbox_list *list);