-struct afb_hook_req_itf {
- /* life cycle of the request (no flag, always called) */
- void (*hook_req_begin)(void * closure, const struct afb_hook_req *tr);
- void (*hook_req_end)(void * closure, const struct afb_hook_req *tr);
-
- /* hook of actions on the request, subject to flags */
- void (*hook_req_json)(void * closure, const struct afb_hook_req *tr, struct json_object *obj);
- void (*hook_req_get)(void * closure, const struct afb_hook_req *tr, const char *name, struct afb_arg arg);
- void (*hook_req_success)(void * closure, const struct afb_hook_req *tr, struct json_object *obj, const char *info);
- void (*hook_req_fail)(void * closure, const struct afb_hook_req *tr, const char *status, const char *info);
- void (*hook_req_raw)(void * closure, const struct afb_hook_req *tr, const char *buffer, size_t size);
- void (*hook_req_send)(void * closure, const struct afb_hook_req *tr, const char *buffer, size_t size);
- void (*hook_req_context_get)(void * closure, const struct afb_hook_req *tr, void *value);
- void (*hook_req_context_set)(void * closure, const struct afb_hook_req *tr, void *value, void (*free_value)(void*));
- void (*hook_req_addref)(void * closure, const struct afb_hook_req *tr);
- void (*hook_req_unref)(void * closure, const struct afb_hook_req *tr);
- void (*hook_req_session_close)(void * closure, const struct afb_hook_req *tr);
- void (*hook_req_session_set_LOA)(void * closure, const struct afb_hook_req *tr, unsigned level, int result);
- void (*hook_req_subscribe)(void * closure, const struct afb_hook_req *tr, struct afb_event event, int result);
- void (*hook_req_unsubscribe)(void * closure, const struct afb_hook_req *tr, struct afb_event event, int result);
- void (*hook_req_subcall)(void * closure, const struct afb_hook_req *tr, const char *api, const char *verb, struct json_object *args);
- void (*hook_req_subcall_result)(void * closure, const struct afb_hook_req *tr, int status, struct json_object *result);
+struct afb_hook_xreq_itf {
+ void (*hook_xreq_begin)(void * closure, const struct afb_xreq *xreq);
+ void (*hook_xreq_end)(void * closure, const struct afb_xreq *xreq);
+ void (*hook_xreq_json)(void * closure, const struct afb_xreq *xreq, struct json_object *obj);
+ void (*hook_xreq_get)(void * closure, const struct afb_xreq *xreq, const char *name, struct afb_arg arg);
+ void (*hook_xreq_success)(void * closure, const struct afb_xreq *xreq, struct json_object *obj, const char *info);
+ void (*hook_xreq_fail)(void * closure, const struct afb_xreq *xreq, const char *status, const char *info);
+ void (*hook_xreq_raw)(void * closure, const struct afb_xreq *xreq, const char *buffer, size_t size);
+ void (*hook_xreq_send)(void * closure, const struct afb_xreq *xreq, const char *buffer, size_t size);
+ void (*hook_xreq_context_get)(void * closure, const struct afb_xreq *xreq, void *value);
+ void (*hook_xreq_context_set)(void * closure, const struct afb_xreq *xreq, void *value, void (*free_value)(void*));
+ void (*hook_xreq_addref)(void * closure, const struct afb_xreq *xreq);
+ void (*hook_xreq_unref)(void * closure, const struct afb_xreq *xreq);
+ void (*hook_xreq_session_close)(void * closure, const struct afb_xreq *xreq);
+ void (*hook_xreq_session_set_LOA)(void * closure, const struct afb_xreq *xreq, unsigned level, int result);
+ void (*hook_xreq_subscribe)(void * closure, const struct afb_xreq *xreq, struct afb_event event, int result);
+ void (*hook_xreq_unsubscribe)(void * closure, const struct afb_xreq *xreq, struct afb_event event, int result);
+ void (*hook_xreq_subcall)(void * closure, const struct afb_xreq *xreq, const char *api, const char *verb, struct json_object *args);
+ void (*hook_xreq_subcall_result)(void * closure, const struct afb_xreq *xreq, int status, struct json_object *result);