view src/lib-storage/list/mailbox-list-notify-tree.h @ 22604:98d99bf6511e

lib-storage: Make sure mailbox list notification flush sees latest changes. This is mainly useful with imaptest test scripts to make sure they're seeing the changes done by the other session, without assuming that inotify will always notify about the change before NOOP is run (it doesn't). Do this only if mailbox_idle_check_interval>0, so it's not run when periodic stat()s are wanted to be avoided.
author Timo Sirainen <timo.sirainen@dovecot.fi>
date Mon, 11 Sep 2017 13:48:17 +0300
parents a16d77a075bb
children
line wrap: on
line source

#ifndef MAILBOX_LIST_NOTIFY_TREE_H
#define MAILBOX_LIST_NOTIFY_TREE_H

#include "mailbox-tree.h"

struct mailbox_notify_node {
	struct mailbox_node node;

	guid_128_t guid;
	uint32_t index_uid;

	uint32_t uidvalidity;
	uint32_t uidnext;
	uint32_t messages;
	uint32_t unseen;
	uint64_t highest_modseq;
};

struct mailbox_list_notify_tree *
mailbox_list_notify_tree_init(struct mailbox_list *list);
void mailbox_list_notify_tree_deinit(struct mailbox_list_notify_tree **tree);

struct mailbox_notify_node *
mailbox_list_notify_tree_lookup(struct mailbox_list_notify_tree *tree,
				const char *storage_name);

#endif