Mercurial > dovecot > original-hg > dovecot-1.2
diff src/lib-imap/imap-match.h @ 6007:cc1f4688a988 HEAD
Added support for multiple mailbox list patterns.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Sun, 15 Jul 2007 05:33:43 +0300 |
parents | f4dac54df44e |
children | e4eb71ae8e96 |
line wrap: on
line diff
--- a/src/lib-imap/imap-match.h Sun Jul 15 02:45:25 2007 +0300 +++ b/src/lib-imap/imap-match.h Sun Jul 15 05:33:43 2007 +0300 @@ -2,16 +2,19 @@ #define __IMAP_MATCH_H enum imap_match_result { - IMAP_MATCH_YES = 1, /* match */ - IMAP_MATCH_NO = -1, /* definite non-match */ + IMAP_MATCH_NO = 0x00, /* definite non-match */ + IMAP_MATCH_YES = 0x01, /* match */ + + /* YES and NO are returned alone, but CHILDREN and PARENT may be + returned both (eg. "foo*bar" vs. "foobar/baz") */ /* non-match, but its children could match (eg. "box" vs "box/%") */ - IMAP_MATCH_CHILDREN = 0, + IMAP_MATCH_CHILDREN = 0x02, /* non-match, but one of its parents does match. This should often be handled with YES matches, because when listing for "%" and "box/foo" exists but "box" doesn't, you should still list "box" as - (Nonexistent Children) mailbox. */ - IMAP_MATCH_PARENT = -2 + (Nonexistent HasChildren) mailbox. */ + IMAP_MATCH_PARENT = 0x04 }; struct imap_match_glob; @@ -21,6 +24,9 @@ struct imap_match_glob * imap_match_init(pool_t pool, const char *pattern, bool inboxcase, char separator); +struct imap_match_glob * +imap_match_init_multiple(pool_t pool, const char *const *patterns, + bool inboxcase, char separator); void imap_match_deinit(struct imap_match_glob **glob);