virtual-mail.c revision 9f755a35f7db42df6d449e30a543d9ab51734585
/* Copyright (c) 2008 Dovecot authors, see the included COPYING file */
#include "lib.h"
#include "array.h"
#include "index-mail.h"
#include "virtual-storage.h"
struct virtual_mail {
struct index_mail imail;
struct mailbox_header_lookup_ctx *wanted_headers;
/* currently active mail */
struct mail *backend_mail;
/* all allocated mails */
};
struct mail *
virtual_mail_alloc(struct mailbox_transaction_context *t,
struct mailbox_header_lookup_ctx *wanted_headers)
{
struct virtual_mail *vmail;
sizeof(void *), 5);
}
{
unsigned int i, count;
for (i = 0; i < count; i++)
}
static struct mail *
{
unsigned int i, count;
for (i = 0; i < count; i++) {
return mails[i];
}
return NULL;
}
{
struct virtual_backend_box *bbox;
struct mailbox_transaction_context *backend_trans;
struct mailbox_header_lookup_ctx *backend_headers;
const struct virtual_mail_index_record *vrec;
const struct mail_index_record *rec;
const void *data;
bool expunged;
if (backend_headers != NULL)
}
i_unreached();
}
{
return FALSE;
return TRUE;
}
static int
{
return -1;
}
return 0;
}
static int
{
int tz;
if (timezone_r == NULL)
timezone_r = &tz;
return -1;
}
return 0;
}
{
return -1;
}
return 0;
}
{
return -1;
}
return 0;
}
{
return -1;
}
return 0;
}
{
return -1;
}
return 0;
}
static int
bool decode_to_utf8, const char **value_r)
{
decode_to_utf8, value_r) < 0) {
return -1;
}
return 0;
}
static int
bool decode_to_utf8, const char *const **value_r)
{
decode_to_utf8, value_r) < 0) {
return -1;
}
return 0;
}
static int
struct mailbox_header_lookup_ctx *headers,
{
struct mailbox_header_lookup_ctx *backend_headers;
int ret;
stream_r);
if (ret < 0) {
return -1;
}
return 0;
}
static int
struct message_size *body_size,
{
stream_r) < 0) {
return -1;
}
return 0;
}
static int
const char **value_r)
{
if (field == MAIL_FETCH_MAILBOX_NAME) {
return 0;
}
return -1;
}
return 0;
}
{
}
static void
{
}
{
}
struct mail_vfuncs virtual_mail_vfuncs = {
NULL,
};