mdbox-deleted-storage.c revision 2454dfa32c93c20a8522c6ed42fe057baaac9f9a
/* Copyright (c) 2013-2017 Dovecot authors, see the included COPYING file */
#include "lib.h"
#include "array.h"
#include "ioloop.h"
#include "mkdir-parents.h"
#include "master-service.h"
#include "mail-index-modseq.h"
#include "mail-index-alloc-cache.h"
#include "mailbox-log.h"
#include "mailbox-list-private.h"
#include "mail-copy.h"
#include "dbox-mail.h"
#include "dbox-save.h"
#include "mdbox-map.h"
#include "mdbox-file.h"
#include "mdbox-sync.h"
#include "mdbox-storage-rebuild.h"
#include "mdbox-storage.h"
extern struct mail_storage mdbox_deleted_storage;
extern struct mailbox mdbox_deleted_mailbox;
extern struct dbox_storage_vfuncs mdbox_deleted_dbox_storage_vfuncs;
static struct mail_storage *mdbox_deleted_storage_alloc(void)
{
struct mdbox_storage *storage;
}
static struct mailbox *
struct mailbox_list *list,
{
struct mdbox_mailbox *mbox;
}
static int
const struct mailbox_update *update,
struct mail_index_transaction *trans)
{
}
if (mail_index_transaction_commit(&new_trans) < 0) {
return -1;
}
}
return 0;
}
static const char *
{
return "";
}
static int
enum mailbox_metadata_items items,
struct mailbox_metadata *metadata_r)
{
return -1;
if ((items & MAILBOX_METADATA_GUID) != 0)
return 0;
}
static struct mail_save_context *
{
struct mail_save_context *ctx;
ctx->transaction = t;
return ctx;
}
static int
{
MAIL_ERROR_NOTPOSSIBLE, "mdbox_deleted doesn't support saving mails");
return -1;
}
static int
{
return -1;
}
{
return -1;
}
static void
{
}
{
struct mail_index_sync_ctx *index_sync_ctx;
struct mail_index_view *sync_view;
struct mail_index_transaction *trans;
struct mdbox_mail_index_record rec;
struct mdbox_map_mail_index_record map_rec;
int ret = 0;
if (mbox->mdbox_deleted_synced) {
/* don't bother supporting incremental syncs */
return 0;
}
/* since mailbox list currently shows all the existing
mailboxes, we don't want all of them to list the deleted
messages. only show messages in user's INBOX or the
namespace prefix. */
return 0;
}
return -1;
return -1;
return -1;
}
ret = -1;
break;
}
if (refcount == 0) {
map_seq);
}
}
if (ret < 0)
else {
if (mail_index_sync_commit(&index_sync_ctx) < 0) {
ret = -1;
} else {
}
}
return ret;
}
static struct mailbox_sync_context *
enum mailbox_sync_flags flags)
{
enum mdbox_sync_flags mdbox_sync_flags = 0;
int ret = 0;
if (mailbox_open(box) < 0)
ret = -1;
}
}
struct mail_storage mdbox_deleted_storage = {
.v = {
NULL,
NULL,
NULL,
NULL,
}
};
struct mailbox mdbox_deleted_mailbox = {
.v = {
NULL,
NULL,
NULL,
NULL,
NULL,
}
};
};