summaryrefslogtreecommitdiffstats
path: root/include
AgeCommit message (Collapse)AuthorFilesLines
2019-03-11c++: Avoid relative path when including headersLoïc Collignon4-7/+8
Prefer the system path to include headers. Change-Id: I08a64e8d27808084ea4592988f36b7e5099a7fc6 Signed-off-by: Loïc Collignon <loic.collignon@iot.bzh>
2019-03-11c++: New C++ API for bindingsLoïc Collignon4-1/+344
You can implement a C++ binding API by inheriting the templated base class 'base_api_t' and overriding the methods you want. At the same time, the c++ files are now located in in their own subdirectory: afb/c++ Change-Id: Ie02535961ec6b4b5ae21390cb520acb1fdc44c9e Signed-off-by: Loïc Collignon <loic.collignon@iot.bzh>
2019-02-06Update copyright datehalibut_7.90.0halibut/7.90.07.90.0José Bollo33-33/+33
Change-Id: I3aaa92b2bfb01699ee8ae609272e93032b6f1a9d Signed-off-by: José Bollo <jose.bollo@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>
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>
2017-10-09Remove tailing spaces and TODO fileJosé Bollo1-2/+2
Change-Id: Id7cdad4e24c6ab62bf9c325b542e1605b17223f4 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-09-07Allow renaming of APIJosé Bollo4-0/+25
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é Bollo3-87/+114
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é Bollo2-0/+14
Change-Id: Ic21c79dcd9908919a1a8d13e8747ef0bd2490477 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-09-07Implement afb_req_has_permissionJosé Bollo1-0/+14
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-29verbosity: split verbosity level 1 in 2 levelsJosé Bollo1-3/+3
Change-Id: I32a96f1863caffa6a17c25f52d06538f8eb60555 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-08-03subcall_req: introduce afb_req_subcall_reqJosé Bollo1-0/+33
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-13Fix const issue in afb-auth.hJosé Bollo1-2/+2
The fields type and loa were declared as const. This worked well for C compilers that are allowing to initialize constant fixed structures. But when compiling with C++, it is no more easy to create initialized structure explicitely. In C++, the solution is to use C++14 constexpr functions. But for using these function, const must be removed. Bug-AGL: SPEC-741 Change-Id: I8096db6e4eba020f96fbf25789b2990d2a8cbabf Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-07-03Make status commonJosé Bollo3-8/+8
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-30Bindings V2: enforce prefix AFB_ to logging macrosJosé Bollo1-0/+3
This might break many codes but it is better in the long term. Change-Id: I346d13f0a6ef6b211edf25844489405351548299