/* Copyright (c) 2015-2018 Dovecot authors, see the included COPYING file */
#ifndef PUSH_NOTIFICATION_EVENTS_H
#define PUSH_NOTIFICATION_EVENTS_H
#include "mail-types.h"
struct mail;
struct mailbox;
struct push_notification_event_config;
struct push_notification_driver_txn;
struct push_notification_txn;
struct push_notification_txn_event;
struct push_notification_txn_mbox;
struct push_notification_txn_msg;
struct push_notification_event_vfuncs_init {
/* Return the default config for an event (or NULL if config is
* required). */
void *(*default_config)(void);
};
struct push_notification_event_vfuncs_mbox {
/* Output debug information about a message event. */
/* Called when message data is about to be free'd. */
};
/* Mailbox event: create mailbox. */
struct push_notification_event_config *ec,
struct push_notification_txn_mbox *mbox);
/* Mailbox event: delete mailbox. */
struct push_notification_event_config *ec,
struct push_notification_txn_mbox *mbox);
/* Mailbox event: rename mailbox. */
struct push_notification_event_config *ec,
struct push_notification_txn_mbox *mbox,
/* Mailbox event: subscribe mailbox. */
struct push_notification_event_config *ec,
struct push_notification_txn_mbox *mbox);
/* Mailbox event: unsubscribe mailbox. */
struct push_notification_event_config *ec,
struct push_notification_txn_mbox *mbox);
};
struct push_notification_event_vfuncs_msg {
/* Output debug information about a message event. */
/* Called when message data is about to be free'd. */
};
/* Message event: save message (from MTA). */
struct push_notification_event_config *ec,
struct push_notification_txn_msg *msg,
/* Message event: append message (from MUA). */
struct push_notification_event_config *ec,
struct push_notification_txn_msg *msg,
/* Message event: expunge message. */
struct push_notification_event_config *ec,
struct push_notification_txn_msg *msg);
/* Message event: flag change. */
struct push_notification_event_config *ec,
struct push_notification_txn_msg *msg,
enum mail_flags old_flags);
/* Message event: keyword change. */
struct push_notification_event_config *ec,
struct push_notification_txn_msg *msg,
const char *const *old_keywords);
};
struct push_notification_event_config {
void *config;
};
struct push_notification_event {
const char *name;
};
struct push_notification_txn_event {
void *data;
};
const struct push_notification_event *);
void
const char *event_name, void *config);
(const struct push_notification_event *event);
(const struct push_notification_event *event);
#endif /* PUSH_NOTIFICATION_EVENTS_H */