push-notification-txn-mbox.h revision 51ed197520dd9ea534fbc3bc1790ebe3cb5421e2
c25356d5978632df6203437e1953bcb29e0c736fTimo Sirainen/* Copyright (c) 2015 Dovecot authors, see the included COPYING file */
c25356d5978632df6203437e1953bcb29e0c736fTimo Sirainen
57f4445a46726a17bfe78b0964dd301a6ccb40ecTimo Sirainen#ifndef PUSH_NOTIFICATION_TXN_MBOX_H
c8296ac1ed68ed5c5168de545b76f9b27fc76d35Timo Sirainen#define PUSH_NOTIFICATION_TXN_MBOX_H
c8296ac1ed68ed5c5168de545b76f9b27fc76d35Timo Sirainen
57f4445a46726a17bfe78b0964dd301a6ccb40ecTimo Sirainen
57f4445a46726a17bfe78b0964dd301a6ccb40ecTimo Sirainenstruct push_notification_txn_event;
c8296ac1ed68ed5c5168de545b76f9b27fc76d35Timo Sirainen
c8296ac1ed68ed5c5168de545b76f9b27fc76d35Timo Sirainenstruct push_notification_txn_mbox {
c8296ac1ed68ed5c5168de545b76f9b27fc76d35Timo Sirainen const char *mailbox;
c8296ac1ed68ed5c5168de545b76f9b27fc76d35Timo Sirainen
c37098f8ce6d512ba41f09564d04ed25720f0a77Timo Sirainen ARRAY(struct push_notification_txn_event *) eventdata;
c8296ac1ed68ed5c5168de545b76f9b27fc76d35Timo Sirainen};
c8296ac1ed68ed5c5168de545b76f9b27fc76d35Timo Sirainen
c8296ac1ed68ed5c5168de545b76f9b27fc76d35Timo Sirainen
c8296ac1ed68ed5c5168de545b76f9b27fc76d35Timo Sirainenstruct push_notification_txn_mbox *
c8296ac1ed68ed5c5168de545b76f9b27fc76d35Timo Sirainenpush_notification_txn_mbox_create(struct push_notification_txn *txn,
c8296ac1ed68ed5c5168de545b76f9b27fc76d35Timo Sirainen struct mailbox *box);
c8296ac1ed68ed5c5168de545b76f9b27fc76d35Timo Sirainenvoid
c8296ac1ed68ed5c5168de545b76f9b27fc76d35Timo Sirainenpush_notification_txn_mbox_end(struct push_notification_txn *ptxn);
57f4445a46726a17bfe78b0964dd301a6ccb40ecTimo Sirainen
c8296ac1ed68ed5c5168de545b76f9b27fc76d35Timo Sirainenvoid *
57f4445a46726a17bfe78b0964dd301a6ccb40ecTimo Sirainenpush_notification_txn_mbox_get_eventdata(struct push_notification_txn_mbox *mbox,
5666a3d6a7ea89362b8d9e8b39b15424cd9d6388Timo Sirainen const char *event_name);
57f4445a46726a17bfe78b0964dd301a6ccb40ecTimo Sirainenvoid
57f4445a46726a17bfe78b0964dd301a6ccb40ecTimo Sirainenpush_notification_txn_mbox_set_eventdata(struct push_notification_txn *txn,
57f4445a46726a17bfe78b0964dd301a6ccb40ecTimo Sirainen struct push_notification_txn_mbox *mbox,
struct push_notification_event_config *event,
void *data);
void
push_notification_txn_mbox_deinit_eventdata(struct push_notification_txn_mbox *mbox);
#endif /* PUSH_NOTIFICATION_TXN_MBOX_H */