+/*
+ * update the hooks for events
+ */
+void afb_evt_update_hooks()
+{
+ struct afb_evt_event *evt;
+
+ pthread_mutex_lock(&events_mutex);
+ for (evt = events ; evt ; evt = evt->next)
+ evt->hookflags = afb_hook_flags_evt(evt->name);
+ pthread_mutex_unlock(&events_mutex);
+}
+
+int afb_evt_push(struct afb_event event, struct json_object *object)
+{
+ if (event.itf == &afb_evt_event_itf)
+ return evt_push((struct afb_evt_event *)event.closure, object);
+ json_object_put(object);
+ return 0;
+}
+
+int afb_evt_unhooked_push(struct afb_event event, struct json_object *object)
+{
+ if (event.itf == &afb_evt_event_itf)
+ return push((struct afb_evt_event *)event.closure, object, 0);
+ json_object_put(object);
+ return 0;
+}
+