- if (main_config->tracereq)
- afb_hook_create_xreq(NULL, NULL, NULL, main_config->tracereq, NULL, NULL);
- if (main_config->traceapi)
- afb_hook_create_api(NULL, main_config->traceapi, NULL, NULL);
- if (main_config->traceevt)
- afb_hook_create_evt(NULL, main_config->traceevt, NULL, NULL);
- if (main_config->traceses)
- afb_hook_create_session(NULL, main_config->traceses, NULL, NULL);
-
- /* load bindings */
- afb_debug("start-load");
- apiset_start_list(main_config->so_bindings, afb_api_so_add_binding, "the binding");
-#if defined(WITH_DBUS_TRANSPARENCY)
- apiset_start_list(main_config->dbus_clients, afb_api_dbus_add_client, "the afb-dbus client");
+ if (tracereq)
+ afb_hook_create_xreq(NULL, NULL, NULL, afb_hook_flags_xreq_from_text(tracereq), NULL, NULL);
+#if !defined(REMOVE_LEGACY_TRACE)
+ if (traceapi || tracesvc || traceditf)
+ afb_hook_create_api(NULL, afb_hook_flags_api_from_text(traceapi)
+ | afb_hook_flags_legacy_ditf_from_text(traceditf)
+ | afb_hook_flags_legacy_svc_from_text(tracesvc), NULL, NULL);
+#else
+ if (traceapi)
+ afb_hook_create_api(NULL, afb_hook_flags_api_from_text(traceapi), NULL, NULL);