dbox-mail.c revision 1ac7c8e9040e0d0b7e9f849e45b94bfe919595a9
/* Copyright (c) 2007-2009 Dovecot authors, see the included COPYING file */
#include "lib.h"
#include "istream.h"
#include "str.h"
#include "index-storage.h"
#include "index-mail.h"
#include "dbox-storage.h"
#include "dbox-file.h"
#include "dbox-mail.h"
#include <stdlib.h>
struct mail *
dbox_mail_alloc(struct mailbox_transaction_context *t,
struct mailbox_header_lookup_ctx *wanted_headers)
{
}
{
}
{
struct dbox_storage *storage =
return -1;
return -1;
if (dbox_file_metadata_read(*file_r) <= 0)
return -1;
return 0;
}
{
return 0;
return -1;
return 0;
}
{
const char *value;
return 0;
return -1;
return 0;
}
{
const char *value;
return 0;
return -1;
return 0;
}
{
const char *value;
return 0;
return -1;
/* missing / corrupted save time - use the file's ctime */
return -1;
}
}
return 0;
}
static int
enum index_cache_field cache_field,
const char **value_r)
{
const char *value;
return 0;
}
return -1;
value = "";
return 0;
}
const char **value_r)
{
/* keep the UIDL in cache file, otherwise POP3 would open all
mail files and read the metadata. same for GUIDs if they're
used. */
switch (field) {
case MAIL_FETCH_UIDL_BACKEND:
case MAIL_FETCH_GUID:
default:
break;
}
}
struct message_size *body_size,
{
struct dbox_storage *storage =
int ret;
return -1;
if (ret <= 0) {
if (ret < 0)
return -1;
"uid=%u points to broken data at offset="
return -1;
}
}
stream_r);
}