Mercurial > dovecot > original-hg > dovecot-1.2
diff src/lib-storage/mail-search.h @ 903:fd8888f6f037 HEAD
Naming style changes, finally got tired of most of the typedefs. Also the
previous enum -> macro change reverted so that we don't use the highest bit
anymore, that's incompatible with old indexes so they will be rebuilt.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Sun, 05 Jan 2003 15:09:51 +0200 |
parents | f2aa58c2afd0 |
children | 411006be3c66 |
line wrap: on
line diff
--- a/src/lib-storage/mail-search.h Sun Jan 05 11:23:13 2003 +0200 +++ b/src/lib-storage/mail-search.h Sun Jan 05 15:09:51 2003 +0200 @@ -4,7 +4,7 @@ #include "imap-parser.h" #include "mail-storage.h" -typedef enum { +enum mail_search_arg_type { SEARCH_OR, SEARCH_SUB, @@ -49,14 +49,14 @@ /* our shortcuts for headers */ SEARCH_IN_REPLY_TO, SEARCH_MESSAGE_ID -} MailSearchArgType; +}; -struct _MailSearchArg { - MailSearchArg *next; +struct mail_search_arg { + struct mail_search_arg *next; - MailSearchArgType type; + enum mail_search_arg_type type; union { - MailSearchArg *subargs; + struct mail_search_arg *subargs; const char *str; } value; @@ -67,23 +67,24 @@ int result; }; -typedef void (*MailSearchForeachFunc)(MailSearchArg *arg, void *context); +typedef void (*MailSearchForeachFunc)(struct mail_search_arg *arg, + void *context); /* Builds search arguments based on IMAP arguments. */ -MailSearchArg *mail_search_args_build(Pool pool, ImapArg *args, - const char **error); +struct mail_search_arg * +mail_search_args_build(pool_t pool, struct imap_arg *args, const char **error); /* Reset the results in search arguments */ -void mail_search_args_reset(MailSearchArg *args); +void mail_search_args_reset(struct mail_search_arg *args); /* goes through arguments in list that don't have a result yet. Returns 1 = search matched, -1 = search unmatched, 0 = don't know yet */ -int mail_search_args_foreach(MailSearchArg *args, MailSearchForeachFunc func, - void *context); +int mail_search_args_foreach(struct mail_search_arg *args, + MailSearchForeachFunc func, void *context); /* Fills have_headers, have_body and have_text based on if such search argument exists that needs to be checked. */ -void mail_search_args_analyze(MailSearchArg *args, int *have_headers, +void mail_search_args_analyze(struct mail_search_arg *args, int *have_headers, int *have_body, int *have_text); #endif