index-fetch.c revision b0f4d39e96eeaa00cde7525a9a5991feefa17a3a
/* Copyright (C) 2002 Timo Sirainen */
#include "lib.h"
#include "iobuffer.h"
#include "temp-string.h"
#include "index-storage.h"
#include "index-fetch.h"
#include "mail-messageset.h"
#include "message-send.h"
#include "imap-date.h"
#include "imap-util.h"
#include "imap-message-cache.h"
#include <unistd.h>
{
const char *body;
else {
i_error("Couldn't generate BODY for UID %u (index %s)",
}
}
{
const char *bodystructure;
if (bodystructure != NULL) {
} else {
i_error("Couldn't generate BODYSTRUCTURE for UID %u (index %s)",
}
}
{
const char *envelope;
else {
i_error("Couldn't generate ENVELOPE for UID %u (index %s)",
}
}
{
(unsigned long) rec->full_virtual_size);
}
{
flags |= MAIL_RECENT;
if (ctx->update_seen)
}
{
}
{
}
{
const char *str;
i_error("Couldn't get RFC822 for UID %u (index %s)",
return;
}
(unsigned long) (hdr_size.virtual_size +
}
{
const char *str;
i_error("Couldn't get RFC822.HEADER for UID %u (index %s)",
return;
}
(unsigned long) hdr_size.virtual_size);
}
{
const char *str;
i_error("Couldn't get RFC822.TEXT for UID %u (index %s)",
return;
}
(unsigned long) body_size.virtual_size);
}
{
field = 0;
if (fetch_data->body)
field |= IMAP_CACHE_BODY;
if (fetch_data->bodystructure)
if (fetch_data->envelope)
if (fetch_data->rfc822_size) {
}
if (fetch_data->rfc822) {
}
if (fetch_data->rfc822_header)
if (fetch_data->rfc822_text)
/* check what body[] sections want */
return field;
}
{
void *mail_cache_context;
if (fields == 0)
return;
if (MSG_HAS_VALID_CRLF_DATA(rec)) {
} else {
rec->full_virtual_size, 0, 0,
}
}
void *context)
{
/* first see what we need to do. this way we don't first do some
light parsing and later notice that we need to do heavier parsing
anyway */
/* send the data written into temp string, skipping the initial space */
}
/* large data */
return TRUE;
}
{
int ret;
return mail_storage_set_index_error(ibox);
/* If we have any BODY[..] sections, \Seen flag is added for
all messages */
break;
}
}
index_fetch_mail, &ctx);
return mail_storage_set_index_error(ibox);
/* BODY[..] was fetched, set \Seen flag for all messages.
This needs to be done separately because we need exclusive
lock for it */
return FALSE;
}
return ret >= 0;
}