diff options
author | Jose Bollo <jose.bollo@iot.bzh> | 2018-10-09 11:37:12 +0200 |
---|---|---|
committer | Jose Bollo <jose.bollo@iot.bzh> | 2018-10-10 10:07:25 +0200 |
commit | 43bc2e5178749719ea35891df5ad6fdd22c5b365 (patch) | |
tree | 71e4dc8a69c18912e58c7513755b55dd5d682cc6 /docs/2.2-config.xml.md | |
parent | 91baca1e612e8323885dfcfe17267a96527fa3c5 (diff) |
docs: Improve documentating 'required-binding'
The documentation was not clear because the
headers wasn't set correctly.
Bug-AGL: SPEC-1800
Change-Id: Ibb5ecf3becdaad1b560e6718d41b81fdf55fe9df
Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
Diffstat (limited to 'docs/2.2-config.xml.md')
-rw-r--r-- | docs/2.2-config.xml.md | 63 |
1 files changed, 59 insertions, 4 deletions
diff --git a/docs/2.2-config.xml.md b/docs/2.2-config.xml.md index 39ea23d..2be9371 100644 --- a/docs/2.2-config.xml.md +++ b/docs/2.2-config.xml.md @@ -119,13 +119,13 @@ is called the "main" unit. List of the api required by the widget. -Each required api must be explicited using a `<param>` entry. +Each required api must be explicit using a `<param>` entry. Example: ```xml <feature name="urn:AGL:widget:required-api"> - <param name="#target" value="main" />> + <param name="#target" value="main" /> <param name="gps" value="auto" /> <param name="afm-main" value="link" /> </feature> @@ -156,7 +156,8 @@ The name is the name of the required API. The value describes how to connect to the required api. It is either: -- local: OBSOLETE, PROVIDED FOR COMPATIBILITY +- local: OBSOLETE SINCE FF (AGL6), PROVIDED FOR COMPATIBILITY + Use the feature **urn:AGL:widget:required-binding** instead. The binding is a local shared object. In that case, the name is the relative path of the shared object to be loaded. @@ -176,6 +177,36 @@ It is either: In that case, the name includes data to access the service. Example: `<param name="log:https://oic@agl.iot.bzh/cloud/log" value="cloud" />` +### required-binding: feature name="urn:AGL:widget:required-binding" + +List of the bindings required by the widget. + +Note: Since AGL 6 (FF - Funky Flounder), +the binder implements bindings version 3 that allow the declaration +of 0, 1 or more APIs by one binding. In other words, the equivalency +one binding = one API is lost. At the same time the framework added +the ability to use bindings exported by other widgets. + +Each required binding must be explicit using a `<param>` entry. + +Example: + +```xml +<feature name="urn:AGL:widget:required-binding"> + <param name="libexec/binding-gps.so" value="local" /> + <param name="extra" value="extern" /> +</feature> +``` + +This will be *virtually* translated for mustaches to the JSON + +```json +"required-binding": [ + { "name": "libexec/binding-gps.so", "value": "local" }, + { "name": "extra", "value": "extern" } + ] +``` + #### required-binding: param name=[name or path] The name or the path of the required BINDING. @@ -192,6 +223,30 @@ It is either: The binding is external. The name is the exported binding name. See provided-binding. +### provided-binding: feature name="urn:AGL:widget:provided-binding" + +This feature allows to export a binding to other binders. +The bindings whose relative name is given as value is exported to +other binders under the given name. + +Each provided binding must be explicit using a `<param>` entry. + +Example: + +```xml +<feature name="urn:AGL:widget:provided-binding"> + <param name="extra" value="export/binding-gps.so" /> +</feature> +``` + +This will be *virtually* translated for mustaches to the JSON + +```json +"provided-binding": [ + { "name": "extra", "value": "export/binding-gps.so" } + ] +``` + #### provided-binding: param name=[exported name] Exports a local binding to other applications. @@ -202,7 +257,7 @@ The value must contain the path to the exported binding. List of the permissions required by the unit. -Each required permission must be explicited using a `<param>` entry. +Each required permission must be explicit using a `<param>` entry. Example: |