imap-fetch.c revision 0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834
/* Copyright (C) 2002 Timo Sirainen */
#include "common.h"
#include "buffer.h"
#include "istream.h"
#include "ostream.h"
#include "str.h"
#include "message-send.h"
#include "message-size.h"
#include "imap-date.h"
#include "commands.h"
#include "imap-fetch.h"
#include "imap-util.h"
#include <unistd.h>
const char *const *imap_fetch_get_body_fields(const char *fields)
{
while (*fields == ' ')
fields++;
if (*fields == '(')
fields++;
/* array ends at ")" element */
dest++;
}
return field_list;
}
{
}
const struct mail_full_flags *flags)
{
struct mail_full_flags full_flags;
return FALSE;
}
if (ctx->update_seen) {
/* \Seen change isn't shown by get_flags() yet */
full_flags = *flags;
flags = &full_flags;
}
return TRUE;
}
{
return FALSE;
return TRUE;
}
{
return FALSE;
return TRUE;
}
{
const char *body;
return FALSE;
return FALSE;
} else {
return FALSE;
}
return FALSE;
return FALSE;
return TRUE;
}
{
const char *bodystructure;
if (bodystructure == NULL)
return FALSE;
return FALSE;
} else {
return FALSE;
}
return FALSE;
return FALSE;
return TRUE;
}
{
const char *envelope;
return FALSE;
return FALSE;
} else {
return FALSE;
}
return FALSE;
return FALSE;
return TRUE;
}
{
const char *str;
return FALSE;
}
return FALSE;
!mail->has_no_nuls) >= 0;
}
{
struct message_size hdr_size;
const char *str;
return FALSE;
}
return FALSE;
!mail->has_no_nuls) >= 0;
}
{
const char *str;
return FALSE;
}
return FALSE;
!mail->has_no_nuls) >= 0;
}
{
const struct mail_full_flags *flags;
struct imap_fetch_body_data *body;
if (!ctx->update_seen)
else {
return FALSE;
MODIFY_ADD) < 0)
return FALSE;
seen_updated = TRUE;
}
}
t_push();
do {
/* write the data into temp string */
break;
break;
break;
/* send the data written into temp string */
break;
data_written = TRUE;
/* medium size data .. seems to be faster without
putting through string */
break;
break;
break;
/* large data */
break;
break;
break;
break;
}
} while (0);
if (data_written) {
}
t_pop();
return !failed;
}
enum mail_fetch_field fetch_data,
enum imap_fetch_field imap_data,
struct imap_fetch_body_data *bodies,
struct mail_search_arg *search_args)
{
struct imap_fetch_context ctx;
struct mailbox_transaction_context *t;
struct imap_fetch_body_data *body;
const char *const *wanted_headers, *const *arr;
if (!mailbox_is_readonly(box)) {
/* If we have any BODY[..] sections, \Seen flag is added for
all messages. */
break;
}
}
}
/* If we have only BODY[HEADER.FIELDS (...)] fetches, get them
separately rather than parsing the full header so mail storage
can try to cache them. */
break;
}
arr++;
}
}
else {
break;
}
}
}
else {
if (mailbox_transaction_commit(t) < 0)
}
}