5c2d695acf9f95ae0dcdda89c4d2391ceda4d672Timo Sirainen#ifndef MAIL_SEARCH_PARSER_PRIVATE_H
5c2d695acf9f95ae0dcdda89c4d2391ceda4d672Timo Sirainen#define MAIL_SEARCH_PARSER_PRIVATE_H
5c2d695acf9f95ae0dcdda89c4d2391ceda4d672Timo Sirainen
5c2d695acf9f95ae0dcdda89c4d2391ceda4d672Timo Sirainen#include "mail-search-parser.h"
5c2d695acf9f95ae0dcdda89c4d2391ceda4d672Timo Sirainen
5c2d695acf9f95ae0dcdda89c4d2391ceda4d672Timo Sirainenstruct mail_search_parser_vfuncs {
5c2d695acf9f95ae0dcdda89c4d2391ceda4d672Timo Sirainen int (*parse_key)(struct mail_search_parser *parser, const char **key_r);
5c2d695acf9f95ae0dcdda89c4d2391ceda4d672Timo Sirainen int (*parse_string)(struct mail_search_parser *parser,
5c2d695acf9f95ae0dcdda89c4d2391ceda4d672Timo Sirainen const char **value_r);
5c2d695acf9f95ae0dcdda89c4d2391ceda4d672Timo Sirainen bool (*parse_skip_next)(struct mail_search_parser *parser,
5c2d695acf9f95ae0dcdda89c4d2391ceda4d672Timo Sirainen const char *str);
5c2d695acf9f95ae0dcdda89c4d2391ceda4d672Timo Sirainen};
5c2d695acf9f95ae0dcdda89c4d2391ceda4d672Timo Sirainen
5c2d695acf9f95ae0dcdda89c4d2391ceda4d672Timo Sirainenstruct mail_search_parser {
5c2d695acf9f95ae0dcdda89c4d2391ceda4d672Timo Sirainen struct mail_search_parser_vfuncs v;
5c2d695acf9f95ae0dcdda89c4d2391ceda4d672Timo Sirainen
5c2d695acf9f95ae0dcdda89c4d2391ceda4d672Timo Sirainen pool_t pool;
5c2d695acf9f95ae0dcdda89c4d2391ceda4d672Timo Sirainen const char *cur_key;
5c2d695acf9f95ae0dcdda89c4d2391ceda4d672Timo Sirainen const char *error;
5c2d695acf9f95ae0dcdda89c4d2391ceda4d672Timo Sirainen};
5c2d695acf9f95ae0dcdda89c4d2391ceda4d672Timo Sirainen
5c2d695acf9f95ae0dcdda89c4d2391ceda4d672Timo Sirainen#endif