summaryrefslogtreecommitdiffstats
path: root/doc/writing-config.xml.html
diff options
context:
space:
mode:
Diffstat (limited to 'doc/writing-config.xml.html')
-rw-r--r--doc/writing-config.xml.html168
1 files changed, 168 insertions, 0 deletions
diff --git a/doc/writing-config.xml.html b/doc/writing-config.xml.html
new file mode 100644
index 0000000..35c7372
--- /dev/null
+++ b/doc/writing-config.xml.html
@@ -0,0 +1,168 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <meta charset="utf-8">
+ <meta name="generator" content="pandoc">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
+ <title>Writing the configuration file &quot;config.xml&quot;</title>
+ <style type="text/css">code{white-space: pre;}</style>
+ <style type="text/css">
+div.sourceCode { overflow-x: auto; }
+table.sourceCode, tr.sourceCode, td.lineNumbers, td.sourceCode {
+ margin: 0; padding: 0; vertical-align: baseline; border: none; }
+table.sourceCode { width: 100%; line-height: 100%; }
+td.lineNumbers { text-align: right; padding-right: 4px; padding-left: 4px; color: #aaaaaa; border-right: 1px solid #aaaaaa; }
+td.sourceCode { padding-left: 5px; }
+code > span.kw { color: #007020; font-weight: bold; } /* Keyword */
+code > span.dt { color: #902000; } /* DataType */
+code > span.dv { color: #40a070; } /* DecVal */
+code > span.bn { color: #40a070; } /* BaseN */
+code > span.fl { color: #40a070; } /* Float */
+code > span.ch { color: #4070a0; } /* Char */
+code > span.st { color: #4070a0; } /* String */
+code > span.co { color: #60a0b0; font-style: italic; } /* Comment */
+code > span.ot { color: #007020; } /* Other */
+code > span.al { color: #ff0000; font-weight: bold; } /* Alert */
+code > span.fu { color: #06287e; } /* Function */
+code > span.er { color: #ff0000; font-weight: bold; } /* Error */
+code > span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */
+code > span.cn { color: #880000; } /* Constant */
+code > span.sc { color: #4070a0; } /* SpecialChar */
+code > span.vs { color: #4070a0; } /* VerbatimString */
+code > span.ss { color: #bb6688; } /* SpecialString */
+code > span.im { } /* Import */
+code > span.va { color: #19177c; } /* Variable */
+code > span.cf { color: #007020; font-weight: bold; } /* ControlFlow */
+code > span.op { color: #666666; } /* Operator */
+code > span.bu { } /* BuiltIn */
+code > span.ex { } /* Extension */
+code > span.pp { color: #bc7a00; } /* Preprocessor */
+code > span.at { color: #7d9029; } /* Attribute */
+code > span.do { color: #ba2121; font-style: italic; } /* Documentation */
+code > span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */
+code > span.cv { color: #60a0b0; font-weight: bold; font-style: italic; } /* CommentVar */
+code > span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */
+ </style>
+ <link rel="stylesheet" href="doc.css">
+ <!--[if lt IE 9]>
+ <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
+ <![endif]-->
+</head>
+<body>
+<header>
+<h1 class="title">Writing the configuration file &quot;config.xml&quot;</h1>
+<h3 class="date">02 septembre 2016</h3>
+</header>
+<nav id="TOC">
+<ul>
+<li><a href="#writing-the-configuration-file-config.xml">Writing the configuration file &quot;config.xml&quot;</a><ul>
+<li><a href="#about-config.xml">About &quot;config.xml&quot;</a></li>
+<li><a href="#example-of-config.xml">Example of &quot;config.xml&quot;</a></li>
+<li><a href="#standard-elements-of-config.xml">Standard elements of &quot;config.xml&quot;</a><ul>
+<li><a href="#the-element-widget">The element widget</a></li>
+<li><a href="#the-element-content">The element content</a></li>
+<li><a href="#the-element-icon">The element icon</a></li>
+</ul></li>
+<li><a href="#known-widget-types-and-content">Known widget types and content</a></li>
+<li><a href="#agl-features">AGL features</a><ul>
+<li><a href="#feature-nameurnaglprovides-binding">feature name=&quot;urn:AGL:provides-binding&quot;</a></li>
+<li><a href="#feature-nameurnaglrequired-permission">feature name=&quot;urn:AGL:required-permission&quot;</a></li>
+<li><a href="#feature-nameurnagl-permission">feature name=&quot;urn:AGL:-permission&quot;</a></li>
+</ul></li>
+</ul></li>
+</ul>
+</nav>
+<h1 id="writing-the-configuration-file-config.xml">Writing the configuration file &quot;config.xml&quot;</h1>
+<h2 id="about-config.xml">About &quot;config.xml&quot;</h2>
+<p>The file <strong>config.xml</strong> describes important data of the application to the framework:</p>
+<ul>
+<li>the unique identifier of the application</li>
+<li>the name of the application</li>
+<li>the type of the application</li>
+<li>the icon of the application</li>
+<li>the permissions linked to the application</li>
+<li>the services and dependancies of the application</li>
+</ul>
+<p>The file MUST be at the root of the widget and MUST be case sensitively name <strong><em>config.xml</em></strong>.</p>
+<p>The file <strong>config.xml</strong> is a XML file described by the document <a href="http://www.w3.org/TR/widgets" title="Packaged Web Apps">widgets</a>.</p>
+<h2 id="example-of-config.xml">Example of &quot;config.xml&quot;</h2>
+<p>Here is the example of the config file for the QML application SmartHome.</p>
+<div class="sourceCode"><pre class="sourceCode xml"><code class="sourceCode xml"><span class="kw">&lt;?xml</span> version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;<span class="kw">?&gt;</span>
+<span class="kw">&lt;widget</span><span class="ot"> xmlns=</span><span class="st">&quot;http://www.w3.org/ns/widgets&quot;</span><span class="ot"> id=</span><span class="st">&quot;smarthome&quot;</span><span class="ot"> version=</span><span class="st">&quot;0.1&quot;</span><span class="kw">&gt;</span>
+ <span class="kw">&lt;name&gt;</span>SmartHome<span class="kw">&lt;/name&gt;</span>
+ <span class="kw">&lt;icon</span><span class="ot"> src=</span><span class="st">&quot;smarthome.png&quot;</span><span class="kw">/&gt;</span>
+ <span class="kw">&lt;content</span><span class="ot"> src=</span><span class="st">&quot;qml/smarthome/smarthome.qml&quot;</span><span class="ot"> type=</span><span class="st">&quot;text/vnd.qt.qml&quot;</span><span class="kw">/&gt;</span>
+ <span class="kw">&lt;description&gt;</span>
+ 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.
+ <span class="kw">&lt;/description&gt;</span>
+ <span class="kw">&lt;author&gt;</span>Qt team<span class="kw">&lt;/author&gt;</span>
+ <span class="kw">&lt;license&gt;</span>GPL<span class="kw">&lt;/license&gt;</span>
+<span class="kw">&lt;/widget&gt;</span></code></pre></div>
+<h2 id="standard-elements-of-config.xml">Standard elements of &quot;config.xml&quot;</h2>
+<h3 id="the-element-widget">The element widget</h3>
+<h4 id="the-attribute-id-of-widget">the attribute id of widget</h4>
+<p>The attribute <em>id</em> is mandatory (for version 2.x, blowfish) and must be unique.</p>
+<p>Values for <em>id</em> are any non empty string containing only latin letters, arabic digits, and the three characters '.' (dot), '-' (dash) and '_' (underscore).</p>
+<p>Authors can use a mnemonic id or can pick a unique id using command <strong>uuid</strong> or <strong>uuidgen</strong>.</p>
+<h4 id="the-attribute-version-of-widget">the attribute version of widget</h4>
+<p>The attribute <em>version</em> is mandatory (for version 2.x, blowfish).</p>
+<p>Values for <em>id</em> are any non empty string containing only latin letters, arabic digits, and the three characters '.' (dot), '-' (dash) and '_' (underscore).</p>
+<p>Version values are dot separated fields MAJOR.MINOR.REVISION.</p>
+<h3 id="the-element-content">The element content</h3>
+<p>The element <em>content</em> is mandatory (for version 2.x, blowfish) and must designate a file (subject to localisation) with its attribute <em>src</em>.</p>
+<p>The content designed depends on its type. See below for the known types.</p>
+<h3 id="the-element-icon">The element icon</h3>
+<p>The element <em>icon</em> is mandatory (for version 2.x, blowfish) and must be unique. It must designate an image file with its attribute <em>src</em>.</p>
+<h2 id="known-widget-types-and-content">Known widget types and content</h2>
+<p>The configuration file <strong><em>/etc/afm/afm-launch.conf</em></strong> defines the types of widget known and how to launch it.</p>
+<p>Known types for the type of content are (for version 2.x, blowfish):</p>
+<ul>
+<li><p><strong><em>text/html</em></strong>: HTML application, content.src designates the home page of the application</p></li>
+<li><p><strong><em>application/x-executable</em></strong>: Native application, content.src designates the relative path of the binary</p></li>
+<li><p><strong><em>application/vnd.agl.url</em></strong>: Internet url, content.src designates the url to be used</p></li>
+<li><p><strong><em>application/vnd.agl.service</em></strong>: AGL service defined as a binder, content.src designates the directory of provided binders, http content, if any, must be put in the subdirectory <strong><em>htdocs</em></strong> of the widget</p></li>
+<li><p><strong><em>application/vnd.agl.native</em></strong>: Native application with AGL service defined as a binder, content.src designates the relative path of the binary, bindings, if any must be put in the subdirectory <strong><em>lib</em></strong> of the widget, http content, if any, must be put in the subdirectory <strong><em>htdocs</em></strong> of the widget</p></li>
+<li><p><strong><em>text/vnd.qt.qml</em></strong>, <strong><em>application/vnd.agl.qml</em></strong>: QML application, content.src designate the relative path of the QML root, imports must be put in the subdirectory <strong><em>imports</em></strong> of the widget</p></li>
+<li><p><strong><em>application/vnd.agl.qml.hybrid</em></strong>: QML application with bindings, content.src designate the relative path of the QML root, bindings, if any must be put in the subdirectory <strong><em>lib</em></strong> of the widget, imports must be put in the subdirectory <strong><em>imports</em></strong> of the widget</p></li>
+<li><p><strong><em>application/vnd.agl.html.hybrid</em></strong>: HTML application, content.src designates the home page of the application, bindings, if any must be put in the subdirectory <strong><em>lib</em></strong> of the widget, http content must be put in the subdirectory <strong><em>htdocs</em></strong> of the widget</p></li>
+</ul>
+<h2 id="agl-features">AGL features</h2>
+<p>The AGL framework uses the feature tag for specifying security and binding requirement of the widget.</p>
+<p>The current version of AGL (up to 2.0.1, blowfish) has no fully implemented features.</p>
+<p>The features planned to be implemented are described below.</p>
+<h3 id="feature-nameurnaglprovides-binding">feature name=&quot;urn:AGL:provides-binding&quot;</h3>
+<p>Use this feature for each provided binding of the widget. The parameters are:</p>
+<h5 id="param-namename">param name=&quot;name&quot;</h5>
+<p>REQUIRED</p>
+<p>The value is the string that must match the binding prefix. It must be unique.</p>
+<h5 id="param-namesrc">param name=&quot;src&quot;</h5>
+<p>REQUIRED</p>
+<p>The value is the path of the shared library for the binding.</p>
+<h5 id="param-nametype">param name=&quot;type&quot;</h5>
+<p>REQUIRED</p>
+<p>Currently it must be <strong><em>application/vnd.agl.binding.v1</em></strong>.</p>
+<h5 id="param-namescope">param name=&quot;scope&quot;</h5>
+<p>REQUIRED</p>
+<p>The value indicate the availability of the binidng:</p>
+<ul>
+<li>private: used only by the widget</li>
+<li>public: available to allowed clients as a remote service (requires permission+)</li>
+<li>inline: available to allowed clients inside their binding (unsafe, requires permission+++)</li>
+</ul>
+<h5 id="param-nameneeded-binding">param name=&quot;needed-binding&quot;</h5>
+<p>OPTIONAL</p>
+<p>The value is a space separated list of binding's names that the binding needs.</p>
+<h3 id="feature-nameurnaglrequired-permission">feature name=&quot;urn:AGL:required-permission&quot;</h3>
+<p>Several permission can be listed or none whether no permission is requested for the widget.</p>
+<p>Each required permission must be explicited using a <param> entry.</p>
+<h5 id="param-namerequired-permission-name">param name=[required permission name]</h5>
+<p>The value is either:</p>
+<ul>
+<li>required: the permission is really needed.</li>
+<li>optional: the permission isn't mandatory</li>
+</ul>
+<h3 id="feature-nameurnagl-permission">feature name=&quot;urn:AGL:-permission&quot;</h3>
+</body>
+</html>