summaryrefslogtreecommitdiffstats
path: root/docs/escape.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/escape.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/escape.md')
-rw-r--r--docs/escape.md37
1 files changed, 37 insertions, 0 deletions
diff --git a/docs/escape.md b/docs/escape.md
new file mode 100644
index 0000000..200e6b6
--- /dev/null
+++ b/docs/escape.md
@@ -0,0 +1,37 @@
+# Escaping helpers functions reference
+
+## char *escape_url(const char *base, const char *path, const char * const *args, size_t *length)
+
+Escape an `url` and `arguments` and returned it as a string.
+
+* `base`: representing the FQDN of the url.
+* `path`: the path to the requested page.
+* `args`: optionnal array of arguments provided for the GET request.
+* `length`: length of the returned `url`.
+
+Returns the escaped `url`.
+
+## const char *escape_args(const char * const *args, size_t *length)
+
+Escape an array of arguments and returned the lenght of the escaped arguments
+string.
+
+* `args`: array of arguments provided for the GET request.
+* `length`: length of the returned `arguments`.
+
+Returns the escaped `arguments`.
+
+## const char *escape_str(const char *str, size_t *length)
+
+Escape a string and returns it.
+
+* `str`: the string to escape.
+* `length`: length of the returned string.
+
+Returns the escaped string.
+
+## const char **unescape_args(const char *args)
+
+Unescape an argument and returns it.
+
+* `args`: the argument to unescape.