+#if WITH_AFB_HOOK
+void afb_calls_hooked_call(
+ struct afb_export *export,
+ const char *api,
+ const char *verb,
+ struct json_object *args,
+ void (*callback)(void*, struct json_object*, const char *error, const char *info, struct afb_api_x3*),
+ void *closure)
+{
+ afb_hook_api_call(export, api, verb, args);
+ do_async(export, NULL, api, verb, args, CALLFLAGS, callback, closure, final_call, mode_hooked_async);
+}
+
+int afb_calls_hooked_call_sync(
+ struct afb_export *export,
+ const char *api,
+ const char *verb,
+ struct json_object *args,
+ struct json_object **object,
+ char **error,
+ char **info)
+{
+ afb_hook_api_callsync(export, api, verb, args);
+ return do_sync(export, NULL, api, verb, args, CALLFLAGS, object, error, info, mode_hooked_sync);
+}
+
+void afb_calls_hooked_subcall(