Mercurial > dovecot > original-hg > dovecot-1.2
annotate src/lib-imap/imap-match.h @ 8999:afc1b0ef120d HEAD
When :MAILBOXDIR= was empty, we might have appended extra '/' to it, which caused problems.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Thu, 30 Apr 2009 20:00:09 -0400 |
parents | e4eb71ae8e96 |
children |
rev | line source |
---|---|
6410
e4eb71ae8e96
Changed .h ifdef/defines to use <NAME>_H format.
Timo Sirainen <tss@iki.fi>
parents:
6007
diff
changeset
|
1 #ifndef IMAP_MATCH_H |
e4eb71ae8e96
Changed .h ifdef/defines to use <NAME>_H format.
Timo Sirainen <tss@iki.fi>
parents:
6007
diff
changeset
|
2 #define IMAP_MATCH_H |
0 | 3 |
1198
d28571e8c810
Rewrote LIST, LSUB and subscription file handling. LIST replies aren't
Timo Sirainen <tss@iki.fi>
parents:
903
diff
changeset
|
4 enum imap_match_result { |
6007
cc1f4688a988
Added support for multiple mailbox list patterns.
Timo Sirainen <tss@iki.fi>
parents:
5840
diff
changeset
|
5 IMAP_MATCH_NO = 0x00, /* definite non-match */ |
cc1f4688a988
Added support for multiple mailbox list patterns.
Timo Sirainen <tss@iki.fi>
parents:
5840
diff
changeset
|
6 IMAP_MATCH_YES = 0x01, /* match */ |
cc1f4688a988
Added support for multiple mailbox list patterns.
Timo Sirainen <tss@iki.fi>
parents:
5840
diff
changeset
|
7 |
cc1f4688a988
Added support for multiple mailbox list patterns.
Timo Sirainen <tss@iki.fi>
parents:
5840
diff
changeset
|
8 /* YES and NO are returned alone, but CHILDREN and PARENT may be |
cc1f4688a988
Added support for multiple mailbox list patterns.
Timo Sirainen <tss@iki.fi>
parents:
5840
diff
changeset
|
9 returned both (eg. "foo*bar" vs. "foobar/baz") */ |
1198
d28571e8c810
Rewrote LIST, LSUB and subscription file handling. LIST replies aren't
Timo Sirainen <tss@iki.fi>
parents:
903
diff
changeset
|
10 |
5559 | 11 /* non-match, but its children could match (eg. "box" vs "box/%") */ |
6007
cc1f4688a988
Added support for multiple mailbox list patterns.
Timo Sirainen <tss@iki.fi>
parents:
5840
diff
changeset
|
12 IMAP_MATCH_CHILDREN = 0x02, |
5559 | 13 /* non-match, but one of its parents does match. This should often be |
14 handled with YES matches, because when listing for "%" and "box/foo" | |
15 exists but "box" doesn't, you should still list "box" as | |
6007
cc1f4688a988
Added support for multiple mailbox list patterns.
Timo Sirainen <tss@iki.fi>
parents:
5840
diff
changeset
|
16 (Nonexistent HasChildren) mailbox. */ |
cc1f4688a988
Added support for multiple mailbox list patterns.
Timo Sirainen <tss@iki.fi>
parents:
5840
diff
changeset
|
17 IMAP_MATCH_PARENT = 0x04 |
1198
d28571e8c810
Rewrote LIST, LSUB and subscription file handling. LIST replies aren't
Timo Sirainen <tss@iki.fi>
parents:
903
diff
changeset
|
18 }; |
d28571e8c810
Rewrote LIST, LSUB and subscription file handling. LIST replies aren't
Timo Sirainen <tss@iki.fi>
parents:
903
diff
changeset
|
19 |
903
fd8888f6f037
Naming style changes, finally got tired of most of the typedefs. Also the
Timo Sirainen <tss@iki.fi>
parents:
805
diff
changeset
|
20 struct imap_match_glob; |
0 | 21 |
22 /* If inboxcase is TRUE, the "INBOX" string at the beginning of line is | |
23 compared case-insensitively */ | |
1198
d28571e8c810
Rewrote LIST, LSUB and subscription file handling. LIST replies aren't
Timo Sirainen <tss@iki.fi>
parents:
903
diff
changeset
|
24 struct imap_match_glob * |
5840 | 25 imap_match_init(pool_t pool, const char *pattern, |
26 bool inboxcase, char separator); | |
6007
cc1f4688a988
Added support for multiple mailbox list patterns.
Timo Sirainen <tss@iki.fi>
parents:
5840
diff
changeset
|
27 struct imap_match_glob * |
cc1f4688a988
Added support for multiple mailbox list patterns.
Timo Sirainen <tss@iki.fi>
parents:
5840
diff
changeset
|
28 imap_match_init_multiple(pool_t pool, const char *const *patterns, |
cc1f4688a988
Added support for multiple mailbox list patterns.
Timo Sirainen <tss@iki.fi>
parents:
5840
diff
changeset
|
29 bool inboxcase, char separator); |
0 | 30 |
3879
928229f8b3e6
deinit, unref, destroy, close, free, etc. functions now take a pointer to
Timo Sirainen <tss@iki.fi>
parents:
3863
diff
changeset
|
31 void imap_match_deinit(struct imap_match_glob **glob); |
1198
d28571e8c810
Rewrote LIST, LSUB and subscription file handling. LIST replies aren't
Timo Sirainen <tss@iki.fi>
parents:
903
diff
changeset
|
32 |
d28571e8c810
Rewrote LIST, LSUB and subscription file handling. LIST replies aren't
Timo Sirainen <tss@iki.fi>
parents:
903
diff
changeset
|
33 enum imap_match_result |
d28571e8c810
Rewrote LIST, LSUB and subscription file handling. LIST replies aren't
Timo Sirainen <tss@iki.fi>
parents:
903
diff
changeset
|
34 imap_match(struct imap_match_glob *glob, const char *data); |
0 | 35 |
36 #endif |