summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2018-12-13Fix warnings due to json-c evolutionSebastien Douheret1-3/+3
Library json-c now returns size_t instead of int. Change-Id: Ib4f8bcd5dc6382fb3d189e83707a39dee8e14683 Signed-off-by: Sebastien Douheret <sebastien.douheret@iot.bzh>
2018-12-13wrap-json: new helper functions for comparisonjobol3-29/+447
The new functions are - wrap_json_clone_depth: clone with defined depth - wrap_json_sort: sort an array accordingly to wrap_json_cmp - wrap_json_keys: compute the array of sorted keys - wrap_json_cmp: compare 2 items - wrap_json_equal: test equallity - wrap_json_contains: test inclusion Change-Id: I9787bff6c262fa2702c27802d771e2d487ce6309 Signed-off-by: jose bollo <jose.bollo@iot.bzh>
2018-12-13Removed anonymous function in ScanDir and fixed warningsSebastien Douheret1-71/+78
Change-Id: Ie6b67506be077f8fe5c2108e5dd98f9460dda485 Signed-off-by: Sebastien Douheret <sebastien.douheret@iot.bzh>
2018-12-13wrap-json: Add clone facilityJosé Bollo3-1/+97
This adds 3 new facilities: - wrap_json_clone: clones any json object superficially - wrap_json_clone_deep: clones any json object deeply - wrap_json_add: adds to an object the fields of an other object Change-Id: I3844d972aa6477c9dde6f66ad0b0604284a853a7 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-12-13Disabled debug code (only used for testing).Sebastien Douheret1-1/+1
Change-Id: I76e66e34f4dfe8d598d6ccf4c91e61932d5b75bc Signed-off-by: Sebastien Douheret <sebastien.douheret@iot.bzh>
2018-12-13Correction to include dynamic api correctlyJonathan Aillet1-1/+2
Define the correct version needed by the application framework for dynamic api. Change-Id: Ic0fd504316e2fc086545f0615ec6e83f2b1cae2d Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-12-13Fixed build warnings with gcc >= 7.3Sebastien Douheret1-3/+3
Reduced the number of warnings in native host configuration (here Tumbleweed) in order to not hide true/real warnings that may appear in the future. Signed-off-by: Sebastien Douheret <sebastien.douheret@iot.bzh>
2018-12-13Added afb-helpers-utils.hThierry Bultel1-0/+17
Added this file to some useful macros, the first one here is INT_STR_MAX that permits to get rid of a warning with gcc >= 7.2.0 Change-Id: I768d216ab5494d346d5ee6e0df66f93410bfab57 Signed-off-by: Thierry Bultel <thierry.bultel@iot.bzh>
2018-12-13Fixed compilation warnings with gcc-7.2.0Thierry Bultel1-5/+5
Replaced some 'size_t' by 'int' Change-Id: I07492dad242b2c8f608f9cc90a4a257e48acec6a Signed-off-by: Thierry Bultel <thierry.bultel@iot.bzh>
2018-12-13Fixed spellingSebastien Douheret2-3/+3
Signed-off-by: Sebastien Douheret <sebastien.douheret@iot.bzh>
2018-12-13More secure way to use strncat and strncpyRomain Forlot1-3/+3
This ensure not data will be written out of bound of the destination variable buffer Change-Id: I4d736855f085fc5f728258c5928fed7191df46b4 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-12-13Fix: compile errors depending API versionRomain Forlot1-4/+7
Change-Id: I9c1476ab35f9bf70322ad4cd81ab0790e4d0724b Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-12-13wrap-json: Fix warningsjobol1-4/+4
Signed-off-by: jobol <jose.bollo@iot.bzh>
2018-12-13wrap-json: Update the documentationjobol1-0/+13
Signed-off-by: jobol <jose.bollo@iot.bzh>
2018-12-13wrap-json: Accept null as valid base64jobol1-9/+18
Signed-off-by: jobol <jose.bollo@iot.bzh>
2018-12-13wrap-json: Record result of testsjobol1-0/+405
Signed-off-by: jobol <jose.bollo@iot.bzh>
2018-12-13wrap-json: Fix bug decoding empty base64jobol1-1/+2
The function 'decode_base64' was buggy because it freed 2 times the pointer 'result'. This came from the fact realloc frees the pointer and return NULL when the size if 0. Signed-off-by: jobol <jose.bollo@iot.bzh>
2018-12-13wrap-json: Improve base64 en-de-codingjobol1-8/+26
The optional characters '*' and '?' weren't managed so the packing of y/Y base64 wasn't really entire. Signed-off-by: jobol <jose.bollo@iot.bzh>
2018-12-13Fix: wrong searchPath parameterRomain Forlot1-5/+10
Change initialization parts of the function to be clearer and ensure that at least searchPath has been correctly passed Change-Id: Ic055e2c244b261b33960072f51193fcbbd48c222 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-12-13Documentate, formating, linting.Romain Forlot4-16/+51
Change-Id: Id77b9de1b847ca26133abd87511de4e78c7d01f7 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-12-13Adapt function to dynamic APIRomain Forlot2-7/+8
A dynamic API being dynamic, you need to pass as parameter on behalf of which API you want to act. If you are using classic v2 API then just pass a NULL pointer value. Change-Id: I9ac6b606ff25c63a05a647e418a7c2bcc4b2a7fe Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-12-13FormatingRomain Forlot2-15/+10
Change-Id: I16ee9154f4f5a7e71af83a22899a94f00e07aa79 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-12-13Make CURL Wrapping functions optionalRomain Forlot1-10/+22
Search CURL package in your system and add it if found. This will add a libcurl to be linked with the target. Change-Id: Ie4a720fd11de97abead7a92a7fb18b5c8af21ec5 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-12-13Add new function to retrieve HTTP response codeRomain Forlot2-0/+11
Change-Id: I1d01c95d6418646ef9d2f8f4b07210a33b10c117 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-12-13POST using unescaped argumentsRomain Forlot4-15/+103
Add the ability to make a POST request without urlencode the arguments. This will only concatenate them instead. You can also specify the used separator. Change-Id: Icb61a5a20771a89e89159132365d86ee4c982d1c Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-12-13Added a Qt's websocket client to AFB into helpersLoïc Collignon4-1/+264
This add a single Qt class to serve as a client to Application Framework Binder. It's optional, not enabled by default. To enable you have to set AFB_HELPERS_QTWSCLIENT to ON. Change-Id: Ia0759a95688e48183e6661082693c410a575b14b Signed-off-by: Loïc Collignon <loic.collignon@iot.bzh>
2018-12-13Fix GCC < v7 warning on maybe unitialized variableRomain Forlot1-2/+2
Initialization done under a switch case statement within a "for" loop which throw warning with GCC v6. Change-Id: I47b51598cc68943bab6f98bd87b7ba6f40caeafc Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-12-13wrap-json: Add base64 byte buffer supportjobol2-4/+225
Signed-off-by: jobol <jose.bollo@iot.bzh>
2018-12-13Rename cmake target accordingly to the git repoRomain Forlot1-1/+1
Change-Id: I7e05205fe392884c25d1370564cad61119894754 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-12-13Adds a CURL wrapper library to help using libcurlRomain Forlot5-1/+707
Change-Id: If73bab16a5d4a5258f730c599630bd5fa8e5684f Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-12-13Linting/Fix: remove warning int/size_t conversionRomain Forlot1-5/+5
Change-Id: I831bac418f5c12c9a747b08ea8be72dcbe1d4ea3 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-12-13Fix memory leakRomain Forlot1-1/+2
Change-Id: Ia02a639ea9210ed7961a88c91ff9e4cd1a732416 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-12-13Avoid memory collision.Romain Forlot1-1/+1
Change-Id: I805a725d6b9477fcb690d7c2c7cbb6bb4f112dfb Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-12-13Add gitreviewRomain Forlot1-0/+6
Change-Id: I63e63cf1cc4545a4090a005629508a654e4a72d1 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-12-13Fix to support pre-V3 DynAPIFulup Ar Foll1-6/+14
2018-12-13Prepare for future API-V3Fulup Ar Foll2-2/+13
2018-12-13Misc Fix/CleaningRomain Forlot1-3/+1
- Correct size type ssize_t to test - Remove free() statement because memory don't issued from a malloc causing exception - Remove redundant break statement after a return. Change-Id: I47824dd5cf7afe68cd32e1c3e94e69f31d802995 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-12-13Concatenate result directly from GetBindingDirPathRomain Forlot2-2/+2
Return non const char pointer. Change-Id: I975b18f72d26c1a2749ca54e4f096271497047dd Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-12-13Fix: mismatching function signature.Romain Forlot1-1/+1
Change-Id: I5d3c8b34a4e42c867fe1e3eccd96aaa2cc9c5ca6 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-12-13Only return binding root dir.Romain Forlot2-36/+6
If subdirs path is needed then concatenation as to be done using the rootdir. Change-Id: I50a1eeb1f853ae26995a96e1661ff38cb7959f60 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-12-13More reliable GetBindingDirsPath function.Romain Forlot2-30/+38
Only return a wanted directory path not a complex structure. Change-Id: I5b5a1dea2c55ee6a76dbbbd52c3ebfdd684255e5 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-12-13Adding JSON library for CPP and its docsRomain Forlot2-0/+15674
Change-Id: I3ae419ea586256bd9fff084f42966abf0f3491dd Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-12-13Retrieve binder rootdir and subfolder pathsRomain Forlot2-1/+48
Change-Id: I064bf4831be40de70dab68b72489c4fdfc69e9c4 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-12-13Reduce scope for some variablesRomain Forlot1-2/+2
Change-Id: Ic89421054a83709eec6afaa22dbb4373bcff9b19 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-12-13Include afb-utilities from C++ easilyRomain Forlot2-1/+15
Change-Id: Ic1c815b412d372a418c2faa51fea451c9100693c Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-12-13Rename back define variable.Romain Forlot2-3/+3
Change-Id: Ie0d40f08230170ef780c46748889e153618d1c44 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-12-13fix strncat functRonan Le Martret1-2/+2
I: Statement might be overflowing a buffer in strncat. Common mistake: BAD: strncat(buffer,charptr,sizeof(buffer)) is wrong, it takes the left over size as 3rd argument GOOD: strncat(buffer,charptr,sizeof(buffer)-strlen(buffer)-1) Signed-off-by: Ronan Le Martret <ronan.lemartret@iot.bzh>
2018-12-13MD lintingRomain Forlot1-3/+1
Change-Id: Iea7fb484aa13d4cba0e27bef06592218710f7c8a Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-12-13Fix: set default value if missing defined varRomain Forlot2-1/+5
Change-Id: I93f8546e2cfe7fc11fdf0f956f10429f6c0ad8d0 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-12-13Format and missing header dependenciesRomain Forlot2-23/+29
Change-Id: If5890445bdb6a676ee6c435f50a27caa8ca5850d Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>