aboutsummaryrefslogtreecommitdiffstats
path: root/src/afb-hook.h
AgeCommit message (Collapse)AuthorFilesLines
2019-03-29hooks: Allow to remove hooking (and/or trace)Jose Bollo1-0/+3
This change allows to downsize the binder by removing its internal hooking and tracing features. Change-Id: Ifb080a7426216f6c6b1c8f8e5bf8ddd52df40a3e Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
2019-02-06Update copyright datehalibut_7.90.0halibut/7.90.07.90.0José Bollo1-1/+1
Change-Id: I3aaa92b2bfb01699ee8ae609272e93032b6f1a9d Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-08-02Add ability to provide binding settingsJosé Bollo1-1/+5
Change-Id: Iab93a26340fa9743a58ca43cd903bbf31c783e5b Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
2018-06-15api-v3: First draftJosé Bollo1-152/+223
This commit introduces the bindings v3 API for bindings. The documentation has still to be improved and will come very soon. Change-Id: I8f9007370e29f671fdfd1da87fff7372a17db7af Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-02-27Update date of copyright noticesJosé Bollo1-1/+1
Change-Id: If9d7e7728df086fbb7214f1de5cbec35cd2f1d9b Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-02-09afb-hook: Add hooks for sessionJosé Bollo1-0/+37
Change-Id: I4fbd6bf57958abb366a742b12afb92bfc03ad299
2017-10-10Add the function afb_req_get_uidJosé Bollo1-1/+5
Change-Id: I9caf38ee3811cf10b546489094f0bb5b3d844c40 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-10-09Deprecate internal use of afb_eventJosé Bollo1-7/+7
The deprecation is made in favor of afb_eventid but this can change later in favor of afb_evt_evtid. Change-Id: Ic16cb25dbd97cb1e8d26b3c54b159d46bbf82671 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-10-09Make afb_event_drop obsoleteJosé Bollo1-6/+3
The function is now replaced by the function afb_event_unref. In the same time, the function afb_event_addref is made available. Change-Id: I9aa30e80e64e82f3b16ab359982337771b287185 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-10-09afb-evt: prepare futur afb_eventidJosé Bollo1-3/+10
Change-Id: Ie4668c2dadbdfbe79bac2c27a1b188edecbcf847 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-10-09Atomic context initialisation for bindingsJosé Bollo1-1/+5
Change-Id: I3e81b64d57c917da1fba9b3a9387d0f4d7f3e6b7 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-10-09Add function 'afb_req_get_application_id'José Bollo1-1/+5
This function is intended to return an identifier of the calling application. At this time, the identifier is just derived from the application id but it can be changed in the future. Change-Id: Idacde8979ac5bb525352de9cab19e3fc1ed48627 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-10-09afb-export: refactor of binder interfaceJosé Bollo1-48/+47
The interfaces of the binder called afb_ditf and afb_svc are merged together to create the afb_export structure. Change-Id: I841ba04d7b2f94bfc19f691ec746d0bd221f164d Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-09-07Allow renaming of APIJosé Bollo1-1/+5
The function afb_daemon_rename_api allows to rename an API during the preinit phase. Change-Id: I35477ba99d35b1dc51a7cacf8e55c3f02d86d7b4 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-09-07Implement afb_req_has_permissionJosé Bollo1-24/+27
This new verb is available in bindings to check whether the client identified by a request has a given permission or not. Change-Id: I5eaa0892d8260d26bd76f37123251c103c981e10 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-08-29hooking: Add hook at global scopeJosé Bollo1-2/+22
Actually the global scope only allows to trace log messages. Change-Id: Ib73edf2e3168311b2ad694d857e6647e34884313 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-08-29hook+trace: add a unique timestampJosé Bollo1-51/+61
A same event must have a unique time stamp. Change-Id: Id33351a97f62c04a84d26995a2cf9ae80613c613 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-08-29hook+trace: adds hookid and typeJosé Bollo1-51/+51
The hookid is a unic identifier for a hook event. Its purpose is to distinguish events that could match different filters: a same event has a same id. Also integrate the field "type" (of the event) in the trace event. Change-Id: I90b0b2d3a0846b673b993110d2752cc54db75bd8 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-08-03subcall_req: introduce afb_req_subcall_reqJosé Bollo1-6/+13
The function 'afb_req_subcall_req' can be used to make asynchronous subcalls. It improves the function 'afb_req_subcall' by automatically keeping the request opened for the callback and by passing it, the request, as an extra argument of the callback. Change-Id: I2dc79c01fc25c7a65b9c8cc9e001a5b85fba99df Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-07-31afb-hook: renamingJosé Bollo1-4/+4
Change-Id: Ie1ac2eb96fb29711c38750c3babe7cbd4b472079 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-06-02Add 'afb_daemon_require_api'José Bollo1-1/+9
This solution is at this time the best one to allow asynchronous calls within initialisation of bindings. Change-Id: I21ba3a74b4e93eec238a11dd51bc6b58c483308d Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-06-02Provide efficient store/unstore for afb_reqJosé Bollo1-2/+15
Change-Id: I231e2506f58227fb8d192df042539b1551a765c5 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-06-01Add hooking for eventsJosé Bollo1-8/+49
Change-Id: If5fe736e04c9f4298302c3cbba568f1d6346ee67 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-05-31Add logging by requestJosé Bollo1-1/+7
Change-Id: I6dda714bcb8c36392c14a1981cfb8960f3db45b8 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-05-30Adds hooks for service (svc)José Bollo1-0/+44
Change-Id: I42265fcee9eae8219ef0cf56d3c8446d2c0fc015 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-05-30fix commentsJosé Bollo1-1/+1
Change-Id: I6a3b2df272a1c88c530fd229ba612ee30160e3cc Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-05-29Cleanup legacy internal functionsJosé Bollo1-22/+13
The functions afb_req_raw and afb_req_send are internal. They are now no more visible from bindings. Change-Id: I1f250a1800168a9c3772375477bf37a501f134a0 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-04-25Add 'afb_daemon_queue_job' for bindingsJosé Bollo1-10/+14
This allow bindings to queue asynchronous jobs. Change-Id: I2a228388c9defde23adb672d579c4a299f212850 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-04-07Add hooking of daemon interfaceJosé Bollo1-13/+72
Change-Id: I5840609f4300ade98412e8527ac5ce1f1e8c0c59 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-04-07Finalize hooking of requestsJosé Bollo1-19/+26
Change-Id: I0c03b2c8ce556f1e6987ee5a7ad355ba9e67f142 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-04-06Reactivate hooking of requestsJosé Bollo1-26/+47
Change-Id: I0fc8429063d99e10344aaadba06480a470b9eb9d 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-03Improves naming of session's moduleJosé Bollo1-2/+2
Make names looking like other names Change-Id: I63ce3d8a3d84193eca9d517cecb1888d630a9b2d 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-10-28hook: adding of hook feature for requestsJosé Bollo1-0/+96
The current implementation is for hooking requests. It allows implementation of command line option for debugging. Further development is needed to also handle events and service API. Also a binding for debugging would be cool. Change-Id: Ib1ac4711180db7b4097ed92ebbbf1a1a9fd2cc1c Signed-off-by: José Bollo <jose.bollo@iot.bzh>