summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
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>
2017-05-19Add json2c for including json in C filesJosé Bollo2-0/+182
Change-Id: I08d8f1c249d5612831fcbc66fe5d0caee4e3a73d Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-05-19Bindings V2: rename init functionsJosé Bollo5-15/+19
The new naming is closer to the functionnal design and closer to V1 names. Change-Id: I8970338056a30564b84eaa1a7da6df3a9e6aa579 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-05-19bindings v2: Enforce to explicitely ask for concurrencyJosé Bollo2-1/+36
Change-Id: Ic20d1eb1c8515cd86444ad62b0daacbcd75e9b7e Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-05-19Bindings V2: Refactor session flagsJosé Bollo9-106/+236
Change-Id: Idb104b3db69d785b11446fe9b66084839290362f Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-05-19Fix cmake dependencydab_3.99.1dab/3.99.13.99.1Ronan Le Martret3-33/+42
* update documentation (get libmicrohttpd>=0.9.54 from upstream). Change-Id: I361708fecd3b670dba0f32230fa3bcbd86fa9c55 Signed-off-by: Ronan Le Martret <ronan.lemartret@iot.bzh>
2017-05-18Fix a bug in subscribers countingJosé Bollo1-3/+4
To avoid as much as possible allocation/deallocation when possible sequences of subscribe/unsubscribe are encountered, the watch strucutre of events is destroyed only when either the event or the client is destroyed. This commit fixes a bad handling in the count of active subscribers. Change-Id: I3f240e69c3b21356ff07f584fe9bfb578d46732b Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-05-15Fix the timer signal numberJosé Bollo1-1/+1
Change-Id: I2dc7520f41472afefc31be7d3ac1a205611c1828 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-05-12free SIGALRM for boost timersJosé Bollo2-4/+6
Change-Id: Ib6825c21b6589db6c7e9b8c5a179c347bcc0a93d Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-05-11generate skeleton from OpenAPI 3José Bollo4-353/+566
Change-Id: Ia2c9d42a12e9b425d34a3a70ae255d82a9320e8c Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-05-11improve logJosé Bollo2-3/+3
Change-Id: I218356c3122179887e8be885affb82cdc6403dbf Signed-off-by: José Bollo <jose.bollo@iot.bzh>