aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosé Bollo <jose.bollo@iot.bzh>2016-05-30 15:00:57 +0200
committerJosé Bollo <jose.bollo@iot.bzh>2016-05-30 15:51:50 +0200
commitec667b3dfe10945dc6fa140ef5acaaf10a437db9 (patch)
tree8eff27cc0b2811061819861cc797051bfd25bdce
parent5b5a2534e5effa69c800c2384c90dff4bc887c09 (diff)
update documentation
Change-Id: I64a28ead6a82658dd9a95c7d54742dbe018ef574 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
-rw-r--r--doc/afb-application-writing.html8
-rw-r--r--doc/afb-application-writing.md8
-rw-r--r--doc/afb-overview.html7
-rw-r--r--doc/afb-overview.md7
-rw-r--r--doc/afb-plugins-overview.md2
-rw-r--r--doc/afb-tests-overview.html106
-rw-r--r--doc/afb-tests-overview.md83
7 files changed, 175 insertions, 46 deletions
diff --git a/doc/afb-application-writing.html b/doc/afb-application-writing.html
index f1e89904..e0bb42c0 100644
--- a/doc/afb-application-writing.html
+++ b/doc/afb-application-writing.html
@@ -109,13 +109,15 @@ of the client named session.</p>
<h3>Handling sessions</h3>
<p>Plugins and features of the binder need to keep track of the client
-instances. In principle, a binder afb-daemon is launched by application
-instance. But for services, a binder</p>
+instances. This of importance for plugins running as service
+because they may have to separate the data of each client.</p>
+
+<p>For common HTML5 browser running an HTML5 application.</p>
<a name="Exchanging.tokens"></a>
<h3>Exchanging tokens</h3>
-<p>At start, the framework communicate a common secret to both the binder
+<p>At start, the framework communicates a common secret to both the binder
and its client: the application. This initial secret is the
initial token.</p>
diff --git a/doc/afb-application-writing.md b/doc/afb-application-writing.md
index ead31a91..70dde783 100644
--- a/doc/afb-application-writing.md
+++ b/doc/afb-application-writing.md
@@ -74,12 +74,14 @@ of the client named session.
### Handling sessions
Plugins and features of the binder need to keep track of the client
-instances. In principle, a binder afb-daemon is launched by application
-instance. But for services, a binder
+instances. This of importance for plugins running as service
+because they may have to separate the data of each client.
+
+For common HTML5 browser running an HTML5 application.
### Exchanging tokens
-At start, the framework communicate a common secret to both the binder
+At start, the framework communicates a common secret to both the binder
and its client: the application. This initial secret is the
initial token.
diff --git a/doc/afb-overview.html b/doc/afb-overview.html
index 8e03ff10..839d606c 100644
--- a/doc/afb-overview.html
+++ b/doc/afb-overview.html
@@ -198,6 +198,10 @@ API of its plugins.</p>
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
</code></pre>
+<p>For this case, the binder afb-daemon takes care to attribute one single session
+context to each client instance. It allows plugins to store and retrieve data
+associated to each of its client.</p>
+
<a name="The.plugins.of.the.binder.afb-daemon"></a>
<h2>The plugins of the binder afb-daemon</h2>
@@ -214,7 +218,8 @@ written with any language through web technologies ala JSON RPC.</p>
</ol>
-<p>A specific document shows</p>
+<p>A specific document explains how to write an afb-daemon binder plugin:
+<a href="afb-plugin-writing.html">HOWTO WRITE a PLUGIN for AFB-DAEMON</a></p>
<a name="Launching.the.binder.afb-daemon"></a>
<h2>Launching the binder afb-daemon</h2>
diff --git a/doc/afb-overview.md b/doc/afb-overview.md
index 37fdd0c3..2ae8e066 100644
--- a/doc/afb-overview.md
+++ b/doc/afb-overview.md
@@ -166,6 +166,10 @@ In that case, the figure showing the whole aspects is
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
+For this case, the binder afb-daemon takes care to attribute one single session
+context to each client instance. It allows plugins to store and retrieve data
+associated to each of its client.
+
The plugins of the binder afb-daemon
------------------------------------
@@ -181,7 +185,8 @@ This simple idea is declined to serves multiple purposes:
3. provide customers services
-A specific document shows
+A specific document explains how to write an afb-daemon binder plugin:
+[HOWTO WRITE a PLUGIN for AFB-DAEMON](afb-plugin-writing.html)
Launching the binder afb-daemon
diff --git a/doc/afb-plugins-overview.md b/doc/afb-plugins-overview.md
index 18b67b17..7e351b6a 100644
--- a/doc/afb-plugins-overview.md
+++ b/doc/afb-plugins-overview.md
@@ -1,6 +1,6 @@
# Overview of plugins shipped with AFB-Daemon
Version: 1
- Date: 30 May 2016
+ Date: 30 mai 2016
Author: Manuel Bachmann
diff --git a/doc/afb-tests-overview.html b/doc/afb-tests-overview.html
new file mode 100644
index 00000000..f5dcb646
--- /dev/null
+++ b/doc/afb-tests-overview.html
@@ -0,0 +1,106 @@
+<html>
+<head>
+ <link rel="stylesheet" type="text/css" href="doc.css">
+ <meta charset="UTF-8">
+</head>
+<body>
+<a name="Overview.of.tests.shipped.with.AFB-Daemon"></a>
+<h1>Overview of tests shipped with AFB-Daemon</h1>
+
+<pre><code>Version: 1
+Date: 30 mai 2016
+Author: Manuel Bachmann
+</code></pre>
+
+<a name="List.of.tests"></a>
+<h2>List of tests</h2>
+
+<p>Here are the tests shipped in the source tree:</p>
+
+<ul>
+<li><strong>afb-client-demo</strong> (command-line WebSockets)</li>
+<li><strong>token-websock.qml</strong> (Qt/QML WebSockets)</li>
+<li><strong>*.html</strong> (HTML5/JS HTTP-REST &amp; WebSockets)</li>
+</ul>
+
+
+<a name="Detail.of.tests"></a>
+<h2>Detail of tests</h2>
+
+<a name="afb-client-demo..command-line.WebSockets."></a>
+<h3>afb-client-demo (command-line WebSockets)</h3>
+
+<p>This clients interactively calls plugins APIs from the command line, using the binder
+<a href="https://en.wikipedia.org/wiki/WebSocket">WebSockets</a> facility.</p>
+
+<p>If <em>afb-daemon</em> has been launched with the following parameters:</p>
+
+<pre><code>$ afb-daemon --port=1234 --token=123456 [...]
+</code></pre>
+
+<p>Then run the client with :</p>
+
+<pre><code>afb-client-demo ws://localhost:1234/api?token=123456 [&lt;api&gt; &lt;verb&gt; [&lt;json-data&gt;]]
+</code></pre>
+
+<p>For instance, to initialize the Audio plugin from the command line :</p>
+
+<pre><code>afb-client-demo ws://localhost:1234/api?token=123456
+</code></pre>
+
+<p>The command doesn&rsquo;t return. You should type requests of type <api> <verb> [&lt;json-data>].
+So, try:</p>
+
+<pre><code>auth connect
+audio init
+</code></pre>
+
+<p><br /></p>
+
+<a name="token-websock.qml..Qt.QML.WebSockets."></a>
+<h3>token-websock.qml (Qt/QML WebSockets)</h3>
+
+<p>If <em>afb-daemon</em> has been launched with the following parameters:</p>
+
+<pre><code>$ afb-daemon --port=1234 --token=123456 [...]
+</code></pre>
+
+<p>and Qt5 is installed.</p>
+
+<p>For installing Qt5 on <strong>Ubuntu 16.04</strong>:</p>
+
+<pre><code>$ apt-get install qmlscene qml-module-qtwebsockets qml-module-qtquick-controls
+</code></pre>
+
+<p>For installing Qt5 on <strong>Fedora 23</strong> :</p>
+
+<pre><code>$ dnf install qt5-qtdeclarative-devel qt5-qtwebsockets-devel qt5-qtquickcontrols
+</code></pre>
+
+<p>Then run the client with :</p>
+
+<pre><code>qmlscene test/token-websock.qml
+</code></pre>
+
+<p>and interactively press the buttons, &ldquo;Connect&rdquo;, &ldquo;Refresh&rdquo;, &ldquo;Logout&rdquo;.</p>
+
+<p><br /></p>
+
+<a name="L..html..HTML5.JS.HTTP-REST..amp..WebSockets."></a>
+<h3>*.html (HTML5/JS HTTP-REST &amp; WebSockets)</h3>
+
+<p>If <em>afb-daemon</em> has been launched with the following parameters:</p>
+
+<pre><code>$ afb-daemon --port=1234 --rootdir=$PWD/test [...]
+</code></pre>
+
+<p><em>(&ldquo;$PWD/test</em>&rdquo; being the &ldquo;test&rdquo; subdirectory of the source tree)_</p>
+
+<p>Then open your preferred Web browser, connect to the following URL:</p>
+
+<pre><code>http://localhost:1234
+</code></pre>
+
+<p>and interactively run the various tests.</p>
+</body>
+</html>
diff --git a/doc/afb-tests-overview.md b/doc/afb-tests-overview.md
index a4632d49..4ea25275 100644
--- a/doc/afb-tests-overview.md
+++ b/doc/afb-tests-overview.md
@@ -1,38 +1,44 @@
# Overview of tests shipped with AFB-Daemon
Version: 1
- Date: 30 May 2016
+ Date: 30 mai 2016
Author: Manuel Bachmann
## List of tests
- Here are the tests shipped in the source tree:
- * **afb-client-demo** (command-line WebSockets)
- * **token-websock.qml** (Qt/QML WebSockets)
- * ***.html** (HTML5/JS HTTP-REST & WebSockets)
+
+Here are the tests shipped in the source tree:
+
+* **afb-client-demo** (command-line WebSockets)
+* **token-websock.qml** (Qt/QML WebSockets)
+* ***.html** (HTML5/JS HTTP-REST & WebSockets)
## Detail of tests
### afb-client-demo (command-line WebSockets)
-This clients interactively calls plugins APIs from the command line, using the binder [WebSockets](https://en.wikipedia.org/wiki/WebSocket) facility.
+This clients interactively calls plugins APIs from the command line, using the binder
+[WebSockets](https://en.wikipedia.org/wiki/WebSocket) facility.
If _afb-daemon_ has been launched with the following parameters:
-```
-$ afb-daemon --port=1234 --token=123456 [...]
-```
+
+
+ $ afb-daemon --port=1234 --token=123456 [...]
+
Then run the client with :
-```
-afb-client-demo ws://localhost:1234/api?token=123456 <plugin> <verb>
-```
+
+ afb-client-demo ws://localhost:1234/api?token=123456 [<api> <verb> [<json-data>]]
For instance, to initialize the Audio plugin from the command line :
-```
-afb-client-demo ws://localhost:1234/api?token=123456 auth connect
-(copy-paste the "token" field from the response)
-afb-client-demo ws://localhost:1234/api?token=123456 audio init <TOKEN>
-```
+
+ afb-client-demo ws://localhost:1234/api?token=123456
+
+The command doesn't return. You should type requests of type <api> <verb> [<json-data>].
+So, try:
+
+ auth connect
+ audio init
<br />
@@ -41,22 +47,24 @@ afb-client-demo ws://localhost:1234/api?token=123456 audio init <TOKEN>
### token-websock.qml (Qt/QML WebSockets)
If _afb-daemon_ has been launched with the following parameters:
-```
-$ afb-daemon --port=1234 --token=123456 [...]
-```
-and Qt5 is installed, on **Ubuntu 16.04**:
-```
-$ apt-get install qmlscene qml-module-qtwebsockets qml-module-qtquick-controls
-```
-or on **Fedora 23** :
-```
-$ dnf install qt5-qtdeclarative-devel qt5-qtwebsockets-devel qt5-qtquickcontrols
-```
+
+ $ afb-daemon --port=1234 --token=123456 [...]
+
+and Qt5 is installed.
+
+For installing Qt5 on **Ubuntu 16.04**:
+
+ $ apt-get install qmlscene qml-module-qtwebsockets qml-module-qtquick-controls
+
+For installing Qt5 on **Fedora 23** :
+
+ $ dnf install qt5-qtdeclarative-devel qt5-qtwebsockets-devel qt5-qtquickcontrols
+
Then run the client with :
-```
-qmlscene test/token-websock.qml
-```
+
+ qmlscene test/token-websock.qml
+
and interactively press the buttons, "Connect", "Refresh", "Logout".
<br />
@@ -65,14 +73,15 @@ and interactively press the buttons, "Connect", "Refresh", "Logout".
### *.html (HTML5/JS HTTP-REST & WebSockets)
If _afb-daemon_ has been launched with the following parameters:
-```
-$ afb-daemon --port=1234 --rootdir=$PWD/test [...]
-```
+
+ $ afb-daemon --port=1234 --rootdir=$PWD/test [...]
+
_("$PWD/test_" being the "test" subdirectory of the source tree)_
Then open your preferred Web browser, connect to the following URL:
-```
-http://localhost:1234
-```
+
+ http://localhost:1234
+
and interactively run the various tests.
+