aboutsummaryrefslogtreecommitdiffstats
path: root/src/afb-api-so-v1.c
AgeCommit message (Collapse)AuthorFilesLines
2019-12-02afb-auth: Increase and improve use of afb-authJose Bollo1-43/+2
This change factorize code for version V1 of bindings and centralizes management of authorisations in a single place. Bug-AGL: SPEC-2968 Change-Id: I6ad95d5bfa0d85dbb6d2060fc9ebca08b68eb4e9 Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
2019-04-02Add conditionnal support of dynamic bindingsJose Bollo1-1/+1
The load of dynamic bindings becomes removable. This is a step in direction of a tiny binder library. Also refactor AGL_DEVEL Signed-off-by: Jose Bollo <jose.bollo@iot.bzh> Change-Id: If283f431fd8a831429e717b2770464cb54476dc7
2019-04-02Improve setting of optionsJose Bollo1-1/+1
Change-Id: Idbadb9b7b801cb61d527addb5d3137aeb4cf6311 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-02afb-export: Manage path of librariesJosé Bollo1-1/+1
This change allows a binding to know its installation path. This path is retrieved using the api function 'afb_api_settings'. The path is returned --if known-- as a string of key "binding-path". Change-Id: Ie1a349dc4936d4ccf173f1f77e118099f7f0599a Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-07-05Simplify build processJosé Bollo1-0/+4
Allows to compile all files even if it isn't required to simplify the build process. Change-Id: Ie09e99794aa9f57b179c7e4cfa882859958beb7a Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-06-15api-v3: First draftJosé Bollo1-97/+42
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-01-31afb-api: Enforce api names to be hookableJosé Bollo1-1/+1
Change-Id: Ic1d5cb208c636d3261e1a96c4a81b488cb84a60e Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-10-09Provide API and VERB name of requestsJosé Bollo1-1/+2
Change-Id: I9a86c6314f871334231e50f9cea60b54aed434b9 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-10-09afb-export: record apiset at creationJosé Bollo1-1/+1
Change-Id: I058eaee990e34990d0860a316ba8c348c23eff5f Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-10-09afb-api: Define the notion of group for concurrencyJosé Bollo1-1/+1
Change-Id: Iafbbff8387bb1f8577cb7aeb6e8ed4b14ab1f4a4 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-10-09Refactor of starting apisJosé Bollo1-47/+6
Change-Id: Ib2efcd8747c3537714dfa7058bb0623d6e283c3d Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-10-09minor cleanupJosé Bollo1-1/+0
Change-Id: I32d44b1150814d8f80d5db44a5730c87606c054b Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-10-09afb-export: refactor of binder interfaceJosé Bollo1-50/+42
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-10/+11
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-07Improve handling of verbosity in bindingsJosé Bollo1-1/+0
The macro AFB_BINDING_PRAGMA_NO_VERBOSE_MACRO is removed. The macro AFB_BINDING_PRAGMA_NO_VERBOSE_UNPREFIX is removed. The macro AFB_BINDING_PRAGMA_KEEP_VERBOSE_UNPREFIX is now used to activate the weakly named verbose macros DEBUG, INFO, NOTICE, WARNING, ERROR. The macros AFB_BINDING_PRAGMA_NO_VERBOSE_DATA and AFB_BINDING_PRAGMA_NO_VERBOSE_DETAILS can be used to tune what verbose parts are to be emitted: If AFB_BINDING_PRAGMA_NO_VERBOSE_DATA is defined then the macro will only report the file and the line that emitted the message. This mode is intended to reduce the count of static data plugin the binary. If AFB_BINDING_PRAGMA_NO_VERBOSE_DATA is not defined and AFB_BINDING_PRAGMA_NO_VERBOSE_DETAILS is defined, this is the opposite: the messages are emitted but not the file, line and function. When none of these 2 are difened, everything is emitted: the message and the details. Change-Id: Ibb83cd435797fadf90626cb06bbda77f0f8b3cde Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-09-07afb-ditf: track daemon stateJosé Bollo1-2/+5
Change-Id: Ic21c79dcd9908919a1a8d13e8747ef0bd2490477 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-08-31Make noconcurrency more efficientJosé Bollo1-0/+1
The previous handling of noconcurrency suffered of inefficiency, was complicated and dedicated to api-so-v2. Change-Id: I32aea9187663ac533819496e9dc9b944db0d89ec Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-08-31afb-svc: make service existing during its initialisationJosé Bollo1-3/+13
The initialisation of services is splitted in two parts: - the creation and allocation of the structure for the service. - the initialisation once the structure is ready and recorded. Change-Id: I05c89fb513869d45e6b8413699fba234f00ce6b1 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-06-28Bindings V2: reintroduce field 'info' for verbsJosé Bollo1-1/+2
CAUTION, this breaks binary compatibility Change-Id: I67acfffe1f04cdddee0ad1230b227b080da1ab06 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-05-30Make api descriptions uniqueJosé Bollo1-27/+75
Before this commit, the bindings version 1 were described differently from the bindings version 2. They now all describes themselves equally using openAPI 3. Change-Id: I73c2017d0bcbf3c3b01db0c58b03e328e4f44fda Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-05-30Adds hooks for service (svc)José Bollo1-0/+2
Change-Id: I42265fcee9eae8219ef0cf56d3c8446d2c0fc015 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-05-30Record API names in service descriptorsJosé Bollo1-1/+1
Change-Id: Ie437a6987df7f27a4a68b9c022d8cad8ab4f2cfe Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-05-30Bindings V1: allows to receive eventJosé Bollo1-2/+2
Don't enforce anymore to have the function 'afbBindingV1ServiceInit' defined when expecting events through 'afbBindingV1ServiceEvent'. This will allow to handle broadcasted events. Change-Id: Ib75904487ad99fdc50813deaf6013f4ba4c47421 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-05-29Add vfail and vsuccess interfacesJosé Bollo1-0/+1
This now factorizes code needed to asprintf the arguments in an allocated string. But the most interesting effect is the ability to handle va_list of arguments. It can be used for library of tools. Change-Id: I4ba74c9984786f07abe0c7e53d7ef79dca863735 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-05-22Bindings V2: Remove explicit references to daemon/serviceJosé Bollo1-16/+17
Usage shown that managing daemon interface and service interface wasn't obvious. This evolution hides the complexity by setting up an internal hidden variable. Change-Id: I667b1ee4e3a7b5ad29d712ee20ad5dd1878b97f3 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-05-11improve logJosé Bollo1-2/+2
Change-Id: I218356c3122179887e8be885affb82cdc6403dbf Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-05-04Prepare bindings version 2José Bollo1-3/+4
Change-Id: Ic9e417d9a36f5da08883c3ded127d8350ff893cc Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-05-04Prepare xreq to be aware of the versionJosé Bollo1-5/+1
Change-Id: If8a1ac53e58ff644d7903aebd263d7d42308c756 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-05-04Eliminate use of AFB_SESSION_CREATEJosé Bollo1-2/+0
AFB_SESSION_CREATE is obsolete since a while. Change-Id: I3dc3eb374f0842d7b210a106b72bce2e4c5c1512 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-04-26fix a warningJosé Bollo1-1/+1
Change-Id: I9aa2d121771a4a1cca2c4733b3f78ee72db70840 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-04-21afb-api: add a 'describe' functionJosé Bollo1-1/+47
this is intended for introspection Change-Id: I2518893c8cb04295159c3646f1286ffd30f739e0 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-04-20cleanup and improvement of xreqJosé Bollo1-2/+3
Change-Id: Iefda7f9d8f979a50fb2586a27edf0ca16d056a1f Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-04-13Introduce apiset for grouping apisJosé Bollo1-7/+8
This will be used at the end for debugging facilities. Change-Id: I75e3345667e1f58143c77a885e166375680ca194 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-04-10Refactor of API interfacesJosé Bollo1-3/+21
The new interface has increased functionnality, it allows to set debug flags by API. Change-Id: Ibd35fb02ed645e22cac8e7021b37b96e07e79877 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-04-07Add hooking of daemon interfaceJosé Bollo1-4/+12
Change-Id: I5840609f4300ade98412e8527ac5ce1f1e8c0c59 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-04-05Make daemon interface commonJosé Bollo1-93/+5
For the future, having only one piece of code to handle daemon interface to bindings is an improvement. Change-Id: I806c424eb1a82637d27bc84b921612789907d971 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-04-04Ensure that subcall_sync use subcallJosé Bollo1-6/+2
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-04Launch job at a earlier stepJosé Bollo1-1/+0
Change-Id: I3fcb96e4d748e38eacc4d413a451143dd9b4a10d Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-04-04Definitive switch to internal's xreqJosé Bollo1-63/+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-03-31Factorize common code for handling requestsJosé Bollo1-4/+31
The common code for session handling is shared using struct afb_xreq. At the moment only hreq leverages the new feature. The objective is double: make the work of writing new internal requests more easy and prepare to check permissions. Change-Id: If3ca311d68c2d8c427d1125f31a2704b150c2c94 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-03-29Prepare move to bindings version 2José Bollo1-0/+315
Change-Id: I3105a5898d0703d1e57eff09f179b38742482842 Signed-off-by: José Bollo <jose.bollo@iot.bzh>