aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ctl-lib/ctl-config.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/ctl-lib/ctl-config.h b/ctl-lib/ctl-config.h
index b8eca1b..e967270 100644
--- a/ctl-lib/ctl-config.h
+++ b/ctl-lib/ctl-config.h
@@ -94,6 +94,18 @@ int ActionLabelToIndex(CtlActionT* actions, const char* actionLabel);
// ctl-config.c
int CtlConfigMagicNew();
json_object* CtlConfigScan(const char *dirList, const char *prefix) ;
+
+/**
+ * @brief Return a string representing the path + filename for a given response
+ * object from a CtlConfigScan calls. This will only take the first result, this is
+ * made to avoid loading several time the same file found at differents places.
+ *
+ * The returned string has to be freed.
+ *
+ * @param apiHandle AppFW Api handle
+ * @param responseJ Response from a CtlConfigScan function call.
+ * @return char* absolute path to a file
+ */
char* ConfigSearch(AFB_ApiT apiHandle, json_object *responseJ);
char* CtlConfigSearch(AFB_ApiT apiHandle, const char *dirList, const char *prefix) ;
int CtlConfigExec(AFB_ApiT apiHandle, CtlConfigT *ctlConfig) ;