summaryrefslogtreecommitdiffstats
path: root/docs/filescan-utils.md
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2019-01-04 14:31:42 +0100
committerRomain Forlot <romain.forlot@iot.bzh>2019-01-16 08:45:56 +0000
commitb7e6dbef56913fa43ea23b842ebe2933d9e0477e (patch)
tree06292d4cbc5acf1eb8da4ca9eabec10dafc274b3 /docs/filescan-utils.md
parent2e36a74fa8ae2a4b8e06f7752c3876f32a8dcbb3 (diff)
Add functions reference documentationguppy_6.99.4guppy/6.99.46.99.4
Only JSON helpers functions were documented before this commits. This add a description for every function of the afb-helpers library. Bug-AGL: SPEC-2114 Change-Id: I3ae941841ef4ad8e345dd4cd6bc012f6596eadc2 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'docs/filescan-utils.md')
-rw-r--r--docs/filescan-utils.md47
1 files changed, 47 insertions, 0 deletions
diff --git a/docs/filescan-utils.md b/docs/filescan-utils.md
new file mode 100644
index 0000000..4a4c2d2
--- /dev/null
+++ b/docs/filescan-utils.md
@@ -0,0 +1,47 @@
+# Filescan utils functions reference
+
+## const char *GetMiddleName(const char *name)
+
+Get rid of the binder name prefix 'afbd-'
+
+* name will be typically the full binder name
+
+Returns the process middle name of the running binder.
+
+## const char *GetBinderName()
+
+Get the Binder Name without the prefix set by the AGL appfw 'afbd-'
+
+Returns the Binder name without the prefix.
+
+## json_object* ScanForConfig (const char* searchPath, CtlScanDirModeT mode, const char *prefix, const char *extension)
+
+Scan a directory searching all files matching pattern: 'prefix*extention'.
+
+* `searchPath`: directory where to begin the searching.
+* `mode`: either or not the search will be recursive.
+* `prefix`: file prefix that will be looking for.
+* `extention`: file extention that will be looking for.
+
+Returns a json_object array of object with 2 parts a 'fullpath' describing the
+fullpath to reach the file and 'filename' containing the matched files.
+
+## char *GetBindingDirPath_(afb_api_t api)
+
+For binding with a version >= 3, get the root directory path.
+
+* `api` : pointer to the AFB API.
+
+Returns a string representing the path to binding root directory.
+
+## const char *getEnvDirList(const char *prefix, const char *suffix)
+
+Get the environment directory colon separated path list. This take the prefix
+add the binder's name then the suffix as environment variable name and also
+search for another variable without the binder's name (so only prefix+suffix).
+
+* `prefix`: Environment variable prefix
+* `suffix`: Environment variable suffix
+
+Returns a string representing a colon separated path list or NULL is case of
+error or none environment variables found.