diff src/lib-index/mail-index-dummy-view.c @ 3114:7c7299d1acfe HEAD

Instead of using separate transaction sorting code for syncing, just put the data from transactions into a temporary transaction and read it from there.
author Timo Sirainen <tss@iki.fi>
date Sat, 22 Jan 2005 18:56:37 +0200
parents
children 9810fafd04ff
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/lib-index/mail-index-dummy-view.c	Sat Jan 22 18:56:37 2005 +0200
@@ -0,0 +1,40 @@
+/* Copyright (C) 2004 Timo Sirainen */
+
+#include "lib.h"
+#include "mail-index-private.h"
+#include "mail-index-view-private.h"
+
+static void _dummy_view_close(struct mail_index_view *view __attr_unused__)
+{
+	i_assert(view->refcount == 0);
+
+	i_free(view);
+}
+
+static uint32_t
+_dummy_view_get_message_count(struct mail_index_view *view __attr_unused__)
+{
+	return (uint32_t)-3;
+}
+
+static struct mail_index_view_methods dummy_view_methods = {
+	_dummy_view_close,
+	_dummy_view_get_message_count,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL
+};
+
+struct mail_index_view *mail_index_dummy_view_open(void)
+{
+	struct mail_index_view *view;
+
+	view = i_new(struct mail_index_view, 1);
+	view->refcount = 1;
+	view->methods = dummy_view_methods;
+	return view;
+}