/* Copyright (c) 2016-2018 Dovecot authors, see the included COPYING file */
#include "lib.h"
#include "ioloop.h"
#include "str.h"
#include "utc-offset.h"
#include "imap-date.h"
#include "imap-util.h"
#include "imap-quote.h"
#include "mail-search.h"
#include "mail-search-mime.h"
/*
*
*/
static struct mail_search_mime_arg *
const struct mail_search_mime_arg *arg)
{
case SEARCH_MIME_OR:
case SEARCH_MIME_SUB:
break;
case SEARCH_MIME_SIZE_EQUAL:
case SEARCH_MIME_SIZE_LARGER:
case SEARCH_MIME_SIZE_SMALLER:
break;
case SEARCH_MIME_HEADER:
/* fall through */
case SEARCH_MIME_DESCRIPTION:
case SEARCH_MIME_ENCODING:
case SEARCH_MIME_ID:
case SEARCH_MIME_LANGUAGE:
case SEARCH_MIME_LOCATION:
case SEARCH_MIME_MD5:
case SEARCH_MIME_TYPE:
case SEARCH_MIME_SUBTYPE:
case SEARCH_MIME_PARAM:
case SEARCH_MIME_BODY:
case SEARCH_MIME_TEXT:
case SEARCH_MIME_CC:
case SEARCH_MIME_BCC:
case SEARCH_MIME_FROM:
case SEARCH_MIME_IN_REPLY_TO:
case SEARCH_MIME_MESSAGE_ID:
case SEARCH_MIME_REPLY_TO:
case SEARCH_MIME_SENDER:
case SEARCH_MIME_SUBJECT:
case SEARCH_MIME_TO:
case SEARCH_MIME_FILENAME_IS:
break;
case SEARCH_MIME_SENTBEFORE:
case SEARCH_MIME_SENTON:
case SEARCH_MIME_SENTSINCE:
break;
case SEARCH_MIME_PARENT:
case SEARCH_MIME_CHILD:
}
break;
case SEARCH_MIME_DEPTH_EQUAL:
case SEARCH_MIME_DEPTH_MIN:
case SEARCH_MIME_DEPTH_MAX:
case SEARCH_MIME_INDEX:
break;
}
return new_arg;
}
struct mail_search_mime_arg *
const struct mail_search_mime_arg *arg)
{
}
return new_arg;
}
struct mail_search_mime_part *
const struct mail_search_mime_part *mpart)
{
return new_mpart;
}
/*
*
*/
bool full_reset)
{
if (args->match_always) {
if (!full_reset)
else {
}
} else if (args->nonmatch_always) {
if (!full_reset)
else {
}
} else {
}
}
}
void *context)
{
return;
/* sublist of conditions */
/* didn't match */
break;
}
}
/* OR-list of conditions */
/* matched */
break;
}
}
} else {
/* just a single condition */
}
}
void *context)
{
int result;
result = 1;
/* didn't match */
return 0;
}
result = -1;
}
return result;
}
/*
*
*/
const struct mail_search_mime_arg *arg2)
{
return FALSE;
case SEARCH_MIME_OR:
case SEARCH_MIME_SUB:
case SEARCH_MIME_SIZE_EQUAL:
case SEARCH_MIME_SIZE_LARGER:
case SEARCH_MIME_SIZE_SMALLER:
case SEARCH_MIME_HEADER:
case SEARCH_MIME_PARAM:
return FALSE;
/* fall through */
case SEARCH_MIME_DESCRIPTION:
case SEARCH_MIME_ENCODING:
case SEARCH_MIME_ID:
case SEARCH_MIME_LANGUAGE:
case SEARCH_MIME_LOCATION:
case SEARCH_MIME_MD5:
case SEARCH_MIME_TYPE:
case SEARCH_MIME_SUBTYPE:
case SEARCH_MIME_BODY:
case SEARCH_MIME_TEXT:
case SEARCH_MIME_CC:
case SEARCH_MIME_BCC:
case SEARCH_MIME_FROM:
case SEARCH_MIME_IN_REPLY_TO:
case SEARCH_MIME_MESSAGE_ID:
case SEARCH_MIME_REPLY_TO:
case SEARCH_MIME_SENDER:
case SEARCH_MIME_SUBJECT:
case SEARCH_MIME_TO:
case SEARCH_MIME_FILENAME_IS:
/* don't bother doing case-insensitive comparison. we should support
full i18n case-insensitivity (or the active comparator
in future). */
case SEARCH_MIME_SENTBEFORE:
case SEARCH_MIME_SENTON:
case SEARCH_MIME_SENTSINCE:
case SEARCH_MIME_PARENT:
case SEARCH_MIME_CHILD:
return FALSE;
case SEARCH_MIME_DEPTH_EQUAL:
case SEARCH_MIME_DEPTH_MIN:
case SEARCH_MIME_DEPTH_MAX:
case SEARCH_MIME_INDEX:
}
i_unreached();
}
const struct mail_search_mime_arg *arg2)
{
return FALSE;
}
}
const struct mail_search_mime_part *mpart2)
{
}
/*
*
*/
{
// FIXME: implement and use
}
/*
*
*/
static bool
const struct mail_search_mime_arg *args,
{
if (prefix[0] == '\0')
return FALSE;
}
if (prefix[0] == '\0')
return TRUE;
}
static bool
const struct mail_search_mime_arg *arg)
{
const char *str;
int tz_offset;
return FALSE;
return TRUE;
}
{
case SEARCH_MIME_OR:
return FALSE;
break;
case SEARCH_MIME_SUB:
return FALSE;
break;
case SEARCH_MIME_SIZE_EQUAL:
break;
case SEARCH_MIME_SIZE_LARGER:
break;
case SEARCH_MIME_SIZE_SMALLER:
break;
case SEARCH_MIME_DESCRIPTION:
break;
break;
break;
case SEARCH_MIME_ENCODING:
break;
case SEARCH_MIME_ID:
break;
case SEARCH_MIME_LANGUAGE:
break;
case SEARCH_MIME_LOCATION:
break;
case SEARCH_MIME_MD5:
break;
case SEARCH_MIME_TYPE:
break;
case SEARCH_MIME_SUBTYPE:
break;
case SEARCH_MIME_PARAM:
break;
case SEARCH_MIME_HEADER:
break;
case SEARCH_MIME_BODY:
break;
case SEARCH_MIME_TEXT:
break;
case SEARCH_MIME_CC:
break;
case SEARCH_MIME_BCC:
break;
case SEARCH_MIME_FROM:
break;
case SEARCH_MIME_IN_REPLY_TO:
break;
case SEARCH_MIME_MESSAGE_ID:
break;
case SEARCH_MIME_REPLY_TO:
break;
case SEARCH_MIME_SENDER:
break;
case SEARCH_MIME_SENTBEFORE:
"SENTBEFORE can't be written as IMAP MIMEPART key "
return FALSE;
}
break;
case SEARCH_MIME_SENTON:
"SENTON can't be written as IMAP MIMEPART key "
return FALSE;
}
break;
case SEARCH_MIME_SENTSINCE:
"SENTSINCE can't be written as IMAP MIMEPART key "
return FALSE;
}
break;
case SEARCH_MIME_SUBJECT:
break;
case SEARCH_MIME_TO:
break;
case SEARCH_MIME_DEPTH_EQUAL:
break;
case SEARCH_MIME_DEPTH_MIN:
break;
case SEARCH_MIME_DEPTH_MAX:
break;
case SEARCH_MIME_INDEX:
break;
case SEARCH_MIME_PARENT:
else if (!mail_search_mime_subargs_to_imap
return FALSE;
break;
case SEARCH_MIME_CHILD:
else if (!mail_search_mime_subargs_to_imap
return FALSE;
break;
case SEARCH_MIME_FILENAME_IS:
break;
break;
break;
break;
}
return TRUE;
}
{
return FALSE;
} else {
return FALSE;
}
}
return TRUE;
}