mail-search-build.h revision 55058d5f50f7e53bb22df4fa6ae951c8001416ab
#ifndef MAIL_SEARCH_BUILD_H
#define MAIL_SEARCH_BUILD_H
#include "mail-search.h"
#include "mail-search-register.h"
struct mailbox;
struct mail_search_build_context {
struct mail_search_register *reg;
struct mail_search_parser *parser;
struct mail_search_arg *parent;
/* error is either here or in parser */
const char *_error;
};
/* Start building a new search query. Use mail_search_args_unref() to
free it. */
struct mail_search_args *mail_search_build_init(void);
/* Convert IMAP SEARCH command compatible parameters to mail_search_args. */
/* Add new search arg with given type. */
struct mail_search_arg *
enum mail_search_arg_type type);
/* Add SEARCH_ALL to search args. */
/* Add a sequence set to search args. */
struct mail_search_arg *
enum mail_search_arg_type type);
struct mail_search_arg *
enum mail_search_arg_type type);
/* Returns 0 if arg is returned, -1 if error. */
struct mail_search_arg *parent,
struct mail_search_arg **arg_r);
#endif