raw-storage.c revision fc4e528886f47bf4d2dd0276fb8705c085c3b9ae
/* Copyright (c) 2007-2016 Dovecot authors, see the included COPYING file */
#include "lib.h"
#include "ioloop.h"
#include "istream.h"
#include "index-mail.h"
#include "mail-copy.h"
#include "mailbox-list-private.h"
#include "raw-sync.h"
#include "raw-storage.h"
extern struct mail_storage raw_storage;
extern struct mailbox raw_mailbox;
struct mail_user *
const struct mail_user_settings *set)
{
struct mail_namespace *ns;
struct mail_namespace_settings *ns_set;
struct mail_storage_settings *mail_set;
const char *error;
/* raw storage doesn't have INBOX. We especially don't want LIST to
return INBOX. */
/* absolute paths are ok with raw storage */
return user;
}
{
struct raw_mailbox *raw_box;
const char *name;
return -1;
} else {
if (mailbox_open(box) < 0)
return -1;
}
if (mailbox_sync(box, 0) < 0)
return -1;
return 0;
}
{
}
{
}
static struct mail_storage *raw_storage_alloc(void)
{
struct raw_storage *storage;
}
static void
struct mailbox_list_settings *set)
{
}
static struct mailbox *
{
struct raw_mailbox *mbox;
}
{
const char *path;
int fd;
}
if (fd == -1) {
"open(%s) failed: %m", path);
}
return -1;
}
}
static int
bool directory ATTR_UNUSED)
{
"Raw mailbox creation isn't supported");
return -1;
}
static int
{
"Raw mailbox update isn't supported");
return -1;
}
{
}
struct mail_storage raw_storage = {
.name = RAW_STORAGE_NAME,
.v = {
NULL,
NULL,
NULL,
NULL,
}
};
struct mailbox raw_mailbox = {
.v = {
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
}
};