orthograph
[src/app-framework-binder.git] / doc / afb-bindings-writing.html
index 8017e19..b32912b 100644 (file)
@@ -35,7 +35,7 @@ code > span.er { color: #ff0000; font-weight: bold; }
 <header>
 <h1 class="title">HOWTO WRITE a BINDING for AFB-DAEMON</h1>
 <h2 class="author">José Bollo</h2>
-<h3 class="date">23 juin 2016</h3>
+<h3 class="date">24 juin 2016</h3>
 </header>
 <nav id="TOC">
 <ul>
@@ -82,9 +82,6 @@ code > span.er { color: #ff0000; font-weight: bold; }
 </ul>
 </nav>
 <h1 id="howto-write-a-binding-for-afb-daemon">HOWTO WRITE a BINDING for AFB-DAEMON</h1>
-<pre><code>version: 1
-Date:    09 juin 2016
-Author:  José Bollo</code></pre>
 <h2 id="summary">Summary</h2>
 <p>Afb-daemon binders serve files through HTTP protocol and offers to developers the capability to expose application API methods through HTTP or WebSocket protocol.</p>
 <p>Binder bindings are used to add API to afb-daemon. This part describes how to write a binding for afb-daemon.</p>
@@ -321,7 +318,7 @@ Author:  José Bollo</code></pre>
 <span class="co"> * Its send the object &#39;obj&#39; (can be NULL) with an</span>
 <span class="co"> * informationnal comment &#39;info (can also be NULL).</span>
 <span class="co"> *</span>
-<span class="co"> * For conveniency, the function calls &#39;json_object_put&#39; for &#39;obj&#39;.</span>
+<span class="co"> * For convenience, the function calls &#39;json_object_put&#39; for &#39;obj&#39;.</span>
 <span class="co"> * Thus, in the case where &#39;obj&#39; should remain available after</span>
 <span class="co"> * the function returns, the function &#39;json_object_get&#39; shall be used.</span>
 <span class="co"> */</span>
@@ -331,7 +328,7 @@ Author:  José Bollo</code></pre>
 <span class="co"> * Same as &#39;afb_req_success&#39; but the &#39;info&#39; is a formatting</span>
 <span class="co"> * string followed by arguments.</span>
 <span class="co"> *</span>
-<span class="co"> * For conveniency, the function calls &#39;json_object_put&#39; for &#39;obj&#39;.</span>
+<span class="co"> * For convenience, the function calls &#39;json_object_put&#39; for &#39;obj&#39;.</span>
 <span class="co"> * Thus, in the case where &#39;obj&#39; should remain available after</span>
 <span class="co"> * the function returns, the function &#39;json_object_get&#39; shall be used.</span>
 <span class="co"> */</span>
@@ -346,7 +343,7 @@ Author:  José Bollo</code></pre>
 <span class="co"> * to call afb_req_success(NULL, info). Thus even if possible it</span>
 <span class="co"> * is strongly recommended to NEVER use &quot;success&quot; for status.</span>
 <span class="co"> *</span>
-<span class="co"> * For conveniency, the function calls &#39;json_object_put&#39; for &#39;obj&#39;.</span>
+<span class="co"> * For convenience, the function calls &#39;json_object_put&#39; for &#39;obj&#39;.</span>
 <span class="co"> * Thus, in the case where &#39;obj&#39; should remain available after</span>
 <span class="co"> * the function returns, the function &#39;json_object_get&#39; shall be used.</span>
 <span class="co"> */</span>
@@ -356,13 +353,13 @@ Author:  José Bollo</code></pre>
 <span class="co"> * Same as &#39;afb_req_fail&#39; but the &#39;info&#39; is a formatting</span>
 <span class="co"> * string followed by arguments.</span>
 <span class="co"> *</span>
-<span class="co"> * For conveniency, the function calls &#39;json_object_put&#39; for &#39;obj&#39;.</span>
+<span class="co"> * For convenience, the function calls &#39;json_object_put&#39; for &#39;obj&#39;.</span>
 <span class="co"> * Thus, in the case where &#39;obj&#39; should remain available after</span>
 <span class="co"> * the function returns, the function &#39;json_object_get&#39; shall be used.</span>
 <span class="co"> */</span>
 <span class="dt">void</span> afb_req_fail_f(<span class="kw">struct</span> afb_req req, <span class="dt">const</span> <span class="dt">char</span> *status, <span class="dt">const</span> <span class="dt">char</span> *info, ...);</code></pre>
 <blockquote>
-<p>For conveniency, these functions automatically call <strong>json_object_put</strong> to release <strong>obj</strong>. Because <strong>obj</strong> usage count is null after being passed to a reply function, it SHOULD not be used anymore. If exceptionally <strong>obj</strong> needs to remain usable after reply function then using <strong>json_object_get</strong> on <strong>obj</strong> to increase usage count and cancels the effect the <strong>json_object_put</strong> is possible.</p>
+<p>For convenience, these functions automatically call <strong>json_object_put</strong> to release <strong>obj</strong>. Because <strong>obj</strong> usage count is null after being passed to a reply function, it SHOULD not be used anymore. If exceptionally <strong>obj</strong> needs to remain usable after reply function then using <strong>json_object_get</strong> on <strong>obj</strong> to increase usage count and cancels the effect the <strong>json_object_put</strong> is possible.</p>
 </blockquote>
 <h2 id="getting-argument-of-invocation">Getting argument of invocation</h2>
 <p>Many methods expect arguments. Afb-daemon's bindings retrieve arguments by name and not by position.</p>
@@ -784,7 +781,7 @@ Author:  José Bollo</code></pre>
 <span class="co"> * &#39;object&#39; can be NULL.</span>
 <span class="co"> * &#39;daemon&#39; MUST be the daemon given in interface when activating the binding.</span>
 <span class="co"> *</span>
-<span class="co"> * For conveniency, the function calls &#39;json_object_put&#39; for &#39;object&#39;.</span>
+<span class="co"> * For convenience, the function calls &#39;json_object_put&#39; for &#39;object&#39;.</span>
 <span class="co"> * Thus, in the case where &#39;object&#39; should remain available after</span>
 <span class="co"> * the function returns, the function &#39;json_object_get&#39; shall be used.</span>
 <span class="co"> */</span>