From 090379fdaf6ed1860dcff21424135ad71ead0cd2 Mon Sep 17 00:00:00 2001 From: José Bollo Date: Mon, 29 May 2017 14:16:13 +0200 Subject: Add 'afb_service_call_sync' function MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This new function allows to call features for the services synchronously. Also refactoring how are handled arguments to calls. The call to 'json_object_put' is now always done by the binder. Change-Id: I910517da75b179aeafc824da4ce29bc299711990 Signed-off-by: José Bollo --- include/afb/afb-service-common.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include/afb/afb-service-common.h') diff --git a/include/afb/afb-service-common.h b/include/afb/afb-service-common.h index 76f8e4e4..081b1db6 100644 --- a/include/afb/afb-service-common.h +++ b/include/afb/afb-service-common.h @@ -32,6 +32,9 @@ struct afb_service_itf void (*call)(void *closure, const char *api, const char *verb, struct json_object *args, void (*callback)(void*, int, struct json_object*), void *callback_closure); + + int (*call_sync)(void *closure, const char *api, const char *verb, struct json_object *args, + struct json_object **result); }; /* -- cgit 1.2.3-korg