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/plugins/push-notification/push-notification-triggers.h | |
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/plugins/push-notification/push-notification-triggers.h')
-rw-r--r-- | src/plugins/push-notification/push-notification-triggers.h | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/src/plugins/push-notification/push-notification-triggers.h b/src/plugins/push-notification/push-notification-triggers.h new file mode 100644 index 0000000..b29bc47 --- /dev/null +++ b/src/plugins/push-notification/push-notification-triggers.h @@ -0,0 +1,64 @@ +/* Copyright (c) 2015-2018 Dovecot authors, see the included COPYING file */ + +#ifndef PUSH_NOTIFICATION_TRIGGERS_H +#define PUSH_NOTIFICATION_TRIGGERS_H + +#include "mail-types.h" + +struct mail; +struct mailbox; +struct push_notification_txn; +struct push_notification_txn_mbox; +struct push_notification_txn_msg; + +enum push_notification_event_trigger { + PUSH_NOTIFICATION_EVENT_TRIGGER_NONE, + + /* Mailbox actions */ + PUSH_NOTIFICATION_EVENT_TRIGGER_MBOX_CREATE = 0x001, + PUSH_NOTIFICATION_EVENT_TRIGGER_MBOX_DELETE = 0x002, + PUSH_NOTIFICATION_EVENT_TRIGGER_MBOX_RENAME = 0x004, + PUSH_NOTIFICATION_EVENT_TRIGGER_MBOX_SUBSCRIBE = 0x008, + + /* Message actions */ + PUSH_NOTIFICATION_EVENT_TRIGGER_MSG_SAVE_NEW = 0x010, + PUSH_NOTIFICATION_EVENT_TRIGGER_MSG_SAVE_APPEND = 0x020, + PUSH_NOTIFICATION_EVENT_TRIGGER_MSG_EXPUNGE = 0x040, + PUSH_NOTIFICATION_EVENT_TRIGGER_MSG_FLAGCHANGE = 0x080, + PUSH_NOTIFICATION_EVENT_TRIGGER_MSG_KEYWORDCHANGE = 0x100, +}; + +/* Mailbox actions. */ +void push_notification_trigger_mbox_create( + struct push_notification_txn *txn, struct mailbox *box, + struct push_notification_txn_mbox *mbox); +void push_notification_trigger_mbox_delete( + struct push_notification_txn *txn, struct mailbox *box, + struct push_notification_txn_mbox *mbox); +void push_notification_trigger_mbox_rename( + struct push_notification_txn *txn, + struct mailbox *src, struct mailbox *dest, + struct push_notification_txn_mbox *mbox); +void push_notification_trigger_mbox_subscribe( + struct push_notification_txn *txn, struct mailbox *box, bool subscribed, + struct push_notification_txn_mbox *mbox); + +/* Message actions. */ +void push_notification_trigger_msg_save_new( + struct push_notification_txn *txn, struct mail *mail, + struct push_notification_txn_msg *msg); +void push_notification_trigger_msg_save_append( + struct push_notification_txn *txn, struct mail *mail, + struct push_notification_txn_msg *msg); +void push_notification_trigger_msg_save_expunge( + struct push_notification_txn *txn, struct mail *mail, + struct push_notification_txn_msg *msg); +void push_notification_trigger_msg_flag_change( + struct push_notification_txn *txn, struct mail *mail, + struct push_notification_txn_msg *msg, enum mail_flags old_flags); +void push_notification_trigger_msg_keyword_change( + struct push_notification_txn *txn, struct mail *mail, + struct push_notification_txn_msg *msg, const char *const *old_keywords); + +#endif + |