]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
Added hook_mailbox_index_opened.
authorTimo Sirainen <tss@iki.fi>
Fri, 9 May 2008 20:47:07 +0000 (23:47 +0300)
committerTimo Sirainen <tss@iki.fi>
Fri, 9 May 2008 20:47:07 +0000 (23:47 +0300)
--HG--
branch : HEAD

src/lib-storage/index/index-storage.c
src/lib-storage/mail-storage-private.h
src/lib-storage/mail-storage.c

index 14e7cbbf74aff0e28e49b6a97bc662216dc6c0aa..1c70ae94a3a132a56b88c222c1c9d08909a24429 100644 (file)
@@ -403,6 +403,9 @@ void index_storage_mailbox_open(struct index_mailbox *ibox)
                                ibox, &ibox->view_module_ctx);
 
        ibox->box.opened = TRUE;
+
+       if (hook_mailbox_index_opened != NULL)
+               hook_mailbox_index_opened(&ibox->box);
 }
 
 void index_storage_mailbox_init(struct index_mailbox *ibox, const char *name,
index 19aadf65c23a48e43452c6e9da8daa97b2ceae50..244a14343644b57a92ce7172cb65629b7adedf5d 100644 (file)
@@ -10,6 +10,8 @@
 extern void (*hook_mail_storage_created)(struct mail_storage *storage);
 /* Called after mailbox has been opened */
 extern void (*hook_mailbox_opened)(struct mailbox *box);
+/* Called after mailbox index has been opened */
+extern void (*hook_mailbox_index_opened)(struct mailbox *box);
 
 struct mail_storage_module_register {
        unsigned int id;
index c1b6055bd1b96b39700e015791b8e76a85c343a3..addc92e09f9f9711ad6c18f9cc6436e2894f0a94 100644 (file)
@@ -31,6 +31,7 @@ struct mail_storage_mail_index_module mail_storage_mail_index_module =
 
 void (*hook_mail_storage_created)(struct mail_storage *storage);
 void (*hook_mailbox_opened)(struct mailbox *box) = NULL;
+void (*hook_mailbox_index_opened)(struct mailbox *box) = NULL;
 
 static ARRAY_DEFINE(storages, struct mail_storage *);