-static struct afb_hook_req_itf hook_req_default_itf = {
- .hook_req_begin = hook_req_begin_default_cb,
- .hook_req_end = hook_req_end_default_cb,
- .hook_req_json = hook_req_json_default_cb,
- .hook_req_get = hook_req_get_default_cb,
- .hook_req_success = hook_req_success_default_cb,
- .hook_req_fail = hook_req_fail_default_cb,
- .hook_req_raw = hook_req_raw_default_cb,
- .hook_req_send = hook_req_send_default_cb,
- .hook_req_context_get = hook_req_context_get_default_cb,
- .hook_req_context_set = hook_req_context_set_default_cb,
- .hook_req_addref = hook_req_addref_default_cb,
- .hook_req_unref = hook_req_unref_default_cb,
- .hook_req_session_close = hook_req_session_close_default_cb,
- .hook_req_session_set_LOA = hook_req_session_set_LOA_default_cb,
- .hook_req_subscribe = hook_req_subscribe_default_cb,
- .hook_req_unsubscribe = hook_req_unsubscribe_default_cb,
- .hook_req_subcall = hook_req_subcall_default_cb,
- .hook_req_subcall_result = hook_req_subcall_result_default_cb,
+static void hook_xreq_subcallsync_default_cb(void * closure, const struct afb_xreq *xreq, const char *api, const char *verb, struct json_object *args)
+{
+ _hook_xreq_(xreq, "subcallsync(%s/%s, %s) ...", api, verb, json_object_to_json_string(args));
+}
+
+static void hook_xreq_subcallsync_result_default_cb(void * closure, const struct afb_xreq *xreq, int status, struct json_object *result)
+{
+ _hook_xreq_(xreq, " ...subcallsync... -> %d: %s", status, json_object_to_json_string(result));
+}
+
+static struct afb_hook_xreq_itf hook_xreq_default_itf = {
+ .hook_xreq_begin = hook_xreq_begin_default_cb,
+ .hook_xreq_end = hook_xreq_end_default_cb,
+ .hook_xreq_json = hook_xreq_json_default_cb,
+ .hook_xreq_get = hook_xreq_get_default_cb,
+ .hook_xreq_success = hook_xreq_success_default_cb,
+ .hook_xreq_fail = hook_xreq_fail_default_cb,
+ .hook_xreq_raw = hook_xreq_raw_default_cb,
+ .hook_xreq_send = hook_xreq_send_default_cb,
+ .hook_xreq_context_get = hook_xreq_context_get_default_cb,
+ .hook_xreq_context_set = hook_xreq_context_set_default_cb,
+ .hook_xreq_addref = hook_xreq_addref_default_cb,
+ .hook_xreq_unref = hook_xreq_unref_default_cb,
+ .hook_xreq_session_close = hook_xreq_session_close_default_cb,
+ .hook_xreq_session_set_LOA = hook_xreq_session_set_LOA_default_cb,
+ .hook_xreq_subscribe = hook_xreq_subscribe_default_cb,
+ .hook_xreq_unsubscribe = hook_xreq_unsubscribe_default_cb,
+ .hook_xreq_subcall = hook_xreq_subcall_default_cb,
+ .hook_xreq_subcall_result = hook_xreq_subcall_result_default_cb,
+ .hook_xreq_subcallsync = hook_xreq_subcallsync_default_cb,
+ .hook_xreq_subcallsync_result = hook_xreq_subcallsync_result_default_cb,