imap-fetch.c revision 4c07b08af30e1065f7022980b60474f229d8cadf
/* Copyright (C) 2002-2004 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 <stdlib.h>
{
}
{
void *data;
if (fetch_handlers == NULL) {
}
}
{
const struct imap_fetch_handler *h = handler_p;
int i;
for (i = 0; h->name[i] != '\0'; i++) {
return -1;
}
}
}
{
const struct imap_fetch_handler *handler;
sizeof(struct imap_fetch_handler),
sizeof(struct imap_fetch_handler),
return FALSE;
}
}
{
struct imap_fetch_context *ctx;
if (fetch_handlers == NULL) {
sizeof(default_handlers) /
sizeof(default_handlers[0]));
}
return ctx;
}
{
const struct imap_fetch_context_handler *handlers;
struct imap_fetch_context_handler h;
/* don't allow duplicate handlers */
for (i = 0; i < size; i++) {
return;
}
}
memset(&h, 0, sizeof(h));
}
struct mail_search_arg *search_arg)
{
const void *data;
if (ctx->flags_update_seen) {
else if (!ctx->flags_have_handler) {
}
}
MAIL_FETCH_STREAM_BODY)) == 0)) {
}
ctx->search_ctx =
}
{
const struct imap_fetch_context_handler *handlers;
int ret;
return ret;
ctx->cur_offset = 0;
ctx->cur_handler++;
}
for (;;) {
if (ret <= 0)
return ret;
}
}
break;
return -1;
}
t_push();
t_pop();
if (ret <= 0) {
return ret;
}
ctx->cur_offset = 0;
}
return -1;
}
return -1;
ctx->cur_handler = 0;
}
return 1;
}
{
}
}
else {
}
}
}
void *context __attr_unused__)
{
const char *body;
return -1;
else {
return -1;
}
return -1;
return 1;
}
{
return TRUE;
}
}
{
const char *bodystructure;
if (bodystructure == NULL)
return -1;
else {
return -1;
}
return -1;
return 1;
}
const char *name __attr_unused__,
{
return TRUE;
}
void *context __attr_unused__)
{
const char *envelope;
return -1;
else {
return -1;
}
return -1;
return 1;
}
const char *name __attr_unused__,
{
return TRUE;
}
void *context __attr_unused__)
{
const struct mail_full_flags *flags;
struct mail_full_flags full_flags;
return -1;
/* Add \Seen flag */
full_flags = *flags;
flags = &full_flags;
return -1;
} else if (ctx->flags_show_only_seen_changes) {
return 1;
}
return 1;
}
const char *name __attr_unused__,
{
return TRUE;
}
void *context __attr_unused__)
{
return -1;
return 1;
}
const char *name __attr_unused__,
{
return TRUE;
}
void *context __attr_unused__)
{
return 1;
}
const char *name __attr_unused__,
{
return TRUE;
}
{ "BODY", fetch_body_init },
{ "BODYSTRUCTURE", fetch_bodystructure_init },
{ "ENVELOPE", fetch_envelope_init },
{ "FLAGS", fetch_flags_init },
{ "INTERNALDATE", fetch_internaldate_init },
{ "RFC822", fetch_rfc822_init },
{ "UID", fetch_uid_init }
};