#define PASSDB_CACHE_H
#include "auth-cache.h"
+#include "passdb.h"
-enum passdb_result;
extern struct auth_cache *passdb_cache;
bool passdb_cache_verify_plain(struct auth_request *request, const char *key,
#ifndef CONFIG_REQUEST_H
#define CONFIG_REQUEST_H
+#include "settings-parser.h"
#include "config-filter.h"
-enum setting_type;
struct master_service_settings_output;
enum config_dump_scope {
#ifndef OLD_SET_PARSER_H
#define OLD_SET_PARSER_H
-enum config_line_type;
+#include "config-parser-private.h"
+
struct config_parser_context;
bool old_settings_handle(struct config_parser_context *ctx,
#include "mail-namespace.h"
#include "mail-storage.h"
#include "mail-search-build.h"
+#include "mailbox-list-iter.h"
#include "doveadm-settings.h"
#include "doveadm-mail.h"
#ifndef DOVEADM_MAIL_ITER_H
#define DOVEADM_MAIL_ITER_H
+#include "mailbox-list-iter.h"
+
struct doveadm_mail_iter;
struct doveadm_mail_cmd_context;
#include "mail-storage-service.h"
#include "mail-search-build.h"
#include "mail-search-parser.h"
+#include "mailbox-list-iter.h"
#include "doveadm.h"
#include "doveadm-settings.h"
#include "doveadm-print.h"
#include "doveadm.h"
#include "doveadm-util.h"
#include "module-context.h"
+#include "mail-error.h"
#include "mail-storage-service.h"
-enum mail_error;
struct mailbox;
struct mail_storage;
struct mail_user;
#ifndef DOVEADM_MAILBOX_LIST_ITER_H
#define DOVEADM_MAILBOX_LIST_ITER_H
+#include "mailbox-list-iter.h"
+
struct doveadm_mail_cmd_context;
/* List only selectable mailboxes */
#include "mailbox-log.h"
#include "mail-namespace.h"
#include "mail-storage.h"
-#include "mailbox-list.h"
+#include "mailbox-list-iter.h"
#include "dsync-mailbox-tree-private.h"
static int
#include "array.h"
#include "str.h"
#include "strescape.h"
+#include "mailbox-list-iter.h"
#include "imap-utf7.h"
#include "imap-quote.h"
#include "imap-match.h"
#include "imap-status.h"
#include "imap-commands.h"
#include "imap-list.h"
-#include "mail-namespace.h"
struct cmd_list_context {
struct client_command_context *cmd;
#include "imap-common.h"
#include "str.h"
+#include "mailbox-list-iter.h"
#include "imap-quote.h"
#include "imap-commands.h"
#include "imap-fetch.h"
#include "str.h"
#include "ostream.h"
#include "imap-quote.h"
+#include "mailbox-list-iter.h"
#include "mailbox-list-notify.h"
#include "mail-search.h"
#include "mail-search-build.h"
#define IMAP_UTIL_H
#include "seq-range-array.h"
+#include "mail-types.h"
-enum mail_flags;
struct imap_arg;
/* Write flags as a space separated string. */
#ifndef MAIL_INDEX_MODSEQ_H
#define MAIL_INDEX_MODSEQ_H
+#include "mail-types.h"
+
#define MAIL_INDEX_MODSEQ_EXT_NAME "modseq"
-enum mail_flags;
struct mail_keywords;
struct mail_index;
struct mail_index_map;
#define MAIL_DELIVER_H
#include "guid.h"
+#include "mail-types.h"
+#include "mail-error.h"
-enum mail_flags;
-enum mail_error;
struct mail_storage;
struct mail_save_context;
struct mailbox;
mail-user.h \
mailbox-guid-cache.h \
mailbox-list.h \
+ mailbox-list-iter.h \
mailbox-list-private.h \
mailbox-list-notify.h \
mailbox-search-result-private.h \
#ifndef CYDIR_SYNC_H
#define CYDIR_SYNC_H
-enum mailbox_sync_flags;
struct mailbox;
struct mailbox_sync_status;
/* If syncing takes longer than this, log a warning. */
#define MAILDIR_SYNC_TIME_WARN_SECS 60
-enum maildir_uidlist_rec_flag;
-
struct maildir_mailbox;
struct maildir_sync_context;
struct maildir_keywords_sync_ctx;
#ifndef MAILBOX_LIST_DELETE_H
#define MAILBOX_LIST_DELETE_H
-enum mailbox_list_path_type;
+#include "mailbox-list.h"
int mailbox_list_delete_maildir_via_trash(struct mailbox_list *list,
const char *name,
#define INDEX_LIST_CONTEXT(obj) \
MODULE_CONTEXT(obj, mailbox_list_index_module)
-enum mailbox_status_items;
struct mail_index_view;
struct mailbox;
struct mailbox_status;
#ifndef MAILBOX_LIST_SUBSCRIPTIONS_H
#define MAILBOX_LIST_SUBSCRIPTIONS_H
-enum mailbox_info_flags;
-enum mailbox_list_iter_flags;
+#include "mailbox-list-iter.h"
+
struct mailbox_tree_context;
struct mailbox_list_iterate_context;
--- /dev/null
+#ifndef MAILBOX_LIST_ITER_H
+#define MAILBOX_LIST_ITER_H
+
+#include "mail-namespace.h"
+#include "mailbox-list.h"
+
+enum mailbox_list_iter_flags {
+ /* Ignore index file and ACLs (used by ACL plugin internally) */
+ MAILBOX_LIST_ITER_RAW_LIST = 0x000001,
+ /* Don't list autocreated mailboxes (e.g. INBOX) unless they
+ physically exist */
+ MAILBOX_LIST_ITER_NO_AUTO_BOXES = 0x000004,
+
+ /* For mailbox_list_iter_init_namespaces(): Skip namespaces that
+ have alias_for set. */
+ MAILBOX_LIST_ITER_SKIP_ALIASES = 0x000008,
+ /* For mailbox_list_iter_init_namespaces(): '*' in a pattern doesn't
+ match beyond namespace boundary (e.g. "foo*" or "*o" doesn't match
+ "foo." namespace's mailboxes, but "*.*" does). also '%' can't match
+ namespace prefixes, if there exists a parent namespace whose children
+ it matches. */
+ MAILBOX_LIST_ITER_STAR_WITHIN_NS = 0x000010,
+
+ /* List only subscribed mailboxes */
+ MAILBOX_LIST_ITER_SELECT_SUBSCRIBED = 0x000100,
+ /* Return MAILBOX_CHILD_* if mailbox's children match selection
+ criteria, even if the mailbox itself wouldn't match. */
+ MAILBOX_LIST_ITER_SELECT_RECURSIVEMATCH = 0x000200,
+ /* Return only mailboxes that have special use flags */
+ MAILBOX_LIST_ITER_SELECT_SPECIALUSE = 0x000400,
+
+ /* Don't return any flags unless it can be done without cost */
+ MAILBOX_LIST_ITER_RETURN_NO_FLAGS = 0x001000,
+ /* Return MAILBOX_SUBSCRIBED flag */
+ MAILBOX_LIST_ITER_RETURN_SUBSCRIBED = 0x002000,
+ /* Return children flags */
+ MAILBOX_LIST_ITER_RETURN_CHILDREN = 0x004000,
+ /* Return IMAP special use flags */
+ MAILBOX_LIST_ITER_RETURN_SPECIALUSE = 0x008000
+};
+
+struct mailbox_info {
+ const char *vname;
+ const char *special_use;
+ enum mailbox_info_flags flags;
+
+ struct mail_namespace *ns;
+};
+
+/* Returns a single pattern from given reference and pattern. */
+const char *mailbox_list_join_refpattern(struct mailbox_list *list,
+ const char *ref, const char *pattern);
+
+/* Initialize new mailbox list request. Pattern may contain '%' and '*'
+ wildcards as defined by RFC-3501. */
+struct mailbox_list_iterate_context *
+mailbox_list_iter_init(struct mailbox_list *list, const char *pattern,
+ enum mailbox_list_iter_flags flags);
+/* Like mailbox_list_iter_init(), but support multiple patterns. Patterns is
+ a NULL-terminated list of strings. It must contain at least one pattern. */
+struct mailbox_list_iterate_context *
+mailbox_list_iter_init_multiple(struct mailbox_list *list,
+ const char *const *patterns,
+ enum mailbox_list_iter_flags flags);
+/* List mailbox_list_iter_init_multiple(), but list mailboxes from all the
+ specified namespaces. */
+struct mailbox_list_iterate_context *
+mailbox_list_iter_init_namespaces(struct mail_namespace *namespaces,
+ const char *const *patterns,
+ enum mail_namespace_type type_mask,
+ enum mailbox_list_iter_flags flags);
+/* Get next mailbox. Returns the mailbox name */
+const struct mailbox_info *
+mailbox_list_iter_next(struct mailbox_list_iterate_context *ctx);
+/* Deinitialize mailbox list request. Returns -1 if some error
+ occurred while listing. */
+int mailbox_list_iter_deinit(struct mailbox_list_iterate_context **ctx);
+/* List one mailbox. Returns 1 if info returned, 0 if mailbox doesn't exist,
+ -1 if error. */
+int mailbox_list_mailbox(struct mailbox_list *list, const char *name,
+ enum mailbox_info_flags *flags_r);
+/* Returns 1 if mailbox has children, 0 if not, -1 if error. */
+int mailbox_has_children(struct mailbox_list *list, const char *name);
+
+#endif
#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++"
#ifndef MAILBOX_LIST_H
#define MAILBOX_LIST_H
-#include "guid.h"
#include "mail-error.h"
#ifdef PATH_MAX
# define MAILBOX_LIST_NAME_MAX_LENGTH 4096
#endif
-enum mail_namespace_type;
struct mail_namespace;
struct mail_storage;
struct mailbox_list;
-struct mailbox_list_iterate_context;
enum mailbox_list_properties {
/* maildir_name must always be empty */
MAILBOX_MATCHED = 0x40000000
};
-enum mailbox_list_iter_flags {
- /* Ignore index file and ACLs (used by ACL plugin internally) */
- MAILBOX_LIST_ITER_RAW_LIST = 0x000001,
- /* Don't list autocreated mailboxes (e.g. INBOX) unless they
- physically exist */
- MAILBOX_LIST_ITER_NO_AUTO_BOXES = 0x000004,
-
- /* For mailbox_list_iter_init_namespaces(): Skip namespaces that
- have alias_for set. */
- MAILBOX_LIST_ITER_SKIP_ALIASES = 0x000008,
- /* For mailbox_list_iter_init_namespaces(): '*' in a pattern doesn't
- match beyond namespace boundary (e.g. "foo*" or "*o" doesn't match
- "foo." namespace's mailboxes, but "*.*" does). also '%' can't match
- namespace prefixes, if there exists a parent namespace whose children
- it matches. */
- MAILBOX_LIST_ITER_STAR_WITHIN_NS = 0x000010,
-
- /* List only subscribed mailboxes */
- MAILBOX_LIST_ITER_SELECT_SUBSCRIBED = 0x000100,
- /* Return MAILBOX_CHILD_* if mailbox's children match selection
- criteria, even if the mailbox itself wouldn't match. */
- MAILBOX_LIST_ITER_SELECT_RECURSIVEMATCH = 0x000200,
- /* Return only mailboxes that have special use flags */
- MAILBOX_LIST_ITER_SELECT_SPECIALUSE = 0x000400,
-
- /* Don't return any flags unless it can be done without cost */
- MAILBOX_LIST_ITER_RETURN_NO_FLAGS = 0x001000,
- /* Return MAILBOX_SUBSCRIBED flag */
- MAILBOX_LIST_ITER_RETURN_SUBSCRIBED = 0x002000,
- /* Return children flags */
- MAILBOX_LIST_ITER_RETURN_CHILDREN = 0x004000,
- /* Return IMAP special use flags */
- MAILBOX_LIST_ITER_RETURN_SPECIALUSE = 0x008000
-};
-
enum mailbox_list_path_type {
/* Return directory's path (eg. ~/dbox/INBOX) */
MAILBOX_LIST_PATH_TYPE_DIR,
bool utf8;
};
-struct mailbox_info {
- const char *vname;
- const char *special_use;
- enum mailbox_info_flags flags;
-
- struct mail_namespace *ns;
-};
-
struct mailbox_permissions {
/* The actual uid/gid of the mailbox */
uid_t file_uid;
Typically this returns either "temp." or ".temp.". */
const char *mailbox_list_get_global_temp_prefix(struct mailbox_list *list);
-/* Returns a single pattern from given reference and pattern. */
-const char *mailbox_list_join_refpattern(struct mailbox_list *list,
- const char *ref, const char *pattern);
-
-/* Initialize new mailbox list request. Pattern may contain '%' and '*'
- wildcards as defined by RFC-3501. */
-struct mailbox_list_iterate_context *
-mailbox_list_iter_init(struct mailbox_list *list, const char *pattern,
- enum mailbox_list_iter_flags flags);
-/* Like mailbox_list_iter_init(), but support multiple patterns. Patterns is
- a NULL-terminated list of strings. It must contain at least one pattern. */
-struct mailbox_list_iterate_context *
-mailbox_list_iter_init_multiple(struct mailbox_list *list,
- const char *const *patterns,
- enum mailbox_list_iter_flags flags);
-/* List mailbox_list_iter_init_multiple(), but list mailboxes from all the
- specified namespaces. */
-struct mailbox_list_iterate_context *
-mailbox_list_iter_init_namespaces(struct mail_namespace *namespaces,
- const char *const *patterns,
- enum mail_namespace_type type_mask,
- enum mailbox_list_iter_flags flags);
-/* Get next mailbox. Returns the mailbox name */
-const struct mailbox_info *
-mailbox_list_iter_next(struct mailbox_list_iterate_context *ctx);
-/* Deinitialize mailbox list request. Returns -1 if some error
- occurred while listing. */
-int mailbox_list_iter_deinit(struct mailbox_list_iterate_context **ctx);
-/* List one mailbox. Returns 1 if info returned, 0 if mailbox doesn't exist,
- -1 if error. */
-int mailbox_list_mailbox(struct mailbox_list *list, const char *name,
- enum mailbox_info_flags *flags_r);
-/* Returns 1 if mailbox has children, 0 if not, -1 if error. */
-int mailbox_has_children(struct mailbox_list *list, const char *name);
-
/* Subscribe/unsubscribe mailbox. There should be no error when
subscribing to already subscribed mailbox. Subscribing to
unexisting mailboxes is optional. */
#ifndef NOTIFY_PLUGIN_H
#define NOTIFY_PLUGIN_H
-enum mail_flags;
+#include "mail-types.h"
+
struct mail;
struct mail_transaction_commit_changes;
struct mail_storage;
#include "mail-search-build.h"
#include "mail-storage.h"
#include "mail-namespace.h"
+#include "mailbox-list-iter.h"
#include "quota-private.h"
static int
#include "mail-namespace.h"
#include "mail-search-build.h"
#include "mail-search-parser.h"
+#include "mailbox-list-iter.h"
#include "virtual-storage.h"
#include "virtual-plugin.h"