summaryrefslogtreecommitdiffstats
path: root/src/plugins/push-notification/push-notification-events-rfc5423.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 09:51:24 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 09:51:24 +0000
commitf7548d6d28c313cf80e6f3ef89aed16a19815df1 (patch)
treea3f6f2a3f247293bee59ecd28e8cd8ceb6ca064a /src/plugins/push-notification/push-notification-events-rfc5423.c
parentInitial commit. (diff)
downloaddovecot-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/plugins/push-notification/push-notification-events-rfc5423.c')
-rw-r--r--src/plugins/push-notification/push-notification-events-rfc5423.c59
1 files changed, 59 insertions, 0 deletions
diff --git a/src/plugins/push-notification/push-notification-events-rfc5423.c b/src/plugins/push-notification/push-notification-events-rfc5423.c
new file mode 100644
index 0000000..10dd0c7
--- /dev/null
+++ b/src/plugins/push-notification/push-notification-events-rfc5423.c
@@ -0,0 +1,59 @@
+/* Copyright (c) 2015-2018 Dovecot authors, see the included COPYING file */
+
+#include "lib.h"
+
+#include "push-notification-events.h"
+#include "push-notification-events-rfc5423.h"
+
+/* These are the RFC 5423 Mail Store Events currently handled within the core
+ push-notification code.
+
+ @todo: These events are not currently handled:
+ - Login
+ - Logout
+ - QuotaExceed
+ - Quota Within
+ */
+extern struct push_notification_event push_notification_event_flagsclear;
+extern struct push_notification_event push_notification_event_flagsset;
+extern struct push_notification_event push_notification_event_mailboxcreate;
+extern struct push_notification_event push_notification_event_mailboxdelete;
+extern struct push_notification_event push_notification_event_mailboxrename;
+extern struct push_notification_event push_notification_event_mailboxsubscribe;
+extern struct push_notification_event push_notification_event_mailboxunsubscribe;
+extern struct push_notification_event push_notification_event_messageappend;
+extern struct push_notification_event push_notification_event_messageexpunge;
+extern struct push_notification_event push_notification_event_messagenew;
+extern struct push_notification_event push_notification_event_messageread;
+extern struct push_notification_event push_notification_event_messagetrash;
+
+static struct push_notification_event *rfc5423_events[] = {
+ &push_notification_event_flagsclear,
+ &push_notification_event_flagsset,
+ &push_notification_event_mailboxcreate,
+ &push_notification_event_mailboxdelete,
+ &push_notification_event_mailboxrename,
+ &push_notification_event_mailboxsubscribe,
+ &push_notification_event_mailboxunsubscribe,
+ &push_notification_event_messageappend,
+ &push_notification_event_messageexpunge,
+ &push_notification_event_messagenew,
+ &push_notification_event_messageread,
+ &push_notification_event_messagetrash
+};
+
+void push_notification_event_register_rfc5423_events(void)
+{
+ unsigned int i;
+
+ for (i = 0; i < N_ELEMENTS(rfc5423_events); i++)
+ push_notification_event_register(rfc5423_events[i]);
+}
+
+void push_notification_event_unregister_rfc5423_events(void)
+{
+ unsigned int i;
+
+ for (i = 0; i < N_ELEMENTS(rfc5423_events); i++)
+ push_notification_event_unregister(rfc5423_events[i]);
+}