maildir-mail.c revision 8000c86be02008b74acc71fa422444dc432e2c01
/* Copyright (C) 2003 Timo Sirainen */
#include "lib.h"
#include "istream.h"
#include "index-mail.h"
#include "maildir-storage.h"
#include "maildir-uidlist.h"
#include <fcntl.h>
#include <unistd.h>
static int
{
if (*fd != -1)
return 1;
return 0;
"open(%s) failed: %m", path);
return -1;
}
static int
{
return 1;
return 0;
"stat(%s) failed: %m", path);
return -1;
}
static struct istream *
bool *deleted_r)
{
const char *path;
int fd = -1;
return NULL;
} else {
return NULL;
}
if (fd == -1) {
return NULL;
}
MAIL_MMAP_BLOCK_SIZE, 0, 0, TRUE);
} else {
}
}
{
const char *path;
uint32_t t;
int fd;
/* we're going to open the mail anyway */
}
"fstat(maildir) failed: %m");
return -1;
}
return -1;
} else {
return -1;
}
return 0;
}
{
(void)index_mail_get_received_date(_mail);
return data->received_date;
return (time_t)-1;
return data->received_date;
}
{
(void)index_mail_get_save_date(_mail);
return (time_t)-1;
}
{
return data->virtual_size;
return data->virtual_size;
}
&flags);
return (uoff_t)-1;
}
} else {
}
/* size can be included in filename */
&virtual_size)) {
&virtual_size, sizeof(virtual_size));
return virtual_size;
}
return index_mail_get_virtual_size(_mail);
}
static const char *
{
if (field == MAIL_FETCH_UIDL_FILE_NAME) {
return NULL;
}
} else {
}
}
}
{
return size;
&flags);
return (uoff_t)-1;
}
} else {
}
/* size can be included in filename */
return (uoff_t)-1;
} else {
/* saved mail which hasn't been committed yet */
return (uoff_t)-1;
}
}
return size;
}
struct message_size *hdr_size,
struct message_size *body_size)
{
bool deleted;
return NULL;
}
}
}
struct mail_vfuncs maildir_mail_vfuncs = {
};