summaryrefslogtreecommitdiffstats
path: root/src/afb-xreq.h
diff options
context:
space:
mode:
authorJosé Bollo <jose.bollo@iot.bzh>2017-04-04 17:30:55 +0200
committerJosé Bollo <jose.bollo@iot.bzh>2017-04-04 17:30:55 +0200
commit7effe02be236921437fb77d8fbeb21eb62e35939 (patch)
treed25d6993676f318ca22100189b44a6a4ab9d0603 /src/afb-xreq.h
parentbfc92795d467277200f17ec103ff42cf52690c95 (diff)
Ensure that subcall_sync use subcall
The intent is to provide the asynchronous subcall as standard. This is needed for fixing subcall across connections (DBus or WebSocket). Change-Id: Ia046cfa4d0124bfa3ba7eb8e8f936eeafcf09875 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
Diffstat (limited to 'src/afb-xreq.h')
-rw-r--r--src/afb-xreq.h7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/afb-xreq.h b/src/afb-xreq.h
index 29dcb3e2..3413703f 100644
--- a/src/afb-xreq.h
+++ b/src/afb-xreq.h
@@ -52,10 +52,6 @@ struct afb_xreq
const struct afb_xreq_query_itf *queryitf;
int refcount; /**< current ref count */
int replied; /**< is replied? */
- int timeout; /**< timeout */
- int sessionflags; /**< flags to check */
- void *group;
- void (*callback)(struct afb_req req);
struct afb_evt_listener *listener;
};
@@ -68,6 +64,7 @@ extern void afb_xreq_success_f(struct afb_xreq *xreq, struct json_object *obj, c
extern const char *afb_xreq_raw(struct afb_xreq *xreq, size_t *size);
extern int afb_xreq_subscribe(struct afb_xreq *xreq, struct afb_event event);
extern int afb_xreq_unsubscribe(struct afb_xreq *xreq, struct afb_event event);
+extern void afb_xreq_subcall(struct afb_xreq *xreq, const char *api, const char *verb, struct json_object *args, void (*callback)(void*, int, struct json_object*), void *cb_closure);
-extern void afb_xreq_call(struct afb_xreq *xreq);
+extern void afb_xreq_call(struct afb_xreq *xreq, int sessionflags, void (*callback)(struct afb_req req));