imap-search.h revision c4b376dd6e0c423006d7ac83a39253bcaf8e7c47
bcb4e51a409d94ae670de96afb8483a4f7855294Stephan Bosch#ifndef IMAP_SEARCH_H
a8433392e8a5ddfe8a125716f62b2a4dc8f1f01eStephan Bosch#define IMAP_SEARCH_H
a8433392e8a5ddfe8a125716f62b2a4dc8f1f01eStephan Bosch
a8433392e8a5ddfe8a125716f62b2a4dc8f1f01eStephan Bosch#include "mail-search.h"
a8433392e8a5ddfe8a125716f62b2a4dc8f1f01eStephan Bosch
a8433392e8a5ddfe8a125716f62b2a4dc8f1f01eStephan Boschstruct imap_arg;
a8433392e8a5ddfe8a125716f62b2a4dc8f1f01eStephan Boschstruct mailbox;
a8433392e8a5ddfe8a125716f62b2a4dc8f1f01eStephan Boschstruct client_command_context;
a8433392e8a5ddfe8a125716f62b2a4dc8f1f01eStephan Bosch
a8433392e8a5ddfe8a125716f62b2a4dc8f1f01eStephan Bosch/* Builds search arguments based on IMAP arguments. Returns -1 if search
a8433392e8a5ddfe8a125716f62b2a4dc8f1f01eStephan Bosch arguments are invalid, 0 if we have to wait for unambiguity,
a8433392e8a5ddfe8a125716f62b2a4dc8f1f01eStephan Bosch 1 if we can continue. */
a8433392e8a5ddfe8a125716f62b2a4dc8f1f01eStephan Boschint imap_search_args_build(struct client_command_context *cmd,
a8433392e8a5ddfe8a125716f62b2a4dc8f1f01eStephan Bosch const struct imap_arg *args, const char *charset,
a8433392e8a5ddfe8a125716f62b2a4dc8f1f01eStephan Bosch struct mail_search_args **search_args_r);
a8433392e8a5ddfe8a125716f62b2a4dc8f1f01eStephan Bosch
a8433392e8a5ddfe8a125716f62b2a4dc8f1f01eStephan Bosch/* Returns -1 if set is invalid, 0 if we have to wait for unambiguity,
a8433392e8a5ddfe8a125716f62b2a4dc8f1f01eStephan Bosch 1 if we can continue. */
a8433392e8a5ddfe8a125716f62b2a4dc8f1f01eStephan Boschint imap_search_get_seqset(struct client_command_context *cmd,
a8433392e8a5ddfe8a125716f62b2a4dc8f1f01eStephan Bosch const char *set, bool uid,
a8433392e8a5ddfe8a125716f62b2a4dc8f1f01eStephan Bosch struct mail_search_args **search_args_r);
a8433392e8a5ddfe8a125716f62b2a4dc8f1f01eStephan Boschint imap_search_get_anyset(struct client_command_context *cmd,
a8433392e8a5ddfe8a125716f62b2a4dc8f1f01eStephan Bosch const char *set, bool uid,
a8433392e8a5ddfe8a125716f62b2a4dc8f1f01eStephan Bosch struct mail_search_args **search_args_r);
a8433392e8a5ddfe8a125716f62b2a4dc8f1f01eStephan Bosch
a8433392e8a5ddfe8a125716f62b2a4dc8f1f01eStephan Bosch#endif
a8433392e8a5ddfe8a125716f62b2a4dc8f1f01eStephan Bosch