Prepare the Integration with systemd
[src/app-framework-main.git] / docs / widgets.md
index 5637f2c..2acc92a 100644 (file)
@@ -1,51 +1,14 @@
 The widgets
 ===========
 
-The widgets
------------
-
-The widgets are described by the technical recommendations
-[widgets] and [widgets-digsig].
+The widgets are described by the W3C's technical recommendations
+[Packaged Web Apps (Widgets)][widgets] and [XML Digital Signatures for Widgets][widgets-digsig]
 
 In summary, **widgets are ZIP files that can be signed and
 whose content is described by the file <config.xml>**.
 
-### The configuration file config.xml
-
-This is one of the important file of the widget.
-It fully describes the widget.
-
-Here is the example of the config file for the QML application SmartHome.
-
-```xml
-<?xml version="1.0" encoding="UTF-8"?>
-<widget xmlns="http://www.w3.org/ns/widgets" id="smarthome" version="0.1">
-  <name>SmartHome</name>
-  <icon src="smarthome.png"/>
-  <content src="qml/smarthome/smarthome.qml" type="text/vnd.qt.qml"/>
-  <description>This is the Smarthome QML demo application. It shows some user interfaces for controlling an 
-automated house. The user interface is completely done with QML.</description>
-  <author>Qt team</author>
-  <license>GPL</license>
-</widget>
-```
-
-The most important items are:
-
-- **\<widget id="......"\>**: gives the id of the widget. It must be unique.
-
-- **\<widget version="......"\>**: gives the version of the widget
-
-- **\<icon src="..."\>**: gives a path to the icon of the application
-  (can be repeated with different sizes)
-
-- **\<content src="..." type="..."\>**: this indicates the entry point and its type.
-  The types handled are set through the file /etc/afm/afm-launch.conf
-
-Further development will add handling of <feature> for requiring and providing
-permissions and services.
-
-### Tools for managing widgets
+Tools for managing widgets
+--------------------------
 
 This project includes tools for managing widgets.
 These tools are:
@@ -82,7 +45,16 @@ $ unzip WIDGET -d DIRECTORY
 
 *Note that DIRECTORY will be created if needed*.
 
-### Signing a widget
+Getting data about a widget file
+---------------------------------
+
+The command **wgtpkg-info** opens a widget file, reads its **config.xml**
+file and displays its content in a human readable way.
+
+Signing and packing widget
+--------------------------
+
+### Signing
 
 To sign a widget, you need a private key and its certificate.
 
@@ -103,7 +75,7 @@ Example 2: add a distributor signature
 $ wgtpkg-sign -k authority.key.pem -c authority.cert.pem DIRECTORY
 ```
 
-### Packing a widget
+### Packing
 
 This operation can be done using the command **zip** but
 we provide the tool **wgtpkg-pack** that may add checking.
@@ -112,12 +84,6 @@ Example:
 ```bash
 $ wgtpkg-pack DIRECTORY -o file.wgt
 ```
-
-### Getting data about a widget file
-
-The command **wgtpkg-info** opens a widget file, reads its **config.xml**
-file and displays its content in a human readable way.
-
 Writing a widget
 ----------------
 
@@ -185,6 +151,12 @@ This allows every user to read every file.
 The data of a user are in its directory and are labelled by the security-manager
 using the labels of the application.
 
+[widgets]:          http://www.w3.org/TR/widgets                                    "Packaged Web Apps"
+[widgets-digsig]:   http://www.w3.org/TR/widgets-digsig                             "XML Digital Signatures for Widgets"
+[libxml2]:          http://xmlsoft.org/html/index.html                              "libxml2"
+[app-manifest]:     http://www.w3.org/TR/appmanifest                                "Web App Manifest"
+
+
 [meta-intel]:       https://github.com/01org/meta-intel-iot-security                "A collection of layers providing security technologies"
 [widgets]:          http://www.w3.org/TR/widgets                                    "Packaged Web Apps"
 [widgets-digsig]:   http://www.w3.org/TR/widgets-digsig                             "XML Digital Signatures for Widgets"