mail-index-transaction-view.c revision 09c3a491f4f6ccebe290c7709bdc0d79a187610b
/* Copyright (C) 2004 Timo Sirainen */
#include "lib.h"
#include "buffer.h"
#include "mail-index-private.h"
#include "mail-index-view-private.h"
#include "mail-index-transaction-private.h"
struct mail_index_view_transaction {
struct mail_index_view view;
struct mail_index_view_methods *parent;
struct mail_index_transaction *t;
};
{
struct mail_index_view_transaction *tview =
(struct mail_index_view_transaction *)view;
}
{
struct mail_index_view_transaction *tview =
(struct mail_index_view_transaction *)view;
return view->messages_count +
(tview->t->last_new_seq == 0 ? 0 :
}
const struct mail_index_header **hdr_r)
{
struct mail_index_view_transaction *tview =
(struct mail_index_view_transaction *)view;
return -1;
/* messages_count differs, use a modified copy.
FIXME: same problems as with _view_get_header().. */
}
return 0;
}
struct mail_index_map **map_r,
const struct mail_index_record **rec_r)
{
struct mail_index_view_transaction *tview =
(struct mail_index_view_transaction *)view;
/* FIXME: is this right to return index map..?
it's not there yet. */
return 1;
} else {
}
}
{
struct mail_index_view_transaction *tview =
(struct mail_index_view_transaction *)view;
return 0;
} else {
}
}
{
struct mail_index_view_transaction *tview =
(struct mail_index_view_transaction *)view;
first_seq_r, last_seq_r) < 0)
return -1;
/* FIXME: we don't need this function yet.. new UIDs might be 0 as
well.. */
if (*first_seq_r == 0) {
/* nothing found, either doesn't exist or it's completely
newly appended. */
/* last_seq_r may be growed from transactions */
}
return 0;
}
{
struct mail_index_view_transaction *tview =
(struct mail_index_view_transaction *)view;
const struct mail_index_record *rec;
return -1;
if (*seq_r != 0)
return 0;
break;
}
}
return 0;
}
static struct mail_index_view_methods view_methods = {
};
struct mail_index_view *
{
struct mail_index_view_transaction *tview;
tview->t = t;
}