notify_update_stat(inotify);
}
}
+
+void mailbox_list_index_notify_flush(struct mailbox_list_notify *notify)
+{
+ struct mailbox_list_notify_index *inotify =
+ (struct mailbox_list_notify_index *)notify;
+
+ if (inotify->to_notify != NULL)
+ notify_now_callback(inotify);
+}
v->notify_next = mailbox_list_index_notify_next;
v->notify_deinit = mailbox_list_index_notify_deinit;
v->notify_wait = mailbox_list_index_notify_wait;
+ v->notify_flush = mailbox_list_index_notify_flush;
MODULE_CONTEXT_SET(list, mailbox_list_index_module, ilist);
void mailbox_list_index_notify_wait(struct mailbox_list_notify *notify,
void (*callback)(void *context),
void *context);
+void mailbox_list_index_notify_flush(struct mailbox_list_notify *notify);
void mailbox_list_index_status_init_mailbox(struct mailbox_vfuncs *v);
void mailbox_list_index_backend_init_mailbox(struct mailbox *box,
{
notify->list->v.notify_wait(notify, callback, context);
}
+
+void mailbox_list_notify_flush(struct mailbox_list_notify *notify)
+{
+ if (notify->list->v.notify_flush != NULL)
+ notify->list->v.notify_flush(notify);
+}
/* Call the specified callback when something changes. */
void mailbox_list_notify_wait(struct mailbox_list_notify *notify,
void (*callback)(void *context), void *context);
+/* Flush any delayed notifications now. */
+void mailbox_list_notify_flush(struct mailbox_list_notify *notify);
#endif
void (*notify_deinit)(struct mailbox_list_notify *notify);
void (*notify_wait)(struct mailbox_list_notify *notify,
void (*callback)(void *context), void *context);
+ void (*notify_flush)(struct mailbox_list_notify *notify);
};
struct mailbox_list_module_register {