notify-storage.c revision 263e4b2733768062cb0b8b8917cad78fa2a04ff9
55a14bce15b9f44441b5f56616d73651a294d770Timo Sirainen MODULE_CONTEXT(obj, notify_mailbox_list_module)
458acd7b39c84bae0d18c36ff9ddff9a49b4ae4aTimo Sirainen union mailbox_transaction_module_context module_ctx;
9f0f2de10e4ea0c99052bf4b2bef8179f2536228Timo Sirainenstatic MODULE_CONTEXT_DEFINE_INIT(notify_storage_module,
f98cd3b7ccfb026fb56c580b5c7c2e2ee5468049Timo Sirainenstatic MODULE_CONTEXT_DEFINE_INIT(notify_mail_module,
9f0f2de10e4ea0c99052bf4b2bef8179f2536228Timo Sirainenstatic MODULE_CONTEXT_DEFINE_INIT(notify_mailbox_list_module,
9f0f2de10e4ea0c99052bf4b2bef8179f2536228Timo Sirainenstatic void (*notify_next_hook_mail_storage_created)
9f0f2de10e4ea0c99052bf4b2bef8179f2536228Timo Sirainenstatic void (*notify_next_hook_mailbox_list_created)
7bafda1813454621e03615e83d55bccfa7cc56bdTimo Sirainen struct mail_private *mail = (struct mail_private *)_mail;
7bafda1813454621e03615e83d55bccfa7cc56bdTimo Sirainen union mail_module_context *lmail = NOTIFY_MAIL_CONTEXT(mail);
7bafda1813454621e03615e83d55bccfa7cc56bdTimo Sirainennotify_mail_update_flags(struct mail *_mail, enum modify_type modify_type,
7bafda1813454621e03615e83d55bccfa7cc56bdTimo Sirainen struct mail_private *mail = (struct mail_private *)_mail;
93a7d1ee4b518b5c85f9721dc6539e4dab6aae00Timo Sirainen union mail_module_context *lmail = NOTIFY_MAIL_CONTEXT(mail);
f98cd3b7ccfb026fb56c580b5c7c2e2ee5468049Timo Sirainen lmail->super.update_flags(_mail, modify_type, flags);
458acd7b39c84bae0d18c36ff9ddff9a49b4ae4aTimo Sirainen notify_contexts_mail_update_flags(_mail, old_flags);
458acd7b39c84bae0d18c36ff9ddff9a49b4ae4aTimo Sirainennotify_mail_update_keywords(struct mail *_mail, enum modify_type modify_type,
458acd7b39c84bae0d18c36ff9ddff9a49b4ae4aTimo Sirainen struct mail_private *mail = (struct mail_private *)_mail;
458acd7b39c84bae0d18c36ff9ddff9a49b4ae4aTimo Sirainen union mail_module_context *lmail = NOTIFY_MAIL_CONTEXT(mail);
7744586e3e0fd60158abfbb03a233d3bd8d6c48bTimo Sirainen const char *const *old_keywords, *const *new_keywords;
7bafda1813454621e03615e83d55bccfa7cc56bdTimo Sirainen unsigned int i;
7744586e3e0fd60158abfbb03a233d3bd8d6c48bTimo Sirainen lmail->super.update_keywords(_mail, modify_type, keywords);
2fb9ae42f9e36388ec6db24188b9108434043fd0Timo Sirainen for (i = 0; old_keywords[i] != NULL && new_keywords[i] != NULL; i++) {
2fb9ae42f9e36388ec6db24188b9108434043fd0Timo Sirainen if (strcmp(old_keywords[i], new_keywords[i]) != 0)
7bafda1813454621e03615e83d55bccfa7cc56bdTimo Sirainen if (old_keywords[i] == NULL && new_keywords[i] == NULL)
7bafda1813454621e03615e83d55bccfa7cc56bdTimo Sirainen notify_contexts_mail_update_keywords(_mail, old_keywords);
2fb9ae42f9e36388ec6db24188b9108434043fd0Timo Sirainenstatic struct mail *
7bafda1813454621e03615e83d55bccfa7cc56bdTimo Sirainennotify_mail_alloc(struct mailbox_transaction_context *t,
79f416d4000aa4192683207aea58a7b12ce66411Timo Sirainen struct mailbox_header_lookup_ctx *wanted_headers)
55a14bce15b9f44441b5f56616d73651a294d770Timo Sirainen union mailbox_module_context *lbox = NOTIFY_CONTEXT(t->box);
79f416d4000aa4192683207aea58a7b12ce66411Timo Sirainen _mail = lbox->super.mail_alloc(t, wanted_fields, wanted_headers);
79f416d4000aa4192683207aea58a7b12ce66411Timo Sirainen lmail = p_new(mail->pool, union mail_module_context, 1);
return _mail;
int ret;
return ret;
static struct mailbox_transaction_context *
struct mailbox_transaction_context *t;
static struct mailbox *
return box;
bool rename_children)
rename_children) < 0)
void notify_plugin_init_storage(void)
void notify_plugin_deinit_storage(void)