mailbox-list-private.h revision 3fe67ec75ccae1230bb9eb9f16affc48377f6441
1ac7c8e9040e0d0b7e9f849e45b94bfe919595a9Timo Sirainen#define MAILBOX_LIST_NAME_MAILDIRPLUSPLUS "maildir++"
1ac7c8e9040e0d0b7e9f849e45b94bfe919595a9Timo Sirainen#define MAILBOX_LOG_FILE_NAME "dovecot.mailbox.log"
e42e27fcc497c7b4a5cc0b6ff304abca5ccfcb4fTimo Sirainen int (*get_storage)(struct mailbox_list **list, const char **name,
99695d99930b35c2bac85d52e976b44cf8485d83Timo Sirainen bool (*is_valid_pattern)(struct mailbox_list *list,
1ac7c8e9040e0d0b7e9f849e45b94bfe919595a9Timo Sirainen const char *pattern);
1ac7c8e9040e0d0b7e9f849e45b94bfe919595a9Timo Sirainen bool (*is_valid_existing_name)(struct mailbox_list *list,
99695d99930b35c2bac85d52e976b44cf8485d83Timo Sirainen const char *name);
1ac7c8e9040e0d0b7e9f849e45b94bfe919595a9Timo Sirainen bool (*is_valid_create_name)(struct mailbox_list *list,
99695d99930b35c2bac85d52e976b44cf8485d83Timo Sirainen const char *name);
99695d99930b35c2bac85d52e976b44cf8485d83Timo Sirainen const char *(*get_path)(struct mailbox_list *list, const char *name,
99695d99930b35c2bac85d52e976b44cf8485d83Timo Sirainen int (*get_mailbox_name_status)(struct mailbox_list *list,
1ac7c8e9040e0d0b7e9f849e45b94bfe919595a9Timo Sirainen const char *(*get_temp_prefix)(struct mailbox_list *list, bool global);
1ac7c8e9040e0d0b7e9f849e45b94bfe919595a9Timo Sirainen const char *(*join_refpattern)(struct mailbox_list *list,
1ac7c8e9040e0d0b7e9f849e45b94bfe919595a9Timo Sirainen const char *const *patterns,
1ac7c8e9040e0d0b7e9f849e45b94bfe919595a9Timo Sirainen (*iter_next)(struct mailbox_list_iterate_context *ctx);
7631f16156aca373004953fe6b01a7f343fb47e0Timo Sirainen int (*iter_deinit)(struct mailbox_list_iterate_context *ctx);
1ac7c8e9040e0d0b7e9f849e45b94bfe919595a9Timo Sirainen /* Returns -1 if error, 0 if it's not a valid mailbox, 1 if it is.
1ac7c8e9040e0d0b7e9f849e45b94bfe919595a9Timo Sirainen flags may be updated (especially the children flags). */
1ac7c8e9040e0d0b7e9f849e45b94bfe919595a9Timo Sirainen int (*iter_is_mailbox)(struct mailbox_list_iterate_context *ctx,
1ac7c8e9040e0d0b7e9f849e45b94bfe919595a9Timo Sirainen int (*set_subscribed)(struct mailbox_list *list,
d4002fe1f64d25a792f76fb102ef7dc519cd4e24Martti Rannanjärvi int (*delete_mailbox)(struct mailbox_list *list, const char *name);
d4002fe1f64d25a792f76fb102ef7dc519cd4e24Martti Rannanjärvi int (*rename_mailbox)(struct mailbox_list *oldlist, const char *oldname,
1ac7c8e9040e0d0b7e9f849e45b94bfe919595a9Timo Sirainen struct mailbox_list *newlist, const char *newname,
99695d99930b35c2bac85d52e976b44cf8485d83Timo Sirainen /* called by rename_mailbox() just before running the actual rename() */
1ac7c8e9040e0d0b7e9f849e45b94bfe919595a9Timo Sirainen int (*rename_mailbox_pre)(struct mailbox_list *oldlist,
b9f564d00b7a115f465ffd6840341c7b8f9bfc8aTimo Sirainen const char *newname);
1ac7c8e9040e0d0b7e9f849e45b94bfe919595a9Timo Sirainen int (*get_guid)(struct mailbox_list *list, const char *name,
1ac7c8e9040e0d0b7e9f849e45b94bfe919595a9Timo Sirainen unsigned int id;
e6440616c02bb1404dc35debf45d9741260c7831Timo Sirainen/* private: */
1b6c4fdd2bb4234b5711874b3845547f49649744Timo Sirainen /* -1 if not set yet. use mailbox_list_get_permissions() to set them */
b9f564d00b7a115f465ffd6840341c7b8f9bfc8aTimo Sirainen /* origin (e.g. path) where the file_create_gid was got from */
d4002fe1f64d25a792f76fb102ef7dc519cd4e24Martti Rannanjärvi ARRAY_DEFINE(module_contexts, union mailbox_list_module_context *);
c3d9da3955043aef88c17b71f2081e894186aa6bTimo Sirainen struct mailbox_list_iterate_context *iter_ctx;
e6440616c02bb1404dc35debf45d9741260c7831Timo Sirainen enum mailbox_info_flags leaf_flags, parent_flags;
1ac7c8e9040e0d0b7e9f849e45b94bfe919595a9Timo Sirainen/* Modules should use do "my_id = mailbox_list_module_id++" and
804fa3f03bd9170272168a5ad214053bbe3160c7Josef 'Jeff' Sipek use objects' module_contexts[id] for their own purposes. */
99695d99930b35c2bac85d52e976b44cf8485d83Timo Sirainenextern struct mailbox_list_module_register mailbox_list_module_register;
1ac7c8e9040e0d0b7e9f849e45b94bfe919595a9Timo Sirainenint mailbox_list_settings_parse(const char *data,
1ac7c8e9040e0d0b7e9f849e45b94bfe919595a9Timo Sirainen const char **error_r);
1ac7c8e9040e0d0b7e9f849e45b94bfe919595a9Timo Sirainenint mailbox_list_delete_index_control(struct mailbox_list *list,
1ac7c8e9040e0d0b7e9f849e45b94bfe919595a9Timo Sirainen const char *name);
1f19649986397419d014febd1337c6eb7b530f26Timo Sirainenvoid mailbox_list_iter_update(struct mailbox_list_iter_update_context *ctx,
1f19649986397419d014febd1337c6eb7b530f26Timo Sirainen const char *name);
1f19649986397419d014febd1337c6eb7b530f26Timo Sirainenbool mailbox_list_name_is_too_large(const char *name, char sep);
b58aafbd21b365117538f73f306d22f75acd91f1Timo Sirainenenum mailbox_list_file_type mailbox_list_get_file_type(const struct dirent *d);
1f19649986397419d014febd1337c6eb7b530f26Timo Sirainenbool mailbox_list_try_get_absolute_path(struct mailbox_list *list,
b58aafbd21b365117538f73f306d22f75acd91f1Timo Sirainen const char **name);
f89eb8f2cda0bd6d40a9f96db1c92517f0593871Martti Rannanjärvivoid mailbox_list_add_change(struct mailbox_list *list,
1ac7c8e9040e0d0b7e9f849e45b94bfe919595a9Timo Sirainen const uint8_t mailbox_guid[MAIL_GUID_128_SIZE]);
1ac7c8e9040e0d0b7e9f849e45b94bfe919595a9Timo Sirainenint mailbox_list_get_guid_path(struct mailbox_list *list, const char *path,
99695d99930b35c2bac85d52e976b44cf8485d83Timo Sirainenvoid mailbox_list_clear_error(struct mailbox_list *list);
a8bc64d2ec8babb5109fa23aa3c90383de61cd69Timo Sirainenvoid mailbox_list_set_error(struct mailbox_list *list,
9865d9e7c5713e41db939222ed9c0225a11fb99eTimo Sirainenvoid mailbox_list_set_critical(struct mailbox_list *list, const char *fmt, ...)
2b9dbb270ad82e58d5f3581436e6f143176d5819Timo Sirainenvoid mailbox_list_set_internal_error(struct mailbox_list *list);