aboutsummaryrefslogtreecommitdiffstats
path: root/include
AgeCommit message (Collapse)AuthorFilesLines
2019-02-27Added a tutorial and fix few errorssandbox/ctxnop/binding-objectLoïc Collignon2-25/+24
Added the tuto-5 that show how to benefit from the new 'binding-object' header. Fix few errors that can cause segfault when dealing with events and use the right afb::req object for verbs. Change-Id: I0563dd72a2843b2b54c2e40398ba129aac05ff0c Signed-off-by: Loïc Collignon <loic.collignon@iot.bzh>
2019-02-27Avoid relative path when including headersLoïc Collignon1-1/+0
Prefer the system path to include headers. Change-Id: Id20d7c07b628bb8da25abeef3bc10456693a93f9 Signed-off-by: Loïc Collignon <loic.collignon@iot.bzh>
2019-02-27Update copyright dateJosé Bollo33-33/+33
Change-Id: I3aaa92b2bfb01699ee8ae609272e93032b6f1a9d Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2019-01-21Make the object inherits the 'raw' classLoïc Collignon1-3/+2
Base the 'object' api on the newly added api wrapper. Change-Id: I8370552688bed19265427213fc1cc2f5660aada3 Signed-off-by: Loïc Collignon <loic.collignon@iot.bzh>
2019-01-04Added an 'api' wrapperLoïc Collignon1-1/+154
New 'api' wrapper for 'api' related functions. Change-Id: If6fd7adad1d3172defffe020203b637ace17aa6e Signed-off-by: Loïc Collignon <loic.collignon@iot.bzh>
2019-01-04Reworked the event classLoïc Collignon1-8/+11
Added move semantic and remove invalidation method as it's not used anymore since we drop the support of APIv2. Change-Id: I291155cef3e55ca14c706aa2315ab8dbfd09dffb Signed-off-by: Loïc Collignon <loic.collignon@iot.bzh>
2019-01-04Fix multiple definition and castLoïc Collignon1-6/+3
The function was defined as many time as the header was included. Making it a weak function fix the issue. Also, a plain old C cast is required to make this constexpr valid. Change-Id: Iee5677873180accfddcad0b3a58f3776f9fd8c5e Signed-off-by: Loïc Collignon <loic.collignon@iot.bzh>
2019-01-04binding-wrap: Add verb initialisation for C++Jose Bollo1-0/+34
This new constexpr initialisation method accepts a callback receiving a afb::req instead of a afb_req_t. Change-Id: I742e3dcf1e81873e76f61c319198e3cf7ef5ec0f Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
2019-01-04Fix a template that use the wrong callback definitionLoïc Collignon1-1/+1
It used the legacy callback definition instead of the good one. Change-Id: I5ad6e881e9fb99f1076a6dfa9ded221ccfec4a03 Signed-off-by: Loïc Collignon <loic.collignon@iot.bzh>
2019-01-04Drop APIv2 support on the C++ interfaceLoïc Collignon1-87/+3
The C++ interface is currently used only in APIv3. Change-Id: Idc53bc80a939292f9882fdc62849dd27e543cbf8 Signed-off-by: Loïc Collignon <loic.collignon@iot.bzh>
2019-01-04Avoid relative path when including headersLoïc Collignon4-7/+9
Prefer the system path to include headers. Change-Id: Id20d7c07b628bb8da25abeef3bc10456693a93f9 Signed-off-by: Loïc Collignon <loic.collignon@iot.bzh>
2019-01-04Added a new C++ APILoïc Collignon2-2/+1
You can create an API by inheriting a base class and overring the methods you want. Change-Id: I62fa5ee8f347cd4d7baa7df39c0fcd6c83c4c34e Signed-off-by: Loïc Collignon <loic.collignon@iot.bzh>
2019-01-04afb-binding-v3: Fix issues in includesJosé Bollo2-5/+6
Fix 1: afb_api_v3_verbose doesn't exist Fix 2: afb_api_vverbose isn't declared Fix 3: Ensure implicit cast of "api" and "req" Using presupposed knowledge of internals of afb_api_t and afb_req_t is bad when dealing with implicit conversion in C++ and is generally not the way to go. Change-Id: I2630faa5ea0ae315ca95e4fd6ed6ae1a0beb01a5 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2019-01-02Added a new C++ APILoïc Collignon4-1/+345
You can create an API by inheriting a base class and overring the methods you want. Change-Id: I62fa5ee8f347cd4d7baa7df39c0fcd6c83c4c34e Signed-off-by: Loïc Collignon <loic.collignon@iot.bzh>
2018-11-28Fix deprecation warnings for older GCC versionsguppy_6.99.2guppy/6.99.26.99.2Johann CAHIER1-2/+2
For some reason, SDK doesn't display warning when AFB_BINDING_VERSION is defined as 2. Using #warning instead of #pragma GCC warning fixes the display. Change-Id: I3c96b3630e0d1eac63b2fde72bdec3c7f3d1714a Signed-off-by: Johann CAHIER <johann.cahier@iot.bzh>
2018-08-20Provide functions afb_service_call[_sync]_legacyJose Bollo2-0/+4
These functions was missing and the documentation was erronous. This fixes that issue by providing the missing functions and updating the documentation. Bug-AGL: SPEC-1669 Change-Id: I543b0fbe29370be6f35f15ca3bfa48fef9ab4055 Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
2018-08-02Add ability to provide binding settingsJosé Bollo3-2/+25
Change-Id: Iab93a26340fa9743a58ca43cd903bbf31c783e5b Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
2018-07-27coverage: Improve coverage testJosé Bollo1-5/+5
The test now raise an overall coverage rate: lines......: 75.4% (8356 of 11080 lines) functions..: 80.4% (1094 of 1360 functions) Also Improve the documentation and improve parts of code. Change-Id: Ic2b8bc2f85d4181aa0b358a953f95cb105a0eed9 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-07-25Fix tiny documentation bugJose Bollo1-2/+2
Change-Id: Ib11160a8137480af92c450b65039b1272084f2d6 Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
2018-07-19Fix errors in migration to V3José Bollo2-3/+5
Fix a tiny error in the migration script and improve it. Fix declaration of afb_daemon_get... without args for binding V3 compatibility. Fix declaration of afb_api_event_handler_... Fix the correct URL to the sed script: valid: https://git.automotivelinux.org/src/app-framework-binder/plain/docs/migration-to-binding-v3.sed invalid: https://git.automotivelinux.org/src/app-framework-binder/tree/docs/migration-to-binding-v3.sed Bug-AGL: SPEC-1595 Change-Id: I245b20a9c14634a94c69420312afbd97628bc750 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-07-16afb-binding: Add missing declarationsJosé Bollo1-0/+2
The functions afb_api_set_verbs_v3 and afb_api_delete_api were missing. Change-Id: Icab928984dd6620b8b3920d0406aeb3cb35c9428 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-07-13afb-binding: Fix export of "class" handlingJosé Bollo1-0/+2
The functions afb_api_require_class and afb_api_provide_class weren't exported. This commit fix that oversight. Change-Id: Ica6532bd9e06aa9003a24ae7a54b05c64be7093b Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-07-04afb-req: Fix a bug in afb_req_verboseJosé Bollo1-1/+1
The newer version of afb_req_verbose was self recursive leading the crashes. Bug-AGL: SPEC-1561 Change-Id: I40959e5b72ca850712c27a505e77efea43aadabd Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-06-22Improve documentation of api v3José Bollo25-74/+287
The documentation is improved to reflect the new version. Tune the options Change-Id: I894c3db3bc0c10e89db66a9a51a9ad049bb8c0c4 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-06-15api-v3: First draftJosé Bollo40-2157/+4441
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-06-13afb-eventid: Fix commentsJosé Bollo2-10/+16
Change-Id: I4ba49719a4776511d7f5448cd7fbf84caf7474e8 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-02-27Update date of copyright noticesJosé Bollo28-28/+28
Change-Id: If9d7e7728df086fbb7214f1de5cbec35cd2f1d9b Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-02-22xreq: export a function to get reqJosé Bollo2-11/+31
Change-Id: Ie7eac225f514349926341b7db61ea0eb9029c5d8 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-01-02afb-binding.hpp: Fix constexpr of 'binding'José Bollo1-1/+1
Change-Id: Icdee4029f11dcb6c0f75e945e0b411ea63654afe Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-11-03Add 'noconcurrency' when creating dynamic APIeel_4.99.2eel/4.99.24.99.2José Bollo5-4/+8
Change-Id: Ia108b23b9480bb32f27127ef00c18086fcf86752 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-10-11Update C++ interface for afb_req_get_uidJosé Bollo1-0/+7
Change-Id: I8c281417bd08b49ac708a7992cb46a074e74c979 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-10-10Add the function afb_req_get_uidJosé Bollo3-0/+25
Change-Id: I9caf38ee3811cf10b546489094f0bb5b3d844c40 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-10-09Add wrappers for accesses to internalsJosé Bollo2-1/+36
Change-Id: I6144b0ab21418dc98792f0eeef695f3df0fc11d3 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-10-09Cleanup of header filesJosé Bollo11-113/+35
Change-Id: Icf6cffdf303e125feec2661f5ce736a398c07932 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-10-09Provide API and VERB name of requestsJosé Bollo1-1/+7
Change-Id: I9a86c6314f871334231e50f9cea60b54aed434b9 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-10-09Provide the name of the APIJosé Bollo1-0/+3
Change-Id: I5b4e4b40385830d1b8921d079f5e7e732ec4247f Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-10-09Add a closure argument to dynamic verbsJosé Bollo3-1/+7
Also demonstrate the mix of api v2 with dynapi. Change-Id: I95e8d32ac836590ce3f7b3f0b5f29e5574808976 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-10-09Allow pure dynamic bindingsJosé Bollo1-0/+8
Activates the new internal interfaces Change-Id: I8f51cd271f66a0216ffdf03626300bb5964a70f9 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-10-09Allow dynamic creation of APIsJosé Bollo9-2/+566
Change-Id: I825bfa7969c98dd214457d9ff94e2948362286a9 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-10-09Make single afb_request_subcallJosé Bollo2-2/+11
Change-Id: I8cc96ef9c05781069f07b807bc6632d13668ac69 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-10-09Provide conversions for afb_event and afb_reqJosé Bollo2-0/+16
Provision is made here to convert, trivially: afb_event -> afb_eventid* afb_req -> afb_request* The opposite conversions aren't provided to favor new interfaces. Change-Id: Ib67c2317f782e2edfd1ba0e49e10b321a3b770a3 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-10-09Prepare subscription to eventidJosé Bollo2-6/+12
Change-Id: Ie3f75377009be36f7f5bd52bdb31d0611cd49778 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-10-09Make addref for request return the pointerJosé Bollo2-3/+3
Change-Id: I4286cbd9d02b406570185d265e7b925c43bbc42c Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-10-09Introduce afb_requestJosé Bollo7-67/+536
This prepares the new api with pointers. Change-Id: I4eb299551145226e428934b6835a1a7810ae6439 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-10-09Introduce afb_eventidJosé Bollo7-100/+230
This new name is better suited because it is not an event but the id of an event. This also prepares the new api with pointers. Change-Id: I7be88bb36cf72bf7df70793a77452e405130b951 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-10-09Make afb_event_drop obsoleteJosé Bollo2-11/+26
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-09Atomic context initialisation for bindingsJosé Bollo1-6/+18
Change-Id: I3e81b64d57c917da1fba9b3a9387d0f4d7f3e6b7 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-10-09afb-xreq: prepare futur afb_requestJosé Bollo1-1/+1
Change-Id: I0986113475f354bccdbc711e74a63c9ca809c5ed Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-10-09Add C++ interfaceJosé Bollo2-0/+615
Change-Id: I05e104e4733d071949723073d32b21c22089ecdf Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-10-09Add function 'afb_req_get_application_id'José Bollo1-0/+15
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>