mail-search-build.h revision d798962a54c5cda054d57a0cfc7e5f47dfa20f6e
5c2d695acf9f95ae0dcdda89c4d2391ceda4d672Timo Sirainen /* error is either here or in parser */
7327394e30c1020b9a2a49c72a7e3d0f7803e680Timo Sirainen/* Start building a new search query. Use mail_search_args_unref() to
c4b376dd6e0c423006d7ac83a39253bcaf8e7c47Timo Sirainenstruct mail_search_args *mail_search_build_init(void);
d798962a54c5cda054d57a0cfc7e5f47dfa20f6eTimo Sirainen/* Convert IMAP SEARCH command compatible parameters to mail_search_args.
d798962a54c5cda054d57a0cfc7e5f47dfa20f6eTimo Sirainen If charset is unknown, it's changed to NULL. */
5c2d695acf9f95ae0dcdda89c4d2391ceda4d672Timo Sirainenint mail_search_build(struct mail_search_register *reg,
d798962a54c5cda054d57a0cfc7e5f47dfa20f6eTimo Sirainen struct mail_search_parser *parser, const char **charset,
5c2d695acf9f95ae0dcdda89c4d2391ceda4d672Timo Sirainen struct mail_search_args **args_r, const char **error_r);
55058d5f50f7e53bb22df4fa6ae951c8001416abTimo Sirainen/* Add new search arg with given type. */
55058d5f50f7e53bb22df4fa6ae951c8001416abTimo Sirainenmail_search_build_add(struct mail_search_args *args,
7327394e30c1020b9a2a49c72a7e3d0f7803e680Timo Sirainen/* Add SEARCH_ALL to search args. */
c4b376dd6e0c423006d7ac83a39253bcaf8e7c47Timo Sirainenvoid mail_search_build_add_all(struct mail_search_args *args);
7327394e30c1020b9a2a49c72a7e3d0f7803e680Timo Sirainen/* Add a sequence set to search args. */
c4b376dd6e0c423006d7ac83a39253bcaf8e7c47Timo Sirainenvoid mail_search_build_add_seqset(struct mail_search_args *args,
d798962a54c5cda054d57a0cfc7e5f47dfa20f6eTimo Sirainen/* Convert input string into UTF-8 decomposed titlecase, suitable for
d798962a54c5cda054d57a0cfc7e5f47dfa20f6eTimo Sirainen message_search_init() */
d798962a54c5cda054d57a0cfc7e5f47dfa20f6eTimo Sirainenint mail_search_build_get_utf8_dtc(struct mail_search_build_context *ctx,
4fc52b7b25c3d3f42348903e0154840f8761f306Timo Sirainenmail_search_build_new(struct mail_search_build_context *ctx,
4fc52b7b25c3d3f42348903e0154840f8761f306Timo Sirainenmail_search_build_str(struct mail_search_build_context *ctx,
5c2d695acf9f95ae0dcdda89c4d2391ceda4d672Timo Sirainen/* Returns 0 if arg is returned, -1 if error. */