imap-search-args.c revision 5c2d695acf9f95ae0dcdda89c4d2391ceda4d672
/* Copyright (c) 2002-2010 Dovecot authors, see the included COPYING file */
#include "imap-common.h"
#include "mail-storage.h"
#include "mail-search-parser.h"
#include "mail-search-build.h"
#include "imap-search-args.h"
#include "imap-parser.h"
#include "imap-seqset.h"
#include <stdlib.h>
struct search_build_data {
const char *error;
};
{
case SEARCH_UIDSET:
return TRUE;
break;
case SEARCH_SUB:
case SEARCH_OR:
return TRUE;
break;
default:
break;
}
}
return FALSE;
}
struct mail_search_args **search_args_r)
{
struct mail_search_parser *parser;
struct mail_search_args *sargs;
const char *error;
int ret;
if (IMAP_ARG_IS_EOL(args)) {
return -1;
}
if (ret < 0) {
return -1;
}
return 0;
}
*search_args_r = sargs;
return 1;
}
static bool
{
unsigned int count;
/* when there are no messages, all messagesets are invalid.
if there's at least one message:
- * gives seq1 = seq2 = (uint32_t)-1
- n:* should work if n <= messages_count
- n:m or m should work if m <= messages_count
*/
if (count == 0 || messages_count == 0)
return FALSE;
return FALSE;
} else {
return FALSE;
}
return TRUE;
}
const char *messageset,
struct mail_search_args **args_r,
const char **error_r)
{
struct mail_search_args *args;
*error_r = "Invalid messageset";
return -1;
}
return 0;
}
static int
const char **error_r)
{
struct mail_search_args *args;
*error_r = "Invalid uidset";
return -1;
}
return 0;
}
struct mail_search_args **search_args_r)
{
int ret;
if (ret > 0) {
}
return ret;
}
struct mail_search_args **search_args_r)
{
struct mail_search_args *search_args;
return 0;
} else {
/* $ not set yet, match nothing */
}
return 1;
}
struct mail_search_args **search_args_r)
{
int ret;
/* SEARCHRES extension: replace $ with the last saved
search result */
}
if (!uid) {
&error);
} else {
}
if (ret < 0) {
return -1;
}
return 1;
}