diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 09:51:24 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 09:51:24 +0000 |
commit | f7548d6d28c313cf80e6f3ef89aed16a19815df1 (patch) | |
tree | a3f6f2a3f247293bee59ecd28e8cd8ceb6ca064a /src/lib-storage/mailbox-list-notify.c | |
parent | Initial commit. (diff) | |
download | dovecot-f7548d6d28c313cf80e6f3ef89aed16a19815df1.tar.xz dovecot-f7548d6d28c313cf80e6f3ef89aed16a19815df1.zip |
Adding upstream version 1:2.3.19.1+dfsg1.upstream/1%2.3.19.1+dfsg1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/lib-storage/mailbox-list-notify.c')
-rw-r--r-- | src/lib-storage/mailbox-list-notify.c | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/src/lib-storage/mailbox-list-notify.c b/src/lib-storage/mailbox-list-notify.c new file mode 100644 index 0000000..9ca83ac --- /dev/null +++ b/src/lib-storage/mailbox-list-notify.c @@ -0,0 +1,42 @@ +/* Copyright (c) 2013-2018 Dovecot authors, see the included COPYING file */ + +#include "lib.h" +#include "mailbox-list-private.h" +#include "mailbox-list-notify.h" + +int mailbox_list_notify_init(struct mailbox_list *list, + enum mailbox_list_notify_event mask, + struct mailbox_list_notify **notify_r) +{ + if (list->v.notify_init == NULL) + return -1; + return list->v.notify_init(list, mask, notify_r); +} + +void mailbox_list_notify_deinit(struct mailbox_list_notify **_notify) +{ + struct mailbox_list_notify *notify = *_notify; + + *_notify = NULL; + + notify->list->v.notify_deinit(notify); +} + +int mailbox_list_notify_next(struct mailbox_list_notify *notify, + const struct mailbox_list_notify_rec **rec_r) +{ + return notify->list->v.notify_next(notify, rec_r); +} + +#undef mailbox_list_notify_wait +void mailbox_list_notify_wait(struct mailbox_list_notify *notify, + void (*callback)(void *context), void *context) +{ + 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); +} |