/* Copyright (c) 2010-2018 Dovecot authors, see the included COPYING file */
#include "lib.h"
#include "ioloop.h"
#include "array.h"
#include "str.h"
#include "imap-date.h"
#include "imap-seqset.h"
#include "imap-utf7.h"
#include "imap-util.h"
#include "mail-search-register.h"
#include "mail-search-parser.h"
#include "mail-search-build.h"
#include "mail-search-mime-build.h"
static struct mail_search_arg *
const char *key)
{
/* <message-set> */
return NULL;
}
return sarg;
}
return NULL;
}
static struct mail_search_arg *
{
return NULL;
return sarg;
}
static struct mail_search_arg *
{
/* <search-key1> <search-key2> */
do {
return NULL;
/* <key> OR <key> OR ... <key> - put them all
under one SEARCH_OR list. */
return NULL;
return sarg;
}
static struct mail_search_arg *\
{ \
}
static struct mail_search_arg *
{
}
static struct mail_search_arg *
{
/* <message set> */
return NULL;
/* SEARCHRES: delay initialization */
} else {
return NULL;
}
}
return sarg;
}
static struct mail_search_arg *\
{ \
struct mail_search_arg *sarg; \
return sarg; \
}
static struct mail_search_arg *
{
/* NEW == (RECENT UNSEEN) */
return sarg;
}
static struct mail_search_arg *
{
return sarg;
}
static struct mail_search_arg *
enum mail_search_arg_type type,
{
const char *value;
return NULL;
return NULL;
}
return sarg;
}
static struct mail_search_arg *\
{ \
}
static struct mail_search_arg *
enum mail_search_arg_type type)
{
const char *value;
return NULL;
return NULL;
}
return sarg;
}
static struct mail_search_arg *
{
}
static struct mail_search_arg *
{
}
static struct mail_search_arg *
{
const char *value;
return NULL;
return NULL;
return sarg;
}
static struct mail_search_arg *\
{ \
}
static struct mail_search_arg *
{
const char *hdr_name;
/* <hdr-name> <string> */
return NULL;
return NULL;
}
static struct mail_search_arg *
enum mail_search_arg_type type)
{
return NULL;
return NULL;
return sarg;
}
static struct mail_search_arg *\
{ \
}
static struct mail_search_arg *
enum mail_search_arg_type type)
{
const char *value;
return NULL;
return NULL;
}
return sarg;
}
static struct mail_search_arg *
{
return NULL;
/* we need to match also equal, but SEARCH_BEFORE compares with "<" */
return sarg;
}
static struct mail_search_arg *
{
}
static int
{
else {
return -1;
}
return 0;
}
static int
{
const char *value;
return 0;
name += 7;
/* set name */
if (*name == '\\') {
/* system flag */
return -1;
}
} else {
}
/* set type */
return -1;
return -1;
return 1;
}
static struct mail_search_arg *
{
const char *value;
int ret;
/* [<name> <type>] <modseq> */
return NULL;
return NULL;
if (ret > 0) {
/* extension data used */
return NULL;
}
return NULL;
}
return sarg;
}
static struct mail_search_arg *
{
/* SEARCHRES: delay initialization */
return sarg;
}
{
case SEARCH_OR:
case SEARCH_SUB:
case SEARCH_INTHREAD:
break;
default:
break;
}
}
}
static struct mail_search_arg *
{
return NULL;
return sarg;
}
static struct mail_search_arg *
{
return NULL;
return sarg;
}
static struct mail_search_arg *
{
/* <algorithm> <search key> */
const char *algorithm;
return NULL;
return NULL;
}
return NULL;
return sarg;
}
static struct mail_search_arg *
{
return NULL;
return NULL;
}
return sarg;
}
static struct mail_search_arg *
{
/* <message set> */
return NULL;
return NULL;
}
return sarg;
}
/* argument set operations */
{ "NOT", imap_search_not },
{ "OR", imap_search_or },
/* message sets */
{ "ALL", imap_search_all },
{ "UID", imap_search_uid },
/* flags */
{ "ANSWERED", imap_search_answered },
{ "UNANSWERED", imap_search_unanswered },
{ "DELETED", imap_search_deleted },
{ "UNDELETED", imap_search_undeleted },
{ "DRAFT", imap_search_draft },
{ "UNDRAFT", imap_search_undraft },
{ "FLAGGED", imap_search_flagged },
{ "UNFLAGGED", imap_search_unflagged },
{ "SEEN", imap_search_seen },
{ "UNSEEN", imap_search_unseen },
{ "RECENT", imap_search_recent },
{ "OLD", imap_search_old },
{ "NEW", imap_search_new },
/* keywords */
{ "KEYWORD", imap_search_keyword },
{ "UNKEYWORD", imap_search_unkeyword },
/* dates */
{ "BEFORE", imap_search_before },
{ "ON", imap_search_on },
{ "SINCE", imap_search_since },
{ "SENTBEFORE", imap_search_sentbefore },
{ "SENTON", imap_search_senton },
{ "SENTSINCE", imap_search_sentsince },
{ "X-SAVEDBEFORE", imap_search_x_savedbefore },
{ "X-SAVEDON", imap_search_x_savedon },
{ "X-SAVEDSINCE", imap_search_x_savedsince },
/* sizes */
{ "LARGER", imap_search_larger },
{ "SMALLER", imap_search_smaller },
/* headers */
{ "BCC", imap_search_bcc },
{ "CC", imap_search_cc },
{ "FROM", imap_search_from },
{ "TO", imap_search_to },
{ "SUBJECT", imap_search_subject },
{ "HEADER", imap_search_header },
/* body */
{ "BODY", imap_search_body },
{ "TEXT", imap_search_text },
/* WITHIN extension: */
{ "OLDER", imap_search_older },
{ "YOUNGER", imap_search_younger },
/* CONDSTORE extension: */
{ "MODSEQ", imap_search_modseq },
/* SEARCHRES extension: */
{ "$", imap_search_last_result },
/* FUZZY extension: */
{ "FUZZY", imap_search_fuzzy },
/* SEARCH=MIMEPART extension: */
{ "MIMEPART", imap_search_mimepart },
/* Other Dovecot extensions: */
{ "INTHREAD", imap_search_inthread },
{ "X-GUID", imap_search_x_guid },
{ "X-MAILBOX", imap_search_x_mailbox },
{ "X-REAL-UID", imap_search_x_real_uid }
};
{
return reg;
}
struct mail_search_register *
{
if (mail_search_register_imap == NULL)
return mail_search_register_imap;
}