[Devel package] Doc update 10/101510/6
authorMateusz Bruno-Kaminski <m.bruno2@samsung.com>
Thu, 1 Dec 2016 09:31:07 +0000 (10:31 +0100)
committerMateusz Bruno-Kaminski <m.bruno2@samsung.com>
Wed, 14 Dec 2016 10:23:17 +0000 (11:23 +0100)
[Details] Commited changes in Markdown files, generated HTML files from Markdown.

Change-Id: I318362dfe46ac217cb9e37b456eda1fc3a6c8c45
Signed-off-by: Mateusz Bruno-Kaminski <m.bruno2@samsung.com>
doc/Tizen Avengers - WebApi Guidelines.pdf
doc/html/index.html
doc/src/devel_package.md
doc/src/implementation_cc.md
doc/src/plugin_structure.md

index 819d942825dd0c7cb8ab5a733d09fd9dc0bea26c..ac6172fc59857b9e828bce366334d124efa16273 100644 (file)
Binary files a/doc/Tizen Avengers - WebApi Guidelines.pdf and b/doc/Tizen Avengers - WebApi Guidelines.pdf differ
index cf82f401f551d4ae163005fbf8779e28fb994d36..1328643e650d0d99a6d7856c3bfc867b6188bb07 100644 (file)
@@ -12,7 +12,7 @@
        <div class="separator"></div>
        <a title="Tizen Avengers - WebApi Guidelines" class="brand" href="#" style="background-image:url(images/tizen-logo_32h.png)"></a>
        <div class="separator"></div>
-       <ul id="sections"><li class="l2"><a href="#revision-history">Revision History</a></li><li class="l2"><a href="#overview">Overview</a></li><li class="l2"><a href="#guideline">Guideline</a><ul><li class="l3"><a href="#guideline/languages">Languages</a></li><li class="l3"><a href="#guideline/coding-style">Coding style</a></li><li class="l3"><a href="#guideline/api-guide">API guide</a></li><li class="l3"><a href="#guideline/unit-test-criteria">Unit test criteria</a></li><li class="l3"><a href="#guideline/source-code">Source code</a></li><li class="l3"><a href="#guideline/license-and-boilerplate">License and Boilerplate</a></li></ul></li><li class="l2"><a href="#plugin-structure">Plugin Structure</a><ul><li class="l3"><a href="#plugin-structure/conventions">Conventions</a></li><li class="l3"><a href="#plugin-structure/structure">Structure</a></li><li class="l3"><a href="#plugin-structure/spec-file">Spec file</a></li><li class="l3"><a href="#plugin-structure/gyp-file">GYP file</a></li><li class="l3"><a href="#plugin-structure/implementation-files">Implementation files</a></li><li class="l3"><a href="#plugin-structure/plugin-flow">Plugin flow</a></li></ul></li><li class="l2"><a href="#widl">WIDL</a><ul><li class="l3"><a href="#widl/conventions">Conventions</a></li><li class="l3"><a href="#widl/architecture">Architecture</a></li><li class="l3"><a href="#widl/example">Example</a></li></ul></li><li class="l2"><a href="#tools">Tools</a><ul><li class="l3"><a href="#tools/generate-stub-code">Generate stub code</a></li><li class="l3"><a href="#tools/using-multiple-javascript-files">Using multiple JavaScript files</a></li></ul></li><li class="l2"><a href="#implementation-javascript">Implementation - JavaScript</a><ul><li class="l3"><a href="#implementation-javascript/interface-creation">Interface creation</a></li><li class="l3"><a href="#implementation-javascript/creating-manager-entity">Creating Manager entity</a></li><li class="l3"><a href="#implementation-javascript/properties-definition">Properties definition</a></li><li class="l3"><a href="#implementation-javascript/methods-definition">Methods definition</a></li><li class="l3"><a href="#implementation-javascript/exporting-interface">Exporting interface</a></li><li class="l3"><a href="#implementation-javascript/utils">Utils</a></li><li class="l3"><a href="#implementation-javascript/exceptions">Exceptions</a></li><li class="l3"><a href="#implementation-javascript/synchronous-methods">Synchronous methods</a></li><li class="l3"><a href="#implementation-javascript/asynchronous-methods">Asynchronous methods</a></li><li class="l3"><a href="#implementation-javascript/listeners">Listeners</a></li></ul></li><li class="l2"><a href="#implementation-c">Implementation - C++</a><ul><li class="l3"><a href="#implementation-c/lifecycle-and-plugin-state">Lifecycle and plugin state</a></li><li class="l3"><a href="#implementation-c/privileges">Privileges</a></li><li class="l3"><a href="#implementation-c/namespace-and-entry-points">Namespace and entry points</a></li><li class="l3"><a href="#implementation-c/plugin-structure">Plugin structure</a></li><li class="l3"><a href="#implementation-c/asynchronous-calls">Asynchronous calls</a></li><li class="l3"><a href="#implementation-c/listeners">Listeners</a></li><li class="l3"><a href="#implementation-c/logger">Logger</a></li><li class="l3"><a href="#implementation-c/error-handling">Error handling</a></li></ul></li><li class="l2"><a href="#devel-package">Devel package</a><ul><li class="l3"><a href="#devel-package/package-structure">Package structure</a></li><li class="l3"><a href="#devel-package/creating-custom-web-device-plugins-module">Creating custom web device plugins module</a></li></ul></li></ul>
+       <ul id="sections"><li class="l2"><a href="#revision-history">Revision History</a></li><li class="l2"><a href="#overview">Overview</a></li><li class="l2"><a href="#guideline">Guideline</a><ul><li class="l3"><a href="#guideline/languages">Languages</a></li><li class="l3"><a href="#guideline/coding-style">Coding style</a></li><li class="l3"><a href="#guideline/api-guide">API guide</a></li><li class="l3"><a href="#guideline/unit-test-criteria">Unit test criteria</a></li><li class="l3"><a href="#guideline/source-code">Source code</a></li><li class="l3"><a href="#guideline/license-and-boilerplate">License and Boilerplate</a></li></ul></li><li class="l2"><a href="#plugin-structure">Plugin Structure</a><ul><li class="l3"><a href="#plugin-structure/conventions">Conventions</a></li><li class="l3"><a href="#plugin-structure/structure">Structure</a></li><li class="l3"><a href="#plugin-structure/spec-file">Spec file</a></li><li class="l3"><a href="#plugin-structure/manifest-file">Manifest file</a></li><li class="l3"><a href="#plugin-structure/gyp-file">GYP file</a></li><li class="l3"><a href="#plugin-structure/implementation-files">Implementation files</a></li><li class="l3"><a href="#plugin-structure/plugin-flow">Plugin flow</a></li></ul></li><li class="l2"><a href="#widl">WIDL</a><ul><li class="l3"><a href="#widl/conventions">Conventions</a></li><li class="l3"><a href="#widl/architecture">Architecture</a></li><li class="l3"><a href="#widl/example">Example</a></li></ul></li><li class="l2"><a href="#tools">Tools</a><ul><li class="l3"><a href="#tools/generate-stub-code">Generate stub code</a></li><li class="l3"><a href="#tools/using-multiple-javascript-files">Using multiple JavaScript files</a></li></ul></li><li class="l2"><a href="#implementation-javascript">Implementation - JavaScript</a><ul><li class="l3"><a href="#implementation-javascript/interface-creation">Interface creation</a></li><li class="l3"><a href="#implementation-javascript/creating-manager-entity">Creating Manager entity</a></li><li class="l3"><a href="#implementation-javascript/properties-definition">Properties definition</a></li><li class="l3"><a href="#implementation-javascript/methods-definition">Methods definition</a></li><li class="l3"><a href="#implementation-javascript/exporting-interface">Exporting interface</a></li><li class="l3"><a href="#implementation-javascript/utils">Utils</a></li><li class="l3"><a href="#implementation-javascript/exceptions">Exceptions</a></li><li class="l3"><a href="#implementation-javascript/synchronous-methods">Synchronous methods</a></li><li class="l3"><a href="#implementation-javascript/asynchronous-methods">Asynchronous methods</a></li><li class="l3"><a href="#implementation-javascript/listeners">Listeners</a></li></ul></li><li class="l2"><a href="#implementation-c">Implementation - C++</a><ul><li class="l3"><a href="#implementation-c/lifecycle-and-plugin-state">Lifecycle and plugin state</a></li><li class="l3"><a href="#implementation-c/privileges">Privileges</a></li><li class="l3"><a href="#implementation-c/namespace-and-entry-points">Namespace and entry points</a></li><li class="l3"><a href="#implementation-c/plugin-structure">Plugin structure</a></li><li class="l3"><a href="#implementation-c/asynchronous-calls">Asynchronous calls</a></li><li class="l3"><a href="#implementation-c/listeners">Listeners</a></li><li class="l3"><a href="#implementation-c/logger">Logger</a></li><li class="l3"><a href="#implementation-c/error-handling">Error handling</a></li></ul></li><li class="l2"><a href="#devel-package">Devel package</a><ul><li class="l3"><a href="#devel-package/package-structure">Package structure</a></li><li class="l3"><a href="#devel-package/creating-custom-web-device-plugins-module">Creating custom web device plugins module</a></li></ul></li></ul>
        <div class="separator"></div>
        <div class="extra generated">
                Generated by <a href="https://github.com/DimitarChristoff/doctor" target="_blank" title="generate documentation from markdown">Doctor, MD</a>
 <td>0.1.0</td>
 <td>2015-05-15</td>
 <td>Initial Draft</td>
-<td>Wojciech Kosowicz<br><a href="mailto:w.kosowicz@samsung.com">&#x77;&#46;&#x6b;&#111;&#x73;&#x6f;&#119;&#105;&#x63;&#x7a;&#x40;&#115;&#x61;&#109;&#115;&#x75;&#110;&#x67;&#x2e;&#99;&#111;&#109;</a></td>
+<td>Wojciech Kosowicz<br><a href="mailto:w.kosowicz@samsung.com">&#119;&#x2e;&#107;&#x6f;&#x73;&#x6f;&#119;&#x69;&#x63;&#122;&#64;&#115;&#x61;&#x6d;&#115;&#117;&#110;&#103;&#46;&#99;&#x6f;&#109;</a></td>
 </tr>
 <tr>
 <td>0.2.0</td>
 <td>2015-05-22</td>
 <td>Extended version</td>
-<td>Pawel Kaczmarek<br><a href="mailto:p.kaczmarek3@samsung.com">&#112;&#46;&#107;&#x61;&#x63;&#122;&#x6d;&#97;&#x72;&#x65;&#x6b;&#x33;&#x40;&#115;&#97;&#x6d;&#115;&#x75;&#110;&#x67;&#46;&#x63;&#111;&#x6d;</a></td>
+<td>Pawel Kaczmarek<br><a href="mailto:p.kaczmarek3@samsung.com">&#112;&#x2e;&#107;&#x61;&#99;&#122;&#109;&#97;&#x72;&#101;&#x6b;&#51;&#64;&#115;&#97;&#x6d;&#115;&#x75;&#110;&#x67;&#46;&#x63;&#111;&#109;</a></td>
 </tr>
 <tr>
 <td>0.2.1</td>
 <td>2015-06-01</td>
 <td>Proofreading</td>
-<td>Rafal Galka<br><a href="mailto:r.galka@samsung.com">&#x72;&#46;&#x67;&#x61;&#108;&#107;&#x61;&#x40;&#115;&#x61;&#x6d;&#x73;&#117;&#x6e;&#x67;&#x2e;&#x63;&#111;&#x6d;</a></td>
+<td>Rafal Galka<br><a href="mailto:r.galka@samsung.com">&#x72;&#x2e;&#x67;&#x61;&#108;&#107;&#97;&#x40;&#x73;&#97;&#x6d;&#x73;&#x75;&#110;&#103;&#x2e;&#99;&#111;&#109;</a></td>
 </tr>
 <tr>
 <td>0.3.0</td>
 <td>2015-06-08</td>
 <td>Supplemented C++ implementation guide</td>
-<td>Rafal Galka<br><a href="mailto:r.galka@samsung.com">&#114;&#46;&#103;&#97;&#108;&#107;&#97;&#x40;&#x73;&#x61;&#x6d;&#115;&#x75;&#x6e;&#x67;&#x2e;&#99;&#111;&#109;</a></td>
+<td>Rafal Galka<br><a href="mailto:r.galka@samsung.com">&#114;&#x2e;&#103;&#97;&#108;&#107;&#97;&#x40;&#x73;&#97;&#109;&#x73;&#117;&#x6e;&#x67;&#x2e;&#x63;&#x6f;&#109;</a></td>
 </tr>
 <tr>
 <td>0.4.0</td>
 <td>2015-06-16</td>
 <td>Guideline</td>
-<td>Pawel Kaczmarek<br><a href="mailto:p.kaczmarek3@samsung.com">&#112;&#46;&#107;&#97;&#99;&#x7a;&#109;&#x61;&#114;&#x65;&#107;&#51;&#x40;&#x73;&#97;&#x6d;&#115;&#117;&#x6e;&#103;&#x2e;&#99;&#111;&#109;</a></td>
+<td>Pawel Kaczmarek<br><a href="mailto:p.kaczmarek3@samsung.com">&#x70;&#46;&#x6b;&#97;&#99;&#122;&#x6d;&#x61;&#x72;&#x65;&#107;&#x33;&#x40;&#x73;&#x61;&#x6d;&#x73;&#x75;&#x6e;&#103;&#x2e;&#99;&#x6f;&#x6d;</a></td>
 </tr>
 <tr>
 <td>0.5.0</td>
 <td>2015-06-18</td>
 <td>Devel package</td>
-<td>Pawel Kaczmarek<br><a href="mailto:p.kaczmarek3@samsung.com">&#112;&#x2e;&#107;&#x61;&#99;&#x7a;&#109;&#97;&#x72;&#x65;&#107;&#x33;&#x40;&#x73;&#x61;&#109;&#x73;&#x75;&#x6e;&#103;&#x2e;&#x63;&#111;&#109;</a></td>
+<td>Pawel Kaczmarek<br><a href="mailto:p.kaczmarek3@samsung.com">&#x70;&#46;&#107;&#97;&#99;&#x7a;&#109;&#97;&#114;&#101;&#107;&#x33;&#64;&#x73;&#97;&#x6d;&#115;&#x75;&#110;&#103;&#x2e;&#99;&#x6f;&#x6d;</a></td>
 </tr>
 <tr>
 <td>0.5.1</td>
 <td>2015-06-24</td>
 <td>Add info about WAPIOven.py</td>
-<td>Pawel Kaczmarek<br><a href="mailto:p.kaczmarek3@samsung.com">&#112;&#46;&#107;&#x61;&#x63;&#x7a;&#x6d;&#x61;&#114;&#x65;&#107;&#x33;&#x40;&#115;&#x61;&#109;&#x73;&#117;&#x6e;&#x67;&#x2e;&#99;&#x6f;&#x6d;</a></td>
+<td>Pawel Kaczmarek<br><a href="mailto:p.kaczmarek3@samsung.com">&#112;&#46;&#107;&#97;&#99;&#x7a;&#x6d;&#x61;&#x72;&#x65;&#x6b;&#51;&#64;&#x73;&#97;&#x6d;&#115;&#x75;&#110;&#103;&#x2e;&#x63;&#111;&#x6d;</a></td>
 </tr>
 <tr>
 <td>0.6.0</td>
 <td>2016-10-28</td>
 <td>update devel package for tizen 3.0</td>
-<td>Annie Park<br><a href="mailto:hj.na.park@samsung.com">&#x68;&#x6a;&#46;&#110;&#x61;&#46;&#112;&#97;&#x72;&#x6b;&#x40;&#x73;&#97;&#109;&#x73;&#117;&#110;&#x67;&#46;&#99;&#111;&#x6d;</a></td>
+<td>Annie Park<br><a href="mailto:hj.na.park@samsung.com">&#104;&#x6a;&#46;&#110;&#97;&#x2e;&#112;&#97;&#x72;&#107;&#64;&#115;&#x61;&#x6d;&#x73;&#x75;&#110;&#x67;&#x2e;&#99;&#x6f;&#x6d;</a></td>
 </tr>
 </tbody>
 </table>
@@ -143,9 +143,14 @@ $ git checkout origin/tizen_3.0
 </ul>
 <h3 id="plugin-structure/spec-file">Spec file</h3>
 <p>Spec file (<code>webapi-plugins.spec</code>) kept inside <code>packaging/</code> directory
-is build specification file used by rpm packaging system where variables are defined.
+is build specification file used by RPM packaging system where variables are defined.
 Those variables can be used to include or exclude particular modules from
 build for each profile (mobile, TV, wearable).</p>
+<h3 id="plugin-structure/manifest-file">Manifest file</h3>
+<p>Each RPM package must have a manifest file where developers can specify the access control domain
+in which their application should be running and potentially additional security policies for the
+application. It is necessary to build the project. The manifest file (<code>webapi-plugins.manifest</code>)
+is located in the root directory of the project.</p>
 <h3 id="plugin-structure/gyp-file">GYP file</h3>
 <p>Each plugin has its own gyp file that contains information specific for it.
 Plugin configuration file (gyp) is the equivalent of CMake.
@@ -484,7 +489,9 @@ native.callSync(&#39;Calendar_addChangeListener&#39;, {
 <p>All plugins instances are created by runtime on application launch.
 It&#39;s important to not initialize any database/service connections and platform
 handlers in instance constructor. All resources should be &quot;lazy&quot; initialized
-just before first use, to keep starting time as short as possible.
+just before first use, to keep starting time as short as possible. At the beginning
+the initializer loads only basic information from plugins.json. This file is being
+generated during plugins build process, its body depends on defined modules.
 Initialized resources can be referenced to instance and kept for further usage.
 Instance destructor is called on application termination and should release all
 used resources to prevent memory leaks.</p>
@@ -494,8 +501,9 @@ Example: If operation should change some object retrieved from platform,
 identifier should be passed again and additional check if object still exists
 should be made.</p>
 <h3 id="implementation-c/privileges">Privileges</h3>
-<p>Some of the API methods require privilege access. In Tizen 3.0 checking if application has privilege
-to call method has been moved to C++ layer. It&#39;s the first step which should be checked.</p>
+<p>Some of the API methods require privilege access. The privilege engine used in the project is Cynara.
+In Tizen 3.0 checking if application has privilege to call method has been moved to C++ layer. It&#39;s the
+first step which should be checked.</p>
 <p>Below can be found example of using Privilege in Alarm API:</p>
 <pre class="prettyprint linenums"><code class="lang-cpp">const std::string kPrivilegeAlarm = &quot;http://tizen.org/privilege/alarm.get&quot;;
 
@@ -658,6 +666,10 @@ Package contains required common headers files, gypi files and webapi-plugins.pc
 |-----------pylib
 |-------------gyp
 |---------------generator
+|---------slimit
+|-----------ply
+|-----------tests
+|-----------visitors
 |---lib
 |-----pkgconfig
 </code></pre>
index c6b9e4c6b364a04268affa7f3675f49adc979862..0f970f1e25a212060f6aa2d059223172341803c7 100644 (file)
@@ -15,6 +15,10 @@ Package contains required common headers files, gypi files and webapi-plugins.pc
 |-----------pylib
 |-------------gyp
 |---------------generator
+|---------slimit
+|-----------ply
+|-----------tests
+|-----------visitors
 |---lib
 |-----pkgconfig
 ```
index 9795bfca34ebaeebbb2b8859d1c9c927825cb513..c6d84e51799313a712593e87b534668c60a479b6 100644 (file)
@@ -5,7 +5,9 @@
 All plugins instances are created by runtime on application launch.
 It's important to not initialize any database/service connections and platform
 handlers in instance constructor. All resources should be "lazy" initialized
-just before first use, to keep starting time as short as possible.
+just before first use, to keep starting time as short as possible. At the beginning
+the initializer loads only basic information from plugins.json. This file is being
+generated during plugins build process, its body depends on defined modules.
 Initialized resources can be referenced to instance and kept for further usage.
 Instance destructor is called on application termination and should release all
 used resources to prevent memory leaks.
@@ -18,8 +20,9 @@ should be made.
 
 ### Privileges
 
-Some of the API methods require privilege access. In Tizen 3.0 checking if application has privilege
-to call method has been moved to C++ layer. It's the first step which should be checked.
+Some of the API methods require privilege access. The privilege engine used in the project is Cynara.
+In Tizen 3.0 checking if application has privilege to call method has been moved to C++ layer. It's the
+first step which should be checked.
 
 Below can be found example of using Privilege in Alarm API:
 
index 536bebe799f72b7c54cf79ebeb984b52e8aaa630..161b0d4ab921b996cf9bac7f804d48805cf983c4 100644 (file)
@@ -17,10 +17,17 @@ Each plugin contains following structure:
 ### Spec file
 
 Spec file (```webapi-plugins.spec```) kept inside ```packaging/``` directory
-is build specification file used by rpm packaging system where variables are defined.
+is build specification file used by RPM packaging system where variables are defined.
 Those variables can be used to include or exclude particular modules from
 build for each profile (mobile, TV, wearable).
 
+### Manifest file
+
+Each RPM package must have a manifest file where developers can specify the access control domain
+in which their application should be running and potentially additional security policies for the
+application. It is necessary to build the project. The manifest file (```webapi-plugins.manifest```)
+is located in the root directory of the project.
+
 ### GYP file
 
 Each plugin has its own gyp file that contains information specific for it.