mail-search.h revision 9b7c27cd95df5ca3cd523381205efe24e88ee817
#ifndef __MAIL_SEARCH_H
#define __MAIL_SEARCH_H
enum mail_search_arg_type {
/* sequence sets */
/* flags */
/* dates */
SEARCH_ON, /* time must point to beginning of the day */
SEARCH_SENTON, /* time must point to beginning of the day */
/* sizes */
/* headers */
/* body */
};
struct mail_search_seqset {
struct mail_search_seqset *next;
};
struct mail_search_arg {
struct mail_search_arg *next;
enum mail_search_arg_type type;
struct {
struct mail_search_arg *subargs;
struct mail_search_seqset *seqset;
const char *str;
} value;
void *context;
const char *hdr_field_name; /* for SEARCH_HEADER* */
unsigned int not:1;
int result; /* -1 = unknown, 0 = unmatched, 1 = matched */
};
STMT_START { \
} STMT_END
void *context);
/* Reset the results in search arguments. match_always is reset only if
full_reset is TRUE. */
/* goes through arguments in list that don't have a result yet.
Returns 1 = search matched, 0 = search unmatched, -1 = don't know yet */
void *context);
#ifdef CONTEXT_TYPE_SAFETY
#else
#endif
/* Fills have_headers and have_body based on if such search argument exists
that needs to be checked. Returns the headers that we're searching for, or
NULL if we're searching for TEXT. */
const char *const *
bool *have_headers, bool *have_body);
#endif