imap-fetch.c revision 0b1f70057d59ed3fe7a163bd4fde0c75353910f3
/* 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 <unistd.h>
const char *const *imap_fetch_get_body_fields(const char *fields)
{
while (*fields == ' ')
fields++;
if (*fields == '(')
fields++;
/* array ends at ")" element */
break;
if (**field != '\0') {
dest++;
}
}
return field_list;
}
{
}
const struct mail_full_flags *flags)
{
return FALSE;
}
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;
}
{
struct message_size hdr_size;
const char *str;
return FALSE;
}
return FALSE;
}
{
const char *str;
return FALSE;
}
return FALSE;
}
{
const struct mail_full_flags *flags;
struct imap_fetch_body_data *body;
if (!ctx->update_seen)
else {
return FALSE;
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,
const char *messageset, int uidset)
{
struct imap_fetch_context ctx;
struct imap_fetch_body_data *body;
const char *const *wanted_headers, *const *arr;
int all_found;
/* 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++;
}
}
if (ctx.update_seen) {
return -1;
}
messageset, uidset);
else {
break;
}
}
}
}