imapc-search.c revision 8a26102b8b1e08a774398980a8f92ae8f8575da8
/* Copyright (c) 2011 Dovecot authors, see the included COPYING file */
#include "lib.h"
#include "istream.h"
#include "write-full.h"
#include "str.h"
#include "imap-arg.h"
#include "imap-date.h"
#include "imap-util.h"
#include "mail-user.h"
#include "mail-search.h"
#include "index-search-private.h"
#include "imapc-mail.h"
#include "imapc-client.h"
#include "imapc-storage.h"
struct imapc_search_context {
struct index_search_context ictx;
/* non-NULL during _search_next_nonblock() */
/* sequences of messages we're next wanting to fetch. */
unsigned int fetching:1;
};
void *context)
{
struct imapc_mailbox *mbox =
;
reply);
} else {
}
}
static bool
bool want_headers)
{
if ((fields & (MAIL_FETCH_STREAM_BODY |
MAIL_FETCH_VIRTUAL_SIZE)) != 0) {
} else if (want_headers ||
MAIL_FETCH_DATE)) != 0) {
}
if ((fields & MAIL_FETCH_RECEIVED_DATE) != 0) {
}
return ret;
}
static void
{
/* we don't need to fetch anything */
return;
}
}
struct mail_search_context *
imapc_search_init(struct mailbox_transaction_context *t,
struct mail_search_args *args,
const enum mail_sort_type *sort_program)
{
struct imapc_search_context *ctx;
}
{
struct imapc_mailbox *mbox =
return index_storage_search_deinit(_ctx);
}
{
struct imapc_mailbox *mbox =
bool ret;
if (!ret)
return FALSE;
}
return TRUE;
}
{
unsigned int i, count;
for (i = 0; i < count; i++) {
}
}
{
/* add messages to the next_seqs list as long as the sequences
are incrementing */
if (ctx->next_pending_seq == 0)
prev_seq = 0;
else {
}
while (index_storage_search_next_update_seq(_ctx)) {
break;
}
}
} T_END;
}
{
unsigned int count;
if (count == 0) {
if (count == 0)
return FALSE;
}
else
return TRUE;
}
{
unsigned int i, count;
for (i = 0; i < reply->file_args_count; i++) {
return TRUE;
}
}
return FALSE;
}
static void
const struct imapc_untagged_reply *reply,
{
const char *value;
return;
return;
i_error("dup() failed: %m");
return;
}
} else {
return;
return;
}
}
}
return;
}
} else if (body) {
if (ret < 0) {
return;
}
/* we'll assume that the remote server is working properly and
sending CRLF linefeeds */
}
}
const struct imapc_untagged_reply *reply,
{
unsigned int i;
time_t t;
int tz;
break;
}
}
else
}
{
struct imapc_simple_context sctx;
return 0;
}