bcb4e51a409d94ae670de96afb8483a4f7855294Stephan Bosch/* Copyright (c) 2010-2018 Dovecot authors, see the included COPYING file */
5c2d695acf9f95ae0dcdda89c4d2391ceda4d672Timo Sirainenstatic int imap_search_parse_key(struct mail_search_parser *_parser,
5c2d695acf9f95ae0dcdda89c4d2391ceda4d672Timo Sirainen const char **key_r)
5c2d695acf9f95ae0dcdda89c4d2391ceda4d672Timo Sirainen const struct imap_arg *arg = parser->cur->args;
5c2d695acf9f95ae0dcdda89c4d2391ceda4d672Timo Sirainen "Unexpected string as search key: ",
5c2d695acf9f95ae0dcdda89c4d2391ceda4d672Timo Sirainen stack = p_new(_parser->pool, struct imap_arg_stack, 1);
5c2d695acf9f95ae0dcdda89c4d2391ceda4d672Timo Sirainenstatic int imap_search_parse_string(struct mail_search_parser *_parser,
5c2d695acf9f95ae0dcdda89c4d2391ceda4d672Timo Sirainen const char **value_r)
5c2d695acf9f95ae0dcdda89c4d2391ceda4d672Timo Sirainen const struct imap_arg *arg = parser->cur->args;
5c2d695acf9f95ae0dcdda89c4d2391ceda4d672Timo Sirainen _parser->error = "Missing parameter for search key";
5c2d695acf9f95ae0dcdda89c4d2391ceda4d672Timo Sirainenimap_search_parse_skip_next(struct mail_search_parser *_parser, const char *str)
5c2d695acf9f95ae0dcdda89c4d2391ceda4d672Timo Sirainen if (!imap_arg_get_astring(parser->cur->args, &arg))
5c2d695acf9f95ae0dcdda89c4d2391ceda4d672Timo Sirainenstatic const struct mail_search_parser_vfuncs mail_search_parser_imap_vfuncs = {
5c2d695acf9f95ae0dcdda89c4d2391ceda4d672Timo Sirainenmail_search_parser_init_imap(const struct imap_arg *args)
5c2d695acf9f95ae0dcdda89c4d2391ceda4d672Timo Sirainen pool = pool_alloconly_create("imap search parser", 1024);
5c2d695acf9f95ae0dcdda89c4d2391ceda4d672Timo Sirainen parser = p_new(pool, struct imap_mail_search_parser, 1);