diff src/lib-index/mailbox-list-index.h @ 6069:8576ce5d7fb4 HEAD

Changed mailbox_list_index_view_init() to return -1 if uid_validity doesn't match between mailbox list index and the view.
author Timo Sirainen <tss@iki.fi>
date Wed, 18 Jul 2007 07:58:21 +0300
parents 4d3294c59939
children f1f83c90fd3d
line wrap: on
line diff
--- a/src/lib-index/mailbox-list-index.h	Wed Jul 18 07:56:02 2007 +0300
+++ b/src/lib-index/mailbox-list-index.h	Wed Jul 18 07:58:21 2007 +0300
@@ -1,6 +1,7 @@
 #ifndef __MAILBOX_LIST_INDEX_H
 #define __MAILBOX_LIST_INDEX_H
 
+struct mailbox_list_index_view;
 struct mailbox_list_index_sync_ctx;
 
 /* Mailbox list index contains UID <-> mailbox name mapping. It also takes in
@@ -61,10 +62,10 @@
 
 /* Mailbox list index and mail index must be kept in sync, so lookups and
    iterations must know the mail index view. The mail_view can be set to NULL
-   to use the latest changes. */
-struct mailbox_list_index_view *
-mailbox_list_index_view_init(struct mailbox_list_index *index,
-			     struct mail_index_view *mail_view);
+   to use the latest changes. Returns -1 if uidvalidity doesn't match. */
+int mailbox_list_index_view_init(struct mailbox_list_index *index,
+				 struct mail_index_view *mail_view,
+				 struct mailbox_list_index_view **view_r);
 void mailbox_list_index_view_deinit(struct mailbox_list_index_view **view);
 
 /* Get mailbox UID for a given name. Returns 1 if found, 0 if not,