push-notification-plugin.c revision a846e6d6b4f1e9fcef4c07a5982b243a274f0a42
/* Copyright (c) 2015-2017 Dovecot authors, see the included COPYING file */
#include "lib.h"
#include "array.h"
#include "ioloop.h"
#include "mail-namespace.h"
#include "mail-storage.h"
#include "mail-storage-private.h"
#include "notify-plugin.h"
#include "str.h"
#include "push-notification-drivers.h"
#include "push-notification-events.h"
#include "push-notification-events-rfc5423.h"
#include "push-notification-plugin.h"
#include "push-notification-triggers.h"
#include "push-notification-txn-mbox.h"
#include "push-notification-txn-msg.h"
#define PUSH_NOTIFICATION_CONFIG "push_notification_driver"
#define PUSH_NOTIFICATION_CONFIG_OLD "push_notification_backend"
#define PUSH_NOTIFICATION_USER_CONTEXT(obj) \
static struct ioloop *main_ioloop;
static void
{
struct push_notification_driver_txn *dtxn;
struct push_notification_driver_user **duser;
struct mail_storage *storage;
if (ptxn->initialized) {
return;
}
/* no notifications for autocreated raw users */
return;
}
}
}
}
static struct push_notification_txn *
struct mailbox_transaction_context *t)
{
struct push_notification_txn *ptxn;
struct mail_storage *storage;
ptxn->t = t;
return ptxn;
}
static void push_notification_transaction_end
{
struct push_notification_driver_txn **dtxn;
if (ptxn->initialized) {
}
}
}
}
static void push_notification_transaction_commit
{
/* Make sure we're not in just any random ioloop, which could get
destroyed soon. This way the push-notification drivers can do async
operations that finish in the main ioloop. */
} else {
}
}
{
struct push_notification_txn *ptxn;
}
{
struct push_notification_txn *ptxn;
}
{
struct push_notification_txn *ptxn;
}
bool subscribed)
{
struct push_notification_txn *ptxn;
}
{
/* POST_SESSION means MTA delivery. */
} else {
}
}
static void push_notification_mail_copy(void *txn,
{
}
{
}
static void
enum mail_flags old_flags)
{
}
static void
const char *const *old_keywords)
{
}
static void *
{
}
static void push_notification_transaction_rollback(void *txn)
{
}
static void
push_notification_config_init(const char *config_name,
struct push_notification_driver_list *dlist)
{
struct push_notification_driver_user *duser;
const char *env;
unsigned int i;
for (i = 2;; i++) {
break;
}
break;
}
// Add driver.
}
}
static struct push_notification_driver_list *
{
struct push_notification_driver_list *dlist;
/* Support old configuration (it was available at time initial OX
* driver was first released). */
dlist);
}
return dlist;
}
{
struct push_notification_driver_user **duser;
}
}
}
}
{
struct push_notification_user *puser;
}
/* Plugin interface. */
const char *push_notification_plugin_version = DOVECOT_ABI_VERSION;
extern struct push_notification_driver push_notification_driver_dlog;
extern struct push_notification_driver push_notification_driver_ox;
static struct notify_context *push_notification_ctx;
static const struct notify_vfuncs push_notification_vfuncs = {
/* Mailbox Events */
/* Mail Events */
};
static struct mail_storage_hooks push_notification_storage_hooks = {
};
{
}
void push_notification_plugin_deinit(void)
{
}