+static void hook_api_class_provide(void *closure, const struct afb_hookid *hookid, const struct afb_export *export, int result, const char *name)
+{
+ hook_api(closure, hookid, export, "class_provide", "{si ss?}", "status", result, "name", name);
+}
+
+static void hook_api_class_require(void *closure, const struct afb_hookid *hookid, const struct afb_export *export, int result, const char *name)
+{
+ hook_api(closure, hookid, export, "class_require", "{si ss?}", "status", result, "name", name);
+}
+
+static void hook_api_delete_api(void *closure, const struct afb_hookid *hookid, const struct afb_export *export, int result)
+{
+ hook_api(closure, hookid, export, "delete_api", "{si}", "status", result);
+}
+
+static void hook_api_on_event_handler_before(void *closure, const struct afb_hookid *hookid, const struct afb_export *export, const char *event, int event_x2, struct json_object *object, const char *pattern)
+{
+ hook_api(closure, hookid, export, "on_event_handler.before",
+ "{ss ss sO?}", "pattern", pattern, "event", event, "data", object);
+}
+
+static void hook_api_on_event_handler_after(void *closure, const struct afb_hookid *hookid, const struct afb_export *export, const char *event, int event_x2, struct json_object *object, const char *pattern)
+{
+ hook_api(closure, hookid, export, "on_event_handler.after",
+ "{ss ss sO?}", "pattern", pattern, "event", event, "data", object);
+}
+
+static void hook_api_settings(void *closure, const struct afb_hookid *hookid, const struct afb_export *export, struct json_object *object)
+{
+ hook_api(closure, hookid, export, "settings", "{sO}", "settings", object);
+}
+
+static struct afb_hook_api_itf hook_api_itf = {
+ .hook_api_event_broadcast_before = hook_api_event_broadcast_before,
+ .hook_api_event_broadcast_after = hook_api_event_broadcast_after,
+ .hook_api_get_event_loop = hook_api_get_event_loop,
+ .hook_api_get_user_bus = hook_api_get_user_bus,
+ .hook_api_get_system_bus = hook_api_get_system_bus,
+ .hook_api_vverbose = hook_api_vverbose,
+ .hook_api_event_make = hook_api_event_make,
+ .hook_api_rootdir_get_fd = hook_api_rootdir_get_fd,
+ .hook_api_rootdir_open_locale = hook_api_rootdir_open_locale,
+ .hook_api_queue_job = hook_api_queue_job,
+ .hook_api_legacy_unstore_req = hook_api_unstore_req,
+ .hook_api_require_api = hook_api_require_api,
+ .hook_api_require_api_result = hook_api_require_api_result,
+ .hook_api_add_alias = hook_api_add_alias_cb,
+ .hook_api_start_before = hook_api_start_before,
+ .hook_api_start_after = hook_api_start_after,
+ .hook_api_on_event_before = hook_api_on_event_before,
+ .hook_api_on_event_after = hook_api_on_event_after,
+ .hook_api_call = hook_api_call,
+ .hook_api_call_result = hook_api_call_result,
+ .hook_api_callsync = hook_api_callsync,
+ .hook_api_callsync_result = hook_api_callsync_result,
+ .hook_api_new_api_before = hook_api_new_api_before,
+ .hook_api_new_api_after = hook_api_new_api_after,
+ .hook_api_api_set_verbs_v2 = hook_api_api_set_verbs_v2,
+ .hook_api_api_set_verbs_v3 = hook_api_api_set_verbs_v3,
+ .hook_api_api_add_verb = hook_api_api_add_verb,
+ .hook_api_api_del_verb = hook_api_api_del_verb,
+ .hook_api_api_set_on_event = hook_api_api_set_on_event,
+ .hook_api_api_set_on_init = hook_api_api_set_on_init,
+ .hook_api_api_seal = hook_api_api_seal,
+ .hook_api_event_handler_add = hook_api_event_handler_add,
+ .hook_api_event_handler_del = hook_api_event_handler_del,
+ .hook_api_class_provide = hook_api_class_provide,
+ .hook_api_class_require = hook_api_class_require,
+ .hook_api_delete_api = hook_api_delete_api,
+ .hook_api_on_event_handler_before = hook_api_on_event_handler_before,
+ .hook_api_on_event_handler_after = hook_api_on_event_handler_after,
+ .hook_api_settings = hook_api_settings,
+};
+
+/*******************************************************************************/
+/***** trace the events *****/
+/*******************************************************************************/
+