summaryrefslogtreecommitdiffstats
path: root/bindings/samples
AgeCommit message (Collapse)AuthorFilesLines
2019-04-23samples: wrong parameter for get_new_board()Phong Tran1-1/+1
for fixing warning: too many arguments in call to 'get_new_board' Change-Id: I7b3d175310156ea3d2efed29e344f01c9904d534 Signed-off-by: Phong Tran <tranmanphong@gmail.com>
2019-04-23Merge changes Id24d9bb0,I6807ed25José Bollo2-2/+2
* changes: change style initialization of struct afb_auth missing full initialization for struct afb_verb_v3
2019-04-17missing full initialization for struct afb_verb_v3Phong Tran2-2/+2
This is for fixing warning: missing field 'callback' initializer [-Wmissing-field-initializers] Change-Id: I6807ed25bff96c96f347ec1e87f1b12cf0759498 Signed-off-by: Phong Tran <tranmanphong@gmail.com>
2019-04-12Fix small issuesJose Bollo1-0/+1
These issues was discovered by static analysis tool. Change-Id: Iea75151c9b1f5e4cb139d2dc4e8a5c8bae5bb303 Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
2019-04-12Reordering of sample and tutorial bindingsJosé Bollo1-74/+14
The main idea here is to install the sample and tutorial bindings in specific directory. This will at the end help to package parts of the binder. It also includes a simplification of CMakeLists files. Also fix an error in packaging rpm. Bug-AGL: SPEC-2165 Change-Id: I494cc753796848cde849de1c3596893c78fa228f Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2019-02-06Update copyright datehalibut_7.90.0halibut/7.90.07.90.0José Bollo7-7/+7
Change-Id: I3aaa92b2bfb01699ee8ae609272e93032b6f1a9d Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2019-01-18hello3: Fix warning unused variableJose Bollo1-1/+0
The variable 'calling' was not used anymore. Change-Id: I3a041cee57b2682374084003415d13a77a554fba Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
2019-01-02hello3: Add verb 'after'Jose Bollo2-2/+79
The verb 'after' launches a new thread that after a delay will call a verb (like call). The type of call can be set to 'call', 'callsync', 'subcall' or 'subcallsync'. This allows to add test for asynchronous issues in multithreaded environment. Change-Id: Ic59a27b7b7fbd3716d34fdaa35c42aa9ecb7f201 Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
2019-01-02bindings/samples: Cleanup and tiny commentJose Bollo5-1465/+14
The count of samples was too large and with duplications. Hopefuly, removing duplications and adding a tiny README file lowers fuzzy. Change-Id: I55ed8f40a4f1e6e28e2a36f2819e25505246ecdd Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
2018-10-30samples: Fix compiling errorJose Bollo1-1/+1
Latest versions of libraries used doesn't define TRUE. This fix it by using 1 instead. Change-Id: I17db5ca34aeceab96c83143f49094fbaca74a95a Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
2018-08-22hello3: Add mutebugJose Bollo1-0/+6
The verb mutebug returns without answering but increment the reference count of the request. This has 2 weird effects: - on the service, it creates a memory leak - on the client, it creates a starve of answer Both effects are intended to test further improvements of the binder. Change-Id: I76ebe0dff1b42a8a72e1b3536857d1d1811452c1 Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
2018-08-02Add ability to provide binding settingsJosé Bollo1-0/+8
Change-Id: Iab93a26340fa9743a58ca43cd903bbf31c783e5b Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
2018-08-02tic-tac-toe: improve event handlingJose Bollo1-15/+17
Change-Id: Ifba67b4b83650f9b32f78d077d0bbd3d3882238b Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
2018-07-27coverage: Improve coverage testJosé Bollo1-2/+112
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-24coverage and test: Add testsJose Bollo1-10/+302
coverage values: - lines: 70.5 % - functions: 76.3 % Change-Id: Iaf802e84bbfa57502bbbac8c3b567b14c01608b6 Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
2018-07-08hello2: Add a binding v2 exampleJosé Bollo2-0/+553
Needed for test of bindings v2. Change-Id: I33f8b497428bf03f8f80ad26bcdec773d269f41d Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-07-08hello3: Fix a bugJosé Bollo1-1/+0
The request was released without any need. It came from migration from v2 to v3. Change-Id: If2558ca247f0db912ce5705fa1fd98f3771dcb1f Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-06-22hello3: Add verbsJosé Bollo1-0/+37
Add the following verb for testing purpose: - close: close the session - set-loa: set the LOA of the session - setctx: set the contextual data of a session - setctxif: set the contextual data of a session if not already set - getctx: get the contextual data of a session - info: returns the info of the session Change-Id: Ie2ceb897ecdff01f6efd0a3b174b5794913726d9 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-06-22Improve documentation of api v3José Bollo2-43/+26
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é Bollo9-301/+1230
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é Bollo7-7/+7
Change-Id: If9d7e7728df086fbb7214f1de5cbec35cd2f1d9b 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é Bollo1-1/+1
Change-Id: Ia108b23b9480bb32f27127ef00c18086fcf86752 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-10-23afb-api-dyn: Uniform return 0 on successJosé Bollo1-0/+2
Change-Id: I6ca079fa84547928f999e07d1925202a1e14850f Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-10-10Add the function afb_req_get_uidJosé Bollo1-0/+7
Change-Id: I9caf38ee3811cf10b546489094f0bb5b3d844c40 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-10-09Add wrappers for accesses to internalsJosé Bollo1-6/+6
Change-Id: I6144b0ab21418dc98792f0eeef695f3df0fc11d3 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-10-09Add a closure argument to dynamic verbsJosé Bollo1-1/+14
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é Bollo2-0/+489
Activates the new internal interfaces Change-Id: I8f51cd271f66a0216ffdf03626300bb5964a70f9 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-10-09Make afb_event_drop obsoleteJosé Bollo1-1/+1
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-09Add function 'afb_req_get_application_id'José Bollo1-0/+8
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-09-07Implement afb_req_has_permissionJosé Bollo1-0/+10
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-03subcall_req: introduce afb_req_subcall_reqJosé Bollo1-0/+22
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-03Make status commonJosé Bollo1-6/+6
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é Bollo2-21/+21
This might break many codes but it is better in the long term. Change-Id: I346d13f0a6ef6b211edf25844489405351548299
2017-06-28Bindings V2: reintroduce field 'info' for verbsJosé Bollo2-29/+28
CAUTION, this breaks binary compatibility Change-Id: I67acfffe1f04cdddee0ad1230b227b080da1ab06 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-06-12Moves tic-tac-toe sample to V2José Bollo1-51/+33
Change-Id: I761bca13f98f9bc9557725ed97979218d79fcbb2 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-06-01Add hooking for eventsJosé Bollo1-0/+33
Change-Id: If5fe736e04c9f4298302c3cbba568f1d6346ee67 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-06-01Add backward compatibility and remarksJosé Bollo4-0/+4
Change-Id: Ia261e2d9efce399b210f834c1acb679215021edd Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-05-31Introduce typedef for clientsJosé Bollo1-26/+25
Change-Id: Idb71c3ae869046f568166d239cf5addd31d42c6f Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-05-31Add logging by requestJosé Bollo1-1/+32
Change-Id: I6dda714bcb8c36392c14a1981cfb8960f3db45b8 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-05-30sample binding "hello" receives eventsJosé Bollo1-1/+7
Change-Id: Ic39d2c025af257703340d1c8f56746b2e27d3818 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-05-29Add 'afb_service_call_sync' functionJosé Bollo1-6/+49
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-22Bindings V2: migration of HelloWorld binderJosé Bollo1-31/+37
Change-Id: I34df971e9182fbab13d590e8390d6fe6af5d0f51 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-05-05session: start to manage concurrencyJosé Bollo1-0/+8
Change-Id: I5895fa14fcb496e71fba600994e7e454cf1d110b Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-04-11Fix a memory leakJosé Bollo1-0/+1
Change-Id: Id47b417f6e5f8bf2322b1de7ed12579de711160f Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-04-10Make HelloWord binding multi-threadJosé Bollo1-0/+13
Handling of event was not compatible with multi threaded. This implmentation solves this by protecting event access with mutexes. Change-Id: Ie52216289000f1ae6352c9dda442dfbda1ebe850 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-04-05Make daemon interface commonJosé Bollo1-0/+1
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-04Add synchronous subcallsJosé Bollo1-2/+27
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-03-31Factorize common code for handling requestsJosé Bollo2-1/+7
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-01-03cleanup: removes legacy-named fileJosé Bollo1-0/+18
The file include/afb/afb-plugin.h was kept for compatibility with previous versions. Change-Id: If144803b5f56e9828ec78de5279520319bbc3342 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-01-03Adds 2017 to copyrightsJosé Bollo5-5/+5
Change-Id: Id85c4eb4e36a05b61346004ba95daa19faf5074f Signed-off-by: José Bollo <jose.bollo@iot.bzh>