1 Writing the configuration file "config.xml"
2 ===========================================
7 The file **config.xml** describes important data of the application
10 - the unique identifier of the application
11 - the name of the application
12 - the type of the application
13 - the icon of the application
14 - the permissions linked to the application
15 - the services and dependancies of the application
17 The file MUST be at the root of the widget and MUST be case sensitively name
20 The file **config.xml** is a XML file described by the document
23 Example of "config.xml"
24 -----------------------
26 Here is the example of the config file for the QML application SmartHome.
29 <?xml version="1.0" encoding="UTF-8"?>
30 <widget xmlns="http://www.w3.org/ns/widgets" id="smarthome" version="0.1">
31 <name>SmartHome</name>
32 <icon src="smarthome.png"/>
33 <content src="qml/smarthome/smarthome.qml" type="text/vnd.qt.qml"/>
35 This is the Smarthome QML demo application.
36 It shows some user interfaces for controlling an automated house.
37 The user interface is completely done with QML.
39 <author>Qt team</author>
40 <license>GPL</license>
44 Standard elements of "config.xml"
45 ---------------------------------
47 ### The element widget
49 #### the attribute id of widget
51 The attribute *id* is mandatory (for version 2.x, blowfish) and must be unique.
53 Values for *id* are any non empty string containing only latin letters,
54 arabic digits, and the three characters '.' (dot), '-' (dash) and
57 Authors can use a mnemonic id or can pick a unique id using
58 command **uuid** or **uuidgen**.
60 #### the attribute version of widget
62 The attribute *version* is mandatory (for version 2.x, blowfish).
64 Values for *id* are any non empty string containing only latin letters,
65 arabic digits, and the three characters '.' (dot), '-' (dash) and
68 Version values are dot separated fields MAJOR.MINOR.REVISION.
70 ### The element content
72 The element *content* is mandatory (for version 2.x, blowfish) and must designate a file
73 (subject to localisation) with its attribute *src*.
75 The content designed depends on its type. See below for the known types.
79 The element *icon* is mandatory (for version 2.x, blowfish) and must
80 be unique. It must designate an image file with its attribute *src*.
82 Known widget types and content
83 ------------------------------
85 The configuration file ***/etc/afm/afm-launch.conf*** defines the types
86 of widget known and how to launch it.
88 Known types for the type of content are (for version 2.x, blowfish):
92 content.src designates the home page of the application
94 - ***application/x-executable***:
96 content.src designates the relative path of the binary
98 - ***application/vnd.agl.url***:
100 content.src designates the url to be used
102 - ***application/vnd.agl.service***:
103 AGL service defined as a binder,
104 content.src designates the directory of provided binders,
105 http content, if any, must be put in the subdirectory ***htdocs*** of the widget
107 - ***application/vnd.agl.native***:
108 Native application with AGL service defined as a binder,
109 content.src designates the relative path of the binary,
110 bindings, if any must be put in the subdirectory ***lib*** of the widget,
111 http content, if any, must be put in the subdirectory ***htdocs*** of the widget
113 - ***text/vnd.qt.qml***, ***application/vnd.agl.qml***:
115 content.src designate the relative path of the QML root,
116 imports must be put in the subdirectory ***imports*** of the widget
118 - ***application/vnd.agl.qml.hybrid***:
119 QML application with bindings,
120 content.src designate the relative path of the QML root,
121 bindings, if any must be put in the subdirectory ***lib*** of the widget,
122 imports must be put in the subdirectory ***imports*** of the widget
124 - ***application/vnd.agl.html.hybrid***:
126 content.src designates the home page of the application,
127 bindings, if any must be put in the subdirectory ***lib*** of the widget,
128 http content must be put in the subdirectory ***htdocs*** of the widget
134 The AGL framework uses the feature tag for specifying security and binding
135 requirement of the widget.
137 The current version of AGL (up to 2.0.1, blowfish) has no fully implemented
140 The features planned to be implemented are described below.
142 ### feature name="urn:AGL:required-binding"
144 List of the bindings required by the widget.
146 Each required binding must be explicited using a <param> entry.
148 #### param name=[required binding name]
152 - required: the binding is mandatorily needed except if the feature
153 isn't required (required="false") and in that case it is optional.
154 - optional: the binding is optional
156 ### feature name="urn:AGL:required-permission"
158 List of the permissions required by the widget.
160 Each required permission must be explicited using a <param> entry.
162 #### param name=[required permission name]
166 - required: the permission is mandatorily needed except if the feature
167 isn't required (required="false") and in that case it is optional.
168 - optional: the permission is optional
170 ### feature name="urn:AGL:provided-binding"
172 Use this feature for each provided binding of the widget.
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: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.
225 This level defines the level of accreditation required to get the given
226 permission. The accreditions are given by signatures of widgets.
230 [widgets]: http://www.w3.org/TR/widgets "Packaged Web Apps"
231 [widgets-digsig]: http://www.w3.org/TR/widgets-digsig "XML Digital Signatures for Widgets"
232 [libxml2]: http://xmlsoft.org/html/index.html "libxml2"
233 [app-manifest]: http://www.w3.org/TR/appmanifest "Web App Manifest"