aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2017-06-19Add page-break for pdf and fix spellingSebastien Douheret9-101/+94
Change-Id: I3225f27a4e45792aeeb418eac5430c93c9d70061 Signed-off-by: Sebastien Douheret <sebastien.douheret@iot.bzh>
2017-06-19Add gitbook documentation (support PDF generation).Sebastien Douheret16-1/+960
To generate PDF doc: ./gendocs.sh pdf To generate HTML doc (local webserver): ./gendocs.sh serve Change-Id: I77156a45e86f3bcab045cee05694f93b7a50e4ba Signed-off-by: Sebastien Douheret <sebastien.douheret@iot.bzh>
2017-06-13Refactor of the documentationJosé Bollo39-6/+5017
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-12Fix issue in using systemd socket activationJosé Bollo1-2/+2
When afb-daemon was launched without systemd it crashed in sd_fds_for. Change-Id: I481f5d1a24ec45f8cacae32792b2e47dfa62f611 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-06-12Add comment for bindings v2José Bollo1-3/+3
Change-Id: Ic9c1e89f6f4f5a124ffb2dbb88a26dc5e8e1e543 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-06-12Removes reference to NULL in includesJosé Bollo3-5/+5
Change-Id: I94b2d57b8234f607167488afd24364920f9624f0 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-06-08Merge "Add rpm and deb packaging"Jan-Simon Moeller8-0/+241
2017-06-08Merge "Add package archive documentation to README.md"Jan-Simon Moeller1-0/+9
2017-06-07Fix concurrency issue in handling referencesJosé Bollo3-14/+15
Change-Id: Iaae331fbdadb88f26057a64193a026950dcb56e4 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-06-07Add rpm and deb packagingRonan Le Martret8-0/+241
Change-Id: I604cb02ea9a9ee94105583223dbacb4116d299ff Signed-off-by: Ronan Le Martret <ronan.lemartret@iot.bzh>
2017-06-07Add package archive documentation to README.mdRonan Le Martret1-0/+9
Change-Id: Ic93ae014f56ddd0a2f0d7d12d15005eb1bda1f09 Signed-off-by: Ronan Le Martret <ronan.lemartret@iot.bzh>
2017-06-05Allows to enforce prefixed verbose messagesJosé Bollo1-21/+37
Change-Id: I41aa310f6898d5578b8de296d3b637c0d3595b1b Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-06-02Fix typedef for afb_stored_reqJosé Bollo1-0/+1
Change-Id: I3c1cbb4a8a5473af5ac520441fecd1e5f3f253b3 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-06-02Add 'afb_daemon_require_api'José Bollo7-4/+78
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é Bollo21-428/+622
Change-Id: I231e2506f58227fb8d192df042539b1551a765c5 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-06-02Localize construction of afb_argJosé Bollo3-24/+16
Change-Id: I08f1bc228c419243044949aa3c4094873932d3f2 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-06-02Improve start_api functionJosé Bollo1-11/+15
Change-Id: I8ef676eb501c80a77944f88100119e8ae8784259 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-06-02Fix error on initialisationJosé Bollo4-6/+8
Change-Id: If6a988359b4d2747cefdd683b6328f5b36e37548 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-06-02Fix issue when JSON value is NULL in xreqJosé Bollo1-1/+3
Change-Id: Ifb84a77abb0fee947fb05d80ac8276a8ede988af Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-06-01Fix bug in websocket on empty packetsJosé Bollo1-3/+3
Change-Id: I21d6e36df183b798539cf2a378976cc595a77029 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-06-01Enforce starting services on needJosé Bollo3-84/+90
Also remove default api verbs because it wasn't used actually and it wasn't compatible with this evolution. Change-Id: I863b99eddd418f771011bb35b4bcea763046224e Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-06-01fix include of afb-service-v1.hJosé Bollo5-1/+9
Change-Id: I4e756949635854694711590c81fee0b7d99d33b3 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-06-01fix a warning on 32 bitsJosé Bollo1-1/+1
Change-Id: I03c50694470059f11e47b51a29e3df6929125752 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-06-01Improve log output formatJosé Bollo3-154/+72
Also rename of field 'prefix' to 'api' in afb_ditf Change-Id: Iaff49a3e829bca6e33023c888e95fb18fa0b85d8 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-06-01Add hooking for eventsJosé Bollo8-27/+468
Change-Id: If5fe736e04c9f4298302c3cbba568f1d6346ee67 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-06-01Add backward compatibility and remarksJosé Bollo9-8/+55
Change-Id: Ia261e2d9efce399b210f834c1acb679215021edd Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-05-31Return API description through websocketJosé Bollo1-3/+180
Change-Id: Iab10ed193bf6f6fc4240f6856c5835e35cd85dfa Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-05-31Introduce typedef for clientsJosé Bollo2-27/+55
Change-Id: Idb71c3ae869046f568166d239cf5addd31d42c6f Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-05-31code formatting improvementJosé Bollo6-12/+16
Change-Id: I07e0201c4dc9996e47ca70819123b351c7fb2ad7 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-05-31Add logging by requestJosé Bollo11-23/+258
Change-Id: I6dda714bcb8c36392c14a1981cfb8960f3db45b8 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-05-31fix bad exit status reportJosé Bollo1-1/+0
Change-Id: Ieb3aac9610c3e60702fe709f283f5dc1805623d8 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-05-30Make api descriptions uniqueJosé Bollo2-29/+77
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é Bollo9-31/+364
Change-Id: I42265fcee9eae8219ef0cf56d3c8446d2c0fc015 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-05-30fix commentsJosé Bollo2-4/+4
Change-Id: I6a3b2df272a1c88c530fd229ba612ee30160e3cc 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-30fix bug in hooking verbose callsJosé Bollo1-1/+4
Change-Id: I879d05968521a25cab73f65dad02a52357e62dab Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-05-30Record API names in service descriptorsJosé Bollo4-8/+17
Change-Id: Ie437a6987df7f27a4a68b9c022d8cad8ab4f2cfe Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-05-30Bindings V1: allows to receive eventJosé Bollo2-5/+7
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 warning on missing undefined symbolsJosé Bollo1-1/+1
Change-Id: I0ebe3b222cc5f0add9c9d433c0517af4e1910911 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-05-29Moves library resolution on top (hack)José Bollo2-45/+42
Avoid to tune executable byu executable. Should be redefined later. Change-Id: I02e55e642c1797768b7dbcd8406f59199a56891d Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-05-29Relax authorisation checlk for selfJosé Bollo4-5/+4
Change-Id: I115bbebb2f51be92578d1cc6b2fb5ae89813b630 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-05-29Add vfail and vsuccess interfacesJosé Bollo8-27/+70
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-29Cleanup legacy internal functionsJosé Bollo4-97/+20
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-05-29Add 'afb_service_call_sync' functionJosé Bollo14-166/+378
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-29afb-client-demo add options -H and -rJosé Bollo1-8/+58
The option -H (or --human) allows to output the emited JSON object as pretty formatted for being readable by human. The option -r (--raw) can be used in this case to still continue to print the raw output. Change-Id: I1da531794fb243413741f067cfea79f670c3a626 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-05-24fix concurrency for afb_msg_json_reply_errorJosé Bollo1-6/+1
Change-Id: I37ab68217c733456810e7e9ceb4e2e6c058f1b5b Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-05-24Handles subcall sync within xreqJosé Bollo4-143/+138
Change-Id: Ieac7c589ddadfb67761332443a3fd92038b6d548 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-22Bindings V2: Remove explicit references to daemon/serviceJosé Bollo21-241/+588
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>