summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2018-12-13Improve json object releaseRomain Forlot1-3/+2
For convenience queryJ will always be released. Users has to call json_object_get to be able to use it after that. API subcall use an intermediate variable to avoid modifying this parameter in case of user wanna use it after that. Change-Id: I98f478d3fc0c4ef28234811333b9effd8289e74d Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-12-13Improve way to loading an actionRomain Forlot3-160/+153
Split and cleaner function that load from JSON object an object CtlActionT that could be used by the controller. Also use a new syntax that reduce the number of JSON fields to parse based on a URI syntax. Change-Id: Iabc447368ca56e3a4279fb728ba2f546e11c961b Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-12-13Upgrade config schemaRomain Forlot8-226/+440
Change the way to load LUA scripts. They are now considerate as Plugin and loads with them. This imply rework of how to search and find plugins as well as the way to load LUA. Also load an harcoded LUA scripts providing LUA helpers and managing global variables lock unlock mechanism Change-Id: I64e38aa27278d0cfdca787155db2d0c89953f905 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-12-13Fix: callback execution conditionRomain Forlot1-1/+1
Test the wrong pointer to know if there is a CB to execute. Action pointer could be void as the loading callback isn't stored in it. Change-Id: I3281cdd603cc8b90059331fcff694b354eae1db0 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-12-13Fix conversion compilation warningRomain Forlot2-3/+3
Change-Id: I0d5350c1e454bc118e4470ae7ff0eafe253cd2bf Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-12-13Fix link to afb-helpers renamed from afb-utilitiesRomain Forlot1-1/+1
Change-Id: I5f17060c00de8bf7825fbd842db2cca8f2142df7 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-12-13Release json_objects used to launched the actionRomain Forlot1-0/+4
Instead of only have API subcall releasing the json_object now release in all cases to be coherent. This should be argument to be passed to an action, treated in that action then after that has been done, this object has no more meanings and should be released. Change-Id: I371f0c3db34f4126a812d70b7e3ccb9f8bb5f776 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-12-13Format, get rid of conversion type warning.Romain Forlot2-9/+7
Change-Id: I8cde66dc613fd36e7061f45918520ecd1cdf2825 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-12-13Use an intermadiary variable avoiding side effets.Romain Forlot1-10/+13
Previously using parameter and modifying it which could involves side effects. Better to use an intermediary json_object to be fills with action->argsJ and queryJ object meld together. Also fix segfault after json_object_put called inside AFB_ServiceSync doing a json_object_get() on object to be conserved Change-Id: I4618a7bc87e111afa1fe047168ba7232241ac4c8 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-12-13Old audio controller traces left behindRomain Forlot1-1/+1
Change-Id: I2423376e9c0c616ba62439b387f7da23f710dbb0 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-12-13Fixed links and markdown warnings in README.mdSebastien Douheret1-9/+13
Signed-off-by: Sebastien Douheret <sebastien.douheret@iot.bzh>
2018-12-13Linting: Initialize fullprefix variableRomain Forlot1-1/+1
Change-Id: I24b0b0f87f1315220cf668c170fc3c13a85f46bb Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-12-13Fix memory leakRomain Forlot1-0/+4
Change-Id: I5ba04ecfb7809f9132e7958c5044b3d821830e8a Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-12-13Change prefix generation, simpler is betterRomain Forlot1-3/+5
Change-Id: Ieb4801b9162f9f8f374b352fb66bed82a8854b7f Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-12-13Add binding rootdir to searched path for conf and pluginsRomain Forlot2-2/+26
Change-Id: I4526dd9afc76ac9c63ecb6e800157a0678485955 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-12-13Make public ConfigSearch functionRomain Forlot2-1/+2
Change-Id: I6da8b9d463ef9adc604bc59285189e45dfb63a7a Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-12-13Fix segfault when no l2c functions definedRomain Forlot2-2/+2
Mark "ldpath" parameter as optional like it is. Change-Id: If32e078f5a4349ab895b1fd4b8f0a8c542d247a1 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-12-13Get back on track l2c functions.Romain Forlot6-15/+48
Change-Id: I8425f0de60a35b4e287c8829fe72cbca80bc55df Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-12-13Fix warning compile about uninitialized variableRomain Forlot1-2/+2
Change-Id: I5b07409a7d7c9b5e038accb973b3232775e40c23 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-12-13Avoid compile warning, memory leaks, lintingRomain Forlot4-8/+14
Change-Id: Ida18aeab20d5b894609c1a9c2f6fc2a71a0b4a23 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-12-13Fix wrong json object pointed.Romain Forlot1-3/+2
Change-Id: Id485aa5ddf8d78a1fc48922cb3c3161fb65dea1b Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-12-13Protect exec when no files found.Romain Forlot1-28/+31
ScanForConfig return null when no files found which isn't handled until now. Change-Id: I70d6b4a45be9d434aca049e3cd3260dfc38a7ff7 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-12-13wrong json unpacking fails.Romain Forlot1-1/+1
Change-Id: Ie0246192b014c3550207fab1fb6512aeb6e5bce1 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-12-13Wrong increment always fails load an actionRomain Forlot1-1/+0
Change-Id: I7a8a3ac4846f1190caf1a4dde066e50dc592d58b Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-12-13Loading additional files from JSON sectionRomain Forlot2-24/+47
Now handle "files" object inside section loading to externalize JSON definition and could split them in several files if needed. "files" could be specified inside a section object, each files will be parsed to found same key than the current section and append content to the existing section's objects Change-Id: I4414684d08c5214cf96b365f9b0a72b13578a6ca Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-12-13Remove C++ warning ISO/C++11Romain Forlot1-25/+87
Change-Id: I03afd7479f0db8189cad41fd3b0fcb756f373603 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-12-13Get back lua2c functions parsed at plugin loadRomain Forlot3-8/+29
Format JSON unpack operations Change-Id: Iaed0988d8536ad1df60a32a610e69e35485fc9f8 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-12-13Correctly export symbols for C++Romain Forlot4-2/+29
Change-Id: I87eb6b5cc7208caaabbc3c2f3b6636d600c60370 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-12-13Fix: strncpy does't add null char at the endRomain Forlot3-24/+26
Fix: handle null response from CtlScanConfig() Change-Id: Icbe2a649886998078adda35b0d0dfd1c46e8fe31 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-12-13You may want load lua lib as embedded static libRomain Forlot1-0/+1
In this case you it should be available through link_libraries variable. Change-Id: Ic1dba40f7a44ea545db761d3b8e44b454f272ede Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-12-13Load afb_binding macros and stuff to pluginsRomain Forlot1-9/+24
Change-Id: I18a70e929530bb1cd5f7f68962edf975521b1c71 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-12-13Fix: C++ list initialization correctly done.Romain Forlot1-1/+1
C++ requires to initialize using the same order than what it is declared. Change-Id: Ic0063e0c0c8b2d5ad28e00e42b8a7e8822399a4b Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-12-13fix: wrong usage of strncat and strncpy functionRomain Forlot3-31/+31
3rd arguments match strlen of 2nd arguments and should not match the maximum length of destination variable. Change-Id: Ifebf6097bb995d0cf2c5633eb94d52d4517ade7b Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-12-13Modifiy timer to supper DynAPIFulup Ar Foll3-11/+18
th Please enter the commit message for your changes. Lines starting Signed-off-by: Ronan Le Martret <ronan.lemartret@iot.bzh>
2018-12-13create agl .gitreview fileRonan Le Martret1-0/+4
Signed-off-by: Ronan Le Martret <ronan.lemartret@iot.bzh>
2018-12-13fix build errorRonan Le Martret1-1/+1
* error: format not a string literal and no format arguments [-Werror=format-security] Signed-off-by: Ronan Le Martret <ronan.lemartret@iot.bzh>
2018-12-13Fix issue with compiling in API-V2Fulup Ar Foll1-1/+8
2018-12-13Avoid duplicated _GNU_SOURCE definition warningRomain Forlot5-6/+7
Change-Id: I2b805a60b67db1a72b429093256999673e2c3964 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-12-13FormatingRomain Forlot11-163/+161
Change-Id: I2b805a60b67db1a72b429093256999673e2c3964 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-12-13Replace macro by apiV2 compatible inline functionRomain Forlot1-0/+7
Signature from apiv2 and apiv3 aren't the same so better use an inline function here to be able to return a pointer. Change-Id: I2e811a37337ca1a4f1015a060e147c69370aa63c Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-12-13Add action method to execute an action from its uidRomain Forlot2-2/+23
Change-Id: Ic8f1d418db228ca8c646263b32a2431931a6a4be Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-12-13Fix: issue at compile time Forlot Romain [IoT.bzh]1-2/+2
ctl-plugin.h:124:34: error: expected expression before ‘...’ token
2018-12-13First working version as submoduleFulup Ar Foll12-113/+283
2018-12-131st V2/pre-V3 versionfulup13-464/+886
2018-12-13fix target nameFulup Ar Foll2-2/+2
2018-12-13DocumentationFulup Ar Foll1-1/+1
2018-12-13Remove NetbeansFulup Ar Foll13-353/+0
2018-12-13Doc updateFulup Ar Foll2-1/+2
2018-12-13Initial Commit as submoduleFulup Ar Foll58-3746/+1021
2018-12-13Use public URL for submodule afb-utilitiesRonan Le Martret1-1/+1
Signed-off-by: Ronan Le Martret <ronan.lemartret@iot.bzh>