1 The configuration file config.xml
4 The widgets are described by the W3C's technical recommendations
5 [Packaged Web Apps (Widgets)][widgets] and [XML Digital Signatures for Widgets][widgets-digsig]
6 that specifies the configuration file **config.xml**.
11 The file **config.xml** describes important data of the application
14 - the unique identifier of the application
15 - the name of the application
16 - the type of the application
17 - the icon of the application
18 - the permissions linked to the application
19 - the services and dependancies of the application
21 The file MUST be at the root of the widget and MUST be case sensitively name
24 The file **config.xml** is a XML file described by the document
27 Here is the example of the config file for the QML application SmartHome.
30 <?xml version="1.0" encoding="UTF-8"?>
31 <widget xmlns="http://www.w3.org/ns/widgets" id="smarthome" version="0.1">
32 <name>SmartHome</name>
33 <icon src="smarthome.png"/>
34 <content src="qml/smarthome/smarthome.qml" type="text/vnd.qt.qml"/>
35 <description>This is the Smarthome QML demo application. It shows some user interfaces for controlling an
36 automated house. The user interface is completely done with QML.</description>
37 <author>Qt team</author>
38 <license>GPL</license>
42 The most important items are:
44 - **<widget id="......"\>**: gives the id of the widget. It must be unique.
46 - **<widget version="......"\>**: gives the version of the widget
48 - **<icon src="..."\>**: gives a path to the icon of the application
49 (can be repeated with different sizes)
51 - **<content src="..." type="..."\>**: this indicates the entry point and its type.
53 Standard elements of "config.xml"
54 ---------------------------------
56 ### The element widget
58 #### the attribute id of widget
60 The attribute *id* is mandatory (for version 2.x, blowfish) and must be unique.
62 Values for *id* are any non empty string containing only latin letters,
63 arabic digits, and the three characters '.' (dot), '-' (dash) and
66 Authors can use a mnemonic id or can pick a unique id using
67 command **uuid** or **uuidgen**.
69 ### the attribute version of widget
71 The attribute *version* is mandatory (for version 2.x, blowfish).
73 Values for *version* are any non empty string containing only latin letters,
74 arabic digits, and the three characters '.' (dot), '-' (dash) and
77 Version values are dot separated fields MAJOR.MINOR.REVISION.
78 Such version would preferabily follow guidelines of
79 [semantic versionning][semantic-version].
81 ### The element content
83 The element *content* is mandatory (for version 2.x, blowfish) and must designate a file
84 (subject to localisation) with its attribute *src*.
86 The content designed depends on its type. See below for the known types.
90 The element *icon* is mandatory (for version 2.x, blowfish) and must
91 be unique. It must designate an image file with its attribute *src*.
96 The AGL framework uses the feature tag for specifying security and binding
97 requirement of the widget.
99 The current version of AGL (up to 2.0.1, blowfish) has no fully implemented
102 The features planned to be implemented are described below.
104 ### feature name="urn:AGL:widget:required-api"
106 List of the api required by the widget.
108 Each required api must be explicited using a <param> entry.
112 <feature name="urn:AGL:widget:required-api">
113 <param name="urn:AGL:permission:A" value="required" />
114 <param name="urn:AGL:permission:B" value="optional" />
118 This will be *virtually* translated for mustaches to the JSON
122 { "name": "urn:AGL:permission:A", "value": "required", "required": true },
123 { "name": "urn:AGL:permission:A", "value": "optional", "optional": true }
125 "urn:AGL:permission:A": { "name": "urn:AGL:permission:A", "value": "required", "required": true },
126 "urn:AGL:permission:B": { "name": "urn:AGL:permission:B", "value": "optional", "optional": true }
130 #### param name="#target"
132 Declares the name of the component requiring the listed bindings.
133 Only one instance of the param "#target" is allowed.
134 When there is not instance of the param
137 - required: the binding is mandatorily needed except if the feature
138 isn't required (required="false") and in that case it is optional.
139 - optional: the binding is optional
141 #### param name=[required api name]
145 - required: the binding is mandatorily needed except if the feature
146 isn't required (required="false") and in that case it is optional.
147 - optional: the binding is optional
149 ### feature name="urn:AGL:widget:required-permission"
151 List of the permissions required by the widget.
153 Each required permission must be explicited using a <param> entry.
155 #### param name=[required permission name]
159 - required: the permission is mandatorily needed except if the feature
160 isn't required (required="false") and in that case it is optional.
161 - optional: the permission is optional
163 ### feature name="urn:AGL:widget:provided-api"
165 Use this feature for each provided api of the widget.
168 #### param name="subid"
172 The value is the string that must match the binding prefix.
175 #### param name="name"
179 The value is the string that must match the binding prefix.
182 #### param name="src"
186 The value is the path of the shared library for the binding.
188 #### param name="type"
192 Currently it must be ***application/vnd.agl.binding.v1***.
195 #### param name="scope"
199 The value indicate the availability of the binidng:
201 - private: used only by the widget
202 - public: available to allowed clients as a remote service (requires permission+)
203 - inline: available to allowed clients inside their binding (unsafe, requires permission+++)
205 #### param name="needed-binding"
209 The value is a space separated list of binding's names that the binding needs.
211 ### feature name="urn:AGL:widget:defined-permission"
213 Each required permission must be explicited using a <param> entry.
215 #### param name=[defined permission name]
217 The value is the level of the defined permission.
226 This level defines the level of accreditation required to get the given
227 permission. The accreditions are given by signatures of widgets.
232 The configuration file ***/etc/afm/afm-unit.conf*** defines the types
233 of widget known and how to launch it.
235 Known types for the type of content are (for version 2.x, blowfish):
239 content.src designates the home page of the application
241 - ***application/x-executable***:
243 content.src designates the relative path of the binary
245 - ***application/vnd.agl.url***:
247 content.src designates the url to be used
249 - ***application/vnd.agl.service***:
250 AGL service defined as a binder,
251 content.src designates the directory of provided binders,
252 http content, if any, must be put in the subdirectory ***htdocs*** of the widget
254 - ***application/vnd.agl.native***:
255 Native application with AGL service defined as a binder,
256 content.src designates the relative path of the binary,
257 bindings, if any must be put in the subdirectory ***lib*** of the widget,
258 http content, if any, must be put in the subdirectory ***htdocs*** of the widget
260 - ***text/vnd.qt.qml***, ***application/vnd.agl.qml***:
262 content.src designate the relative path of the QML root,
263 imports must be put in the subdirectory ***imports*** of the widget
265 - ***application/vnd.agl.qml.hybrid***:
266 QML application with bindings,
267 content.src designate the relative path of the QML root,
268 bindings, if any must be put in the subdirectory ***lib*** of the widget,
269 imports must be put in the subdirectory ***imports*** of the widget
271 - ***application/vnd.agl.html.hybrid***:
273 content.src designates the home page of the application,
274 bindings, if any must be put in the subdirectory ***lib*** of the widget,
275 http content must be put in the subdirectory ***htdocs*** of the widget
280 [widgets]: http://www.w3.org/TR/widgets "Packaged Web Apps"
281 [widgets-digsig]: http://www.w3.org/TR/widgets-digsig "XML Digital Signatures for Widgets"
282 [libxml2]: http://xmlsoft.org/html/index.html "libxml2"
283 [app-manifest]: http://www.w3.org/TR/appmanifest "Web App Manifest"
286 [meta-intel]: https://github.com/01org/meta-intel-iot-security "A collection of layers providing security technologies"
287 [widgets]: http://www.w3.org/TR/widgets "Packaged Web Apps"
288 [widgets-digsig]: http://www.w3.org/TR/widgets-digsig "XML Digital Signatures for Widgets"
289 [libxml2]: http://xmlsoft.org/html/index.html "libxml2"
290 [openssl]: https://www.openssl.org "OpenSSL"
291 [xmlsec]: https://www.aleksey.com/xmlsec "XMLSec"
292 [json-c]: https://github.com/json-c/json-c "JSON-c"
293 [d-bus]: http://www.freedesktop.org/wiki/Software/dbus "D-Bus"
294 [libzip]: http://www.nih.at/libzip "libzip"
295 [cmake]: https://cmake.org "CMake"
296 [security-manager]: https://wiki.tizen.org/wiki/Security/Tizen_3.X_Security_Manager "Security-Manager"
297 [app-manifest]: http://www.w3.org/TR/appmanifest "Web App Manifest"
298 [tizen-security]: https://wiki.tizen.org/wiki/Security "Tizen security home page"
299 [tizen-secu-3]: https://wiki.tizen.org/wiki/Security/Tizen_3.X_Overview "Tizen 3 security overview"
300 [semantic-version]: http://semver.org/ "Semantic versionning"