#ifndef MAIL_SEARCH_PARSER_H
#define MAIL_SEARCH_PARSER_H
struct imap_arg;
/* Build a parser parsing the given imap args. NOTE: args must not be freed
until this parser is destroyed. */
struct mail_search_parser *
/* Build a parser parsing the given command line args. */
struct mail_search_parser *
mail_search_parser_init_cmdline(const char *const args[]);
/* Key is set to the next search key, or MAIL_SEARCH_PARSER_KEY_LIST for
beginning of a list. Returns 1 if ok, 0 if no more keys in this
const char **key_r);
/* Get the next string. Returns 0 if ok, -1 if parsing error. */
const char **value_r);
/* If next parameter equals to the given string case-insensitively, skip over
it and return TRUE. Otherwise do nothing and return FALSE. */
const char *str);
/* Returns the reason string for parsing error. */
#endif