mail-search-mime.h revision 74bc7e646663255703e10e0c0b7242ad7ad52f94
#ifndef MAIL_SEARCH_MIMEPART_H
#define MAIL_SEARCH_MIMEPART_H
enum mail_search_mime_arg_type {
/* sizes */
/* part properties */
/* content-type */
/* headers */
/* body */
/* message */
SEARCH_MIME_SENTON, /* time must point to beginning of the day */
/* relations */
/* position */
/* filename */
};
struct mail_search_mime_arg {
/* NOTE: when adding new fields, make sure mail_search_mime_arg_dup_one()
and mail_search_mime_arg_one_equals() are updated. */
struct mail_search_mime_arg *next;
union {
struct mail_search_mime_arg *subargs;
const char *str;
unsigned int number;
} value;
void *context;
const char *field_name; /* for SEARCH_HEADER* */
int result; /* -1 = unknown, 0 = unmatched, 1 = matched */
};
struct mail_search_mime_part {
struct mail_search_mime_arg *args;
bool simplified:1;
};
typedef void
void *context);
/* Returns TRUE if the two mimepart search keys are fully compatible. */
const struct mail_search_mime_part *mpart2);
/* Same as mail_search_mime_part_equal(), but for individual
mail_search_mime_arg structs. All the siblings of arg1 and arg2 are
also compared. */
const struct mail_search_mime_arg *arg2);
/* Same as mail_search_mime_arg_equals(), but don't compare siblings. */
const struct mail_search_mime_arg *arg2);
struct mail_search_mime_part *
const struct mail_search_mime_part *mpart);
struct mail_search_mime_arg *
const struct mail_search_mime_arg *arg);
/* Reset the results in search arguments. match_always is reset only if
full_reset is TRUE. */
bool full_reset);
/* goes through arguments in list that don't have a result yet.
Returns 1 = search matched, 0 = search unmatched, -1 = don't know yet */
CALLBACK_TYPECHECK(callback, void (*)( \
guaranteed to have match_not=FALSE. */
/* Appends MIMEPART search key to the dest string and returns TRUE. */
/* Like mail_search_mime_part_to_imap(), but append only a single MIMEPART
key. */
#endif