-/* interface for wsreq / afb_req */
-const struct afb_req_itf afb_ws_json1_req_itf = {
- .json = (void*)wsreq_json,
- .get = (void*)wsreq_get,
- .success = (void*)wsreq_success,
- .fail = (void*)wsreq_fail,
- .raw = (void*)wsreq_raw,
- .send = (void*)wsreq_send,
- .context_get = (void*)afb_context_get,
- .context_set = (void*)afb_context_set,
- .addref = (void*)wsreq_addref,
- .unref = (void*)wsreq_unref,
- .session_close = (void*)afb_context_close,
- .session_set_LOA = (void*)afb_context_change_loa,
- .subscribe = (void*)wsreq_subscribe,
- .unsubscribe = (void*)wsreq_unsubscribe,
- .subcall = (void*)wsreq_subcall
+/* interface for xreq */
+const struct afb_xreq_query_itf afb_ws_json1_xreq_itf = {
+ .reply = wsreq_reply,
+ .unref = wsreq_destroy
+};
+
+/* the interface for events */
+static const struct afb_evt_itf evt_itf = {
+ .broadcast = (void*)aws_on_event,
+ .push = (void*)aws_on_event