Lines Matching defs:hooks
15 const struct mail_storage_hooks *hooks;
42 const struct mail_storage_hooks *hooks)
48 new_hook.hooks = hooks;
50 /* allow adding hooks before mail_storage_hooks_init() */
57 const struct mail_storage_hooks *hooks)
61 mail_storage_hooks_add(module, hooks);
67 void mail_storage_hooks_remove(const struct mail_storage_hooks *hooks)
73 if (module_hook->hooks == hooks) {
83 void mail_storage_hooks_add_internal(const struct mail_storage_hooks *hooks)
87 /* make sure we don't add duplicate hooks */
89 i_assert(*existing_hooksp != hooks);
90 array_append(&internal_hooks, &hooks, 1);
93 void mail_storage_hooks_remove_internal(const struct mail_storage_hooks *hooks)
99 if (*old_hooks == hooks) {
135 /* first get all hooks wanted by the user */
150 /* now that we have them in order, save them to user's hooks */
151 p_array_init(&user->hooks, user->pool,
154 array_append(&user->hooks, &module_hook->hooks, 1);
155 array_append_array(&user->hooks, &internal_hooks);
160 const struct mail_storage_hooks *const *hooks;
167 array_foreach(&user->hooks, hooks) {
168 if ((*hooks)->mail_user_created != NULL) T_BEGIN {
169 (*hooks)->mail_user_created(user);
179 const struct mail_storage_hooks *const *hooks;
181 array_foreach(&ns->user->hooks, hooks) {
182 if ((*hooks)->mail_namespace_storage_added != NULL) T_BEGIN {
183 (*hooks)->mail_namespace_storage_added(ns);
190 const struct mail_storage_hooks *const *hooks;
192 array_foreach(&namespaces->user->hooks, hooks) {
195 if ((*hooks)->mail_namespaces_created != NULL) T_BEGIN {
196 (*hooks)->mail_namespaces_created(namespaces);
203 const struct mail_storage_hooks *const *hooks;
205 array_foreach(&namespaces->user->hooks, hooks) {
208 if ((*hooks)->mail_namespaces_added != NULL) T_BEGIN {
209 (*hooks)->mail_namespaces_added(namespaces);
216 const struct mail_storage_hooks *const *hooks;
221 array_foreach(&storage->user->hooks, hooks) {
222 if ((*hooks)->mail_storage_created != NULL) T_BEGIN {
223 (*hooks)->mail_storage_created(storage);
233 const struct mail_storage_hooks *const *hooks;
238 array_foreach(&list->ns->user->hooks, hooks) {
239 if ((*hooks)->mailbox_list_created != NULL) T_BEGIN {
240 (*hooks)->mailbox_list_created(list);
250 const struct mail_storage_hooks *const *hooks;
255 array_foreach(&box->storage->user->hooks, hooks) {
256 if ((*hooks)->mailbox_allocated != NULL) T_BEGIN {
257 (*hooks)->mailbox_allocated(box);
267 const struct mail_storage_hooks *const *hooks;
269 array_foreach(&box->storage->user->hooks, hooks) {
270 if ((*hooks)->mailbox_opened != NULL) T_BEGIN {
271 (*hooks)->mailbox_opened(box);
278 const struct mail_storage_hooks *const *hooks;
284 array_foreach(&mail->box->storage->user->hooks, hooks) {
285 if ((*hooks)->mail_allocated != NULL) T_BEGIN {
286 (*hooks)->mail_allocated(mail);