dbox-mail.c revision ea1f67e14d727496179ee4ff391f592bce8f4f2d
/* Copyright (c) 2007-2010 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;
/* we just messed up mail's input stream by reading metadata */
}
return 0;
}
static int
const char **value_r)
{
return -1;
return 0;
}
{
const char *value;
return 0;
/* see if we have it in metadata */
return -1;
else {
/* no. that means we can use the size in the header */
}
return 0;
}
{
const char *value;
return 0;
&value) < 0)
return -1;
return 0;
}
{
const char *value;
return 0;
&value) < 0)
return -1;
return 0;
}
{
struct dbox_storage *storage =
return 0;
return -1;
return -1;
}
return 0;
}
static int
enum index_cache_field cache_field,
const char **value_r)
{
struct index_mailbox_context *ibox =
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;
&input);
if (ret <= 0) {
if (ret < 0)
return -1;
"uid=%u points to broken data at offset="
return -1;
}
}
stream_r);
}