summaryrefslogtreecommitdiffstats
path: root/src/afb-subcall.c
AgeCommit message (Collapse)AuthorFilesLines
2017-08-02afb-xreq: integration of subcallsJosé Bollo1-118/+0
The file afb-subcall is now integrated within afb-xreq. It improves memory allocation and performance of synchronous calls. Change-Id: I4190199babbe0559527438b530b19ac9a35ec38b Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-07-03Make status commonJosé Bollo1-2/+2
Make all error status for bindings use a common convention: a negative value means an error. Change-Id: Id09610051295810f04f00477d7ec1d9771bf7975 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-06-02Provide efficient store/unstore for afb_reqJosé Bollo1-1/+1
Change-Id: I231e2506f58227fb8d192df042539b1551a765c5 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-05-29Add 'afb_service_call_sync' functionJosé Bollo1-3/+3
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 <jose.bollo@iot.bzh>
2017-05-24Handles subcall sync within xreqJosé Bollo1-122/+29
Change-Id: Ieac7c589ddadfb67761332443a3fd92038b6d548 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-04-13Introduce apiset for grouping apisJosé Bollo1-3/+2
This will be used at the end for debugging facilities. Change-Id: I75e3345667e1f58143c77a885e166375680ca194 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-04-13secure subcall api and verbJosé Bollo1-4/+11
Change-Id: Ia1df54bfd139f247137f4373a2cbd75dcf74efc8 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-04-12Add credential data to xreqJosé Bollo1-0/+3
This will allow soon to check the credentials when evaluating calls. Change-Id: I993216ccbc02538dcd92e49fcb2de0541eeb8c01 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-04-12Optimisation of xreqJosé Bollo1-15/+13
Reduce the count of memory read Change-Id: Ie4dfa4bd30d6485be91961196294c43ffbd3b2a9 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-04-07Finalize hooking of requestsJosé Bollo1-1/+1
Change-Id: I0c03b2c8ce556f1e6987ee5a7ad355ba9e67f142 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-04-04Ensure that subcall_sync use subcallJosé Bollo1-33/+46
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>
2017-04-04Add synchronous subcallsJosé Bollo1-15/+65
Synchronous subcalls are more easy for writing simple applications with sequential logic. Change-Id: I76a0231a64a6db8270014cd2a64284e1b0fc16ec Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-04-04Definitive switch to internal's xreqJosé Bollo1-1/+1
This switch allows to work on a common base for the requests. Change-Id: I94e7fdda80c1966af399309334c41c7c8c8259dc Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-04-04Migrates subcalls to use xreqJosé Bollo1-119/+66
Change-Id: If865208bc0c207511d2b11e4cff617005ed01e56 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-03-27Simplify functions for callsJosé Bollo1-1/+1
For historical reasons, the call to apis was passing the length of the api and the length of the verb. The reason was to avoid a copy of strings. But the copy occured only for HTTP requests. Having this implementation is of small interest and compromise future changes. This patch simplify things. Change-Id: I8157724c6c721b6797cd0eab52b07e1b8d6eb5f8 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-01-03Adds 2017 to copyrightsJosé Bollo1-1/+1
Change-Id: Id85c4eb4e36a05b61346004ba95daa19faf5074f Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2016-06-10subcall: adds an error functionJosé Bollo1-1/+11
Change-Id: I9f766c4b880cc741392e5c33b58a2723b5a6f4ef Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2016-06-10common code reuseJosé Bollo1-12/+1
Change-Id: I5f400a92165bb380ec5f703dd8ca567e90aebca2 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2016-06-09Make possible to call a method from a bindingJosé Bollo1-0/+195
The new request call 'afb_req_subcall' allows a binding to call the method of an other binding. Change-Id: I8538185be7a1663153a25db2bc940f9e2bdedb1a Signed-off-by: José Bollo <jose.bollo@iot.bzh>