mail-search-register-human.c revision 51379a5d323a361622f1d8cd7c40e168c9302a0c
/* Copyright (c) 2010 Dovecot authors, see the included COPYING file */
#include "lib.h"
#include "ioloop.h"
#include "array.h"
#include "str.h"
#include "imap-utf7.h"
#include "settings-parser.h"
#include "imap-date.h"
#include "mail-search-register.h"
#include "mail-search-parser.h"
#include "mail-search-build.h"
#include <time.h>
#include <ctype.h>
static struct mail_search_arg *
{
struct mail_search_arg *sarg;
/* this changes the parent arg to be an OR block instead of AND block */
return NULL;
return sarg;
}
static struct mail_search_arg *
enum mail_search_arg_type type,
{
struct mail_search_arg *sarg;
unsigned int secs;
unsigned long unixtime;
return NULL;
/* a) yyyy-mm-dd
b) imap date
c) unix timestamp
d) interval (e.g. n days) */
/* imap date */
} else {
}
return NULL;
}
return sarg;
}
static struct mail_search_arg *\
{ \
}
static struct mail_search_arg *
enum mail_search_arg_type type)
{
struct mail_search_arg *sarg;
return NULL;
return NULL;
}
return sarg;
}
static struct mail_search_arg *
{
}
static struct mail_search_arg *
{
}
static struct mail_search_arg *
{
}
static struct mail_search_arg *
{
struct mail_search_arg *sarg;
const char *value;
T_BEGIN {
else
} T_END;
return NULL;
}
return sarg;
}
static struct mail_search_arg *
{
}
static const struct mail_search_register_arg human_register_args[] = {
{ "OR", human_search_or },
/* dates */
{ "BEFORE", human_search_before },
{ "ON", human_search_on },
{ "SINCE", human_search_since },
{ "SENTBEFORE", human_search_sentbefore },
{ "SENTON", human_search_senton },
{ "SENTSINCE", human_search_sentsince },
{ "SAVEDBEFORE", human_search_savedbefore },
{ "SAVEDON", human_search_savedon },
{ "SAVEDSINCE", human_search_savedsince },
{ "X-SAVEDBEFORE", human_search_savedbefore },
{ "X-SAVEDON", human_search_savedon },
{ "X-SAVEDSINCE", human_search_savedsince },
/* sizes */
{ "LARGER", human_search_larger },
{ "SMALLER", human_search_smaller },
/* Other Dovecot extensions: */
{ "GUID", human_search_guid },
{ "MAILBOX", human_search_mailbox },
{ "MAILBOX-GUID", human_search_mailbox_guid }
};
static struct mail_search_register *
{
struct mail_search_register *reg;
unsigned int i, j, human_count, imap_count;
int ret;
/* find and register args in imap that don't exist in human */
for (i = j = 0; i < imap_count && j < human_count; ) {
if (ret < 0) {
i++;
} else if (ret > 0) {
j++;
} else {
i++; j++;
}
}
for (; i < imap_count; i++)
return reg;
}
struct mail_search_register *mail_search_register_get_human(void)
{
if (mail_search_register_human == NULL) {
struct mail_search_register *imap_reg =
}
return mail_search_register_human;
}