[LB] Web AR code snippet style update 54/95554/1
authorEditor Lionbridge <TizenEditor.SEL@lionbridge.com>
Thu, 3 Nov 2016 17:10:10 +0000 (19:10 +0200)
committerEditor Lionbridge <TizenEditor.SEL@lionbridge.com>
Thu, 3 Nov 2016 17:10:10 +0000 (19:10 +0200)
- Fixed the code examples to follow the same style as the guides
- Mainly fixed the comment style to /* ... */, added and removed incorrect
  spaces, and modified line breaks and indentation

Change-Id: Ie76ebb52942c024194bc53187e93d7e98d89e6ad

184 files changed:
org.tizen.web.apireference/html/device_api/mobile/tizen/account.html
org.tizen.web.apireference/html/device_api/mobile/tizen/alarm.html
org.tizen.web.apireference/html/device_api/mobile/tizen/application.html
org.tizen.web.apireference/html/device_api/mobile/tizen/archive.html
org.tizen.web.apireference/html/device_api/mobile/tizen/badge.html
org.tizen.web.apireference/html/device_api/mobile/tizen/bluetooth.html
org.tizen.web.apireference/html/device_api/mobile/tizen/bookmark.html
org.tizen.web.apireference/html/device_api/mobile/tizen/calendar.html
org.tizen.web.apireference/html/device_api/mobile/tizen/callhistory.html
org.tizen.web.apireference/html/device_api/mobile/tizen/contact.html
org.tizen.web.apireference/html/device_api/mobile/tizen/content.html
org.tizen.web.apireference/html/device_api/mobile/tizen/cordova/console.html
org.tizen.web.apireference/html/device_api/mobile/tizen/cordova/cordova.html
org.tizen.web.apireference/html/device_api/mobile/tizen/cordova/device-motion.html
org.tizen.web.apireference/html/device_api/mobile/tizen/cordova/device.html
org.tizen.web.apireference/html/device_api/mobile/tizen/cordova/dialogs.html
org.tizen.web.apireference/html/device_api/mobile/tizen/cordova/events.html
org.tizen.web.apireference/html/device_api/mobile/tizen/cordova/file.html
org.tizen.web.apireference/html/device_api/mobile/tizen/cordova/filetransfer.html
org.tizen.web.apireference/html/device_api/mobile/tizen/cordova/globalization.html
org.tizen.web.apireference/html/device_api/mobile/tizen/cordova/media.html
org.tizen.web.apireference/html/device_api/mobile/tizen/cordova/networkInformation.html
org.tizen.web.apireference/html/device_api/mobile/tizen/datacontrol.html
org.tizen.web.apireference/html/device_api/mobile/tizen/datasync.html
org.tizen.web.apireference/html/device_api/mobile/tizen/download.html
org.tizen.web.apireference/html/device_api/mobile/tizen/exif.html
org.tizen.web.apireference/html/device_api/mobile/tizen/feedback.html
org.tizen.web.apireference/html/device_api/mobile/tizen/filesystem.html
org.tizen.web.apireference/html/device_api/mobile/tizen/fmradio.html
org.tizen.web.apireference/html/device_api/mobile/tizen/humanactivitymonitor.html
org.tizen.web.apireference/html/device_api/mobile/tizen/inputdevice.html
org.tizen.web.apireference/html/device_api/mobile/tizen/keymanager.html
org.tizen.web.apireference/html/device_api/mobile/tizen/mediacontroller.html
org.tizen.web.apireference/html/device_api/mobile/tizen/mediakey.html
org.tizen.web.apireference/html/device_api/mobile/tizen/messageport.html
org.tizen.web.apireference/html/device_api/mobile/tizen/messaging.html
org.tizen.web.apireference/html/device_api/mobile/tizen/networkbearerselection.html
org.tizen.web.apireference/html/device_api/mobile/tizen/nfc.html
org.tizen.web.apireference/html/device_api/mobile/tizen/notification.html
org.tizen.web.apireference/html/device_api/mobile/tizen/package.html
org.tizen.web.apireference/html/device_api/mobile/tizen/power.html
org.tizen.web.apireference/html/device_api/mobile/tizen/preference.html
org.tizen.web.apireference/html/device_api/mobile/tizen/push.html
org.tizen.web.apireference/html/device_api/mobile/tizen/se.html
org.tizen.web.apireference/html/device_api/mobile/tizen/sensor.html
org.tizen.web.apireference/html/device_api/mobile/tizen/sound.html
org.tizen.web.apireference/html/device_api/mobile/tizen/systeminfo.html
org.tizen.web.apireference/html/device_api/mobile/tizen/systemsetting.html
org.tizen.web.apireference/html/device_api/mobile/tizen/time.html
org.tizen.web.apireference/html/device_api/mobile/tizen/tizen.html
org.tizen.web.apireference/html/device_api/mobile/tizen/websetting.html
org.tizen.web.apireference/html/device_api/mobile/tizen/widgetservice.html
org.tizen.web.apireference/html/device_api/tv/tizen/alarm.html
org.tizen.web.apireference/html/device_api/tv/tizen/application.html
org.tizen.web.apireference/html/device_api/tv/tizen/archive.html
org.tizen.web.apireference/html/device_api/tv/tizen/content.html
org.tizen.web.apireference/html/device_api/tv/tizen/cordova/console.html
org.tizen.web.apireference/html/device_api/tv/tizen/cordova/cordova.html
org.tizen.web.apireference/html/device_api/tv/tizen/cordova/device-motion.html
org.tizen.web.apireference/html/device_api/tv/tizen/cordova/device.html
org.tizen.web.apireference/html/device_api/tv/tizen/cordova/dialogs.html
org.tizen.web.apireference/html/device_api/tv/tizen/cordova/events.html
org.tizen.web.apireference/html/device_api/tv/tizen/cordova/file.html
org.tizen.web.apireference/html/device_api/tv/tizen/cordova/filetransfer.html
org.tizen.web.apireference/html/device_api/tv/tizen/cordova/globalization.html
org.tizen.web.apireference/html/device_api/tv/tizen/cordova/media.html
org.tizen.web.apireference/html/device_api/tv/tizen/cordova/networkInformation.html
org.tizen.web.apireference/html/device_api/tv/tizen/datacontrol.html
org.tizen.web.apireference/html/device_api/tv/tizen/download.html
org.tizen.web.apireference/html/device_api/tv/tizen/exif.html
org.tizen.web.apireference/html/device_api/tv/tizen/filesystem.html
org.tizen.web.apireference/html/device_api/tv/tizen/keymanager.html
org.tizen.web.apireference/html/device_api/tv/tizen/messageport.html
org.tizen.web.apireference/html/device_api/tv/tizen/package.html
org.tizen.web.apireference/html/device_api/tv/tizen/systeminfo.html
org.tizen.web.apireference/html/device_api/tv/tizen/time.html
org.tizen.web.apireference/html/device_api/tv/tizen/tizen.html
org.tizen.web.apireference/html/device_api/tv/tizen/tvaudiocontrol.html
org.tizen.web.apireference/html/device_api/tv/tizen/tvchannel.html
org.tizen.web.apireference/html/device_api/tv/tizen/tvdisplaycontrol.html
org.tizen.web.apireference/html/device_api/tv/tizen/tvinfo.html
org.tizen.web.apireference/html/device_api/tv/tizen/tvinputdevice.html
org.tizen.web.apireference/html/device_api/tv/tizen/tvwindow.html
org.tizen.web.apireference/html/device_api/tv/tizen/websetting.html
org.tizen.web.apireference/html/device_api/wearable/tizen/alarm.html
org.tizen.web.apireference/html/device_api/wearable/tizen/application.html
org.tizen.web.apireference/html/device_api/wearable/tizen/archive.html
org.tizen.web.apireference/html/device_api/wearable/tizen/badge.html
org.tizen.web.apireference/html/device_api/wearable/tizen/bluetooth.html
org.tizen.web.apireference/html/device_api/wearable/tizen/content.html
org.tizen.web.apireference/html/device_api/wearable/tizen/cordova/console.html
org.tizen.web.apireference/html/device_api/wearable/tizen/cordova/cordova.html
org.tizen.web.apireference/html/device_api/wearable/tizen/cordova/device-motion.html
org.tizen.web.apireference/html/device_api/wearable/tizen/cordova/device.html
org.tizen.web.apireference/html/device_api/wearable/tizen/cordova/dialogs.html
org.tizen.web.apireference/html/device_api/wearable/tizen/cordova/events.html
org.tizen.web.apireference/html/device_api/wearable/tizen/cordova/file.html
org.tizen.web.apireference/html/device_api/wearable/tizen/cordova/filetransfer.html
org.tizen.web.apireference/html/device_api/wearable/tizen/cordova/globalization.html
org.tizen.web.apireference/html/device_api/wearable/tizen/cordova/media.html
org.tizen.web.apireference/html/device_api/wearable/tizen/cordova/networkInformation.html
org.tizen.web.apireference/html/device_api/wearable/tizen/datacontrol.html
org.tizen.web.apireference/html/device_api/wearable/tizen/download.html
org.tizen.web.apireference/html/device_api/wearable/tizen/exif.html
org.tizen.web.apireference/html/device_api/wearable/tizen/feedback.html
org.tizen.web.apireference/html/device_api/wearable/tizen/filesystem.html
org.tizen.web.apireference/html/device_api/wearable/tizen/humanactivitymonitor.html
org.tizen.web.apireference/html/device_api/wearable/tizen/inputdevice.html
org.tizen.web.apireference/html/device_api/wearable/tizen/keymanager.html
org.tizen.web.apireference/html/device_api/wearable/tizen/mediacontroller.html
org.tizen.web.apireference/html/device_api/wearable/tizen/mediakey.html
org.tizen.web.apireference/html/device_api/wearable/tizen/messageport.html
org.tizen.web.apireference/html/device_api/wearable/tizen/nfc.html
org.tizen.web.apireference/html/device_api/wearable/tizen/notification.html
org.tizen.web.apireference/html/device_api/wearable/tizen/package.html
org.tizen.web.apireference/html/device_api/wearable/tizen/power.html
org.tizen.web.apireference/html/device_api/wearable/tizen/preference.html
org.tizen.web.apireference/html/device_api/wearable/tizen/push.html
org.tizen.web.apireference/html/device_api/wearable/tizen/se.html
org.tizen.web.apireference/html/device_api/wearable/tizen/sensor.html
org.tizen.web.apireference/html/device_api/wearable/tizen/sound.html
org.tizen.web.apireference/html/device_api/wearable/tizen/systeminfo.html
org.tizen.web.apireference/html/device_api/wearable/tizen/systemsetting.html
org.tizen.web.apireference/html/device_api/wearable/tizen/time.html
org.tizen.web.apireference/html/device_api/wearable/tizen/tizen.html
org.tizen.web.apireference/html/device_api/wearable/tizen/widgetservice.html
org.tizen.web.apireference/html/ui_fw_api/Animation/animation.htm
org.tizen.web.apireference/html/ui_fw_api/Base/popup.htm
org.tizen.web.apireference/html/ui_fw_api/Gesture_Events/drag.htm
org.tizen.web.apireference/html/ui_fw_api/Gesture_Events/gesture.htm
org.tizen.web.apireference/html/ui_fw_api/Gesture_Events/swipe.htm
org.tizen.web.apireference/html/ui_fw_api/Globalization/globalization.htm
org.tizen.web.apireference/html/ui_fw_api/Mobile_UIComponents/deprecated/mobile_Checkboxradio.htm
org.tizen.web.apireference/html/ui_fw_api/Mobile_UIComponents/deprecated/mobile_Collapsible.htm
org.tizen.web.apireference/html/ui_fw_api/Mobile_UIComponents/deprecated/mobile_FastScroll.htm
org.tizen.web.apireference/html/ui_fw_api/Mobile_UIComponents/deprecated/mobile_Gallery.htm
org.tizen.web.apireference/html/ui_fw_api/Mobile_UIComponents/deprecated/mobile_MultimediaView.htm
org.tizen.web.apireference/html/ui_fw_api/Mobile_UIComponents/deprecated/mobile_Notification.htm
org.tizen.web.apireference/html/ui_fw_api/Mobile_UIComponents/deprecated/mobile_ProgressBar.htm
org.tizen.web.apireference/html/ui_fw_api/Mobile_UIComponents/deprecated/mobile_ScrollHandler.htm
org.tizen.web.apireference/html/ui_fw_api/Mobile_UIComponents/deprecated/mobile_SearchBar.htm
org.tizen.web.apireference/html/ui_fw_api/Mobile_UIComponents/deprecated/mobile_SelectMenu.htm
org.tizen.web.apireference/html/ui_fw_api/Mobile_UIComponents/deprecated/mobile_Swipe.htm
org.tizen.web.apireference/html/ui_fw_api/Mobile_UIComponents/deprecated/mobile_TabBar.htm
org.tizen.web.apireference/html/ui_fw_api/Mobile_UIComponents/deprecated/mobile_Tokentextarea.htm
org.tizen.web.apireference/html/ui_fw_api/Mobile_UIComponents/mobile_Button.htm
org.tizen.web.apireference/html/ui_fw_api/Mobile_UIComponents/mobile_Checkbox.htm
org.tizen.web.apireference/html/ui_fw_api/Mobile_UIComponents/mobile_ColoredListview.htm
org.tizen.web.apireference/html/ui_fw_api/Mobile_UIComponents/mobile_Drawer.htm
org.tizen.web.apireference/html/ui_fw_api/Mobile_UIComponents/mobile_DropdownMenu.htm
org.tizen.web.apireference/html/ui_fw_api/Mobile_UIComponents/mobile_Expandable.htm
org.tizen.web.apireference/html/ui_fw_api/Mobile_UIComponents/mobile_GridView.htm
org.tizen.web.apireference/html/ui_fw_api/Mobile_UIComponents/mobile_Navigation.htm
org.tizen.web.apireference/html/ui_fw_api/Mobile_UIComponents/mobile_PageIndicator.htm
org.tizen.web.apireference/html/ui_fw_api/Mobile_UIComponents/mobile_PanelChanger.htm
org.tizen.web.apireference/html/ui_fw_api/Mobile_UIComponents/mobile_Popup.htm
org.tizen.web.apireference/html/ui_fw_api/Mobile_UIComponents/mobile_Progress.htm
org.tizen.web.apireference/html/ui_fw_api/Mobile_UIComponents/mobile_Radio.htm
org.tizen.web.apireference/html/ui_fw_api/Mobile_UIComponents/mobile_SearchInput.htm
org.tizen.web.apireference/html/ui_fw_api/Mobile_UIComponents/mobile_SectionChanger.htm
org.tizen.web.apireference/html/ui_fw_api/Mobile_UIComponents/mobile_Slider.htm
org.tizen.web.apireference/html/ui_fw_api/Mobile_UIComponents/mobile_Tabs.htm
org.tizen.web.apireference/html/ui_fw_api/Mobile_UIComponents/mobile_TextEnveloper.htm
org.tizen.web.apireference/html/ui_fw_api/Mobile_UIComponents/mobile_TextInput.htm
org.tizen.web.apireference/html/ui_fw_api/Mobile_UIComponents/mobile_ToggleSwitch.htm
org.tizen.web.apireference/html/ui_fw_api/Wearable_UIComponents/wearable_button.htm
org.tizen.web.apireference/html/ui_fw_api/Wearable_UIComponents/wearable_checkbox.htm
org.tizen.web.apireference/html/ui_fw_api/Wearable_UIComponents/wearable_circleprogressbar.htm
org.tizen.web.apireference/html/ui_fw_api/Wearable_UIComponents/wearable_circularindexscrollbar.htm
org.tizen.web.apireference/html/ui_fw_api/Wearable_UIComponents/wearable_drawer.htm
org.tizen.web.apireference/html/ui_fw_api/Wearable_UIComponents/wearable_indexscrollbar.htm
org.tizen.web.apireference/html/ui_fw_api/Wearable_UIComponents/wearable_marquee.htm
org.tizen.web.apireference/html/ui_fw_api/Wearable_UIComponents/wearable_pageindicator.htm
org.tizen.web.apireference/html/ui_fw_api/Wearable_UIComponents/wearable_popup.htm
org.tizen.web.apireference/html/ui_fw_api/Wearable_UIComponents/wearable_processing.htm
org.tizen.web.apireference/html/ui_fw_api/Wearable_UIComponents/wearable_sectionchanger.htm
org.tizen.web.apireference/html/ui_fw_api/Wearable_UIComponents/wearable_selector.htm
org.tizen.web.apireference/html/ui_fw_api/Wearable_UIComponents/wearable_slider.htm
org.tizen.web.apireference/html/ui_fw_api/Wearable_UIComponents/wearable_snaplistview.htm
org.tizen.web.apireference/html/ui_fw_api/Wearable_UIComponents/wearable_swipelist.htm
org.tizen.web.apireference/html/ui_fw_api/Wearable_UIComponents/wearable_toggleswitch.htm
org.tizen.web.apireference/html/ui_fw_api/Wearable_UIComponents/wearable_viewSwitcher.htm
org.tizen.web.apireference/html/ui_fw_api/Wearable_UIComponents/wearable_virtuallist.htm
org.tizen.web.apireference/html/w3c_api/camera_w.html

index 7a2b684..7652f5b 100644 (file)
@@ -432,22 +432,26 @@ If the specified key already exists, the corresponding value is overwritten with
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var appId = tizen.application.getCurrentApplication().appInfo.id;
- tizen.account.getAccounts(function(accounts) {
-     var account = accounts[0];
-     if(account) {
-         var key = 'nickname';
-         var value = 'nickname of anonymous user';
-         account.setExtendedData(key, value);
-         console.log(account.getExtendedData(key)); // 'nickname of anonymous user'
-
-         account.setExtendedData(key, 'nickname updated');
-         console.log(account.getExtendedData(key)); // 'nickname updated'
-     }
- }, function(e) {
-     console.log('Error: ' + e.message);
- }, appId);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var appId = tizen.application.getCurrentApplication().appInfo.id;
+tizen.account.getAccounts(function(accounts)
+{
+&nbsp;&nbsp;&nbsp;var account = accounts[0];
+&nbsp;&nbsp;&nbsp;if (account)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var key = 'nickname';
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var value = 'nickname of anonymous user';
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;account.setExtendedData(key, value);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(account.getExtendedData(key)); /* 'Nickname of anonymous user' */
+
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;account.setExtendedData(key, 'nickname updated');
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(account.getExtendedData(key)); /* 'Nickname updated' */
+&nbsp;&nbsp;&nbsp;}
+}, function(e)
+{
+&nbsp;&nbsp;&nbsp;console.log('Error: ' + e.message);
+}, appId);
+</pre>
 </div>
 </dd>
 <dt class="method" id="Account::getExtendedData">
@@ -501,18 +505,22 @@ Returns null if the given key is not found.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var appId = tizen.application.getCurrentApplication().appInfo.id;
- tizen.account.getAccounts(function(accounts) {
-     var account = accounts[0];
-     if(account) {
-         var key = 'accessToken';
-         var value = account.getExtendedData(key);
-         console.log(account.userName + "'s accessToken is " + value);
-     }
- }, function(e) {
-     console.log('Error: ' + e.message);
- }, appId);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var appId = tizen.application.getCurrentApplication().appInfo.id;
+tizen.account.getAccounts(function(accounts)
+{
+&nbsp;&nbsp;&nbsp;var account = accounts[0];
+&nbsp;&nbsp;&nbsp;if (account)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var key = 'accessToken';
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var value = account.getExtendedData(key);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(account.userName + "'s accessToken is " + value);
+&nbsp;&nbsp;&nbsp;}
+}, function(e)
+{
+&nbsp;&nbsp;&nbsp;console.log('Error: ' + e.message);
+}, appId);
+</pre>
 </div>
 </dd>
 <dt class="method" id="Account::getExtendedData-2">
@@ -569,24 +577,31 @@ Returns an empty array if there is no extended data.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var appId = tizen.application.getCurrentApplication().appInfo.id;
- tizen.account.getAccounts(function(accounts) {
-     var account = accounts[0];
-     if(account) {
-         account.getExtendedData(function(extendedData) {
-             for(var i=0; i &lt; extendedData.length; i++) {
-                 var key = extendedData.key;
-                 var value = extendedData.value;
-                 console.log(key + " : " + value);
-             }
-         }, function(e) {
-             console.log("Error : " + e.message);
-         });
-     }
- }, function(e) {
-     console.log('Error: ' + e.message);
- }, appId);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var appId = tizen.application.getCurrentApplication().appInfo.id;
+tizen.account.getAccounts(function(accounts)
+{
+&nbsp;&nbsp;&nbsp;var account = accounts[0];
+&nbsp;&nbsp;&nbsp;if (account)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;account.getExtendedData(function(extendedData)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; extendedData.length; i++)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var key = extendedData.key;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var value = extendedData.value;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(key + ": " + value);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}, function(e)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Error: " + e.message);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;});
+&nbsp;&nbsp;&nbsp;}
+}, function(e)
+{
+&nbsp;&nbsp;&nbsp;console.log('Error: ' + e.message);
+}, appId);
+</pre>
 </div>
 </dd>
 </dl>
@@ -687,12 +702,13 @@ You should implement the appcontrol for the account provider.<br>For more detail
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var appId = tizen.application.getCurrentApplication().appInfo.id;
- var provider = tizen.account.getProvider(appId);
- var account = new tizen.Account(provider, {userName: 'admin', iconUri: 'path/to/icon.jpg'});
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var appId = tizen.application.getCurrentApplication().appInfo.id;
+var provider = tizen.account.getProvider(appId);
+var account = new tizen.Account(provider, {userName: 'admin', iconUri: 'path/to/icon.jpg'});
 
- tizen.account.add(account);
- </pre>
+tizen.account.add(account);
+</pre>
 </div>
 </dd>
 <dt class="method" id="AccountManager::remove">
@@ -747,16 +763,20 @@ This method can be used by an account provider application.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var appId = tizen.application.getCurrentApplication().appInfo.id;
- tizen.account.getAccounts(function(accounts) {
-     var account = accounts[0];
-     if(account) {
-         tizen.account.remove(account.id);
-     }
- }, function(e) {
-     console.log('Error: ' + e.message);
- }, appId);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var appId = tizen.application.getCurrentApplication().appInfo.id;
+tizen.account.getAccounts(function(accounts)
+{
+&nbsp;&nbsp;&nbsp;var account = accounts[0];
+&nbsp;&nbsp;&nbsp;if (account)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tizen.account.remove(account.id);
+&nbsp;&nbsp;&nbsp;}
+}, function(e)
+{
+&nbsp;&nbsp;&nbsp;console.log('Error: ' + e.message);
+}, appId);
+</pre>
 </div>
 </dd>
 <dt class="method" id="AccountManager::update">
@@ -810,17 +830,21 @@ This method can be used only an account provider application.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var appId = tizen.application.getCurrentApplication().appInfo.id;
- tizen.account.getAccounts(function(accounts) {
-     var account = accounts[0];
-     if(account) {
-         account.userName = 'abc';
-         tizen.account.update(account);
-     })
- }, function(e) {
-     console.log('Error: ' + e.message);
- }, appId);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var appId = tizen.application.getCurrentApplication().appInfo.id;
+tizen.account.getAccounts(function(accounts)
+{
+&nbsp;&nbsp;&nbsp;var account = accounts[0];
+&nbsp;&nbsp;&nbsp;if (account)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;account.userName = 'abc';
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tizen.account.update(account);
+&nbsp;&nbsp;&nbsp;}
+}, function(e)
+{
+&nbsp;&nbsp;&nbsp;console.log('Error: ' + e.message);
+}, appId);
+</pre>
 </div>
 </dd>
 <dt class="method" id="AccountManager::getAccount">
@@ -870,8 +894,9 @@ This method can be used only an account provider application.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var account = tizen.account.getAccount(1);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var account = tizen.account.getAccount(1);
+</pre>
 </div>
 </dd>
 <dt class="method" id="AccountManager::getAccounts">
@@ -929,13 +954,15 @@ If you want to get all accounts, omit the applicationId argument.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> tizen.account.getAccounts(function(accounts) {
-     // accounts is an array whose members are all registered accounts in this device.
- }, function (e) {
-     console.log("Error : " + e.message);
- });
-
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+tizen.account.getAccounts(function(accounts)
+{
+&nbsp;&nbsp;&nbsp;/* accounts is an array whose members are all registered accounts in this device */
+}, function(e)
+{
+&nbsp;&nbsp;&nbsp;console.log("Error: " + e.message);
+});
+</pre>
 </div>
 </dd>
 <dt class="method" id="AccountManager::getProvider">
@@ -990,12 +1017,14 @@ You can register your application as an account provider by writing account rela
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var appId = tizen.application.getCurrentApplication().appInfo.id;
- var provider = tizen.account.getProvider(appId);
- if (!provider) {
-     console.log('current application is not account provider.');
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var appId = tizen.application.getCurrentApplication().appInfo.id;
+var provider = tizen.account.getProvider(appId);
+if (!provider)
+{
+&nbsp;&nbsp;&nbsp;console.log('current application is not account provider.');
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="AccountManager::getProviders">
@@ -1053,13 +1082,18 @@ If you want to get all the providers, omit the capability argument.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> tizen.account.getProviders(function(providers) {
-     // providers is an array whose members are account providers
-     // which have contact capability.
- }, function (e) {
-     console.log('Error : ' + e.message);
- }, "http://tizen.org/account/capability/contact");
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+tizen.account.getProviders(function(providers)
+{
+&nbsp;&nbsp;&nbsp;/*
+&nbsp;&nbsp;&nbsp;   providers is an array whose members are account providers
+&nbsp;&nbsp;&nbsp;   which have contact capability
+&nbsp;&nbsp;&nbsp;*/
+}, function(e)
+{
+&nbsp;&nbsp;&nbsp;console.log('Error: ' + e.message);
+}, "http://tizen.org/account/capability/contact");
+</pre>
 </div>
 </dd>
 <dt class="method" id="AccountManager::addAccountListener">
@@ -1112,18 +1146,23 @@ If you want to get all the providers, omit the capability argument.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> tizen.account.addAccountListener({
-     onadded: function(account) {
-         // a callback function which will be called when account is added.
-     },
-     onremoved: function(accountId) {
-         // a callback function which will be called when account is removed.
-     },
-     onupdated: function(account) {
-         // a callback function which will be called when account is updated.
-     }
- });
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+tizen.account.addAccountListener(
+{
+&nbsp;&nbsp;&nbsp;onadded: function(account)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Callback function which will be called when account is added */
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;onremoved: function(accountId)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Callback function which will be called when account is removed */
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;onupdated: function(account)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Callback function which will be called when account is updated */
+&nbsp;&nbsp;&nbsp;}
+});
+</pre>
 </div>
 </dd>
 <dt class="method" id="AccountManager::removeAccountListener">
@@ -1169,19 +1208,24 @@ If you want to get all the providers, omit the capability argument.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var watchId = tizen.account.addAccountListener({
-     onadded: function(account) {
-         // a callback function which will be called when account is added.
-     },
-     onremoved: function(accountId) {
-         // a callback function which will be called when account is removed.
-     },
-     onupdated: function(account) {
-         // a callback function which will be called when account is updated.
-     }
- });
- tizen.account.removeAccountListener(watchId);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var watchId = tizen.account.addAccountListener(
+{
+&nbsp;&nbsp;&nbsp;onadded: function(account)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Callback function which will be called when account is added */
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;onremoved: function(accountId)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Callback function which will be called when account is removed */
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;onupdated: function(account)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Callback function which will be called when account is updated */
+&nbsp;&nbsp;&nbsp;}
+});
+tizen.account.removeAccountListener(watchId);
+</pre>
 </div>
 </dd>
 </dl>
index 4c1ebd2..ba0349e 100644 (file)
@@ -278,12 +278,13 @@ For more information about the application control, see <a href="application.htm
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Triggers an alarm on a given date/time
- var alarm = new tizen.AlarmAbsolute(new Date(2014, 10, 4, 8, 0));
- var appControl = new tizen.ApplicationControl("http://tizen.org/appcontrol/operation/view");
- tizen.alarm.add(alarm, tizen.application.getCurrentApplication().appInfo.id, appControl);
- console.log("Alarm added with id: " + alarm.id);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Triggers an alarm on a given date/time */
+var alarm = new tizen.AlarmAbsolute(new Date(2014, 10, 4, 8, 0));
+var appControl = new tizen.ApplicationControl("http://tizen.org/appcontrol/operation/view");
+tizen.alarm.add(alarm, tizen.application.getCurrentApplication().appInfo.id, appControl);
+console.log("Alarm added with id: " + alarm.id);
+</pre>
 </div>
 </dd>
 <dt class="method" id="AlarmManager::remove">
@@ -340,18 +341,23 @@ If an alarm goes off, it will be removed from the storage automatically.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var alarms = tizen.alarm.getAll();
-
- // Removes the first alarm
- if (alarms.length &gt; 0) {
-   try {
-     tizen.alarm.remove(alarms[0].id);
-     console.log("Successfully removed the first alarm.");
-   } catch(error) {
-     console.log("Failed to remove the first alarm.");
-   }
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var alarms = tizen.alarm.getAll();
+
+/* Removes the first alarm */
+if (alarms.length &gt; 0)
+{
+&nbsp;&nbsp;&nbsp;try
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tizen.alarm.remove(alarms[0].id);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Successfully removed the first alarm.");
+&nbsp;&nbsp;&nbsp;} 
+&nbsp;&nbsp;&nbsp;catch (error)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Failed to remove the first alarm.");
+&nbsp;&nbsp;&nbsp;}
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="AlarmManager::removeAll">
@@ -393,9 +399,10 @@ Because each application has its own alarm storage, this method removes alarms o
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> tizen.alarm.removeAll();
- console.log("remove all registered alarms in the storage.");
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+tizen.alarm.removeAll();
+console.log("remove all registered alarms in the storage.");
+</pre>
 </div>
 </dd>
 <dt class="method" id="AlarmManager::get">
@@ -440,18 +447,19 @@ Because each application has its own alarm storage, this method removes alarms o
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Sets an alarm
- var date = new Date();
- date.setHours(date.getHours()+1);
- var abs_alarm = new tizen.AlarmAbsolute(date);
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Sets an alarm */
+var date = new Date();
+date.setHours(date.getHours() + 1);
+var abs_alarm = new tizen.AlarmAbsolute(date);
 
- // Adds an alarm
- tizen.alarm.add(abs_alarm, tizen.application.getCurrentApplication().appInfo.id);
+/* Adds an alarm */
+tizen.alarm.add(abs_alarm, tizen.application.getCurrentApplication().appInfo.id);
 
- // Gets an alarm
- var alarm = tizen.alarm.get(abs_alarm.id);
- console.log("The alarm will trigger at " + alarm.getNextScheduledDate());
- </pre>
+/* Gets an alarm */
+var alarm = tizen.alarm.get(abs_alarm.id);
+console.log("The alarm will trigger at " + alarm.getNextScheduledDate());
+</pre>
 </div>
 </dd>
 <dt class="method" id="AlarmManager::getAll">
@@ -484,9 +492,10 @@ Alarms that have already been triggered are removed automatically from the stora
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var alarms = tizen.alarm.getAll();
- console.log(alarms.length + " alarms present in the storage.");
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var alarms = tizen.alarm.getAll();
+console.log(alarms.length + " alarms present in the storage.");
+</pre>
 </div>
 </dd>
 </dl>
@@ -548,17 +557,18 @@ It is guaranteed that this alarm will be fired after at least <em>delay</em> sec
 If <em>period</em> is provided, it will be adjusted by the operating system, however this value will not be lower than 600 seconds.
           </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Gets the current application ID.
- var appId = tizen.application.getCurrentApplication().appInfo.id;
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Gets the current application ID */
+var appId = tizen.application.getCurrentApplication().appInfo.id;
 
- // Sets an alarm in 3 hours from now
- var alarm1 = new tizen.AlarmRelative(3 * tizen.alarm.PERIOD_HOUR);
- tizen.alarm.add(alarm1, appId);
+/* Sets an alarm in 3 hours from now */
+var alarm1 = new tizen.AlarmRelative(3 * tizen.alarm.PERIOD_HOUR);
+tizen.alarm.add(alarm1, appId);
 
- // Sets an alarm in one hour, recurring after every 10 minutes
- var alarm2 = new tizen.AlarmRelative(tizen.alarm.PERIOD_HOUR, 10 * tizen.alarm.PERIOD_MINUTE);
- tizen.alarm.add(alarm2, appId);
- </pre>
+/* Sets an alarm in one hour, recurring after every 10 minutes */
+var alarm2 = new tizen.AlarmRelative(tizen.alarm.PERIOD_HOUR, 10 * tizen.alarm.PERIOD_MINUTE);
+tizen.alarm.add(alarm2, appId);
+</pre>
 </div>
         
       <div class="constructors">
@@ -630,16 +640,17 @@ If the alarm has expired, this method returns <var>null</var>.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Gets the current application ID.
- var appId = tizen.application.getCurrentApplication().appInfo.id;
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Gets the current application ID */
+var appId = tizen.application.getCurrentApplication().appInfo.id;
 
- // Sets an alarm in 3 hours from now
- var alarm = new tizen.AlarmRelative(3 * tizen.alarm.PERIOD_HOUR);
- tizen.alarm.add(alarm, appId);
+/* Sets an alarm in 3 hours from now */
+var alarm = new tizen.AlarmRelative(3 * tizen.alarm.PERIOD_HOUR);
+tizen.alarm.add(alarm, appId);
 
- var sec = alarm.getRemainingSeconds();
- console.log("remaining time is " + sec);
- </pre>
+var sec = alarm.getRemainingSeconds();
+console.log("remaining time is " + sec);
+</pre>
 </div>
 </dd>
 </dl>
@@ -674,22 +685,23 @@ If a <em>period</em> is provided, the alarm keeps triggering for the given inter
           </p>
          </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Gets the current application ID.
- var appId = tizen.application.getCurrentApplication().appInfo.id;
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Gets the current application ID */
+var appId = tizen.application.getCurrentApplication().appInfo.id;
 
- // Sets an alarm on January 1st 2014 08:00
- var date = new Date(2014, 0, 1, 8, 0);
- var alarm1 = new tizen.AlarmAbsolute(date);
- tizen.alarm.add(alarm1, appId);
+/* Sets an alarm on January 1st 2014 08:00 */
+var date = new Date(2014, 0, 1, 8, 0);
+var alarm1 = new tizen.AlarmAbsolute(date);
+tizen.alarm.add(alarm1, appId);
 
- // Sets an alarm on January 1st 2014 08:00, repeating every 2 days
- var alarm2 = new tizen.AlarmAbsolute(date, 2 * tizen.alarm.PERIOD_DAY);
- tizen.alarm.add(alarm2, appId);
+/* Sets an alarm on January 1st 2014 08:00, repeating every 2 days */
+var alarm2 = new tizen.AlarmAbsolute(date, 2 * tizen.alarm.PERIOD_DAY);
+tizen.alarm.add(alarm2, appId);
 
- // Sets an alarm occurring on every Saturday and Sunday, at 08:00, starting from January 1st 2014
- var alarm3 = new tizen.AlarmAbsolute(date, ["SA", "SU"]);
- tizen.alarm.add(alarm3, appId);
- </pre>
+/* Sets an alarm occurring on every Saturday and Sunday, at 08:00, starting from January 1st 2014 */
+var alarm3 = new tizen.AlarmAbsolute(date, ["SA", "SU"]);
+tizen.alarm.add(alarm3, appId);
+</pre>
 </div>
         
       <div class="constructors">
@@ -786,17 +798,18 @@ If the alarm has expired, this method returns <var>null</var>. The returned date
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Gets the current application ID.
- var appId = tizen.application.getCurrentApplication().appInfo.id;
-
- // Sets an alarm on January 1st 2014 08:00
- var date = new Date(2014, 0, 1, 8, 0);
- var alarm1 = new tizen.AlarmAbsolute(date);
- tizen.alarm.add(alarm1, appId);
-
- var date = alarm1.getNextScheduledDate();
- console.log("next scheduled time is " + date);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Gets the current application ID */
+var appId = tizen.application.getCurrentApplication().appInfo.id;
+
+/* Sets an alarm on January 1st 2014 08:00 */
+var date = new Date(2014, 0, 1, 8, 0);
+var alarm1 = new tizen.AlarmAbsolute(date);
+tizen.alarm.add(alarm1, appId);
+
+var date = alarm1.getNextScheduledDate();
+console.log("next scheduled time is " + date);
+</pre>
 </div>
 </dd>
 </dl>
index a180f02..d2f5661 100644 (file)
@@ -391,9 +391,10 @@ The <em>tizen.application </em>object allows access to the Application API's fun
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var app = tizen.application.getCurrentApplication();
- console.log("Current application's app id is " + app.appInfo.id);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var app = tizen.application.getCurrentApplication();
+console.log("Current application's app id is " + app.appInfo.id);
+</pre>
 </div>
 </dd>
 <dt class="method" id="ApplicationManager::kill">
@@ -461,23 +462,28 @@ UnknownError - If any other error occurs.              </li>
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function onKillSuccess() {
-     console.log("Application terminated successfully");
- }
-
- function onRunningAppsContext(contexts) {
-    // let's assume that the application "targetApp0.main" has been installed.
-    var targetId = "targetApp0.main";
-
-    for (var i = 0; i &lt; contexts.length; i++) {
-        if (contexts[i].appId == targetId) {
-            tizen.application.kill(contexts[i].id, onKillSuccess);
-        }
-    }
- }
-
- tizen.application.getAppsContext(onRunningAppsContext);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function onKillSuccess()
+{
+&nbsp;&nbsp;&nbsp;console.log("Application terminated successfully");
+}
+
+function onRunningAppsContext(contexts)
+{
+&nbsp;&nbsp;&nbsp;/* Let's assume that the application "targetApp0.main" has been installed */
+&nbsp;&nbsp;&nbsp;var targetId = "targetApp0.main";
+
+&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; contexts.length; i++)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (contexts[i].appId == targetId)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tizen.application.kill(contexts[i].id, onKillSuccess);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;}
+}
+
+tizen.application.getAppsContext(onRunningAppsContext);
+</pre>
 </div>
 </dd>
 <dt class="method" id="ApplicationManager::launch">
@@ -542,13 +548,15 @@ UnknownError - If any other error occurs.              </li>
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function onsuccess() {
-     console.log("The application has launched successfully");
- }
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function onsuccess()
+{
+&nbsp;&nbsp;&nbsp;console.log("The application has launched successfully");
+}
 
- // let's assume that application "targetApp0.main" has been installed
- tizen.application.launch("targetApp0.main", onsuccess);
- </pre>
+/* Let's assume that application "targetApp0.main" has been installed */
+tizen.application.launch("targetApp0.main", onsuccess);
+</pre>
 </div>
 </dd>
 <dt class="method" id="ApplicationManager::launchAppControl">
@@ -642,34 +650,33 @@ UnknownError: If any other error occurs.              </li>
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var appControl = new tizen.ApplicationControl(
-     "http://tizen.org/appcontrol/operation/pick",
-     null,
-     "image/jpeg",
-     null);
-
- var appControlReplyCallback = {
-     // callee sent a reply
-     onsuccess: function(data) {
-         for (var i = 0; i &lt; data.length; i++) {
-             if (data[i].key == "http://tizen.org/appcontrol/data/selected") {
-                 console.log('Selected image is ' + data[i].value[0]);
-             }
-         }
-     },
-     // callee returned failure
-     onfailure: function() {
-         console.log('The launch application control failed');
-     }
- }
-
- tizen.application.launchAppControl(
-     appControl,
-     null,
-     function() {console.log("launch application control succeed"); },
-     function(e) {console.log("launch application control failed. reason: " + e.message); },
-     appControlReplyCallback );
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var appControl = new tizen.ApplicationControl("http://tizen.org/appcontrol/operation/pick",
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;null, "image/jpeg", null);
+
+var appControlReplyCallback = 
+{
+&nbsp;&nbsp;&nbsp;/* Callee sent a reply */
+&nbsp;&nbsp;&nbsp;onsuccess: function(data)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; data.length; i++)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (data[i].key == "http://tizen.org/appcontrol/data/selected")
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('Selected image is ' + data[i].value[0]);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;/* Callee returned failure */
+&nbsp;&nbsp;&nbsp;onfailure: function()
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('The launch application control failed');
+&nbsp;&nbsp;&nbsp;}
+}
+
+tizen.application.launchAppControl(appControl, null,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;function() {console.log("launch application control succeed");},
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;function(e) {console.log("launch application control failed. reason: " + e.message);},
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;appControlReplyCallback);
+</pre>
 </div>
 </dd>
 <dt class="method" id="ApplicationManager::findAppControl">
@@ -724,42 +731,41 @@ UnknownError - If any other error occurs.              </li>
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var appControl = new tizen.ApplicationControl(
-     "http://tizen.org/appcontrol/operation/pick",
-     null,
-     "image/jpeg",
-     null);
-
- function successCB(appInfos, appControl)
- {
-     // appControl is same object with the value passed as first parameter to findAppControl()
-     var appControlReplyCallback = {
-         // callee sent a reply
-         onsuccess: function(data) {
-             for (var i = 0; i &lt; data.length; i++) {
-                 if (data[i].key == "http://tizen.org/appcontrol/data/selected") {
-                     console.log('Selected image is ' + data[i].value[0]);
-                 }
-             }
-         },
-         // callee returned failure
-         onfailure: function() {
-             console.log('The launch application control failed');
-         }
-     }
-
-     var appId = appInfos[0].id; // select first app's id
-
-     tizen.application.launchAppControl(
-         appControl,
-         appId,
-         function() {console.log("launch application control succeed"); },
-        function(e) {console.log("launch application control failed. reason: " + e.message); },
-        appControlReplyCallback );
- }
-
- tizen.application.findAppControl(appControl, successCB);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var appControl = new tizen.ApplicationControl("http://tizen.org/appcontrol/operation/pick",
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;null, "image/jpeg", null);
+
+function successCB(appInfos, appControl)
+{
+&nbsp;&nbsp;&nbsp;/* appControl is same object with the value passed as first parameter to findAppControl() */
+&nbsp;&nbsp;&nbsp;var appControlReplyCallback = 
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Callee sent a reply */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;onsuccess: function(data)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; data.length; i++)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (data[i].key == "http://tizen.org/appcontrol/data/selected")
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('Selected image is ' + data[i].value[0]);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Callee returned failure */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;onfailure: function()
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('The launch application control failed');
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;}
+
+&nbsp;&nbsp;&nbsp;var appId = appInfos[0].id; /* Select first app's id */
+
+&nbsp;&nbsp;&nbsp;tizen.application.launchAppControl(appControl, appId,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;function() {console.log("launch application control succeed");},
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;function(e) {console.log("launch application control failed. reason: " + e.message);},
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;appControlReplyCallback);
+}
+
+tizen.application.findAppControl(appControl, successCB);
+</pre>
 </div>
 </dd>
 <dt class="method" id="ApplicationManager::getAppsContext">
@@ -806,13 +812,15 @@ UnknownError - If an unknown error occurs.              </li>
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function onRunningAppsContext(contexts) {
-     for (var i = 0; i &lt; contexts.length; i++)
-         console.log("ID : " + contexts[i].id);
- }
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function onRunningAppsContext(contexts)
+{
+&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; contexts.length; i++)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("ID: " + contexts[i].id);
+}
 
- tizen.application.getAppsContext(onRunningAppsContext);
- </pre>
+tizen.application.getAppsContext(onRunningAppsContext);
+</pre>
 </div>
 </dd>
 <dt class="method" id="ApplicationManager::getAppContext">
@@ -856,9 +864,10 @@ The list of running applications and their application IDs is obtained with <em>
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var appContext = tizen.application.getAppContext(null);
- console.log("Application context retrieved for app " + appContext.appId);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var appContext = tizen.application.getAppContext(null);
+console.log("Application context retrieved for app " + appContext.appId);
+</pre>
 </div>
 </dd>
 <dt class="method" id="ApplicationManager::getAppsInfo">
@@ -905,13 +914,15 @@ UnknownError - If an unknown error occurs.              </li>
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function onListInstalledApps(applications) {
-     for (var i = 0; i &lt; applications.length; i++)
-         console.log("ID : " + applications[i].id);
- }
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function onListInstalledApps(applications)
+{
+&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; applications.length; i++)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("ID: " + applications[i].id);
+}
 
- tizen.application.getAppsInfo(onListInstalledApps);
- </pre>
+tizen.application.getAppsInfo(onListInstalledApps);
+</pre>
 </div>
 </dd>
 <dt class="method" id="ApplicationManager::getAppInfo">
@@ -959,9 +970,10 @@ The list of installed applications and their application IDs is obtained with <e
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var appInfo = tizen.application.getAppInfo(null);
- console.log("Current application name : " + appInfo.name);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var appInfo = tizen.application.getAppInfo(null);
+console.log("Current application name: " + appInfo.name);
+</pre>
 </div>
 </dd>
 <dt class="method" id="ApplicationManager::getAppCerts">
@@ -1042,13 +1054,15 @@ The certificate types are listed below:
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var appCerts = tizen.application.getAppCerts(null);
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var appCerts = tizen.application.getAppCerts(null);
 
- for (var i = 0; i &lt; appCerts.length; i++) {
-    console.log("#" + i + " type:" + appCerts[i].type);
-    console.log("#" + i + " value:" + appCerts[i].value);
- }
- </pre>
+for (var i = 0; i &lt; appCerts.length; i++)
+{
+&nbsp;&nbsp;&nbsp;console.log("#" + i + " type:" + appCerts[i].type);
+&nbsp;&nbsp;&nbsp;console.log("#" + i + " value:" + appCerts[i].value);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="ApplicationManager::getAppSharedURI">
@@ -1096,9 +1110,10 @@ If the ID is set to <var>null</var> or not set at all, it returns the shared dir
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var sharedDir = tizen.application.getAppSharedURI(null);
- console.log("shared directory : " + sharedDir);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var sharedDir = tizen.application.getAppSharedURI(null);
+console.log("shared directory: " + sharedDir);
+</pre>
 </div>
 </dd>
 <dt class="method" id="ApplicationManager::getAppMetaData">
@@ -1157,10 +1172,10 @@ an empty array is returned
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var metaDataArray = tizen.application.getAppMetaData(null);
- console.log("size of metadata : " + metaDataArray.length);
-
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var metaDataArray = tizen.application.getAppMetaData(null);
+console.log("size of metadata: " + metaDataArray.length);
+</pre>
 </div>
 </dd>
 <dt class="deprecated method" id="ApplicationManager::addAppInfoEventListener">
@@ -1226,19 +1241,24 @@ with the corresponding listener identifier.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var appEventCallback = {
-    oninstalled: function(appInfo) {
-       console.log('The application ' + appInfo.name + ' is installed');
-    },
-    onupdated: function(appInfo) {
-       console.log('The application ' + appInfo.name + ' is updated');
-    },
-    onuninstalled: function(appid) {
-       console.log('The application ' + appid + ' is uninstalled');
-    }
- };
- var watchId = tizen.application.addAppInfoEventListener(appEventCallback);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var appEventCallback = 
+{
+&nbsp;&nbsp;&nbsp;oninstalled: function(appInfo)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('The application ' + appInfo.name + ' is installed');
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;onupdated: function(appInfo)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('The application ' + appInfo.name + ' is updated');
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;onuninstalled: function(appid)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('The application ' + appid + ' is uninstalled');
+&nbsp;&nbsp;&nbsp;}
+};
+var watchId = tizen.application.addAppInfoEventListener(appEventCallback);
+</pre>
 </div>
 </dd>
 <dt class="deprecated method" id="ApplicationManager::removeAppInfoEventListener">
@@ -1280,20 +1300,25 @@ applications on a device.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var appEventCallback = {
-   oninstalled: function(appInfo) {
-     console.log('The application ' + appInfo.name + ' is installed');
-   },
-   onupdated: function(appInfo) {
-     console.log('The application ' + appInfo.name + ' is updated');
-   },
-   onuninstalled: function(appid) {
-     console.log('The application ' + appid + ' is uninstalled');
-   }
- };
- var watchId = tizen.application.addAppInfoEventListener(appEventCallback);
- tizen.application.removeAppInfoEventListener(watchId);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var appEventCallback = 
+{
+&nbsp;&nbsp;&nbsp;oninstalled: function(appInfo)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('The application ' + appInfo.name + ' is installed');
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;onupdated: function(appInfo)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('The application ' + appInfo.name + ' is updated');
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;onuninstalled: function(appid)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('The application ' + appid + ' is uninstalled');
+&nbsp;&nbsp;&nbsp;}
+};
+var watchId = tizen.application.addAppInfoEventListener(appEventCallback);
+tizen.application.removeAppInfoEventListener(watchId);
+</pre>
 </div>
 </dd>
 </dl>
@@ -1378,10 +1403,11 @@ the basic operations (such as exit or hide) for the current application.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var app = tizen.application.getCurrentApplication();
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var app = tizen.application.getCurrentApplication();
 
- app.exit();
- </pre>
+app.exit();
+</pre>
 </div>
 </dd>
 <dt class="method" id="Application::hide">
@@ -1405,10 +1431,11 @@ the basic operations (such as exit or hide) for the current application.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var app = tizen.application.getCurrentApplication();
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var app = tizen.application.getCurrentApplication();
 
- app.hide();
- </pre>
+app.hide();
+</pre>
 </div>
 </dd>
 <dt class="method" id="Application::getRequestedAppControl">
@@ -1448,12 +1475,14 @@ appropriately when it is launched.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var reqAppControl = tizen.application.getCurrentApplication().getRequestedAppControl();
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var reqAppControl = tizen.application.getCurrentApplication().getRequestedAppControl();
 
- if (reqAppControl) {
-     console.log("Requester AppID : " + reqAppControl.callerAppId);
- }
- </pre>
+if (reqAppControl) 
+{
+&nbsp;&nbsp;&nbsp;console.log("Requester AppID: " + reqAppControl.callerAppId);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="Application::addEventListener">
@@ -1504,28 +1533,35 @@ System events do not require an application identifier to be specified. Therefor
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var app = tizen.application.getCurrentApplication();
-
- // for user events: sender's application ID  and event name must be provided by using a dictionary
- // Let's assume that at least two applications are installed
- function onListInstalledApps(appsInfo) {
-   var appId = null;
-
-   if (appsInfo.length &gt; 0 &amp;&amp; app.appInfo.id != appsInfo[0].id) {
-     appId = appsInfo[0].id;
-   } else if (appsInfo.length &gt; 1) {
-     appId = appsInfo[1].id;
-   }
-
-   if (appId) {
-     var watchId = app.addEventListener({"appId": appId, "name": "custom_user_event"}, function(event, data) {
-       console.log("Data: " + JSON.stringify(data));
-       // do something
-     });
-   }
- }
- tizen.application.getAppsInfo(onListInstalledApps);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var app = tizen.application.getCurrentApplication();
+
+/* For user events: sender's application ID and event name must be provided by using a dictionary */
+/* Let's assume that at least two applications are installed */
+function onListInstalledApps(appsInfo)
+{
+&nbsp;&nbsp;&nbsp;var appId = null;
+
+&nbsp;&nbsp;&nbsp;if (appsInfo.length &gt; 0 &amp;&amp; app.appInfo.id != appsInfo[0].id)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;appId = appsInfo[0].id;
+&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;else if (appsInfo.length &gt; 1)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;appId = appsInfo[1].id;
+&nbsp;&nbsp;&nbsp;}
+
+&nbsp;&nbsp;&nbsp;if (appId)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var watchId = app.addEventListener({"appId": appId, "name": "custom_user_event"}, function(event, data)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Data: " + JSON.stringify(data));
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Do something */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;});
+&nbsp;&nbsp;&nbsp;}
+}
+tizen.application.getAppsInfo(onListInstalledApps);
+</pre>
 </div>
 </dd>
 <dt class="method" id="Application::removeEventListener">
@@ -1558,31 +1594,39 @@ System events do not require an application identifier to be specified. Therefor
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var app = tizen.application.getCurrentApplication();
-
- // for user events: sender's application ID  and event name must be provided by using a dictionary
- // Let's assume that at least two applications are installed
- function onListInstalledApps(appsInfo) {
-   var appId = null;
-   var watchId = null;
-
-   if (appsInfo.length &gt; 0 &amp;&amp; app.appInfo.id != appsInfo[0].id) {
-     appId = appsInfo[0].id;
-   } else if (appsInfo.length &gt; 1) {
-     appId = appsInfo[1].id;
-   }
-
-   if (appId) {
-     watchId = app.addEventListener({"appId": appId, "name": "custom_user_event"}, function(event, data) {
-       if (watchId) {
-         app.removeEventListener(watchId);
-         watchId = null;
-       }
-     });
-   }
- }
- tizen.application.getAppsInfo(onListInstalledApps);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var app = tizen.application.getCurrentApplication();
+
+/* For user events: sender's application ID and event name must be provided by using a dictionary */
+/* Let's assume that at least two applications are installed */
+function onListInstalledApps(appsInfo)
+{
+&nbsp;&nbsp;&nbsp;var appId = null;
+&nbsp;&nbsp;&nbsp;var watchId = null;
+
+&nbsp;&nbsp;&nbsp;if (appsInfo.length &gt; 0 &amp;&amp; app.appInfo.id != appsInfo[0].id)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;appId = appsInfo[0].id;
+&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;else if (appsInfo.length &gt; 1)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;appId = appsInfo[1].id;
+&nbsp;&nbsp;&nbsp;}
+
+&nbsp;&nbsp;&nbsp;if (appId)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;watchId = app.addEventListener({"appId": appId, "name": "custom_user_event"}, function(event, data)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (watchId)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;app.removeEventListener(watchId);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;watchId = null;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;});
+&nbsp;&nbsp;&nbsp;}
+}
+tizen.application.getAppsInfo(onListInstalledApps);
+</pre>
 </div>
 </dd>
 <dt class="method" id="Application::broadcastEvent">
@@ -1629,14 +1673,16 @@ An application can listen to events from other applications. However, it can onl
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var myCustomData = {
-   foo: 'bar'
- };
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var myCustomData = 
+{
+&nbsp;&nbsp;&nbsp;foo: 'bar'
+};
 
- var app = tizen.application.getCurrentApplication();
+var app = tizen.application.getCurrentApplication();
 
- app.broadcastEvent({"name": "custom_user_event"}, myCustomData);
- </pre>
+app.broadcastEvent({"name": "custom_user_event"}, myCustomData);
+</pre>
 </div>
 </dd>
 <dt class="method" id="Application::broadcastTrustedEvent">
@@ -1683,14 +1729,16 @@ An application can listen to events from other applications. However, it can onl
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var myTrustedCustomData = {
-   foo: 'bar'
- };
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var myTrustedCustomData = 
+{
+&nbsp;&nbsp;&nbsp;foo: 'bar'
+};
 
- var app = tizen.application.getCurrentApplication();
+var app = tizen.application.getCurrentApplication();
 
- app.broadcastTrustedEvent({"name": "custom_user_event"}, myTrustedCustomData);
- </pre>
+app.broadcastTrustedEvent({"name": "custom_user_event"}, myTrustedCustomData);
+</pre>
 </div>
 </dd>
 </dl>
@@ -1898,8 +1946,9 @@ between applications through the <em>ApplicationControl </em>interface.
  2.0
           </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var appControlData = new tizen.ApplicationControlData("image", [imagedata1]);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var appControlData = new tizen.ApplicationControlData("image", [imagedata1]);
+</pre>
 </div>
 <div class="constructors">
 <h4 id="ApplicationControlData::constructor">Constructors</h4>
@@ -1962,15 +2011,11 @@ and launches the selected application.
  2.0
           </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var appControl =
-       new tizen.ApplicationControl(
-                  "http://tizen.org/appcontrol/operation/view",
-                  null,
-                  "image/jpeg",
-                  null,
-                  [new tizen.ApplicationControlData("images",
-                                                    [imagedata1, imagedata2])] );
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var appControl = new tizen.ApplicationControl("http://tizen.org/appcontrol/operation/view",
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;null, "image/jpeg", null,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[new tizen.ApplicationControlData("images", [imagedata1, imagedata2])]);
+</pre>
 </div>
 <div class="constructors">
 <h4 id="ApplicationControl::constructor">Constructors</h4>
@@ -2128,17 +2173,20 @@ It contains the information that the calling application passed to <em>launchApp
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var reqAppControl = tizen.application.getCurrentApplication().getRequestedAppControl();
- if (reqAppControl) {
-     console.log("Requester AppID : " + reqAppControl.callerAppId);
-
-     var appControl = reqAppControl.appControl;
-     if (appControl.operation == "http://tizen.org/appcontrol/operation/pick") {
-         var data = new tizen.ApplicationControlData("http://tizen.org/appcontrol/data/selected", ["Image1.jpg"]);
-         reqAppControl.replyResult([data]);
-     }
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var reqAppControl = tizen.application.getCurrentApplication().getRequestedAppControl();
+if (reqAppControl)
+{
+&nbsp;&nbsp;&nbsp;console.log("Requester AppID: " + reqAppControl.callerAppId);
+
+&nbsp;&nbsp;&nbsp;var appControl = reqAppControl.appControl;
+&nbsp;&nbsp;&nbsp;if (appControl.operation == "http://tizen.org/appcontrol/operation/pick")
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var data = new tizen.ApplicationControlData("http://tizen.org/appcontrol/data/selected", ["Image1.jpg"]);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;reqAppControl.replyResult([data]);
+&nbsp;&nbsp;&nbsp;}
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="RequestedApplicationControl::replyFailure">
@@ -2168,16 +2216,19 @@ to perform the requested action.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var reqAppControl = tizen.application.getCurrentApplication().getRequestedAppControl();
- if (reqAppControl) {
-     console.log("Requester AppID : " + reqAppControl.callerAppId);
-
-     var appControl = reqAppControl.appControl;
-     if (appControl.operation == "http://tizen.org/appcontrol/operation/pick") {
-         reqAppControl.replyFailure();
-     }
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var reqAppControl = tizen.application.getCurrentApplication().getRequestedAppControl();
+if (reqAppControl)
+{
+&nbsp;&nbsp;&nbsp;console.log("Requester AppID: " + reqAppControl.callerAppId);
+
+&nbsp;&nbsp;&nbsp;var appControl = reqAppControl.appControl;
+&nbsp;&nbsp;&nbsp;if (appControl.operation == "http://tizen.org/appcontrol/operation/pick")
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;reqAppControl.replyFailure();
+&nbsp;&nbsp;&nbsp;}
+}
+</pre>
 </div>
 </dd>
 </dl>
@@ -2309,13 +2360,15 @@ This callback interface specifies a success method with an array of
         </ul>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function onListInstalledApps(applications) {
-     for (var i = 0; i &lt; applications.length; i++)
-         console.log("ID : " + applications[i].id);
- }
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function onListInstalledApps(applications)
+{
+&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; applications.length; i++)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("ID: " + applications[i].id);
+}
 
- tizen.application.getAppsInfo(onListInstalledApps);
- </pre>
+tizen.application.getAppsInfo(onListInstalledApps);
+</pre>
 </div>
 </dd>
 </dl>
@@ -2369,43 +2422,42 @@ It is used in <em>ApplicationManager.findAppControl()</em>.
         </ul>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var appControl = new tizen.ApplicationControl(
-     "http://tizen.org/appcontrol/operation/pick",
-     null,
-     "image/jpeg",
-     null);
-
- // FindAppControlSuccessCallback instance
- function successCB(appInfos, appControl)
- {
-     // appControl is same object with the value passed as first parameter to findAppControl()
-     var appControlReplyCallback = {
-         // callee sent a reply
-         onsuccess: function(data) {
-             for (var i = 0; i &lt; data.length; i++) {
-                 if (data[i].key == "http://tizen.org/appcontrol/data/selected") {
-                     console.log('Selected image is ' + data[i].value[0]);
-                 }
-             }
-         },
-         // callee returned failure
-         onfailure: function() {
-             console.log('The launch application control failed');
-         }
-     }
-
-     var appId = appInfos[0].id; // select first app's id
-
-     tizen.application.launchAppControl(
-         appControl,
-         appId,
-         function() {console.log("launch application control succeed"); },
-        function(e) {console.log("launch application control failed. reason: " + e.message); },
-        appControlReplyCallback );
- }
-
- tizen.application.findAppControl(appControl, successCB);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var appControl = new tizen.ApplicationControl("http://tizen.org/appcontrol/operation/pick",
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;null, "image/jpeg", null);
+
+/* FindAppControlSuccessCallback instance */
+function successCB(appInfos, appControl)
+{
+&nbsp;&nbsp;&nbsp;/* appControl is same object with the value passed as first parameter to findAppControl() */
+&nbsp;&nbsp;&nbsp;var appControlReplyCallback =
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Callee sent a reply */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;onsuccess: function(data)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; data.length; i++)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (data[i].key == "http://tizen.org/appcontrol/data/selected")
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('Selected image is ' + data[i].value[0]);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Callee returned failure */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;onfailure: function()
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('The launch application control failed');
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;}
+
+&nbsp;&nbsp;&nbsp;var appId = appInfos[0].id; /* Select first app's id */
+
+&nbsp;&nbsp;&nbsp;tizen.application.launchAppControl(appControl, appId,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;function() {console.log("launch application control succeed");},
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;function(e) {console.log("launch application control failed. reason: " + e.message);},
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;appControlReplyCallback);
+}
+
+tizen.application.findAppControl(appControl, successCB);
+</pre>
 </div>
 </dd>
 </dl>
@@ -2484,35 +2536,34 @@ This callback interface specifies two methods:
           </ul>
          </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var appControl = new tizen.ApplicationControl(
-     "http://tizen.org/appcontrol/operation/pick",
-     null,
-     "image/jpeg",
-     null);
-
- // ApplicationControlDataArrayReplyCallback instance
- var appControlReplyCallback = {
-     // callee sent a reply
-     onsuccess: function(data) {
-         for (var i = 0; i &lt; data.length; i++) {
-             if (data[i].key == "http://tizen.org/appcontrol/data/selected") {
-                 console.log('Selected image is ' + data[i].value[0]);
-             }
-         }
-     },
-     // callee returned failure
-     onfailure: function() {
-         console.log('The launch application control failed');
-     }
- }
-
- tizen.application.launchAppControl(
-     appControl,
-     null,
-     function() {console.log("launch application control succeed"); },
-     function(e) {console.log("launch application control failed. reason: " + e.message); },
-     appControlReplyCallback );
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var appControl = new tizen.ApplicationControl("http://tizen.org/appcontrol/operation/pick",
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;null, "image/jpeg", null);
+
+/* ApplicationControlDataArrayReplyCallback instance */
+var appControlReplyCallback =
+{
+&nbsp;&nbsp;&nbsp;/* Callee sent a reply */
+&nbsp;&nbsp;&nbsp;onsuccess: function(data)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; data.length; i++)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (data[i].key == "http://tizen.org/appcontrol/data/selected")
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('Selected image is ' + data[i].value[0]);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;/* Callee returned failure */
+&nbsp;&nbsp;&nbsp;onfailure: function()
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('The launch application control failed');
+&nbsp;&nbsp;&nbsp;}
+}
+
+tizen.application.launchAppControl(appControl, null,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;function() {console.log("launch application control succeed");},
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;function(e) {console.log("launch application control failed. reason: " + e.message);},
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;appControlReplyCallback);
+</pre>
 </div>
 <div class="methods">
 <h4>Methods</h4>
@@ -2581,19 +2632,24 @@ an application is installed, updated, or uninstalled.
           </p>
          </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var appEventCallback = {
-    oninstalled: function(appInfo) {
-       console.log('The application ' + appInfo.name + ' is installed');
-    },
-    onupdated: function(appInfo) {
-       console.log('The application ' + appInfo.name + ' is updated');
-    },
-    onuninstalled: function(appid) {
-       console.log('The application ' + appid + ' is uninstalled');
-    }
- };
- var watchId = tizen.application.addAppInfoEventListener(appEventCallback);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var appEventCallback =
+{
+&nbsp;&nbsp;&nbsp;oninstalled: function(appInfo)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('The application ' + appInfo.name + ' is installed');
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;onupdated: function(appInfo)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('The application ' + appInfo.name + ' is updated');
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;onuninstalled: function(appid)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('The application ' + appid + ' is uninstalled');
+&nbsp;&nbsp;&nbsp;}
+};
+var watchId = tizen.application.addAppInfoEventListener(appEventCallback);
+</pre>
 </div>
 <div class="methods">
 <h4>Methods</h4>
@@ -2731,30 +2787,37 @@ Platform modules will be able to broadcast system events in a future Tizen relea
         </ul>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var app = tizen.application.getCurrentApplication();
-
- // for user events: sender's application ID  and event name must be provided by using a dictionary
- // Let's assume that at least two applications are installed
- function onListInstalledApps(appsInfo) {
-   var appId = null;
-
-   if (appsInfo.length &gt; 0 &amp;&amp; app.appInfo.id != appsInfo[0].id) {
-     appId = appsInfo[0].id;
-   } else if (appsInfo.length &gt; 1) {
-     appId = appsInfo[1].id;
-   }
-
-   var eventCB = function(event, data) {
-     console.log("Data: " + JSON.stringify(data));
-     // do something
-   };
-
-   if (appId) {
-     var watchId = app.addEventListener({"appId": appId, "name": "custom_user_event"}, eventCB);
-   }
- }
- tizen.application.getAppsInfo(onListInstalledApps);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var app = tizen.application.getCurrentApplication();
+
+/* For user events: sender's application ID and event name must be provided by using a dictionary */
+/* Let's assume that at least two applications are installed */
+function onListInstalledApps(appsInfo)
+{
+&nbsp;&nbsp;&nbsp;var appId = null;
+
+&nbsp;&nbsp;&nbsp;if (appsInfo.length &gt; 0 &amp;&amp; app.appInfo.id != appsInfo[0].id)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;appId = appsInfo[0].id;
+&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;else if (appsInfo.length &gt; 1)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;appId = appsInfo[1].id;
+&nbsp;&nbsp;&nbsp;}
+
+&nbsp;&nbsp;&nbsp;var eventCB = function(event, data)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Data: " + JSON.stringify(data));
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Do something */
+&nbsp;&nbsp;&nbsp;};
+
+&nbsp;&nbsp;&nbsp;if (appId)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var watchId = app.addEventListener({"appId": appId, "name": "custom_user_event"}, eventCB);
+&nbsp;&nbsp;&nbsp;}
+}
+tizen.application.getAppsInfo(onListInstalledApps);
+</pre>
 </div>
 </dd>
 </dl>
index 978173a..1eece8b 100644 (file)
@@ -457,16 +457,19 @@ In this mode, <em>getEntries()</em>, <em>getEntryByName()</em>, and <em>extractA
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function successCallback(archive) {
-     console.log("Success, can now read from archive " + archive);
- }
-
- function errorCallback(error) {
-     console.log(error);
- }
-
- tizen.archive.open("downloads/some_archive.zip", "r", successCallback, errorCallback);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function successCallback(archive)
+{
+&nbsp;&nbsp;&nbsp;console.log("Success, can now read from archive " + archive);
+}
+
+function errorCallback(error)
+{
+&nbsp;&nbsp;&nbsp;console.log(error);
+}
+
+tizen.archive.open("downloads/some_archive.zip", "r", successCallback, errorCallback);
+</pre>
 </div>
 </dd>
 <dt class="method" id="ArchiveManager::abort">
@@ -499,13 +502,15 @@ In this mode, <em>getEntries()</em>, <em>getEntryByName()</em>, and <em>extractA
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function openSuccess(archive) {
-     operationId = archive.extractAll("downloads/extracted");
-     tizen.archive.abort(operationId);
- }
-
- tizen.archive.open("downloads/some_archive.zip", "r", openSuccess);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function openSuccess(archive)
+{
+&nbsp;&nbsp;&nbsp;operationId = archive.extractAll("downloads/extracted");
+&nbsp;&nbsp;&nbsp;tizen.archive.abort(operationId);
+}
+
+tizen.archive.open("downloads/some_archive.zip", "r", openSuccess);
+</pre>
 </div>
 </dd>
 </dl>
@@ -724,24 +729,29 @@ If the source file is big then the callback can also be called while the file is
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function errorCallback(error) {
-     console.log(error);
- }
-
- function successCallback() {
-     console.log("done");
- }
-
- function progressCallback(opId, val, name) {
-     console.log("opId: " + opId + " with progress val: " + val);
- }
-
- function createSuccess(archive) {
-     archive.add("downloads/file.txt", successCallback, errorCallback, progressCallback);
- }
-
- tizen.archive.open("downloads/new_archive.zip", "w", createSuccess);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function errorCallback(error)
+{
+&nbsp;&nbsp;&nbsp;console.log(error);
+}
+
+function successCallback()
+{
+&nbsp;&nbsp;&nbsp;console.log("done");
+}
+
+function progressCallback(opId, val, name)
+{
+&nbsp;&nbsp;&nbsp;console.log("opId: " + opId + " with progress val: " + val);
+}
+
+function createSuccess(archive)
+{
+&nbsp;&nbsp;&nbsp;archive.add("downloads/file.txt", successCallback, errorCallback, progressCallback);
+}
+
+tizen.archive.open("downloads/new_archive.zip", "w", createSuccess);
+</pre>
 </div>
 </dd>
 <dt class="method" id="ArchiveFile::extractAll">
@@ -835,24 +845,29 @@ UnknownError: In any other error case              </li>
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function errorCallback(error) {
-     console.log(error);
- }
-
- function successCallback() {
-     console.log("done");
- }
-
- function progressCallback(opId, val, name) {
-     console.log("extracting operation (: " + opId + ") is in progress (" + (val * 100).toFixed(1) + "%)");
- }
-
- function openSuccess(archive) {
-     archive.extractAll("music", successCallback, errorCallback, progressCallback);
- }
-
- tizen.archive.open("downloads/some_archive.zip", "r", openSuccess);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function errorCallback(error)
+{
+&nbsp;&nbsp;&nbsp;console.log(error);
+}
+
+function successCallback()
+{
+&nbsp;&nbsp;&nbsp;console.log("done");
+}
+
+function progressCallback(opId, val, name)
+{
+&nbsp;&nbsp;&nbsp;console.log("extracting operation (: " + opId + ") is in progress (" + (val * 100).toFixed(1) + "%)");
+}
+
+function openSuccess(archive)
+{
+&nbsp;&nbsp;&nbsp;archive.extractAll("music", successCallback, errorCallback, progressCallback);
+}
+
+tizen.archive.open("downloads/some_archive.zip", "r", openSuccess);
+</pre>
 </div>
 </dd>
 <dt class="method" id="ArchiveFile::getEntries">
@@ -921,23 +936,28 @@ UnknownError: In case of any error              </li>
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function errorCallback(error) {
-     console.log(error);
- }
-
- function getEntriesSuccess(entries) {
-     console.log("Entries length: " + entries.length);
-     for (var i=0; i &lt; entries.length; i++) {
-         console.log(entries[i].name);
-     }
- }
-
- function openSuccess(archive) {
-     archive.getEntries(getEntriesSuccess, errorCallback);
- }
-
- tizen.archive.open("downloads/some_archive.zip", "r", openSuccess, errorCallback);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function errorCallback(error)
+{
+&nbsp;&nbsp;&nbsp;console.log(error);
+}
+
+function getEntriesSuccess(entries)
+{
+&nbsp;&nbsp;&nbsp;console.log("Entries length: " + entries.length);
+&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; entries.length; i++)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(entries[i].name);
+&nbsp;&nbsp;&nbsp;}
+}
+
+function openSuccess(archive)
+{
+&nbsp;&nbsp;&nbsp;archive.getEntries(getEntriesSuccess, errorCallback);
+}
+
+tizen.archive.open("downloads/some_archive.zip", "r", openSuccess, errorCallback);
+</pre>
 </div>
 </dd>
 <dt class="method" id="ArchiveFile::getEntryByName">
@@ -1012,20 +1032,24 @@ UnknownError: In case of any other error              </li>
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function errorCallback(error) {
-     console.log(error);
- }
-
- function getEntrySuccess(entry) {
-     console.log("Entry: " + entry.name + " size: " + entry.size);
- }
-
- function openSuccess(archive) {
-     archive.getEntryByName("arch/my_file.txt", getEntrySuccess, errorCallback);
- }
-
- tizen.archive.open("downloads/some_archive.zip", "r", openSuccess);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function errorCallback(error)
+{
+&nbsp;&nbsp;&nbsp;console.log(error);
+}
+
+function getEntrySuccess(entry)
+{
+&nbsp;&nbsp;&nbsp;console.log("Entry: " + entry.name + " size: " + entry.size);
+}
+
+function openSuccess(archive)
+{
+&nbsp;&nbsp;&nbsp;archive.getEntryByName("arch/my_file.txt", getEntrySuccess, errorCallback);
+}
+
+tizen.archive.open("downloads/some_archive.zip", "r", openSuccess);
+</pre>
 </div>
 </dd>
 <dt class="method" id="ArchiveFile::close">
@@ -1229,24 +1253,29 @@ UnknownError: In case of any other error              </li>
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function errorCallback(error) {
-     console.log(error);
- }
-
- function extractSuccessCallback() {
-     console.log("done");
- }
-
- function getEntrySuccess(entry) {
-     entry.extract("downloads/extract", extractSuccessCallback, errorCallback);
- }
-
- function openSuccess(archive) {
-     archive.getEntryByName("my_file.txt", getEntrySuccess, errorCallback);
- }
-
- tizen.archive.open("downloads/some_archive.zip", "r", openSuccess, errorCallback);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function errorCallback(error)
+{
+&nbsp;&nbsp;&nbsp;console.log(error);
+}
+
+function extractSuccessCallback()
+{
+&nbsp;&nbsp;&nbsp;console.log("done");
+}
+
+function getEntrySuccess(entry)
+{
+&nbsp;&nbsp;&nbsp;entry.extract("downloads/extract", extractSuccessCallback, errorCallback);
+}
+
+function openSuccess(archive)
+{
+&nbsp;&nbsp;&nbsp;archive.getEntryByName("my_file.txt", getEntrySuccess, errorCallback);
+}
+
+tizen.archive.open("downloads/some_archive.zip", "r", openSuccess, errorCallback);
+</pre>
 </div>
 </dd>
 </dl>
index 1ce080f..f4873f1 100644 (file)
@@ -115,8 +115,9 @@ There is a tizen.badge object that allows accessing the functionality of the Bad
  2.3
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">   console.log("Maximum length of a badge number is " + tizen.badge.maxBadgeCount);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+console.log("Maximum length of a badge number is " + tizen.badge.maxBadgeCount);
+</pre>
 </div>
 </li></ul>
 </div>
@@ -173,10 +174,11 @@ There is a tizen.badge object that allows accessing the functionality of the Bad
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var app = tizen.application.getCurrentApplication();
- var appid = app.appInfo.id;
- tizen.badge.setBadgeCount(appid, 3);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var app = tizen.application.getCurrentApplication();
+var appid = app.appInfo.id;
+tizen.badge.setBadgeCount(appid, 3);
+</pre>
 </div>
 </dd>
 <dt class="method" id="BadgeManager::getBadgeCount">
@@ -229,10 +231,11 @@ There is a tizen.badge object that allows accessing the functionality of the Bad
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var app = tizen.application.getCurrentApplication();
- var appid = app.appInfo.id;
- var count = tizen.badge.getBadgeCount(appid);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var app = tizen.application.getCurrentApplication();
+var appid = app.appInfo.id;
+var count = tizen.badge.getBadgeCount(appid);
+</pre>
 </div>
 </dd>
 <dt class="method" id="BadgeManager::addChangeListener">
@@ -288,19 +291,22 @@ There is a tizen.badge object that allows accessing the functionality of the Bad
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">  // Let's assume that at least two applications are installed
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Assume that at least two applications are installed */
 
-  function onListInstalledApps(appsInfo) {
-    function watcher(appId, count) {
-      console.log(appId + ' badge number were updated : ' + count);
-    }
+function onListInstalledApps(appsInfo)
+{
+&nbsp;&nbsp;&nbsp;function watcher(appId, count)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(appId + ' badge number were updated: ' + count);
+&nbsp;&nbsp;&nbsp;}
 
-    // Registers to be notified when the badge number changes
-    tizen.badge.addChangeListener([appsInfo[0].id, [appsInfo[1].id], watcher);
-  }
+&nbsp;&nbsp;&nbsp;/* Registers to be notified when the badge number changes */
+&nbsp;&nbsp;&nbsp;tizen.badge.addChangeListener([appsInfo[0].id, [appsInfo[1].id], watcher);
+}
 
-  tizen.application.getAppsInfo(onListInstalledApps);
- </pre>
+tizen.application.getAppsInfo(onListInstalledApps);
+</pre>
 </div>
 </dd>
 <dt class="method" id="BadgeManager::removeChangeListener">
@@ -349,22 +355,25 @@ There is a tizen.badge object that allows accessing the functionality of the Bad
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">  // Let's assume that at least two applications are installed
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Assume that at least two applications are installed */
 
-  function onListInstalledApps(appsInfo) {
-    function watcher(appId, count) {
-      console.log(appId + ' badge number were updated : ' + count);
-    }
+function onListInstalledApps(appsInfo)
+{
+&nbsp;&nbsp;&nbsp;function watcher(appId, count)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(appId + ' badge number were updated: ' + count);
+&nbsp;&nbsp;&nbsp;}
 
-    // Registers to be notified when the badge number changes
-    tizen.badge.addChangeListener([appsInfo[0].id, [appsInfo[1].id], watcher);
+&nbsp;&nbsp;&nbsp;/* Registers to be notified when the badge number changes */
+&nbsp;&nbsp;&nbsp;tizen.badge.addChangeListener([appsInfo[0].id, [appsInfo[1].id], watcher);
 
-    // Cancels the watch operation
-    tizen.badge.removeChangeListener([appsInfo[0].id, [appsInfo[1].id]);
-  }
+&nbsp;&nbsp;&nbsp;/* Cancels the watch operation */
+&nbsp;&nbsp;&nbsp;tizen.badge.removeChangeListener([appsInfo[0].id, [appsInfo[1].id]);
+}
 
-  tizen.application.getAppsInfo(onListInstalledApps);
- </pre>
+tizen.application.getAppsInfo(onListInstalledApps);
+</pre>
 </div>
 </dd>
 </dl>
@@ -413,21 +422,25 @@ There is a tizen.badge object that allows accessing the functionality of the Bad
         </ul>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">   // logs the number of badge changes:
-   function watcher(appId, count) {
-     console.log(appId + ' -&gt; badge number updates: ' + count);
-   }
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Logs the number of badge changes */
+function watcher(appId, count)
+{
+&nbsp;&nbsp;&nbsp;console.log(appId + ' -&gt; badge number updates: ' + count);
+}
 
-   // gets Application's ID:
-   var appId = tizen.application.getCurrentApplication().appInfo.id;
+/* Gets Application's ID */
+var appId = tizen.application.getCurrentApplication().appInfo.id;
 
-   // let's assume that the application "TestSample.main" has been installed.
-   var targetAppId = "TestSample.main";
+/* Assume that the application "TestSample.main" has been installed */
+var targetAppId = "TestSample.main";
 
-   // registers to be notified when the badge number changes for either
-   // this or targetAppId application:
-   tizen.badge.addChangeListener([appId, targetAppId], watcher);
- </pre>
+/*
+   Registers to be notified when the badge number changes for either
+   this or targetAppId application
+*/
+tizen.badge.addChangeListener([appId, targetAppId], watcher);
+</pre>
 </div>
 </dd>
 </dl>
index 4e928fb..da71999 100644 (file)
@@ -507,9 +507,12 @@ The <em>tizen.bluetooth</em> object allows access to the Bluetooth API.
 <dl>
 <pre class="webidl prettyprint">BluetoothLEServiceData(DOMString uuid, DOMString data);</pre>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Creates a serviceData.
- var service = new tizen.BluetoothLEServiceData("c500-11e5", "0x1811");
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Creates a serviceData */
+var service = new tizen.BluetoothLEServiceData("c500-11e5", "0x1811");
+</pre>
+</div>
+</dl>
 </div>
 <div class="attributes">
 <h4>Attributes</h4>
@@ -523,10 +526,11 @@ The <em>tizen.bluetooth</em> object allows access to the Bluetooth API.
  2.3.1
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Creates a serviceData.
- var service = new tizen.BluetoothLEServiceData("c500-11e5", "0x1811");
- service.uuid = "f236-41a4";
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Creates a serviceData */
+var service = new tizen.BluetoothLEServiceData("c500-11e5", "0x1811");
+service.uuid = "f236-41a4";
+</pre>
 </div>
 </li>
 <li class="attribute" id="BluetoothLEServiceData::data">
@@ -538,10 +542,11 @@ The <em>tizen.bluetooth</em> object allows access to the Bluetooth API.
  2.3.1
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Creates a serviceData.
- var service = new tizen.BluetoothLEServiceData("c500-11e5", "0x1811");
- service.data = "0x1815";
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Creates a serviceData */
+var service = new tizen.BluetoothLEServiceData("c500-11e5", "0x1811");
+service.data = "0x1815";
+</pre>
 </div>
 </li>
 </ul>
@@ -566,9 +571,10 @@ The <em>tizen.bluetooth</em> object allows access to the Bluetooth API.
 <dl>
 <pre class="webidl prettyprint">BluetoothLEManufacturerData(DOMString id, DOMString data);</pre>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Creates a manufacturerData.
- var manufacture = new tizen.BluetoothLEManufacturerData("127", "0x0057");
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Creates a manufacturerData */
+var manufacture = new tizen.BluetoothLEManufacturerData("127", "0x0057");
+</pre>
 </div>
 </dl>
 </div>
@@ -584,10 +590,11 @@ The <em>tizen.bluetooth</em> object allows access to the Bluetooth API.
  2.3.1
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Creates a manufacturerData.
- var manufacture = new tizen.BluetoothLEManufacturerData("127", "0x0057");
- manufacturer.id = "129";
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Creates a manufacturerData */
+var manufacture = new tizen.BluetoothLEManufacturerData("127", "0x0057");
+manufacturer.id = "129";
+</pre>
 </div>
 </li>
 <li class="attribute" id="BluetoothLEManufacturerData::data">
@@ -599,10 +606,11 @@ The <em>tizen.bluetooth</em> object allows access to the Bluetooth API.
  2.3.1
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Creates a manufacturerData.
- var manufacture = new tizen.BluetoothLEManufacturerData("127", "0x0057");
- manufacturer.data = "0x0059"
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Creates a manufacturerData */
+var manufacture = new tizen.BluetoothLEManufacturerData("127", "0x0057");
+manufacturer.data = "0x0059"
+</pre>
 </div>
 </li>
 </ul>
@@ -632,9 +640,13 @@ This dictionary is used as an input parameter of the BluetoothLEAdvertiseData co
           </p>
          </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var advertData = { includeName : false, uuids: ["f236-41a4"], solicitationuuids: ["5857-4d3f"],
-                    appearance: 192, includeTxPowerLevel: false  }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var advertData = 
+{
+&nbsp;&nbsp;&nbsp;includeName: false, uuids: ["f236-41a4"], solicitationuuids: ["5857-4d3f"],
+&nbsp;&nbsp;&nbsp;appearance: 192, includeTxPowerLevel: false
+}
+</pre>
 </div>
 </div>
 <div class="interface" id="BluetoothLEAdvertiseData">
@@ -663,10 +675,14 @@ This represents the data to be advertised as well as the scan response data for
           </p>
          </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var advertData = { includeName : false, uuids: ["f236-41a4"], solicitationuuids: ["5857-4d3f"],
-                    appearance: 192, includeTxPowerLevel: false }
- var advertise = new tizen.BluetoothLEAdvertiseData(advertData);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var advertData =
+{
+&nbsp;&nbsp;&nbsp;includeName: false, uuids: ["f236-41a4"], solicitationuuids: ["5857-4d3f"],
+&nbsp;&nbsp;&nbsp;appearance: 192, includeTxPowerLevel: false
+}
+var advertise = new tizen.BluetoothLEAdvertiseData(advertData);
+</pre>
 </div>
 <div class="constructors">
 <h4 id="BluetoothLEAdvertiseData::constructor">Constructors</h4>
@@ -685,9 +701,10 @@ If attribute is set to null, The default value is set to a false.
  2.3.1
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var advertise = new tizen.BluetoothLEAdvertiseData();
- advertise.includeName = true;
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var advertise = new tizen.BluetoothLEAdvertiseData();
+advertise.includeName = true;
+</pre>
 </div>
 </li>
 <li class="attribute" id="BluetoothLEAdvertiseData::uuids">
@@ -700,9 +717,10 @@ If attribute is set to null, The default value is set to a false.
  2.3.1
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var advertise = new tizen.BluetoothLEAdvertiseData();
- advertise.uuids = ["180d"];
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var advertise = new tizen.BluetoothLEAdvertiseData();
+advertise.uuids = ["180d"];
+</pre>
 </div>
 </li>
 <li class="attribute" id="BluetoothLEAdvertiseData::solicitationuuids">
@@ -715,9 +733,10 @@ If attribute is set to null, The default value is set to a false.
  2.3.1
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var advertise = new tizen.BluetoothLEAdvertiseData();
- advertise.solicitationuuids = ["180f"];
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var advertise = new tizen.BluetoothLEAdvertiseData();
+advertise.solicitationuuids = ["180f"];
+</pre>
 </div>
 </li>
 <li class="attribute" id="BluetoothLEAdvertiseData::appearance">
@@ -734,9 +753,10 @@ See the <a href="https://developer.bluetooth.org/gatt/characteristics/Pages/Char
  2.3.1
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var advertise = new tizen.BluetoothLEAdvertiseData();
- advertise.appearance = 192;
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var advertise = new tizen.BluetoothLEAdvertiseData();
+advertise.appearance = 192;
+</pre>
 </div>
 </li>
 <li class="attribute" id="BluetoothLEAdvertiseData::includeTxPowerLevel">
@@ -749,9 +769,10 @@ If attribute is set to null, The default value is set to a false.
  2.3.1
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var advertise = new tizen.BluetoothLEAdvertiseData();
- advertise.includeTxPowerLevel = true;
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var advertise = new tizen.BluetoothLEAdvertiseData();
+advertise.includeTxPowerLevel = true;
+</pre>
 </div>
 </li>
 <li class="attribute" id="BluetoothLEAdvertiseData::serviceData">
@@ -763,10 +784,11 @@ If attribute is set to null, The default value is set to a false.
  2.3.1
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var advertise = new tizen.BluetoothLEAdvertiseData();
- var service = new tizen.BluetoothLEServiceData("c500-11e5", "0x1811");
- advertise.serviceData = service;
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var advertise = new tizen.BluetoothLEAdvertiseData();
+var service = new tizen.BluetoothLEServiceData("c500-11e5", "0x1811");
+advertise.serviceData = service;
+</pre>
 </div>
 </li>
 <li class="attribute" id="BluetoothLEAdvertiseData::manufacturerData">
@@ -778,10 +800,11 @@ If attribute is set to null, The default value is set to a false.
  2.3.1
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var advertise = new tizen.BluetoothLEAdvertiseData();
- var manufacture = new tizen.BluetoothLEManufacturerData("127", "0x0057");
- advertise.manufacturerData = manufacture;
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var advertise = new tizen.BluetoothLEAdvertiseData();
+var manufacture = new tizen.BluetoothLEManufacturerData("127", "0x0057");
+advertise.manufacturerData = manufacture;
+</pre>
 </div>
 </li>
 </ul>
@@ -817,8 +840,9 @@ If attribute is set to null, The default value is set to a false.
  1.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> console.log(tizen.bluetooth.deviceMajor);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+console.log(tizen.bluetooth.deviceMajor);
+</pre>
 </div>
 </li>
 <li class="attribute" id="BluetoothManager::deviceMinor">
@@ -831,8 +855,9 @@ If attribute is set to null, The default value is set to a false.
  1.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> console.log(tizen.bluetooth.deviceMinor);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+console.log(tizen.bluetooth.deviceMinor);
+</pre>
 </div>
 </li>
 <li class="attribute" id="BluetoothManager::deviceService">
@@ -845,8 +870,9 @@ If attribute is set to null, The default value is set to a false.
  1.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> console.log(tizen.bluetooth.deviceService);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+console.log(tizen.bluetooth.deviceService);
+</pre>
 </div>
 </li>
 </ul>
@@ -896,12 +922,16 @@ Instead, use <em>http://tizen.org/privilege/bluetooth</em>.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> try {
-     var adapter = tizen.bluetooth.getDefaultAdapter() ;
- } catch (err) {
-     console.log (err.name +": " + err.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+try
+{
+&nbsp;&nbsp;&nbsp;var adapter = tizen.bluetooth.getDefaultAdapter();
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="BluetoothManager::getLEAdapter">
@@ -952,12 +982,16 @@ Instead, use <em>http://tizen.org/privilege/bluetooth</em>.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> try {
-     var adapter = tizen.bluetooth.getLEAdapter();
- } catch (err) {
-     console.log(err.name +": " + err.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+try
+{
+&nbsp;&nbsp;&nbsp;var adapter = tizen.bluetooth.getLEAdapter();
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+}
+</pre>
 </div>
 </dd>
 </dl>
@@ -1048,10 +1082,11 @@ Registering a service in the device service database            </li>
  1.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Access adapter name
- var adapter = tizen.bluetooth.getDefaultAdapter();
- console.log ("Bluetooth adapter name: " + adapter.name);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Access adapter name */
+var adapter = tizen.bluetooth.getDefaultAdapter();
+console.log("Bluetooth adapter name: " + adapter.name);
+</pre>
 </div>
 </li>
 <li class="attribute" id="BluetoothAdapter::address">
@@ -1064,9 +1099,10 @@ Registering a service in the device service database            </li>
  1.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var adapter = tizen.bluetooth.getDefaultAdapter();
- console.log("Bluetooth device address: " + adapter.address);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var adapter = tizen.bluetooth.getDefaultAdapter();
+console.log("Bluetooth device address: " + adapter.address);
+</pre>
 </div>
 </li>
 <li class="attribute" id="BluetoothAdapter::powered">
@@ -1090,9 +1126,10 @@ This attribute holds one of the following 2 values:
  1.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var adapter = tizen.bluetooth.getDefaultAdapter();
- console.log("Bluetooth state: " + (adapter.powered ? "On" : "Off"));
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var adapter = tizen.bluetooth.getDefaultAdapter();
+console.log("Bluetooth state: " + (adapter.powered ? "On" : "Off"));
+</pre>
 </div>
 </li>
 <li class="attribute" id="BluetoothAdapter::visible">
@@ -1105,10 +1142,11 @@ This attribute holds one of the following 2 values:
  1.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Queries the current visible state
- var adapter = tizen.bluetooth.getDefaultAdapter();
- console.log ("Bluetooth Visibility: " + (adapter.visible ? "On" : "Off"));
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Queries the current visible state */
+var adapter = tizen.bluetooth.getDefaultAdapter();
+console.log("Bluetooth Visibility: " + (adapter.visible ? "On" : "Off"));
+</pre>
 </div>
 </li>
 </ul>
@@ -1191,25 +1229,30 @@ Instead, use <em>http://tizen.org/privilege/bluetooth</em>.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var adapter = tizen.bluetooth.getDefaultAdapter();
-
- var bt_always_on = tizen.systeminfo.getCapability("http://tizen.org/capability/network.bluetooth.always_on");
-
- function changeName(newName) {
-     if (adapter.name != newName) {
-         // initiate change name
-         adapter.setName(newName, function() {
-             console.log("Adapter name changed to " + adapter.name);
-         },
-         function(e) {
-             console.log("Failed to change name: " + e.message);
-         });
-     }
- }
- if (bt_always_on === false) {
-     changeName("myDevice");
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var adapter = tizen.bluetooth.getDefaultAdapter();
+
+var bt_always_on = tizen.systeminfo.getCapability("http://tizen.org/capability/network.bluetooth.always_on");
+
+function changeName(newName)
+{
+&nbsp;&nbsp;&nbsp;if (adapter.name != newName)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Initiate change name */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;adapter.setName(newName, function()
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Adapter name changed to " + adapter.name);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}, function(e)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Failed to change name: " + e.message);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;});
+&nbsp;&nbsp;&nbsp;}
+}
+if (bt_always_on === false)
+{
+&nbsp;&nbsp;&nbsp;changeName("myDevice");
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="BluetoothAdapter::setPowered">
@@ -1288,41 +1331,51 @@ Instead, use <em>http://tizen.org/privilege/bluetooth</em>.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var adapter = tizen.bluetooth.getDefaultAdapter();
-
- function powerOn() {
-      // If adapter is not powered on
-      if (!adapter.powered) {
-           // Initiates power on
-           adapter.setPowered(true, function() {
-               console.log("Bluetooth powered on success.");
-           },
-           function(e) {
-               console.log("Failed to power on Bluetooth: " + e.message);
-           });
-      }
- }
-
- function powerOff() {
-      // If powered on
-      if (adapter.powered) {
-           // Initiates power off
-           adapter.setPowered(false, function() {
-               console.log("Bluetooth powered off successfully.");
-           },
-           function(e) {
-               console.log("Failed to power off Bluetooth: " + e.message);
-           });
-      }
- }
-
- var bt_always_on = tizen.systeminfo.getCapability("http://tizen.org/capability/network.bluetooth.always_on");
- if (bt_always_on === true) {
-     console.log("Bluetooth cannot be turn off or on because this device must be always enabled.");
- } else {
-     powerOn();
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var adapter = tizen.bluetooth.getDefaultAdapter();
+
+function powerOn()
+{
+&nbsp;&nbsp;&nbsp;/* If adapter is not powered on */
+&nbsp;&nbsp;&nbsp;if (!adapter.powered)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Initiates power on */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;adapter.setPowered(true, function()
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Bluetooth powered on success.");
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}, function(e)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Failed to power on Bluetooth: " + e.message);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;});
+&nbsp;&nbsp;&nbsp;}
+}
+
+function powerOff()
+{
+&nbsp;&nbsp;&nbsp;/* If powered on */
+&nbsp;&nbsp;&nbsp;if (adapter.powered)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Initiates power off */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;adapter.setPowered(false, function()
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Bluetooth powered off successfully.");
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}, function(e)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Failed to power off Bluetooth: " + e.message);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;});
+&nbsp;&nbsp;&nbsp;}
+}
+
+var bt_always_on = tizen.systeminfo.getCapability("http://tizen.org/capability/network.bluetooth.always_on");
+if (bt_always_on === true)
+{
+&nbsp;&nbsp;&nbsp;console.log("Bluetooth cannot be turn off or on because this device must be always enabled.");
+}
+else
+{
+&nbsp;&nbsp;&nbsp;powerOn();
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="BluetoothAdapter::setChangeListener">
@@ -1363,21 +1416,26 @@ Instead, use <em>http://tizen.org/privilege/bluetooth</em>.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var changeListener = {
-      onstatechanged: function(powered) {
-          console.log ("Power state is changed into: " + powered);
-      },
-      onnamechanged: function(name) {
-          console.log("Name is changed to: " + name);
-      },
-      onvisibilitychanged: function(visible) {
-          console.log("Visibility is changed into: " + visible);
-      }
- };
-
- var adapter = tizen.bluetooth.getDefaultAdapter();
- adapter.setChangeListener(changeListener);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var changeListener =
+{
+&nbsp;&nbsp;&nbsp;onstatechanged: function(powered)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Power state is changed into: " + powered);
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;onnamechanged: function(name)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Name is changed to: " + name);
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;onvisibilitychanged: function(visible)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Visibility is changed into: " + visible);
+&nbsp;&nbsp;&nbsp;}
+};
+
+var adapter = tizen.bluetooth.getDefaultAdapter();
+adapter.setChangeListener(changeListener);
+</pre>
 </div>
 </dd>
 <dt class="method" id="BluetoothAdapter::unsetChangeListener">
@@ -1406,24 +1464,29 @@ Instead, use <em>http://tizen.org/privilege/bluetooth</em>.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var adapter = tizen.bluetooth.getDefaultAdapter();
-
- var changeListener = {
-      onstatechanged: function(powered) {
-          console.log ("Power state is changed into: " + powered);
-          if (!powered)
-              adapter.unsetChangeListener();
-      },
-      onnamechanged: function(name) {
-          console.log("Name is changed to: " + name);
-      },
-      onvisibilitychanged: function(visible) {
-          console.log("Visibility is changed into: " + visible);
-      }
- };
-
- adapter.setChangeListener(changeListener);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var adapter = tizen.bluetooth.getDefaultAdapter();
+
+var changeListener =
+{
+&nbsp;&nbsp;&nbsp;onstatechanged: function(powered)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Power state is changed into: " + powered);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (!powered)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;adapter.unsetChangeListener();
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;onnamechanged: function(name)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Name is changed to: " + name);
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;onvisibilitychanged: function(visible)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Visibility is changed into: " + visible);
+&nbsp;&nbsp;&nbsp;}
+};
+
+adapter.setChangeListener(changeListener);
+</pre>
 </div>
 </dd>
 <dt class="method" id="BluetoothAdapter::discoverDevices">
@@ -1504,41 +1567,50 @@ Instead, use <em>http://tizen.org/privilege/bluetooth</em>.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var adapter = tizen.bluetooth.getDefaultAdapter();
-
- function startDiscovery() {
-
-  var discoverDevicesSuccessCallback = {
-      onstarted: function() {
-          console.log ("Device discovery started...");
-      },
-      ondevicefound: function(device) {
-          console.log("Found device - name: " + device.name + ", Address: "+ device.address);
-      },
-      ondevicedisappeared: function(address) {
-          console.log("Device disappeared: " + address);
-      },
-      onfinished: function(devices) {
-          console.log("Found Devices");
-          for (var i = 0; i &lt; devices.length; i++) {
-              console.log("Name: " + devices[i].name + ", Address: " + devices[i].address);
-          }
-          console.log("Total: " + devices.length);
-      }
-  };
-
-  // Starts searching for nearby devices, for about 12 sec.
-  adapter.discoverDevices(discoverDevicesSuccessCallback, function(e) {
-      console.log ("Failed to search devices: " + e.message + "(" + e.name + ")");
-  });
- }
-
- function onSetPoweredError(e) {
-     console.log ("Could not turn on device, reason: " + e.message + "(" + e.name + ")");
- }
-
- adapter.setPowered(true, startDiscovery, onSetPoweredError);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var adapter = tizen.bluetooth.getDefaultAdapter();
+
+function startDiscovery()
+{
+&nbsp;&nbsp;&nbsp;var discoverDevicesSuccessCallback =
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;onstarted: function()
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Device discovery started...");
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ondevicefound: function(device)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Found device - name: " + device.name + ", Address: " + device.address);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ondevicedisappeared: function(address)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Device disappeared: " + address);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;onfinished: function(devices)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Found Devices");
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; devices.length; i++)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Name: " + devices[i].name + ", Address: " + devices[i].address);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Total: " + devices.length);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;};
+
+&nbsp;&nbsp;&nbsp;/* Starts searching for nearby devices, for about 12 sec */
+&nbsp;&nbsp;&nbsp;adapter.discoverDevices(discoverDevicesSuccessCallback, function(e)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Failed to search devices: " + e.message + "(" + e.name + ")");
+&nbsp;&nbsp;&nbsp;});
+}
+
+function onSetPoweredError(e)
+{
+&nbsp;&nbsp;&nbsp;console.log("Could not turn on device, reason: " + e.message + "(" + e.name + ")");
+}
+
+adapter.setPowered(true, startDiscovery, onSetPoweredError);
+</pre>
 </div>
 </dd>
 <dt class="method" id="BluetoothAdapter::stopDiscovery">
@@ -1606,56 +1678,67 @@ Instead, use <em>http://tizen.org/privilege/bluetooth</em>.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var adapter = tizen.bluetooth.getDefaultAdapter();
-
- // Calls this method whenever user finds one of the device.
- function cancelDiscovery() {
-    adapter.stopDiscovery(function() {
-        console.log("Stop discovery success.");
-    },
-    function (e) {
-        console.log("Error while stopDiscovery:" + e.message);
-    });
- }
-
- function startDiscovery() {
-
-  var discoverDevicesSuccessCallback = {
-      onstarted: function() {
-          console.log ("Device discovery started...") ;
-      },
-      ondevicefound: function(device) {
-          console.log("Found device - name: " + device.name + ", Address: "+ device.address);
-          // Shows the device to user to check if this is the device user is looking for.
-          // For example, add this to list view.
-
-          cancelDiscovery();
-      },
-      ondevicedisappeared: function(address) {
-          console.log("Device disappeared: " + address);
-          // Removes from list, as it is no longer valid.
-      },
-      onfinished: function(devices) {
-          console.log("Found Devices");
-          for (var i = 0; i &lt; devices.length; i++) {
-              console.log("Name: " + devices[i].name + ", Address: " + devices[i].address);
-          }
-          console.log("Total: " + devices.length);
-      }
-  };
-
-  // Starts searching for nearby devices, for about 12 sec.
-  adapter.discoverDevices(discoverDevicesSuccessCallback, function(e) {
-      console.log ("Failed to search devices: " + e.message + "(" + e.name + ")");
-  });
- }
-
- function onSetPoweredError(e) {
-     console.log ("Could not turn on device, reason: " + e.message + "(" + e.name + ")");
- }
-
- adapter.setPowered(true, startDiscovery, onSetPoweredError);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var adapter = tizen.bluetooth.getDefaultAdapter();
+
+/* Calls this method whenever user finds one of the device */
+function cancelDiscovery()
+{
+&nbsp;&nbsp;&nbsp;adapter.stopDiscovery(function()
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Stop discovery success.");
+&nbsp;&nbsp;&nbsp;}, function(e)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Error while stopDiscovery:" + e.message);
+&nbsp;&nbsp;&nbsp;});
+}
+
+function startDiscovery()
+{
+&nbsp;&nbsp;&nbsp;var discoverDevicesSuccessCallback =
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;onstarted: function()
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Device discovery started...");
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ondevicefound: function(device)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Found device - name: " + device.name + ", Address: " + device.address);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Shows the device to user to check if this is the device user is looking for */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* For example, add this to list view */
+
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cancelDiscovery();
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ondevicedisappeared: function(address)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Device disappeared: " + address);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Removes from list, as it is no longer valid */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;onfinished: function(devices)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Found Devices");
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; devices.length; i++)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Name: " + devices[i].name + ", Address: " + devices[i].address);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Total: " + devices.length);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;};
+
+&nbsp;&nbsp;&nbsp;/* Starts searching for nearby devices, for about 12 sec */
+&nbsp;&nbsp;&nbsp;adapter.discoverDevices(discoverDevicesSuccessCallback, function(e)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Failed to search devices: " + e.message + "(" + e.name + ")");
+&nbsp;&nbsp;&nbsp;});
+}
+
+function onSetPoweredError(e)
+{
+&nbsp;&nbsp;&nbsp;console.log("Could not turn on device, reason: " + e.message + "(" + e.name + ")");
+}
+
+adapter.setPowered(true, startDiscovery, onSetPoweredError);
+</pre>
 </div>
 </dd>
 <dt class="method" id="BluetoothAdapter::getKnownDevices">
@@ -1732,27 +1815,32 @@ Instead, use <em>http://tizen.org/privilege/bluetooth</em>.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var adapter = tizen.bluetooth.getDefaultAdapter();
-
- function onGotDevices(devices) {
-    console.log("Devices");
-    for (var i = 0; i &lt; devices.length; i++) {
-        console.log(" Name: " + devices[i].name + ", Address: " + devices[i].address);
-    }
-    console.log("Total: " + devices.length);
- }
-
- function onError(e) {
-   console.log ("Error: " + e.message);
- }
-
- function onBluetoothsetPowered() {
-    adapter.getKnownDevices(onGotDevices, onError);
- }
-
- // Turns on Bluetooth
- adapter.setPowered(true, onBluetoothsetPowered);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var adapter = tizen.bluetooth.getDefaultAdapter();
+
+function onGotDevices(devices)
+{
+&nbsp;&nbsp;&nbsp;console.log("Devices");
+&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; devices.length; i++)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(" Name: " + devices[i].name + ", Address: " + devices[i].address);
+&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;console.log("Total: " + devices.length);
+}
+
+function onError(e)
+{
+&nbsp;&nbsp;&nbsp;console.log("Error: " + e.message);
+}
+
+function onBluetoothsetPowered()
+{
+&nbsp;&nbsp;&nbsp;adapter.getKnownDevices(onGotDevices, onError);
+}
+
+/* Turns on Bluetooth */
+adapter.setPowered(true, onBluetoothsetPowered);
+</pre>
 </div>
 </dd>
 <dt class="method" id="BluetoothAdapter::getDevice">
@@ -1828,20 +1916,23 @@ Instead, use <em>http://tizen.org/privilege/bluetooth</em>.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function gotDeviceInfo(device) {
-    console.log("Device Name: " + device.name);
-    console.log("Device Address: " + device.address);
-    console.log("Device Class: " + device.deviceClass.major);
-    console.log("Is Bonded: " + (device.isBonded ? "Yes" : "No"));
- }
-
- function onError(e) {
-    console.log ("Could not get device info:" + e.message);
- }
-
- var adapter = tizen.bluetooth.getDefaultAdapter();
- adapter.getDevice("35:F4:59:D1:7A:03", gotDeviceInfo, onError);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function gotDeviceInfo(device)
+{
+&nbsp;&nbsp;&nbsp;console.log("Device Name: " + device.name);
+&nbsp;&nbsp;&nbsp;console.log("Device Address: " + device.address);
+&nbsp;&nbsp;&nbsp;console.log("Device Class: " + device.deviceClass.major);
+&nbsp;&nbsp;&nbsp;console.log("Is Bonded: " + (device.isBonded ? "Yes" : "No"));
+}
+
+function onError(e)
+{
+&nbsp;&nbsp;&nbsp;console.log("Could not get device info:" + e.message);
+}
+
+var adapter = tizen.bluetooth.getDefaultAdapter();
+adapter.getDevice("35:F4:59:D1:7A:03", gotDeviceInfo, onError);
+</pre>
 </div>
 </dd>
 <dt class="method" id="BluetoothAdapter::createBonding">
@@ -1915,19 +2006,22 @@ Instead, use <em>http://tizen.org/privilege/bluetooth</em>.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function onBondingSuccess(device) {
-    console.log("Device Name:" + device.name);
-    console.log("Device Address:" + device.address);
-    console.log("Device Service UUIDs:" + device.uuids.join("\n"));
- }
-
- function onError(e) {
-    console.log ("Could not create bonding, reason:" + e.message);
- }
-
- var adapter = tizen.bluetooth.getDefaultAdapter();
- adapter.createBonding("35:F4:59:D1:7A:03", onBondingSuccess, onError);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function onBondingSuccess(device)
+{
+&nbsp;&nbsp;&nbsp;console.log("Device Name:" + device.name);
+&nbsp;&nbsp;&nbsp;console.log("Device Address:" + device.address);
+&nbsp;&nbsp;&nbsp;console.log("Device Service UUIDs:" + device.uuids.join("\n"));
+}
+
+function onError(e)
+{
+&nbsp;&nbsp;&nbsp;console.log("Could not create bonding, reason:" + e.message);
+}
+
+var adapter = tizen.bluetooth.getDefaultAdapter();
+adapter.createBonding("35:F4:59:D1:7A:03", onBondingSuccess, onError);
+</pre>
 </div>
 </dd>
 <dt class="method" id="BluetoothAdapter::destroyBonding">
@@ -2001,25 +2095,30 @@ Instead, use <em>http://tizen.org/privilege/bluetooth</em>.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var adapter = tizen.bluetooth.getDefaultAdapter();
-
- function gotDevice(device) {
-    if (device.isBonded) {
-      // Initiates destroying bonding
-      adapter.destroyBonding(device.address, function() {
-           console.log("Succeeded to destroy the bond success with:" + device.address);
-       },
-       function(e) {
-           console.log("Failed to destroy the bond with " + device.address + ", reason: " + e.message);
-       });
-    }
- }
-
- var deviceAddress = "35:F4:59:D1:7A:03";
- adapter.getDevice(deviceAddress, gotDevice, function(e) {
-     console.log("Failed to get device info for " + deviceAddress + ", reason: " + e.message);
- });
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var adapter = tizen.bluetooth.getDefaultAdapter();
+
+function gotDevice(device)
+{
+&nbsp;&nbsp;&nbsp;if (device.isBonded)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Initiates destroying bonding */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;adapter.destroyBonding(device.address, function()
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Succeeded to destroy the bond success with:" + device.address);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}, function(e)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Failed to destroy the bond with " + device.address + ", reason: " + e.message);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;});
+&nbsp;&nbsp;&nbsp;}
+}
+
+var deviceAddress = "35:F4:59:D1:7A:03";
+adapter.getDevice(deviceAddress, gotDevice, function(e)
+{
+&nbsp;&nbsp;&nbsp;console.log("Failed to get device info for " + deviceAddress + ", reason: " + e.message);
+});
+</pre>
 </div>
 </dd>
 <dt class="method" id="BluetoothAdapter::registerRFCOMMServiceByUUID">
@@ -2105,52 +2204,58 @@ Instead, use <em>http://tizen.org/privilege/bluetooth</em>.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var adapter = tizen.bluetooth.getDefaultAdapter();
- // Holds currently registered service record
- var chatServiceHandler = null;
- // Holds currently open socket
- var serviceSocket = null;
-
- function chatServiceSuccessCb(recordHandler) {
-    console.log("Chat service registration succeeds!");
-    chatServiceHandler = recordHandler;
-    recordHandler.onconnect = function(socket) {
-        console.log("Client connected: " + socket.peer.name + "," + socket.peer.address);
-        serviceSocket = socket;
-        // Messages received from remote device
-        socket.onmessage = function() {
-             var data = socket.readData();
-             // Handles message code goes here
-
-        };
-
-        socket.onclose = function() {
-            console.log('The socket is closed.');
-            serviceSocket = null;
-        };
-    };
- };
-
- function publishChatService() {
-    var CHAT_SERVICE_UUID = "5BCE9431-6C75-32AB-AFE0-2EC108A30860";
-    adapter.registerRFCOMMServiceByUUID(CHAT_SERVICE_UUID, "Chat service", chatServiceSuccessCb,
-      // Error handler
-      function(e) {
-           console.log( "Could not register service record, Error: " + e.message);
-      });
- }
-
- function unregisterChatService() {
-      if (chatServiceHandler != null) {
-          chatServiceHandler.unregister(function() {
-               console.log("Chat service is unregistered");
-               chatServiceHandler = null;
-           }, function(e) {
-               console.log("Failed to unregister service: " + e.message);
-           });
-      }
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var adapter = tizen.bluetooth.getDefaultAdapter();
+/* Holds currently registered service record */
+var chatServiceHandler = null;
+/* Holds currently open socket */
+var serviceSocket = null;
+
+function chatServiceSuccessCb(recordHandler)
+{
+&nbsp;&nbsp;&nbsp;console.log("Chat service registration succeeds!");
+&nbsp;&nbsp;&nbsp;chatServiceHandler = recordHandler;
+&nbsp;&nbsp;&nbsp;recordHandler.onconnect = function(socket)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Client connected: " + socket.peer.name + "," + socket.peer.address);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;serviceSocket = socket;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Messages received from remote device */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;socket.onmessage = function()
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var data = socket.readData();
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Handles message code goes here */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;};
+
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;socket.onclose = function()
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('The socket is closed.');
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;serviceSocket = null;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;};
+&nbsp;&nbsp;&nbsp;};
+};
+
+function publishChatService()
+{
+&nbsp;&nbsp;&nbsp;var CHAT_SERVICE_UUID = "5BCE9431-6C75-32AB-AFE0-2EC108A30860";
+&nbsp;&nbsp;&nbsp;adapter.registerRFCOMMServiceByUUID(CHAT_SERVICE_UUID, "Chat service", chatServiceSuccessCb,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Error handler: function(e) {console.log("Could not register service record, Error: " + e.message);} */);
+}
+
+function unregisterChatService() 
+{
+&nbsp;&nbsp;&nbsp;if (chatServiceHandler != null)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;chatServiceHandler.unregister(function()
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Chat service is unregistered");
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;chatServiceHandler = null;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}, function(e)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Failed to unregister service: " + e.message);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;});
+&nbsp;&nbsp;&nbsp;}
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="BluetoothAdapter::getBluetoothProfileHandler">
@@ -2193,16 +2298,20 @@ Instead, use <em>http://tizen.org/privilege/bluetooth</em>.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var adapter = tizen.bluetooth.getDefaultAdapter();
- var healthProfileHandler;
- var healthCapability = tizen.systeminfo.getCapability("http://tizen.org/feature/network.bluetooth.health");
-
- if (healthCapability) {
-     healthProfileHandler = adapter.getBluetoothProfileHandler("HEALTH");
- } else {
-     console.log("Bluetooth Health Profile is not supported on this device.");
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var adapter = tizen.bluetooth.getDefaultAdapter();
+var healthProfileHandler;
+var healthCapability = tizen.systeminfo.getCapability("http://tizen.org/feature/network.bluetooth.health");
+
+if (healthCapability)
+{
+&nbsp;&nbsp;&nbsp;healthProfileHandler = adapter.getBluetoothProfileHandler("HEALTH");
+}
+else
+{
+&nbsp;&nbsp;&nbsp;console.log("Bluetooth Health Profile is not supported on this device.");
+}
+</pre>
 </div>
 </dd>
 </dl>
@@ -2306,13 +2415,13 @@ Instead, use <em>http://tizen.org/privilege/bluetooth</em>.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var adapter = tizen.bluetooth.getLEAdapter();
- adapter.startScan(
-     function onsuccess(device) {
-         console.log("[Found device] address: " + device.address);
-     }
- );
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var adapter = tizen.bluetooth.getLEAdapter();
+adapter.startScan(function onsuccess(device)
+{
+&nbsp;&nbsp;&nbsp;console.log("[Found device] address: " + device.address);
+});
+</pre>
 </div>
 </dd>
 <dt class="method" id="BluetoothLEAdapter::stopScan">
@@ -2353,16 +2462,17 @@ Instead, use <em>http://tizen.org/privilege/bluetooth</em>.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var adapter = tizen.bluetooth.getLEAdapter();
- adapter.startScan(
-     function onsuccess(device) {
-         if (device.address == "11:22:33:44:55:66") {
-             console.log("Found device: " + device.name);
-             adapter.stopScan();
-         }
-     }
- );
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var adapter = tizen.bluetooth.getLEAdapter();
+adapter.startScan(function onsuccess(device)
+{
+&nbsp;&nbsp;&nbsp;if (device.address == "11:22:33:44:55:66")
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Found device: " + device.name);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;adapter.stopScan();
+&nbsp;&nbsp;&nbsp;}
+});
+</pre>
 </div>
 </dd>
 <dt class="method" id="BluetoothLEAdapter::startAdvertise">
@@ -2452,32 +2562,30 @@ Instead, use <em>http://tizen.org/privilege/bluetooth</em>.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var adapter = tizen.bluetooth.getLEAdapter();
- var battery_svc_uuid_16 = "180f"; // the service UUID, 16-bit UUID or 128-bit UUID is supported. (e.g. 180F, 0000180F-0000-1000-8000-00805F9B34FB)
- var heart_rate_svc_uuid_16 = "180d"; // the service solicitation UUID, 16-bit UUID or 128-bit UUID is supported. (e.g. 180F, 0000180F-0000-1000-8000-00805F9B34FB)
- var advertiseOptions = {
-     includeName: true,          // Whether the device name should be included
-     includeTxPowerLevel: true,    // Whether the transmission power level should be included
-     appearance: 192,     // The external appearance of device, 192 - Generic Watch
-     uuids: [battery_svc_uuid_16],
-     solicitationuuids: [heart_rate_svc_uuid_16]
- };
-
- var advertiseData = new tizen.BluetoothLEAdvertiseData(advertiseOptions);
- var connectable = true;
-
- adapter.startAdvertise(
-     advertiseData,
-     "ADVERTISE",
-     function onstate(state) {
-         console.log("Advertiser state: " + state);
-     },
-     function(e) {
-         console.log("Failed to startAdvertise : " + e.message);
-     },
-     "LOW_LATENCY",
-     connectable);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var adapter = tizen.bluetooth.getLEAdapter();
+var battery_svc_uuid_16 = "180f"; /* Service UUID, 16-bit UUID is supported (e.g. 180f) */
+var heart_rate_svc_uuid_16 = "180d"; /* Service solicitation UUID, 16-bit UUID is supported (e.g. 180d) */
+var advertiseOptions =
+{
+&nbsp;&nbsp;&nbsp;includeName: true, /* Whether the device name should be included */
+&nbsp;&nbsp;&nbsp;includeTxPowerLevel: true, /* Whether the transmission power level should be included */
+&nbsp;&nbsp;&nbsp;appearance: 192, /* External appearance of device, 192 - Generic Watch */
+&nbsp;&nbsp;&nbsp;uuids: [battery_svc_uuid_16],
+&nbsp;&nbsp;&nbsp;solicitationuuids: [heart_rate_svc_uuid_16]
+};
+
+var advertiseData = new tizen.BluetoothLEAdvertiseData(advertiseOptions);
+var connectable = true;
+
+adapter.startAdvertise(advertiseData, "ADVERTISE", function onstate(state)
+{
+&nbsp;&nbsp;&nbsp;console.log("Advertiser state: " + state);
+}, function(e)
+{
+&nbsp;&nbsp;&nbsp;console.log("Failed to startAdvertise: " + e.message);
+}, "LOW_LATENCY", connectable);
+</pre>
 </div>
 </dd>
 <dt class="method" id="BluetoothLEAdapter::stopAdvertise">
@@ -2518,25 +2626,27 @@ Instead, use <em>http://tizen.org/privilege/bluetooth</em>.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var adapter = tizen.bluetooth.getLEAdapter();
- var battery_svc_uuid_16 = "180f"; // the service UUID, 16-bit UUID or 128-bit UUID is supported. (e.g. 180F, 0000180F-0000-1000-8000-00805F9B34FB)
- var heart_rate_svc_uuid_16 = "180d"; // the service solicitation UUID, 16-bit UUID or 128-bit UUID is supported. (e.g. 180F, 0000180F-0000-1000-8000-00805F9B34FB)
- var advertiseOptions = {
-     includeName: true,          // Whether the device name should be included
-     includeTxPowerLevel: true,    // Whether the transmission power level should be included
-     appearance: 192,     // The external appearance of device, 192 - Generic Watch
-     uuids: [battery_svc_uuid_16],
-     solicitationuuids: [heart_rate_svc_uuid_16]
- };
-
- var advertiseData = new tizen.BluetoothLEAdvertiseData(advertiseOptions);
-
- adapter.startAdvertise(advertiseData, "ADVERTISE",
-     function onstate(state) {
-         console.log("Advertiser state: " + state);
-     });
- adapter.stopAdvertise();
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var adapter = tizen.bluetooth.getLEAdapter();
+var battery_svc_uuid_16 = "180f"; /* Service UUID, 16-bit UUID is supported (e.g. 180f) */
+var heart_rate_svc_uuid_16 = "180d"; /* Service solicitation UUID, 16-bit UUID is supported (e.g. 180d) */
+var advertiseOptions =
+{
+&nbsp;&nbsp;&nbsp;includeName: true, /* Whether the device name should be included */
+&nbsp;&nbsp;&nbsp;includeTxPowerLevel: true, /* Whether the transmission power level should be included */
+&nbsp;&nbsp;&nbsp;appearance: 192, /* External appearance of device, 192 - Generic Watch */
+&nbsp;&nbsp;&nbsp;uuids: [battery_svc_uuid_16],
+&nbsp;&nbsp;&nbsp;solicitationuuids: [heart_rate_svc_uuid_16]
+};
+
+var advertiseData = new tizen.BluetoothLEAdvertiseData(advertiseOptions);
+
+adapter.startAdvertise(advertiseData, "ADVERTISE", function onstate(state)
+{
+&nbsp;&nbsp;&nbsp;console.log("Advertiser state: " + state);
+});
+adapter.stopAdvertise();
+</pre>
 </div>
 </dd>
 </dl>
@@ -2557,20 +2667,21 @@ Instead, use <em>http://tizen.org/privilege/bluetooth</em>.
  2.3.1
           </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">  function onconnected(device) {
-    console.log("Connected to device");
-    var service = device.getService(device.uuids[0]);
-    console.log("Service got");
-  }
-
- var adapter = tizen.bluetooth.getLEAdapter();
- adapter.startScan(
-  function onsuccess(device) {
-    console.log("[Found device] address: " + device.address);
-    device.connect(onconnected.bind(null, device), onerror);
- });
-
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function onconnected(device)
+{
+&nbsp;&nbsp;&nbsp;console.log("Connected to device");
+&nbsp;&nbsp;&nbsp;var service = device.getService(device.uuids[0]);
+&nbsp;&nbsp;&nbsp;console.log("Service got");
+}
+
+var adapter = tizen.bluetooth.getLEAdapter();
+adapter.startScan(function onsuccess(device)
+{
+&nbsp;&nbsp;&nbsp;console.log("[Found device] address: " + device.address);
+&nbsp;&nbsp;&nbsp;device.connect(onconnected.bind(null, device), onerror);
+});
+</pre>
 </div>
 <div class="attributes">
 <h4>Attributes</h4>
@@ -2585,10 +2696,10 @@ Instead, use <em>http://tizen.org/privilege/bluetooth</em>.
  2.3.1
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var service = device.getService(device.uuids[0]);
- console.log("Service UUID " + service.uuid);
-
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var service = device.getService(device.uuids[0]);
+console.log("Service UUID " + service.uuid);
+</pre>
 </div>
 </li>
 <li class="attribute" id="BluetoothGATTService::services">
@@ -2602,12 +2713,13 @@ Instead, use <em>http://tizen.org/privilege/bluetooth</em>.
  2.3.1
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var service = device.getService(device.uuids[0]);
- for( var i = 0; i  service.services.length; ++i) {
-   console.log("Subservices UUID " + service.services[i].uuid);
- }
-
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var service = device.getService(device.uuids[0]);
+for (var i = 0; i  service.services.length; ++i)
+{
+&nbsp;&nbsp;&nbsp;console.log("Subservices UUID " + service.services[i].uuid);
+}
+</pre>
 </div>
 </li>
 <li class="attribute" id="BluetoothGATTService::characteristics">
@@ -2621,12 +2733,13 @@ Instead, use <em>http://tizen.org/privilege/bluetooth</em>.
  2.3.1
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var service = device.getService(device.uuids[0]);
- for( var i = 0; i  service.characteristics.length; ++i) {
-   console.log("Subservices UUID " + service.characteristics[i].isWritable);
- }
-
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var service = device.getService(device.uuids[0]);
+for (var i = 0; i  service.characteristics.length; ++i)
+{
+&nbsp;&nbsp;&nbsp;console.log("Subservices UUID " + service.characteristics[i].isWritable);
+}
+</pre>
 </div>
 </li>
 </ul>
@@ -2822,34 +2935,40 @@ Instead, use <em>http://tizen.org/privilege/bluetooth</em>.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function onerror(e) {
-      console.log("Failed to connect to device: " + e.message);
- }
-
- function proccessDevice(device) {
-     device.connect(onConnected, onerror);
-     function onConnected() {
-         var service = device.getService(device.uuids[0]);
-         if (service.characteristics.length &gt; 0) {
-             var characteristic = service.characteristics[0];
-             characteristic.readValue(function(val) {
-                  console.log("Value read: " + val);
-                  device.disconnect();
-             });
-         }
-     }
- }
-
- var adapter = tizen.bluetooth.getLEAdapter();
- adapter.startScan(
-     function onsuccess(device) {
-         if (device.address == "11:22:33:44:55:66") {
-             console.log("Found device: " + device.name);
-             proccessDevice(device);
-         }
-     }
- );
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function onerror(e)
+{
+&nbsp;&nbsp;&nbsp;console.log("Failed to connect to device: " + e.message);
+}
+
+function proccessDevice(device)
+{
+&nbsp;&nbsp;&nbsp;device.connect(onConnected, onerror);
+&nbsp;&nbsp;&nbsp;function onConnected()
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var service = device.getService(device.uuids[0]);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (service.characteristics.length &gt; 0)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var characteristic = service.characteristics[0];
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;characteristic.readValue(function(val)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Value read: " + val);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;device.disconnect();
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;});
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;}
+}
+
+var adapter = tizen.bluetooth.getLEAdapter();
+adapter.startScan(function onsuccess(device)
+{
+&nbsp;&nbsp;&nbsp;if (device.address == "11:22:33:44:55:66")
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Found device: " + device.name);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;proccessDevice(device);
+&nbsp;&nbsp;&nbsp;}
+});
+</pre>
 </div>
 </dd>
 <dt class="method" id="BluetoothGATTCharacteristic::writeValue">
@@ -2919,37 +3038,44 @@ Instead, use <em>http://tizen.org/privilege/bluetooth</em>.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function onerror(e) {
-      console.log("Failed to connect to device: " + e.message);
- }
-
- function proccessDevice(device) {
-     device.connect(onConnected, onerror);
-     function onConnected() {
-         var service = device.getService(device.uuids[0]);
-         if (service.characteristics.length &gt; 0) {
-             var characteristic = service.characteristics[0];
-             var data = new Array(1, 2, 3, 4, 5, 6);
-             characteristic.writeValue(data, function() {
-                  console.log("Value written");
-                  device.disconnect();
-             }, function(e) {
-                  console.log("Failed to write: " + e.message);
-             });
-         }
-     }
- }
-
- var adapter = tizen.bluetooth.getLEAdapter();
- adapter.startScan(
-     function onsuccess(device) {
-         if (device.address == "11:22:33:44:55:66") {
-             console.log("Found device: " + device.name);
-             proccessDevice(device);
-         }
-     }
- );
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function onerror(e)
+{
+&nbsp;&nbsp;&nbsp;console.log("Failed to connect to device: " + e.message);
+}
+
+function proccessDevice(device)
+{
+&nbsp;&nbsp;&nbsp;device.connect(onConnected, onerror);
+&nbsp;&nbsp;&nbsp;function onConnected()
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var service = device.getService(device.uuids[0]);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (service.characteristics.length &gt; 0)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var characteristic = service.characteristics[0];
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var data = new Array(1, 2, 3, 4, 5, 6);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;characteristic.writeValue(data, function()
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Value written");
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;device.disconnect();
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}, function(e)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Failed to write: " + e.message);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;});
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;}
+}
+
+var adapter = tizen.bluetooth.getLEAdapter();
+adapter.startScan(function onsuccess(device)
+{
+&nbsp;&nbsp;&nbsp;if (device.address == "11:22:33:44:55:66")
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Found device: " + device.name);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;proccessDevice(device);
+&nbsp;&nbsp;&nbsp;}
+});
+</pre>
 </div>
 </dd>
 <dt class="method" id="BluetoothGATTCharacteristic::addValueChangeListener">
@@ -2998,36 +3124,40 @@ Instead, use <em>http://tizen.org/privilege/bluetooth</em>.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function proccessDevice(device) {
-
-     function onConnected() {
-         var service = device.getService("5BCE9431-6C75-32AB-AFE0-2EC108A30860");
-         if (service.characteristics.length &gt; 0) {
-             var characteristic = service.characteristics[0];
-             var watchID;
-
-             watchID = characteristic.addValueChangeListener(function(value) {
-                 console.log("Characteristic value changed: " + value);
-                 characteristic.removeValueChangeListener(watchID);
-                 device.disconnect();
-             });
-         }
-     }
-
-     device.connect(onConnected);
- }
-
- var adapter = tizen.bluetooth.getLEAdapter();
- adapter.startScan(
-     function onsuccess(device) {
-         if (device.address == "11:22:33:44:55:66") {
-             console.log("Found device: " + device.name);
-             adapter.stopScan();
-             proccessDevice(device);
-         }
-     }
- );
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function proccessDevice(device)
+{
+&nbsp;&nbsp;&nbsp;function onConnected()
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var service = device.getService("5BCE9431-6C75-32AB-AFE0-2EC108A30860");
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (service.characteristics.length &gt; 0)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var characteristic = service.characteristics[0];
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var watchID;
+
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;watchID = characteristic.addValueChangeListener(function(value)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Characteristic value changed: " + value);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;characteristic.removeValueChangeListener(watchID);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;device.disconnect();
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;});
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;}
+
+&nbsp;&nbsp;&nbsp;device.connect(onConnected);
+}
+
+var adapter = tizen.bluetooth.getLEAdapter();
+adapter.startScan(function onsuccess(device)
+{
+&nbsp;&nbsp;&nbsp;if (device.address == "11:22:33:44:55:66")
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Found device: " + device.name);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;adapter.stopScan();
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;proccessDevice(device);
+&nbsp;&nbsp;&nbsp;}
+});
+</pre>
 </div>
 </dd>
 <dt class="method" id="BluetoothGATTCharacteristic::removeValueChangeListener">
@@ -3140,35 +3270,41 @@ Instead, use <em>http://tizen.org/privilege/bluetooth</em>.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function onerror(e) {
-      console.log("Failed to connect to device: " + e.message);
- }
-
- function proccessDevice(device) {
-     device.connect(onConnected, onerror);
-     function onConnected() {
-         var service = device.getService(device.uuids[0]);
-         if (service.characteristics.length &gt; 0) {
-             var characteristic = service.characteristics[0];
-             var descriptor = characteristic.descriptors[0];
-             descriptor.readValue(function(val) {
-                  console.log("Value read: " + val);
-                  device.disconnect();
-             });
-         }
-     }
- }
-
- var adapter = tizen.bluetooth.getLEAdapter();
- adapter.startScan(
-     function onsuccess(device) {
-         if (device.address == "11:22:33:44:55:66") {
-             console.log("Found device: " + device.name);
-             proccessDevice(device);
-         }
-     }
- );
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function onerror(e)
+{
+&nbsp;&nbsp;&nbsp;console.log("Failed to connect to device: " + e.message);
+}
+
+function proccessDevice(device)
+{
+&nbsp;&nbsp;&nbsp;device.connect(onConnected, onerror);
+&nbsp;&nbsp;&nbsp;function onConnected()
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var service = device.getService(device.uuids[0]);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (service.characteristics.length &gt; 0)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var characteristic = service.characteristics[0];
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var descriptor = characteristic.descriptors[0];
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;descriptor.readValue(function(val)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Value read: " + val);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;device.disconnect();
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;});
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;}
+}
+
+var adapter = tizen.bluetooth.getLEAdapter();
+adapter.startScan(function onsuccess(device)
+{
+&nbsp;&nbsp;&nbsp;if (device.address == "11:22:33:44:55:66")
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Found device: " + device.name);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;proccessDevice(device);
+&nbsp;&nbsp;&nbsp;}
+});
+</pre>
 </div>
 </dd>
 <dt class="method" id="BluetoothGATTDescriptor::writeValue">
@@ -3238,38 +3374,45 @@ Instead, use <em>http://tizen.org/privilege/bluetooth</em>.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function onerror(e) {
-      console.log("Failed to connect to device: " + e.message);
- }
-
- function proccessDevice(device) {
-     device.connect(onConnected, onerror);
-     function onConnected() {
-         var service = device.getService(device.uuids[0]);
-         if (service.characteristics.length &gt; 0) {
-             var characteristic = service.characteristics[0];
-             var data = new Array(1, 2, 3, 4, 5, 6);
-             var descriptor = characteristic.descriptors[0];
-             descriptor.writeValue(data, function() {
-                  console.log("Value written");
-                  device.disconnect();
-             }, function(e) {
-                  console.log("Failed to write: " + e.message);
-             });
-         }
-     }
- }
-
- var adapter = tizen.bluetooth.getLEAdapter();
- adapter.startScan(
-     function onsuccess(device) {
-         if (device.address == "11:22:33:44:55:66") {
-             console.log("Found device: " + device.name);
-             proccessDevice(device);
-         }
-     }
- );
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function onerror(e)
+{
+&nbsp;&nbsp;&nbsp;console.log("Failed to connect to device: " + e.message);
+}
+
+function proccessDevice(device)
+{
+&nbsp;&nbsp;&nbsp;device.connect(onConnected, onerror);
+&nbsp;&nbsp;&nbsp;function onConnected()
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var service = device.getService(device.uuids[0]);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (service.characteristics.length &gt; 0)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var characteristic = service.characteristics[0];
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var data = new Array(1, 2, 3, 4, 5, 6);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var descriptor = characteristic.descriptors[0];
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;descriptor.writeValue(data, function()
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Value written");
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;device.disconnect();
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}, function(e)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Failed to write: " + e.message);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;});
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;}
+}
+
+var adapter = tizen.bluetooth.getLEAdapter();
+adapter.startScan(function onsuccess(device)
+{
+&nbsp;&nbsp;&nbsp;if (device.address == "11:22:33:44:55:66")
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Found device: " + device.name);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;proccessDevice(device);
+&nbsp;&nbsp;&nbsp;}
+});
+</pre>
 </div>
 </dd>
 </dl>
@@ -3519,11 +3662,13 @@ A <em>BluetoothDevice</em> object can be retrieved using one of the following AP
  1.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var adapter = tizen.bluetooth.getDefaultAdapter();
- adapter.getDevice("11:22:33:44:55:66", function(device) {
-    console.log("Device Name: " + device.name);
- });
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var adapter = tizen.bluetooth.getDefaultAdapter();
+adapter.getDevice("11:22:33:44:55:66", function(device)
+{
+&nbsp;&nbsp;&nbsp;console.log("Device Name: " + device.name);
+});
+</pre>
 </div>
 </li>
 <li class="attribute" id="BluetoothDevice::address">
@@ -3536,11 +3681,13 @@ A <em>BluetoothDevice</em> object can be retrieved using one of the following AP
  1.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var adapter = tizen.bluetooth.getDefaultAdapter();
- adapter.getDevice("11:22:33:44:55:66", function(device) {
-    console.log("Device Address: " + device.address);
- });
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var adapter = tizen.bluetooth.getDefaultAdapter();
+adapter.getDevice("11:22:33:44:55:66", function(device)
+{
+&nbsp;&nbsp;&nbsp;console.log("Device Address: " + device.address);
+});
+</pre>
 </div>
 </li>
 <li class="attribute" id="BluetoothDevice::deviceClass">
@@ -3553,11 +3700,13 @@ A <em>BluetoothDevice</em> object can be retrieved using one of the following AP
  1.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var adapter = tizen.bluetooth.getDefaultAdapter();
- adapter.getDevice("11:22:33:44:55:66", function(device) {
-    console.log("Device Major Class: " + device.deviceClass.major);
- });
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var adapter = tizen.bluetooth.getDefaultAdapter();
+adapter.getDevice("11:22:33:44:55:66", function(device)
+{
+&nbsp;&nbsp;&nbsp;console.log("Device Major Class: " + device.deviceClass.major);
+});
+</pre>
 </div>
 </li>
 <li class="attribute" id="BluetoothDevice::isBonded">
@@ -3570,11 +3719,13 @@ A <em>BluetoothDevice</em> object can be retrieved using one of the following AP
  1.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var adapter = tizen.bluetooth.getDefaultAdapter();
- adapter.getDevice("11:22:33:44:55:66", function(device) {
-    console.log("Is bonded: " + (device.isBonded ? "Yes" : "No"));
- });
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var adapter = tizen.bluetooth.getDefaultAdapter();
+adapter.getDevice("11:22:33:44:55:66", function(device)
+{
+&nbsp;&nbsp;&nbsp;console.log("Is bonded: " + (device.isBonded ? "Yes" : "No"));
+});
+</pre>
 </div>
 </li>
 <li class="attribute" id="BluetoothDevice::isTrusted">
@@ -3587,11 +3738,13 @@ A <em>BluetoothDevice</em> object can be retrieved using one of the following AP
  1.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var adapter = tizen.bluetooth.getDefaultAdapter();
- adapter.getDevice("11:22:33:44:55:66", function(device) {
-    console.log("Is trusted: " + (device.isTrusted ? "Yes" : "No"));
- });
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var adapter = tizen.bluetooth.getDefaultAdapter();
+adapter.getDevice("11:22:33:44:55:66", function(device)
+{
+&nbsp;&nbsp;&nbsp;console.log("Is trusted: " + (device.isTrusted ? "Yes" : "No"));
+});
+</pre>
 </div>
 </li>
 <li class="attribute" id="BluetoothDevice::isConnected">
@@ -3604,11 +3757,13 @@ A <em>BluetoothDevice</em> object can be retrieved using one of the following AP
  1.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var adapter = tizen.bluetooth.getDefaultAdapter();
- adapter.getDevice("11:22:33:44:55:66", function(device) {
-    console.log("Is connected: " + (device.isConnected ? "Yes" : "No"));
- });
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var adapter = tizen.bluetooth.getDefaultAdapter();
+adapter.getDevice("11:22:33:44:55:66", function(device)
+{
+&nbsp;&nbsp;&nbsp;console.log("Is connected: " + (device.isConnected ? "Yes" : "No"));
+});
+</pre>
 </div>
 </li>
 <li class="attribute" id="BluetoothDevice::uuids">
@@ -3622,27 +3777,31 @@ A <em>BluetoothDevice</em> object can be retrieved using one of the following AP
  1.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var adapter = tizen.bluetooth.getDefaultAdapter();
- var CHAT_SERVICE_UUID = "5BCE9431-6C75-32AB-AFE0-2EC108A30860";
- adapter.getDevice("11:22:33:44:55:66", function(device) {
-    var uuids = device.uuids;
-    var services = "";
-    for (var i = 0; i &lt; uuids.length; i++) {
-        services += uuids[i] + "\n";
-    }
-    console.log ("Services found: " + services);
-    if (uuids.indexOf(CHAT_SERVICE_UUID) != -1) {
-        // Connects to service
-        device.connectToServiceByUUID(CHAT_SERVICE_UUID, function(socket) {
-            //
-            // Connected to service, handle socket
-            //
-        }, function (e) {
-            console.log("Could not connect to chat service !!!. Error: " + e.message);
-        });
-    }
- });
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var adapter = tizen.bluetooth.getDefaultAdapter();
+var CHAT_SERVICE_UUID = "5BCE9431-6C75-32AB-AFE0-2EC108A30860";
+adapter.getDevice("11:22:33:44:55:66", function(device)
+{
+&nbsp;&nbsp;&nbsp;var uuids = device.uuids;
+&nbsp;&nbsp;&nbsp;var services = "";
+&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; uuids.length; i++)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;services += uuids[i] + "\n";
+&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;console.log("Services found: " + services);
+&nbsp;&nbsp;&nbsp;if (uuids.indexOf(CHAT_SERVICE_UUID) != -1)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Connects to service */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;device.connectToServiceByUUID(CHAT_SERVICE_UUID, function(socket)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Connected to service, handle socket */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}, function(e)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Could not connect to chat service !!!. Error: " + e.message);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;});
+&nbsp;&nbsp;&nbsp;}
+});
+</pre>
 </div>
 </li>
 </ul>
@@ -3721,57 +3880,68 @@ Instead, use <em>http://tizen.org/privilege/bluetooth</em>.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var adapter = tizen.bluetooth.getDefaultAdapter();
- var clientSocket = null;
-
- // Calls a method that is invoked when user wants to send a message to a remote device.
- function sendMessage(msg) {
-    // Validates socket state, if everything is ok.
-    if (clientSocket != null &amp;&amp; clientSocket.state == "OPEN") {
-        // Sends the message.
-        clientSocket.writeData(msg);
-    }
- }
-
- // Calls a method that is invoked when a socket is open.
- function onSocketConnected(socket) {
-    clientSocket = socket;
-    console.log("Opening a socket successfully!!!");
-    socket.onmessage = function () {
-        var data = socket.readData();
-        var recvmsg = "";
-        for (var i = 0; i &lt; data.length; i++)
-        {
-           recvmsg += String.fromCharCode(data[i]);
-        }
-        console.log("server msg &gt;&gt; " + recvmsg);
-    };
-
-    socket.onclose = function() {
-        console.log("socket disconnected.");
-    };
- }
-
- function onDeviceReady(device) {
-    // Validates device and service uuid
-    if (device.uuids.indexOf("5BCE9431-6C75-32AB-AFE0-2EC108A30860") != -1) {
-       // Opens socket
-       device.connectToServiceByUUID("5BCE9431-6C75-32AB-AFE0-2EC108A30860", onSocketConnected, function(e) {
-           console.log ("Error connecting to service. Reason: " + e.message);
-        });
-    }
-    else {
-        console.log ("Chat service is not supported by this device");
-    }
- }
-
- function onSetPowered() {
-    // Gets the BluetoothDevice object.
-    adapter.getDevice("35:F4:59:D1:7A:03", onDeviceReady, function(e) { console.log("Error: " + e.message); });
- }
-
- adapter.setPowered(true, onSetPowered, function(e) {console.log ("Could not turn on Bluetooth adapter. reason: " + e.message); });
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var adapter = tizen.bluetooth.getDefaultAdapter();
+var clientSocket = null;
+
+/* Calls a method that is invoked when user wants to send a message to a remote device */
+function sendMessage(msg)
+{
+&nbsp;&nbsp;&nbsp;/* Validates socket state, if everything is ok */
+&nbsp;&nbsp;&nbsp;if (clientSocket != null &amp;&amp; clientSocket.state == "OPEN")
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Sends the message */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;clientSocket.writeData(msg);
+&nbsp;&nbsp;&nbsp;}
+}
+
+/* Calls a method that is invoked when a socket is open */
+function onSocketConnected(socket)
+{
+&nbsp;&nbsp;&nbsp;clientSocket = socket;
+&nbsp;&nbsp;&nbsp;console.log("Opening a socket successfully!!!");
+&nbsp;&nbsp;&nbsp;socket.onmessage = function()
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var data = socket.readData();
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var recvmsg = "";
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; data.length; i++)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;recvmsg += String.fromCharCode(data[i]);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("server msg &gt;&gt; " + recvmsg);
+&nbsp;&nbsp;&nbsp;};
+
+&nbsp;&nbsp;&nbsp;socket.onclose = function()
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("socket disconnected.");
+&nbsp;&nbsp;&nbsp;};
+}
+
+function onDeviceReady(device)
+{
+&nbsp;&nbsp;&nbsp;/* Validates device and service uuid */
+&nbsp;&nbsp;&nbsp;if (device.uuids.indexOf("5BCE9431-6C75-32AB-AFE0-2EC108A30860") != -1)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Opens socket */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;device.connectToServiceByUUID("5BCE9431-6C75-32AB-AFE0-2EC108A30860", onSocketConnected, function(e)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Error connecting to service. Reason: " + e.message);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;});
+&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;else
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Chat service is not supported by this device");
+&nbsp;&nbsp;&nbsp;}
+}
+
+function onSetPowered()
+{
+&nbsp;&nbsp;&nbsp;/* Gets the BluetoothDevice object */
+&nbsp;&nbsp;&nbsp;adapter.getDevice("35:F4:59:D1:7A:03", onDeviceReady, function(e) {console.log("Error: " + e.message);});
+}
+
+adapter.setPowered(true, onSetPowered, function(e) {console.log("Could not turn on Bluetooth adapter. reason: " + e.message); });
+</pre>
 </div>
 </dd>
 </dl>
@@ -3832,13 +4002,13 @@ A <em>BluetoothLEDevice</em> object can be retrieved by using one of the followi
  2.3.1
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var adapter = tizen.bluetooth.getLEAdapter();
- adapter.startScan(
-     function onsuccess(device) {
-         console.log("Found device: " + device.address);
-     }
- );
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var adapter = tizen.bluetooth.getLEAdapter();
+adapter.startScan(function onsuccess(device)
+{
+&nbsp;&nbsp;&nbsp;console.log("Found device: " + device.address);
+});
+</pre>
 </div>
 </li>
 <li class="attribute" id="BluetoothLEDevice::name">
@@ -3851,13 +4021,13 @@ A <em>BluetoothLEDevice</em> object can be retrieved by using one of the followi
  2.3.1
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var adapter = tizen.bluetooth.getLEAdapter();
- adapter.startScan(
-     function onsuccess(device) {
-         console.log("Found device: " + device.name);
-     }
- );
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var adapter = tizen.bluetooth.getLEAdapter();
+adapter.startScan(function onsuccess(device)
+{
+&nbsp;&nbsp;&nbsp;console.log("Found device: " + device.name);
+});
+</pre>
 </div>
 </li>
 <li class="attribute" id="BluetoothLEDevice::txpowerlevel">
@@ -3870,13 +4040,13 @@ A <em>BluetoothLEDevice</em> object can be retrieved by using one of the followi
  2.3.1
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var adapter = tizen.bluetooth.getLEAdapter();
- adapter.startScan(
-     function onsuccess(device) {
-         console.log("Found device: " + device.txpowerlevel);
-     }
- );
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var adapter = tizen.bluetooth.getLEAdapter();
+adapter.startScan(function onsuccess(device)
+{
+&nbsp;&nbsp;&nbsp;console.log("Found device: " + device.txpowerlevel);
+});
+</pre>
 </div>
 </li>
 <li class="attribute" id="BluetoothLEDevice::appearance">
@@ -3889,13 +4059,13 @@ A <em>BluetoothLEDevice</em> object can be retrieved by using one of the followi
  2.3.1
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var adapter = tizen.bluetooth.getLEAdapter();
- adapter.startScan(
-     function onsuccess(device) {
-         console.log("Found device: " + device.appearance);
-     }
- );
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var adapter = tizen.bluetooth.getLEAdapter();
+adapter.startScan(function onsuccess(device)
+{
+&nbsp;&nbsp;&nbsp;console.log("Found device: " + device.appearance);
+});
+</pre>
 </div>
 </li>
 <li class="attribute" id="BluetoothLEDevice::uuids">
@@ -3909,18 +4079,19 @@ A <em>BluetoothLEDevice</em> object can be retrieved by using one of the followi
  2.3.1
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var adapter = tizen.bluetooth.getLEAdapter();
- adapter.startScan(
-     function onsuccess(device) {
-         var uuids = device.uuids;
-         var services = "";
-         for (var i = 0; i &lt; uuids.length; i++) {
-             services += uuids[i] + "\n";
-         }
-         console.log ("Service found: " + services);
-     }
- );
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var adapter = tizen.bluetooth.getLEAdapter();
+adapter.startScan(function onsuccess(device)
+{
+&nbsp;&nbsp;&nbsp;var uuids = device.uuids;
+&nbsp;&nbsp;&nbsp;var services = "";
+&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; uuids.length; i++)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;services += uuids[i] + "\n";
+&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;console.log("Service found: " + services);
+});
+</pre>
 </div>
 </li>
 <li class="attribute" id="BluetoothLEDevice::solicitationuuids">
@@ -3934,18 +4105,19 @@ A <em>BluetoothLEDevice</em> object can be retrieved by using one of the followi
  2.3.1
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var adapter = tizen.bluetooth.getLEAdapter();
- adapter.startScan(
-     function onsuccess(device) {
-         var uuids = device.solicitationuuids;
-         var services = "";
-         for (var i = 0; i &lt; uuids.length; i++) {
-             services += uuids[i] + "\n";
-         }
-         console.log ("Service solicitations found: " + services);
-     }
- );
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var adapter = tizen.bluetooth.getLEAdapter();
+adapter.startScan(function onsuccess(device)
+{
+&nbsp;&nbsp;&nbsp;var uuids = device.solicitationuuids;
+&nbsp;&nbsp;&nbsp;var services = "";
+&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; uuids.length; i++)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;services += uuids[i] + "\n";
+&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;console.log("Service solicitations found: " + services);
+});
+</pre>
 </div>
 </li>
 <li class="attribute" id="BluetoothLEDevice::serviceData">
@@ -3959,18 +4131,19 @@ A <em>BluetoothLEDevice</em> object can be retrieved by using one of the followi
  2.3.1
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var adapter = tizen.bluetooth.getLEAdapter();
- adapter.startScan(
-     function onsuccess(device) {
-         var serviceData = device.serviceData;
-         var data = "";
-         for (var i = 0; i &lt; serviceData.length; i++) {
-             data += serviceData[i].id + serviceData[i].data + "\n";
-         }
-         console.log ("Service data found: " + data);
-     }
- );
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var adapter = tizen.bluetooth.getLEAdapter();
+adapter.startScan(function onsuccess(device)
+{
+&nbsp;&nbsp;&nbsp;var serviceData = device.serviceData;
+&nbsp;&nbsp;&nbsp;var data = "";
+&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; serviceData.length; i++)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;data += serviceData[i].id + serviceData[i].data + "\n";
+&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;console.log("Service data found: " + data);
+});
+</pre>
 </div>
 </li>
 <li class="attribute" id="BluetoothLEDevice::manufacturerData">
@@ -3983,15 +4156,15 @@ A <em>BluetoothLEDevice</em> object can be retrieved by using one of the followi
  2.3.1
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var adapter = tizen.bluetooth.getLEAdapter();
- adapter.startScan(
-     function onsuccess(device) {
-         var manufacturerData = device.manufacturerData;
-         console.log ("Manufacture id: " + manufacturerData.id);
-         console.log ("Manufacture data: " + manufacturerData.data);
-     }
- );
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var adapter = tizen.bluetooth.getLEAdapter();
+adapter.startScan(function onsuccess(device)
+{
+&nbsp;&nbsp;&nbsp;var manufacturerData = device.manufacturerData;
+&nbsp;&nbsp;&nbsp;console.log("Manufacture id: " + manufacturerData.id);
+&nbsp;&nbsp;&nbsp;console.log("Manufacture data: " + manufacturerData.data);
+});
+</pre>
 </div>
 </li>
 <li class="attribute" id="BluetoothLEDevice::rssi">
@@ -4009,14 +4182,14 @@ The signal strength depends on distance (between the device and the beacon) and
  3.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var adapter = tizen.bluetooth.getLEAdapter();
- adapter.startScan(
-     function onsuccess(device) {
-         console.log("Found device: " + device.name);
-         console.log("RSSI: " + device.rssi);
-     }
- );
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var adapter = tizen.bluetooth.getLEAdapter();
+adapter.startScan(function onsuccess(device)
+{
+&nbsp;&nbsp;&nbsp;console.log("Found device: " + device.name);
+&nbsp;&nbsp;&nbsp;console.log("RSSI: " + device.rssi);
+});
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre> Found device: beacon
@@ -4092,24 +4265,27 @@ Instead, use <em>http://tizen.org/privilege/bluetooth</em>.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function onerror(e) {
-      console.log("Failed to connect to device: " + e.message);
- }
-
- function onconnected() {
-     console.log("Connected to device");
- }
-
- var adapter = tizen.bluetooth.getLEAdapter();
- adapter.startScan(
-     function onsuccess(device) {
-         if (device.address == "11:22:33:44:55:66") {
-             console.log("Found device: " + device.name);
-             device.connect(onconnected, onerror);
-         }
-     }
- );
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function onerror(e)
+{
+&nbsp;&nbsp;&nbsp;console.log("Failed to connect to device: " + e.message);
+}
+
+function onconnected()
+{
+&nbsp;&nbsp;&nbsp;console.log("Connected to device");
+}
+
+var adapter = tizen.bluetooth.getLEAdapter();
+adapter.startScan(function onsuccess(device)
+{
+&nbsp;&nbsp;&nbsp;if (device.address == "11:22:33:44:55:66")
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Found device: " + device.name);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;device.connect(onconnected, onerror);
+&nbsp;&nbsp;&nbsp;}
+});
+</pre>
 </div>
 </dd>
 <dt class="method" id="BluetoothLEDevice::disconnect">
@@ -4175,29 +4351,35 @@ Instead, use <em>http://tizen.org/privilege/bluetooth</em>.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function onerror(e) {
-     console.log("Error occured: " + e.message);
- }
-
- function onDeviceFound(device) {
-    function ondisconnect() {
-        console.log("Disconnected");
-    }
-
-    function onconnected() {
-        console.log("Connected to device");
-        device.disconnect(ondisconnect, onerror);
-    }
-
-    if (device.address == "11:22:33:44:55:66") {
-        console.log("Found device: " + device.name);
-        device.connect(onconnected, onerror);
-    }
- }
-
- var adapter = tizen.bluetooth.getLEAdapter();
- adapter.startScan(onDeviceFound, onerror);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function onerror(e)
+{
+&nbsp;&nbsp;&nbsp;console.log("Error occurred: " + e.message);
+}
+
+function onDeviceFound(device)
+{
+&nbsp;&nbsp;&nbsp;function ondisconnect()
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Disconnected");
+&nbsp;&nbsp;&nbsp;}
+
+&nbsp;&nbsp;&nbsp;function onconnected()
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Connected to device");
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;device.disconnect(ondisconnect, onerror);
+&nbsp;&nbsp;&nbsp;}
+
+&nbsp;&nbsp;&nbsp;if (device.address == "11:22:33:44:55:66")
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Found device: " + device.name);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;device.connect(onconnected, onerror);
+&nbsp;&nbsp;&nbsp;}
+}
+
+var adapter = tizen.bluetooth.getLEAdapter();
+adapter.startScan(onDeviceFound, onerror);
+</pre>
 </div>
 </dd>
 <dt class="method" id="BluetoothLEDevice::getService">
@@ -4253,26 +4435,31 @@ Instead, use <em>http://tizen.org/privilege/bluetooth</em>.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function onconnected(device) {
-        console.log("Connected to device");
-        var service = device.getService(device.uuids[0]);
-        console.log("Service got");
- }
-
- function onerror(e) {
-     console.log("Error occured: " + e.message);
- }
-
- function onDeviceFound(device) {
-    if (device.address == "11:22:33:44:55:66") {
-        console.log("Found device: " + device.name);
-        device.connect(onconnected.bind(null, device), onerror);
-    }
- }
-
- var adapter = tizen.bluetooth.getLEAdapter();
- adapter.startScan(onDeviceFound, onerror);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function onconnected(device)
+{
+&nbsp;&nbsp;&nbsp;console.log("Connected to device");
+&nbsp;&nbsp;&nbsp;var service = device.getService(device.uuids[0]);
+&nbsp;&nbsp;&nbsp;console.log("Service got");
+}
+
+function onerror(e)
+{
+&nbsp;&nbsp;&nbsp;console.log("Error occurred: " + e.message);
+}
+
+function onDeviceFound(device)
+{
+&nbsp;&nbsp;&nbsp;if (device.address == "11:22:33:44:55:66")
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Found device: " + device.name);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;device.connect(onconnected.bind(null, device), onerror);
+&nbsp;&nbsp;&nbsp;}
+}
+
+var adapter = tizen.bluetooth.getLEAdapter();
+adapter.startScan(onDeviceFound, onerror);
+</pre>
 </div>
 </dd>
 <dt class="method" id="BluetoothLEDevice::getServiceAllUuids">
@@ -4305,26 +4492,31 @@ Instead, use <em>http://tizen.org/privilege/bluetooth</em>.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function onconnected(device) {
-        console.log("Connected to device");
-        var services = device.getServiceAllUuids();
-        console.log("Services length " + services.length);
- }
-
- function onerror(e) {
-     console.log("Error occured: " + e.message);
- }
-
- function onDeviceFound(device) {
-    if (device.address == "11:22:33:44:55:66") {
-        console.log("Found device: " + device.name);
-        device.connect(onconnected.bind(null, device), onerror);
-    }
- }
-
- var adapter = tizen.bluetooth.getLEAdapter();
- adapter.startScan(onDeviceFound, onerror);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function onconnected(device)
+{
+&nbsp;&nbsp;&nbsp;console.log("Connected to device");
+&nbsp;&nbsp;&nbsp;var services = device.getServiceAllUuids();
+&nbsp;&nbsp;&nbsp;console.log("Services length " + services.length);
+}
+
+function onerror(e)
+{
+&nbsp;&nbsp;&nbsp;console.log("Error occurred: " + e.message);
+}
+
+function onDeviceFound(device)
+{
+&nbsp;&nbsp;&nbsp;if (device.address == "11:22:33:44:55:66")
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Found device: " + device.name);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;device.connect(onconnected.bind(null, device), onerror);
+&nbsp;&nbsp;&nbsp;}
+}
+
+var adapter = tizen.bluetooth.getLEAdapter();
+adapter.startScan(onDeviceFound, onerror);
+</pre>
 </div>
 </dd>
 <dt class="method" id="BluetoothLEDevice::addConnectStateChangeListener">
@@ -4361,30 +4553,37 @@ Instead, use <em>http://tizen.org/privilege/bluetooth</em>.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function onerror(e) {
-     console.log("Error occured: " + e.message);
- }
-
- function onDeviceFound(device) {
-    var onConnectionStateChange = {
-        onconnected: function(device) {
-            console.log("Device " + device.name + " connected");
-        },
-        ondisconnected: function(device) {
-            console.log("Device " + device.name + " disconnected");
-        }
-    }
-
-    if (device.address === "11:22:33:44:55:66") {
-        console.log("Found device: " + device.name);
-        device.addConnectStateChangeListener(onConnectionStateChange);
-        device.connect();
-    }
- }
-
- var adapter = tizen.bluetooth.getLEAdapter();
- adapter.startScan(onDeviceFound, onerror);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function onerror(e)
+{
+&nbsp;&nbsp;&nbsp;console.log("Error occurred: " + e.message);
+}
+
+function onDeviceFound(device)
+{
+&nbsp;&nbsp;&nbsp;var onConnectionStateChange =
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;onconnected: function(device)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Device " + device.name + " connected");
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ondisconnected: function(device)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Device " + device.name + " disconnected");
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;}
+
+&nbsp;&nbsp;&nbsp;if (device.address === "11:22:33:44:55:66")
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Found device: " + device.name);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;device.addConnectStateChangeListener(onConnectionStateChange);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;device.connect();
+&nbsp;&nbsp;&nbsp;}
+}
+
+var adapter = tizen.bluetooth.getLEAdapter();
+adapter.startScan(onDeviceFound, onerror);
+</pre>
 </div>
 </dd>
 <dt class="method" id="BluetoothLEDevice::removeConnectStateChangeListener">
@@ -4410,32 +4609,39 @@ Instead, use <em>http://tizen.org/privilege/bluetooth</em>.
         </ul>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function onerror(e) {
-     console.log("Error occured: " + e.message);
- }
-
- function onDeviceFound(device) {
-    var onConnectionStateChange = {
-        onconnected: function(device) {
-            console.log("Device " + device.name + " connected");
-        },
-        ondisconnected: function(device) {
-            console.log("Device " + device.name + " disconnected");
-            device.removeConnectStateChangeListener(listenerID);
-        }
-    }
-
-    if (device.address === "11:22:33:44:55:66") {
-        console.log("Found device: " + device.name);
-        listenerID = device.addConnectStateChangeListener(onConnectionStateChange);
-        device.connect();
-    }
- }
-
- var adapter = tizen.bluetooth.getLEAdapter();
- var listenerID = null;
- adapter.startScan(onDeviceFound, onerror);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function onerror(e)
+{
+&nbsp;&nbsp;&nbsp;console.log("Error occurred: " + e.message);
+}
+
+function onDeviceFound(device)
+{
+&nbsp;&nbsp;&nbsp;var onConnectionStateChange =
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;onconnected: function(device)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Device " + device.name + " connected");
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ondisconnected: function(device)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Device " + device.name + " disconnected");
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;device.removeConnectStateChangeListener(listenerID);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;}
+
+&nbsp;&nbsp;&nbsp;if (device.address === "11:22:33:44:55:66")
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Found device: " + device.name);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;listenerID = device.addConnectStateChangeListener(onConnectionStateChange);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;device.connect();
+&nbsp;&nbsp;&nbsp;}
+}
+
+var adapter = tizen.bluetooth.getLEAdapter();
+var listenerID = null;
+adapter.startScan(onDeviceFound, onerror);
+</pre>
 </div>
 </dd>
 </dl>
@@ -4595,46 +4801,55 @@ Instead, use <em>http://tizen.org/privilege/bluetooth</em>.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var adapter = tizen.bluetooth.getDefaultAdapter();
-
- function onSocketConnected(socket) {
-    console.log ("Opened connection to remote device");
-    socket.onmessage = function () {
-      console.log ("Message received: " + socket.readData());
-    };
-
-    socket.onclose = function() {
-       console.log("Socket closed with " + socket.peer.name);
-    };
-
-    // Sends data to peer.
-    var textmsg = "Test";
-    var sendtextmsg = new Array();
-    for (var i = 0; i &lt; textmsg.length; i++)
-    {
-        sendtextmsg[i] = textmsg.charCodeAt(i);
-    }
-    socket.writeData (sendtextmsg);
- }
-
- function onSocketError(e) {
-    console.log ("Error connecting to service. Reason: " + e.message);
- }
-
- function onDeviceReady(device) {
-    // Validates device and service uuid.
-    if (device.uuids.indexOf("5BCE9431-6C75-32AB-AFE0-2EC108A30860") != -1) {
-       // Opens socket
-       device.connectToServiceByUUID("5BCE9431-6C75-32AB-AFE0-2EC108A30860", onSocketConnected, onSocketError );
-    }
- }
- function onSetPowered() {
-    // Gets the BluetoothDevice object.
-    adapter.getDevice("35:F4:59:D1:7A:03", onDeviceReady, function(e) { console.log("Error: " + e.message); });
- }
-
- adapter.setPowered(true, onSetPowered, function(e) {console.log ("Could not turn on Bluetooth adapter. reason: " + e.message); });
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var adapter = tizen.bluetooth.getDefaultAdapter();
+
+function onSocketConnected(socket)
+{
+&nbsp;&nbsp;&nbsp;console.log("Opened connection to remote device");
+&nbsp;&nbsp;&nbsp;socket.onmessage = function()
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Message received: " + socket.readData());
+&nbsp;&nbsp;&nbsp;};
+
+&nbsp;&nbsp;&nbsp;socket.onclose = function()
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Socket closed with " + socket.peer.name);
+&nbsp;&nbsp;&nbsp;};
+
+&nbsp;&nbsp;&nbsp;/* Sends data to peer */
+&nbsp;&nbsp;&nbsp;var textmsg = "Test";
+&nbsp;&nbsp;&nbsp;var sendtextmsg = new Array();
+&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; textmsg.length; i++)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sendtextmsg[i] = textmsg.charCodeAt(i);
+&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;socket.writeData(sendtextmsg);
+}
+
+function onSocketError(e)
+{
+&nbsp;&nbsp;&nbsp;console.log("Error connecting to service. Reason: " + e.message);
+}
+
+function onDeviceReady(device)
+{
+&nbsp;&nbsp;&nbsp;/* Validates device and service uuid */
+&nbsp;&nbsp;&nbsp;if (device.uuids.indexOf("5BCE9431-6C75-32AB-AFE0-2EC108A30860") != -1)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Opens socket */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;device.connectToServiceByUUID("5BCE9431-6C75-32AB-AFE0-2EC108A30860", onSocketConnected, onSocketError);
+&nbsp;&nbsp;&nbsp;}
+}
+
+function onSetPowered()
+{
+&nbsp;&nbsp;&nbsp;/* Gets the BluetoothDevice object */
+&nbsp;&nbsp;&nbsp;adapter.getDevice("35:F4:59:D1:7A:03", onDeviceReady, function(e) {console.log("Error: " + e.message);});
+}
+
+adapter.setPowered(true, onSetPowered, function(e) {console.log("Could not turn on Bluetooth adapter. reason: " + e.message);});
+</pre>
 </div>
 </dd>
 <dt class="method" id="BluetoothSocket::readData">
@@ -4684,43 +4899,50 @@ Instead, use <em>http://tizen.org/privilege/bluetooth</em>.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var adapter = tizen.bluetooth.getDefaultAdapter();
-
- function onError(e) {
-    console.log ("Error connecting to service. Reason: " + e.message);
- }
-
- function onSocketConnected(socket) {
-    console.log ("Opening socket success!!!");
-
-    socket.onmessage = function() {
-      //  Gets a message from peer, reads it
-      var data = socket.readData();
-
-      //
-      // Code to evaluate message goes here
-      //
-    };
-
-    socket.onclose = function() {
-       console.log("Socket closed with " + socket.peer.name);
-    };
- }
-
- function onDeviceReady(device) {
-    // Validates device and service uuid
-    if (device.uuids.indexOf("5BCE9431-6C75-32AB-AFE0-2EC108A30860") != -1) {
-       // Opens socket
-       device.connectToServiceByUUID("5BCE9431-6C75-32AB-AFE0-2EC108A30860", onSocketConnected, onError);
-    }
- }
- function onSetPowered() {
-    // Gets the BluetoothDevice object.
-    adapter.getDevice("35:F4:59:D1:7A:03", onDeviceReady, function(e) { console.log("Error: " + e.message); });
- }
-
- adapter.setPowered(true, onSetPowered, function(e) {console.log ("Could not turn on Bluetooth adapter. reason: " + e.message); });
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var adapter = tizen.bluetooth.getDefaultAdapter();
+
+function onError(e)
+{
+&nbsp;&nbsp;&nbsp;console.log("Error connecting to service. Reason: " + e.message);
+}
+
+function onSocketConnected(socket)
+{
+&nbsp;&nbsp;&nbsp;console.log("Opening socket success!!!");
+
+&nbsp;&nbsp;&nbsp;socket.onmessage = function()
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Gets a message from peer, reads it */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var data = socket.readData();
+
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Code to evaluate message goes here */
+&nbsp;&nbsp;&nbsp;};
+
+&nbsp;&nbsp;&nbsp;socket.onclose = function()
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Socket closed with " + socket.peer.name);
+&nbsp;&nbsp;&nbsp;};
+}
+
+function onDeviceReady(device)
+{
+&nbsp;&nbsp;&nbsp;/* Validates device and service uuid */
+&nbsp;&nbsp;&nbsp;if (device.uuids.indexOf("5BCE9431-6C75-32AB-AFE0-2EC108A30860") != -1)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Opens socket */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;device.connectToServiceByUUID("5BCE9431-6C75-32AB-AFE0-2EC108A30860", onSocketConnected, onError);
+&nbsp;&nbsp;&nbsp;}
+}
+
+function onSetPowered()
+{
+&nbsp;&nbsp;&nbsp;/* Gets the BluetoothDevice object */
+&nbsp;&nbsp;&nbsp;adapter.getDevice("35:F4:59:D1:7A:03", onDeviceReady, function(e) {console.log("Error: " + e.message);});
+}
+
+adapter.setPowered(true, onSetPowered, function(e) {console.log("Could not turn on Bluetooth adapter. reason: " + e.message);});
+</pre>
 </div>
 </dd>
 <dt class="method" id="BluetoothSocket::close">
@@ -4825,25 +5047,31 @@ The <em>BluetoothClassDeviceMajor</em> interface contains the list of known valu
  1.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var adapter = tizen.bluetooth.getDefaultAdapter();
-
- function evaluateDevice(address) {
-    adapter.getDevice(address, function(device) {
-        if (device.deviceClass.major == tizen.bluetooth.deviceMajor.COMPUTER) {
-            // Shows computer icon for this device
-            console.log("Device is computer");
-        } else if (device.deviceClass.major == tizen.bluetooth.deviceMajor.PHONE) {
-            // Shows phone icon
-            console.log("Device is a Phone");
-        }
-    }, function(e) {
-        console.log("Couldn't get any device with the given address: " + e.message);
-    });
- }
-
- evaluateDevice("11:22:33:44:55:66");
-
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var adapter = tizen.bluetooth.getDefaultAdapter();
+
+function evaluateDevice(address)
+{
+&nbsp;&nbsp;&nbsp;adapter.getDevice(address, function(device)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (device.deviceClass.major == tizen.bluetooth.deviceMajor.COMPUTER)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Shows computer icon for this device */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Device is computer");
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;else if (device.deviceClass.major == tizen.bluetooth.deviceMajor.PHONE)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Shows phone icon */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Device is a Phone");
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;}, function(e)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Couldn't get any device with the given address: " + e.message);
+&nbsp;&nbsp;&nbsp;});
+}
+
+evaluateDevice("11:22:33:44:55:66");
+</pre>
 </div>
 </li>
 <li class="attribute" id="BluetoothClass::minor">
@@ -4928,15 +5156,19 @@ Instead, use <em>http://tizen.org/privilege/bluetooth</em>.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var adapter = tizen.bluetooth.getDefaultAdapter();
- adapter.getDevice("12:34:56:78:9A:BC", function(device) {
-    if (device.deviceClass.hasService(tizen.bluetooth.deviceService.POSITIONING)) {
-         console.log("Device supports Positioning service");
-    }
- }, function(e) {
-    console.log("Couldn't get device for given address: " + e.message);
- });
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var adapter = tizen.bluetooth.getDefaultAdapter();
+adapter.getDevice("12:34:56:78:9A:BC", function(device)
+{
+&nbsp;&nbsp;&nbsp;if (device.deviceClass.hasService(tizen.bluetooth.deviceService.POSITIONING))
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Device supports Positioning service");
+&nbsp;&nbsp;&nbsp;}
+}, function(e)
+{
+&nbsp;&nbsp;&nbsp;console.log("Couldn't get device for given address: " + e.message);
+});
+</pre>
 </div>
 </dd>
 </dl>
@@ -5210,49 +5442,54 @@ Instead, use <em>http://tizen.org/privilege/bluetooth</em>.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var adapter = tizen.bluetooth.getDefaultAdapter();
- var chatServiceHandler = null;
-
- function chatServiceSuccessCb(handler) {
-    console.log("Chat service registration was successful!");
-
-    chatServiceHandler = handler;
-    handler.onconnect = function(socket) {
-       console.log("Client is connected: " + socket.peer.name + "," + socket.peer.address);
-       socket.onmessage = function() {
-           var data = socket.readData();
-           // Handle message code goes here
-           //....
-       };
-
-       // Expected close
-       socket.onclose = function() {
-           console.log('The socket is closed.');
-       };
-    };
- }
-
- function publishChatService() {
-    var CHAT_SERVICE_UUID = "5BCE9431-6C75-32AB-AFE0-2EC108A30860";
-    adapter.registerRFCOMMServiceByUUID(CHAT_SERVICE_UUID, "Chat service", chatServiceSuccessCb,
-      // Error handler
-      function(e) {
-           console.log( "Could not register service record, Error: " + e.message);
-      });
- }
-
- function unRegisterChatService() {
-      if (chatServiceHandler != null) {
-           chatServiceHandler.unregister(function() {
-               chatServiceHandler = null;
-               console.log("Chat service is unregistered.");
-           },
-           function(e) {
-               console.log ("Error: " + e.message);
-           });
-      }
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var adapter = tizen.bluetooth.getDefaultAdapter();
+var chatServiceHandler = null;
+
+function chatServiceSuccessCb(handler)
+{
+&nbsp;&nbsp;&nbsp;console.log("Chat service registration was successful!");
+
+&nbsp;&nbsp;&nbsp;chatServiceHandler = handler;
+&nbsp;&nbsp;&nbsp;handler.onconnect = function(socket)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Client is connected: " + socket.peer.name + "," + socket.peer.address);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;socket.onmessage = function()
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var data = socket.readData();
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Handle message code here */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;};
+
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Expected close */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;socket.onclose = function()
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('The socket is closed.');
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;};
+&nbsp;&nbsp;&nbsp;};
+}
+
+function publishChatService()
+{
+&nbsp;&nbsp;&nbsp;var CHAT_SERVICE_UUID = "5BCE9431-6C75-32AB-AFE0-2EC108A30860";
+&nbsp;&nbsp;&nbsp;adapter.registerRFCOMMServiceByUUID(CHAT_SERVICE_UUID, "Chat service", chatServiceSuccessCb,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Error handler: function(e) {console.log("Could not register service record, Error: " + e.message);} */);
+}
+
+function unRegisterChatService()
+{
+&nbsp;&nbsp;&nbsp;if (chatServiceHandler != null)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;chatServiceHandler.unregister(function()
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;chatServiceHandler = null;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Chat service is unregistered.");
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}, function(e)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Error: " + e.message);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;});
+&nbsp;&nbsp;&nbsp;}
+}
+</pre>
 </div>
 </dd>
 </dl>
@@ -5377,19 +5614,22 @@ For example, pulse oximeter is 4100 and blood pressure monitor is 4103.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var adapter = tizen.bluetooth.getDefaultAdapter();
- var healthProfileHandler = adapter.getBluetoothProfileHandler("HEALTH");
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var adapter = tizen.bluetooth.getDefaultAdapter();
+var healthProfileHandler = adapter.getBluetoothProfileHandler("HEALTH");
 
- function healthRegisterSuccess(app) {
-     console.log("Registered application: " + app.name);
- }
+function healthRegisterSuccess(app)
+{
+&nbsp;&nbsp;&nbsp;console.log("Registered application: " + app.name);
+}
 
- function healthRegisterError(e) {
-     console.log("Failed to register application: " + e.message);
- };
+function healthRegisterError(e)
+{
+&nbsp;&nbsp;&nbsp;console.log("Failed to register application: " + e.message);
+};
 
- healthProfileHandler.registerSinkApplication(4100, "testSinkApp", healthRegisterSuccess, healthRegisterError);
- </pre>
+healthProfileHandler.registerSinkApplication(4100, "testSinkApp", healthRegisterSuccess, healthRegisterError);
+</pre>
 </div>
 </dd>
 <dt class="method" id="BluetoothHealthProfileHandler::connectToSource">
@@ -5464,38 +5704,44 @@ Instead, use <em>http://tizen.org/privilege/bluetooth</em>.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var adapter = tizen.bluetooth.getDefaultAdapter();
- var healthProfileHandler = adapter.getBluetoothProfileHandler("HEALTH");
- var registerHealthApp = null;
-
- function healthConnectSuccess(channel) {
-     console.log("Health device is connected");
-     var status = "Name of remote device: " + channel.peer.name +
-     "channel type of device profile: " + channel.channelType +
-     "health application name: " + channel.appication.name;
-     console.log(status);
- }
-
- function healthConnectError(e) {
-     console.log("Failed to connect to source: " + e.message);
- };
-
- function gotDeviceInfo(device) {
-     healthProfileHandler.connectToSource(device, registerHealthApp, healthConnectSuccess, healthConnectError);
- }
-
- function healthRegisterSuccess(app) {
-     console.log("Registered application: " + app.name);
-     registerHealthApp = app;
-     adapter.getDevice("35:F4:59:D1:7A:03", gotDeviceInfo);
- }
-
- function healthRegisterError(e) {
-     console.log("Failed to register application: " + e.message);
- };
-
- healthProfileHandler.registerSinkApplication(4100, "testSinkApp", healthRegisterSuccess, healthRegisterError);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var adapter = tizen.bluetooth.getDefaultAdapter();
+var healthProfileHandler = adapter.getBluetoothProfileHandler("HEALTH");
+var registerHealthApp = null;
+
+function healthConnectSuccess(channel)
+{
+&nbsp;&nbsp;&nbsp;console.log("Health device is connected");
+&nbsp;&nbsp;&nbsp;var status = "Name of remote device: " + channel.peer.name +
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"channel type of device profile: " + channel.channelType +
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"health application name: " + channel.appication.name;
+&nbsp;&nbsp;&nbsp;console.log(status);
+}
+
+function healthConnectError(e)
+{
+&nbsp;&nbsp;&nbsp;console.log("Failed to connect to source: " + e.message);
+};
+
+function gotDeviceInfo(device)
+{
+&nbsp;&nbsp;&nbsp;healthProfileHandler.connectToSource(device, registerHealthApp, healthConnectSuccess, healthConnectError);
+}
+
+function healthRegisterSuccess(app)
+{
+&nbsp;&nbsp;&nbsp;console.log("Registered application: " + app.name);
+&nbsp;&nbsp;&nbsp;registerHealthApp = app;
+&nbsp;&nbsp;&nbsp;adapter.getDevice("35:F4:59:D1:7A:03", gotDeviceInfo);
+}
+
+function healthRegisterError(e)
+{
+&nbsp;&nbsp;&nbsp;console.log("Failed to register application: " + e.message);
+};
+
+healthProfileHandler.registerSinkApplication(4100, "testSinkApp", healthRegisterSuccess, healthRegisterError);
+</pre>
 </div>
 </dd>
 </dl>
@@ -5637,46 +5883,60 @@ Instead, use <em>http://tizen.org/privilege/bluetooth</em>.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var adapter = tizen.bluetooth.getDefaultAdapter();
- var healthProfileHandler = adapter.getBluetoothProfileHandler("HEALTH");
- var healthApp = null;
-
- function healthRegisterSuccess(app) {
-     console.log("Registered application: " + app.name);
-     healthApp = app;
-     healthApp.onconnect = function(channel) {
-         console.log("Connected!!");
-     };
- }
-
- function healthRegisterError(e) {
-     console.log("Failed to register application: " + e.message);
- };
-
- function startSink() {
-     try {
-         healthProfileHandler.registerSinkApplication(4100, "testSinkApp", healthRegisterSuccess, healthRegisterError);
-     } catch(e) {
-         console.log("Error: " + e.message);
-     }
- }
-
- function stopSink() {
-     try {
-         if (healthApp != null) {
-             healthApp.unregister(function() {
-                 healthApp = null;
-                 console.log("Health application is unregistered.");
-             },
-             function(e) {
-                 console.log ("Error: " + e.message);
-             });
-         }
-     } catch(err) {
-         console.log("Error: " + err.message);
-     }
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var adapter = tizen.bluetooth.getDefaultAdapter();
+var healthProfileHandler = adapter.getBluetoothProfileHandler("HEALTH");
+var healthApp = null;
+
+function healthRegisterSuccess(app)
+{
+&nbsp;&nbsp;&nbsp;console.log("Registered application: " + app.name);
+&nbsp;&nbsp;&nbsp;healthApp = app;
+&nbsp;&nbsp;&nbsp;healthApp.onconnect = function(channel)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Connected!!");
+&nbsp;&nbsp;&nbsp;};
+}
+
+function healthRegisterError(e)
+{
+&nbsp;&nbsp;&nbsp;console.log("Failed to register application: " + e.message);
+};
+
+function startSink()
+{
+&nbsp;&nbsp;&nbsp;try
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;healthProfileHandler.registerSinkApplication(4100, "testSinkApp", healthRegisterSuccess, healthRegisterError);
+&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;catch (e)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Error: " + e.message);
+&nbsp;&nbsp;&nbsp;}
+}
+
+function stopSink()
+{
+&nbsp;&nbsp;&nbsp;try
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (healthApp != null)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;healthApp.unregister(function()
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;healthApp = null;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Health application is unregistered.");
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}, function(e)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Error: " + e.message);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;});
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;catch (err)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Error: " + err.message);
+&nbsp;&nbsp;&nbsp;}
+}
+</pre>
 </div>
 </dd>
 </dl>
@@ -5800,23 +6060,27 @@ Instead, use <em>http://tizen.org/privilege/bluetooth</em>.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var adapter = tizen.bluetooth.getDefaultAdapter();
- var healthProfileHandler = adapter.getBluetoothProfileHandler("HEALTH");
-
- function healthRegisterSuccess(app) {
-     console.log("Registered application: " + app.name);
-     app.onconnect = function(channel) {;
-         console.log("Health device is connected");
-         channel.close();
-     }
- }
-
- function healthRegisterError(e) {
-     console.log("Failed to register application: " + e.message);
- };
-
- healthProfileHandler.registerSinkApplication(4100, "testSinkApp", healthRegisterSuccess, healthRegisterError);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var adapter = tizen.bluetooth.getDefaultAdapter();
+var healthProfileHandler = adapter.getBluetoothProfileHandler("HEALTH");
+
+function healthRegisterSuccess(app)
+{
+&nbsp;&nbsp;&nbsp;console.log("Registered application: " + app.name);
+&nbsp;&nbsp;&nbsp;app.onconnect = function(channel)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Health device is connected");
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;channel.close();
+&nbsp;&nbsp;&nbsp;}
+}
+
+function healthRegisterError(e)
+{
+&nbsp;&nbsp;&nbsp;console.log("Failed to register application: " + e.message);
+};
+
+healthProfileHandler.registerSinkApplication(4100, "testSinkApp", healthRegisterSuccess, healthRegisterError);
+</pre>
 </div>
 </dd>
 <dt class="method" id="BluetoothHealthChannel::sendData">
@@ -5876,23 +6140,27 @@ Instead, use <em>http://tizen.org/privilege/bluetooth</em>.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var adapter = tizen.bluetooth.getDefaultAdapter();
- var healthProfileHandler = adapter.getBluetoothProfileHandler("HEALTH");
-
- function healthRegisterSuccess(app) {
-     console.log("Registered application: " + app.name);
-     app.onconnect = function(channel) {
-         console.log("Health device is connected");
-         channel.sendData(dataToSend);
-     }
- }
-
- function healthRegisterError(e) {
-     console.log("Failed to register application: " + e.message);
- };
-
- healthProfileHandler.registerSinkApplication(4100, "testSinkApp", healthRegisterSuccess, healthRegisterError);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var adapter = tizen.bluetooth.getDefaultAdapter();
+var healthProfileHandler = adapter.getBluetoothProfileHandler("HEALTH");
+
+function healthRegisterSuccess(app)
+{
+&nbsp;&nbsp;&nbsp;console.log("Registered application: " + app.name);
+&nbsp;&nbsp;&nbsp;app.onconnect = function(channel)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Health device is connected");
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;channel.sendData(dataToSend);
+&nbsp;&nbsp;&nbsp;}
+}
+
+function healthRegisterError(e)
+{
+&nbsp;&nbsp;&nbsp;console.log("Failed to register application: " + e.message);
+};
+
+healthProfileHandler.registerSinkApplication(4100, "testSinkApp", healthRegisterSuccess, healthRegisterError);
+</pre>
 </div>
 </dd>
 <dt class="method" id="BluetoothHealthChannel::setListener">
@@ -5945,32 +6213,39 @@ Instead, use <em>http://tizen.org/privilege/bluetooth</em>.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var adapter = tizen.bluetooth.getDefaultAdapter();
- var healthProfileHandler = adapter.getBluetoothProfileHandler("HEALTH");
-
- var channelCallback = {
-     onmessage: function(data) {
-         console.log("data is received")
-     },
-     onclose: function() {
-         console.log("channel is closed");
-     }
- };
-
- function healthRegisterSuccess(app) {
-     console.log("Registered application: " + app.name);
-     app.onconnect = function(channel) {;
-         console.log("Health device is connected");
-         channel.setListener(channelCallback);
-     }
- }
-
- function healthRegisterError(e) {
-     console.log("Failed to register application: " + e.message);
- };
-
- healthProfileHandler.registerSinkApplication(4100, "testSinkApp", healthRegisterSuccess, healthRegisterError);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var adapter = tizen.bluetooth.getDefaultAdapter();
+var healthProfileHandler = adapter.getBluetoothProfileHandler("HEALTH");
+
+var channelCallback =
+{
+&nbsp;&nbsp;&nbsp;onmessage: function(data)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("data is received")
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;onclose: function()
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("channel is closed");
+&nbsp;&nbsp;&nbsp;}
+};
+
+function healthRegisterSuccess(app)
+{
+&nbsp;&nbsp;&nbsp;console.log("Registered application: " + app.name);
+&nbsp;&nbsp;&nbsp;app.onconnect = function(channel)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Health device is connected");
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;channel.setListener(channelCallback);
+&nbsp;&nbsp;&nbsp;}
+}
+
+function healthRegisterError(e)
+{
+&nbsp;&nbsp;&nbsp;console.log("Failed to register application: " + e.message);
+};
+
+healthProfileHandler.registerSinkApplication(4100, "testSinkApp", healthRegisterSuccess, healthRegisterError);
+</pre>
 </div>
 </dd>
 <dt class="method" id="BluetoothHealthChannel::unsetListener">
@@ -6012,35 +6287,42 @@ Instead, use <em>http://tizen.org/privilege/bluetooth</em>.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var adapter = tizen.bluetooth.getDefaultAdapter();
- var healthProfileHandler = adapter.getBluetoothProfileHandler("HEALTH");
- var connectedChannel = null;
-
- var channelCallback = {
-     onmessage: function(data) {
-         console.log("data is received")
-     },
-     onclose: function() {
-         console.log("channel is closed");
-         connectedChannel.unsetListener();
-     }
- };
-
- function healthRegisterSuccess(app) {
-     console.log("Registered application: " + app.name);
-     app.onconnect = function(channel) {;
-         console.log("Health device is connected");
-         connectedChannel = channel;
-         connectedChannel.setListener(channelCallback);
-     }
- }
-
- function healthRegisterError(e) {
-     console.log("Failed to register application: " + e.message);
- };
-
- healthProfileHandler.registerSinkApplication(4100, "testSinkApp", healthRegisterSuccess, healthRegisterError);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var adapter = tizen.bluetooth.getDefaultAdapter();
+var healthProfileHandler = adapter.getBluetoothProfileHandler("HEALTH");
+var connectedChannel = null;
+
+var channelCallback =
+{
+&nbsp;&nbsp;&nbsp;onmessage: function(data)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("data is received")
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;onclose: function()
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("channel is closed");
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;connectedChannel.unsetListener();
+&nbsp;&nbsp;&nbsp;}
+};
+
+function healthRegisterSuccess(app)
+{
+&nbsp;&nbsp;&nbsp;console.log("Registered application: " + app.name);
+&nbsp;&nbsp;&nbsp;app.onconnect = function(channel)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Health device is connected");
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;connectedChannel = channel;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;connectedChannel.setListener(channelCallback);
+&nbsp;&nbsp;&nbsp;}
+}
+
+function healthRegisterError(e)
+{
+&nbsp;&nbsp;&nbsp;console.log("Failed to register application: " + e.message);
+};
+
+healthProfileHandler.registerSinkApplication(4100, "testSinkApp", healthRegisterSuccess, healthRegisterError);
+</pre>
 </div>
 </dd>
 </dl>
index 5c29f33..b860d2e 100644 (file)
@@ -191,13 +191,17 @@ In this case, the return will contain bookmarks under the root bookmark folder.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> try {
-  // Retrieves bookmarks from the root bookmark folder recursively.
-  var allBookmarks = tizen.bookmark.get(null, true);
- } catch (err) {
-  console.log (err.name +": " + err.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+try
+{
+&nbsp;&nbsp;&nbsp;/* Retrieves bookmarks from the root bookmark folder recursively */
+&nbsp;&nbsp;&nbsp;var allBookmarks = tizen.bookmark.get(null, true);
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="BookmarkManager::add">
@@ -262,13 +266,17 @@ In this case, the bookmark is added under the root bookmark folder.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> try {
- // Adds a bookmark item to root bookmark folder.
-  tizen.bookmark.add(new tizen.BookmarkItem("tizen", "https://www.tizen.org"));
- } catch (err) {
-  console.log (err.name +": " + err.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+try
+{
+&nbsp;&nbsp;&nbsp;/* Adds a bookmark item to root bookmark folder */
+&nbsp;&nbsp;&nbsp;tizen.bookmark.add(new tizen.BookmarkItem("tizen", "https://www.tizen.org"));
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="BookmarkManager::remove">
@@ -323,13 +331,17 @@ In this case, all the bookmarks will be removed.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> try {
- // Removes all the bookmark folders and items.
-  tizen.bookmark.remove();
- } catch (err) {
-  console.log (err.name +": " + err.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+try
+{
+&nbsp;&nbsp;&nbsp;/* Removes all the bookmark folders and items */
+&nbsp;&nbsp;&nbsp;tizen.bookmark.remove();
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+}
+</pre>
 </div>
 </dd>
 </dl>
@@ -356,13 +368,17 @@ In this case, all the bookmarks will be removed.
 <dl>
 <pre class="webidl prettyprint">BookmarkItem(DOMString title, DOMString url);</pre>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> try {
- // Creates a bookmark item.
-  var tizen = new tizen.BookmarkItem("tizen", "https://www.tizen.org");
- } catch (err) {
-  console.log (err.name +": " + err.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+try
+{
+&nbsp;&nbsp;&nbsp;/* Creates a bookmark item */
+&nbsp;&nbsp;&nbsp;var tizen = new tizen.BookmarkItem("tizen", "https://www.tizen.org");
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+}
+</pre>
 </div>
 </dl>
 </div>
@@ -431,13 +447,17 @@ If the parent bookmark folder indicates the root bookmark folder, the value will
 <dl>
 <pre class="webidl prettyprint">BookmarkFolder(DOMString title);</pre>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> try {
- // creates a bookmark folder
-  var folder = new tizen.BookmarkFolder("folder");
- } catch (err) {
-  console.log (err.name +": " + err.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+try
+{
+&nbsp;&nbsp;&nbsp;/* Creates a bookmark folder */
+&nbsp;&nbsp;&nbsp;var folder = new tizen.BookmarkFolder("folder");
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+}
+</pre>
 </div>
 </dl>
 </div>
index 327ff22..7bece78 100644 (file)
@@ -673,45 +673,53 @@ UnknownError - if any other error occurs.              </li>
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">  var calendar;
-
-  function eventFoundCallback(events) {
-    // The event has been successfully found.
-    // Changes the summary.
-    events[0].summary = 'HTML6 Webinar';
-    calendar.update(events[0]);
-    console.log('First event was updated!');
-  }
-
-  // Defines the error callback for all the asynchronous calls.
-  function errorCallback(response) {
-    console.log( 'The following error occurred: ' +  response.name);
-  }
-
-  // Defines the success callback for retrieving the list of calendars.
-  function calendarListCallback(calendars) {
-    if(calendars.length &gt; 0) {
-      calendar = calendars[0];
-      console.log('The calendar id is ' + calendar.id + ' and name ' + calendar.name);
-
-      var ev = new tizen.CalendarEvent({description:'HTML5 Introduction',
-                                         summary:'HTML5 Webinar',
-                                         startDate: new tizen.TZDate(2011, 3, 30, 10, 0),
-                                         duration: new tizen.TimeDuration(1, "HOURS"),
-                                         location:'Huesca'});
-      calendar.add(ev);
-
-      // The event has been successfully added.
-      // Checks whether the added event can be retrieved from the calendar.
-      // If the calendar was empty, only the item added through add() should be returned.
-      var filter = new tizen.AttributeFilter('summary', 'CONTAINS', 'HTML5');
-      calendar.find(eventFoundCallback, errorCallback, filter);
-    }
-  }
-
-  // Gets a list of available calendars.
-  tizen.calendar.getCalendars("EVENT", calendarListCallback, errorCallback);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var calendar;
+
+function eventFoundCallback(events)
+{
+&nbsp;&nbsp;&nbsp;/* Event has been successfully found */
+&nbsp;&nbsp;&nbsp;/* Changes the summary */
+&nbsp;&nbsp;&nbsp;events[0].summary = 'HTML6 Webinar';
+&nbsp;&nbsp;&nbsp;calendar.update(events[0]);
+&nbsp;&nbsp;&nbsp;console.log('First event was updated!');
+}
+
+/* Defines the error callback for all the asynchronous calls */
+function errorCallback(response)
+{
+&nbsp;&nbsp;&nbsp;console.log('The following error occurred: ' + response.name);
+}
+
+/* Defines the success callback for retrieving the list of calendars */
+function calendarListCallback(calendars)
+{
+&nbsp;&nbsp;&nbsp;if (calendars.length &gt; 0)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;calendar = calendars[0];
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('The calendar id is ' + calendar.id + ' and name ' + calendar.name);
+
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var ev = new tizen.CalendarEvent(
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;description:'HTML5 Introduction',
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;summary:'HTML5 Webinar',
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;startDate: new tizen.TZDate(2011, 3, 30, 10, 0),
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;duration: new tizen.TimeDuration(1, "HOURS"),
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;location:'Huesca'
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;});
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;calendar.add(ev);
+
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Event has been successfully added */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Checks whether the added event can be retrieved from the calendar */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* If the calendar was empty, only the item added through add() should be returned */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var filter = new tizen.AttributeFilter('summary', 'CONTAINS', 'HTML5');
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;calendar.find(eventFoundCallback, errorCallback, filter);
+&nbsp;&nbsp;&nbsp;}
+}
+
+/* Gets a list of available calendars */
+tizen.calendar.getCalendars("EVENT", calendarListCallback, errorCallback);
+</pre>
 </div>
 </dd>
 <dt class="method" id="CalendarManager::getUnifiedCalendar">
@@ -775,38 +783,44 @@ If an item is added to the unified calendar, it will be saved in the default cal
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">  var unifiedCalendar;
-
-  // Defines the error callback for all the asynchronous calls.
-  function errorCallback(response) {
-    console.log( 'The following error occurred: ' +  response.name);
-  }
-
-  function eventFoundCallback(events) {
-    // The event has been successfully found.
-    // Changes the summary.
-    events[0].summary = 'HTML6 Webinar';
-    unifiedCalendar.update(events[0]);
-    console.log('First event was updated!');
-  }
-
-  // Gets the unified calendar.
-  unifiedCalendar = tizen.calendar.getUnifiedCalendar("EVENT");
-
-  var ev = new tizen.CalendarEvent({description:'HTML5 Introduction',
-                                    summary:'HTML5 Webinar ',
-                                    startDate: new tizen.TZDate(2011, 3, 30, 10, 0),
-                                    duration: new tizen.TimeDuration(1, "HOURS"),
-                                    location:'Huesca'});
-
-  unifiedCalendar.add(ev);
-
-  // The event has been added.
-  // Checks whether the added event can be retrieved from the calendar.
-  // If the calendar was empty, only the item added through add() should be returned.
-  var filter = new tizen.AttributeFilter('summary', 'CONTAINS', 'HTML5');
-  unifiedCalendar.find(eventFoundCallback, errorCallback, filter);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var unifiedCalendar;
+
+/* Defines the error callback for all the asynchronous calls */
+function errorCallback(response)
+{
+&nbsp;&nbsp;&nbsp;console.log('The following error occurred: ' + response.name);
+}
+
+function eventFoundCallback(events)
+{
+&nbsp;&nbsp;&nbsp;/* Event has been successfully found */
+&nbsp;&nbsp;&nbsp;/* Changes the summary */
+&nbsp;&nbsp;&nbsp;events[0].summary = 'HTML6 Webinar';
+&nbsp;&nbsp;&nbsp;unifiedCalendar.update(events[0]);
+&nbsp;&nbsp;&nbsp;console.log('First event was updated!');
+}
+
+/* Gets the unified calendar */
+unifiedCalendar = tizen.calendar.getUnifiedCalendar("EVENT");
+
+var ev = new tizen.CalendarEvent(
+{
+&nbsp;&nbsp;&nbsp;description:'HTML5 Introduction',
+&nbsp;&nbsp;&nbsp;summary:'HTML5 Webinar ',
+&nbsp;&nbsp;&nbsp;startDate: new tizen.TZDate(2011, 3, 30, 10, 0),
+&nbsp;&nbsp;&nbsp;duration: new tizen.TimeDuration(1, "HOURS"),
+&nbsp;&nbsp;&nbsp;location:'Huesca'
+});
+
+unifiedCalendar.add(ev);
+
+/* Event has been added */
+/* Checks whether the added event can be retrieved from the calendar */
+/* If the calendar was empty, only the item added through add() should be returned */
+var filter = new tizen.AttributeFilter('summary', 'CONTAINS', 'HTML5');
+unifiedCalendar.find(eventFoundCallback, errorCallback, filter);
+</pre>
 </div>
 </dd>
 <dt class="method" id="CalendarManager::getDefaultCalendar">
@@ -865,38 +879,44 @@ If an item is added to the unified calendar, it will be saved in the default cal
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">  var myCalendar;
-
-  // Defines the error callback for all the asynchronous calls.
-  function errorCallback(response) {
-    console.log( 'The following error occurred: ' +  response.name);
-  }
-
-  function eventFoundCallback(events) {
-    // The event has been successfully found.
-    // Changes the summary.
-    events[0].summary = 'HTML6 Webinar';
-    myCalendar.update(events[0]);
-    console.log('First event was updated!');
-  }
-
-  // Gets the default calendar.
-  myCalendar = tizen.calendar.getDefaultCalendar("EVENT");
-
-  var ev = new tizen.CalendarEvent({description:'HTML5 Introduction',
-                                    summary:'HTML5 Webinar ',
-                                    startDate: new tizen.TZDate(2011, 3, 30, 10, 0),
-                                    duration: new tizen.TimeDuration(1, "HOURS"),
-                                    location:'Huesca'});
-
-  myCalendar.add(ev);
-
-  // The event has been added.
-  // Checks whether the added event can be retrieved from the calendar.
-  // If the calendar was empty, only the item added through add() should be returned.
-  var filter = new tizen.AttributeFilter('summary', 'CONTAINS', 'HTML5');
-  myCalendar.find(eventFoundCallback, errorCallback, filter);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var myCalendar;
+
+/* Defines the error callback for all the asynchronous calls */
+function errorCallback(response)
+{
+&nbsp;&nbsp;&nbsp;console.log('The following error occurred: ' + response.name);
+}
+
+function eventFoundCallback(events)
+{
+&nbsp;&nbsp;&nbsp;/* Event has been successfully found */
+&nbsp;&nbsp;&nbsp;/* Changes the summary */
+&nbsp;&nbsp;&nbsp;events[0].summary = 'HTML6 Webinar';
+&nbsp;&nbsp;&nbsp;myCalendar.update(events[0]);
+&nbsp;&nbsp;&nbsp;console.log('First event was updated!');
+}
+
+/* Gets the default calendar */
+myCalendar = tizen.calendar.getDefaultCalendar("EVENT");
+
+var ev = new tizen.CalendarEvent(
+{
+&nbsp;&nbsp;&nbsp;description:'HTML5 Introduction',
+&nbsp;&nbsp;&nbsp;summary:'HTML5 Webinar ',
+&nbsp;&nbsp;&nbsp;startDate: new tizen.TZDate(2011, 3, 30, 10, 0),
+&nbsp;&nbsp;&nbsp;duration: new tizen.TimeDuration(1, "HOURS"),
+&nbsp;&nbsp;&nbsp;location:'Huesca'
+});
+
+myCalendar.add(ev);
+
+/* Event has been added */
+/* Checks whether the added event can be retrieved from the calendar */
+/* If the calendar was empty, only the item added through add() should be returned */
+var filter = new tizen.AttributeFilter('summary', 'CONTAINS', 'HTML5');
+myCalendar.find(eventFoundCallback, errorCallback, filter);
+</pre>
 </div>
 </dd>
 <dt class="method" id="CalendarManager::addCalendar">
@@ -954,21 +974,22 @@ will have its identifier (id attribute) set when the function returns.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var appId = tizen.application.getCurrentApplication().appInfo.id;
- tizen.account.getAccounts(function(accounts) {
-     var account = accounts[0];
-     if(account) {
-         var calendar = new tizen.Calendar(
-             account.id,
-             'remote calendar',
-             'TASK'
-         );
-         tizen.calendar.addCalendar(calendar);
-     }
- }, function(e) {
-     console.log('Error: ' + e.message);
- }, appId);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var appId = tizen.application.getCurrentApplication().appInfo.id;
+tizen.account.getAccounts(function(accounts)
+{
+&nbsp;&nbsp;&nbsp;var account = accounts[0];
+&nbsp;&nbsp;&nbsp;if (account)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var calendar = new tizen.Calendar(account.id,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'remote calendar', 'TASK');
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tizen.calendar.addCalendar(calendar);
+&nbsp;&nbsp;&nbsp;}
+}, function(e)
+{
+&nbsp;&nbsp;&nbsp;console.log('Error: ' + e.message);
+}, appId);
+</pre>
 </div>
 </dd>
 <dt class="method" id="CalendarManager::removeCalendar">
@@ -1036,22 +1057,23 @@ The function will throw an exception if it failed to remove the specified calend
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var appId = tizen.application.getCurrentApplication().appInfo.id;
- tizen.account.getAccounts(function(accounts) {
-     var account = accounts[0];
-     if(account) {
-         var calendar = new tizen.Calendar(
-             account.id,
-             'remote calendar',
-             'TASK'
-         );
-         tizen.calendar.addCalendar(calendar);
-         tizen.calendar.removeCalendar('TASK', calendar.id);
-     }
- }, function(e) {
-     console.log('Error: ' + e.message);
- }, appId);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var appId = tizen.application.getCurrentApplication().appInfo.id;
+tizen.account.getAccounts(function(accounts)
+{
+&nbsp;&nbsp;&nbsp;var account = accounts[0];
+&nbsp;&nbsp;&nbsp;if (account)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var calendar = new tizen.Calendar(account.id,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'remote calendar', 'TASK');
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tizen.calendar.addCalendar(calendar);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tizen.calendar.removeCalendar('TASK', calendar.id);
+&nbsp;&nbsp;&nbsp;}
+}, function(e)
+{
+&nbsp;&nbsp;&nbsp;console.log('Error: ' + e.message);
+}, appId);
+</pre>
 </div>
 </dd>
 <dt class="method" id="CalendarManager::getCalendar">
@@ -1117,14 +1139,18 @@ The function will throw an exception if it failed to remove the specified calend
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">  var calendarId; // calendarId supposed to be initialized
-  try {
-    var calendar = tizen.calendar.getCalendar("EVENT", calendarId);
-    console.log("Successfully retrieved event calendar with id: " + calendarId);
-  } catch(err) {
-    console.log("Error: " + err.name);
-  }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var calendarId; /* calendarId supposed to be initialized */
+try
+{
+&nbsp;&nbsp;&nbsp;var calendar = tizen.calendar.getCalendar("EVENT", calendarId);
+&nbsp;&nbsp;&nbsp;console.log("Successfully retrieved event calendar with id: " + calendarId);
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log("Error: " + err.name);
+}
+</pre>
 </div>
 </dd>
 </dl>
@@ -1197,22 +1223,23 @@ This interface offers the following methods to manage events in a calendar:
           </ul>
          </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var appId = tizen.application.getCurrentApplication().appInfo.id;
- tizen.account.getAccounts(function(accounts) {
-     var account = accounts[0];
-     if(account) {
-         var calendar = new tizen.Calendar(
-             account.id,
-             'remote calendar',
-             'TASK'
-         );
-         // 'calendar' variable is not available until it is inserted into the database.
-         tizen.calendar.addCalendar(calendar);
-     }
- }, function(e) {
-     console.log('Error: ' + e.message);
- }, appId);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var appId = tizen.application.getCurrentApplication().appInfo.id;
+tizen.account.getAccounts(function(accounts)
+{
+&nbsp;&nbsp;&nbsp;var account = accounts[0];
+&nbsp;&nbsp;&nbsp;if (account)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var calendar = new tizen.Calendar(account.id,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'remote calendar', 'TASK');
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* 'calendar' variable is not available until it is inserted into the database */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tizen.calendar.addCalendar(calendar);
+&nbsp;&nbsp;&nbsp;}
+}, function(e)
+{
+&nbsp;&nbsp;&nbsp;console.log('Error: ' + e.message);
+}, appId);
+</pre>
 </div>
 <div class="constructors">
 <h4 id="Calendar::constructor">Constructors</h4>
@@ -1241,10 +1268,11 @@ This interface offers the following methods to manage events in a calendar:
  1.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">  // Gets the default calendar and show its name.
-  var calendar = tizen.calendar.getDefaultCalendar("EVENT");
-  console.log('The calendar name is ' + calendar.name);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Gets the default calendar and shows its name */
+var calendar = tizen.calendar.getDefaultCalendar("EVENT");
+console.log('The calendar name is ' + calendar.name);
+</pre>
 </div>
 </li>
 <li class="attribute" id="Calendar::accountId">
@@ -1321,15 +1349,19 @@ This interface offers the following methods to manage events in a calendar:
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">  var myCalendar; // Calendar supposed to be initialized
-  var itemId; // Calendar item identifier
-  try {
-    var item = myCalendar.get(itemId);
-    console.log("Successfully retrieved item with id: " + itemId);
-  } catch(err) {
-    console.log("Error: " + err.name);
-  }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var myCalendar; /* Calendar supposed to be initialized */
+var itemId; /* Calendar item identifier */
+try
+{
+&nbsp;&nbsp;&nbsp;var item = myCalendar.get(itemId);
+&nbsp;&nbsp;&nbsp;console.log("Successfully retrieved item with id: " + itemId);
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log("Error: " + err.name);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="Calendar::add">
@@ -1392,18 +1424,22 @@ To update an existing item, call the <em>update() </em>method instead. If you wi
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">  // Gets the default calendar.
-  var calendar = tizen.calendar.getDefaultCalendar("EVENT");
-
-  var ev = new tizen.CalendarEvent({description:'HTML5 Introduction',
-                                   summary:'HTML5 Webinar ',
-                                   startDate: new tizen.TZDate(2011, 3, 30, 10, 0),
-                                   duration: new tizen.TimeDuration(1, "HOURS"),
-                                   location:'Huesca'});
-
-  calendar.add(ev);
-  console.log('Event added with uid ' + ev.id.uid);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Gets the default calendar */
+var calendar = tizen.calendar.getDefaultCalendar("EVENT");
+
+var ev = new tizen.CalendarEvent(
+{
+&nbsp;&nbsp;&nbsp;description:'HTML5 Introduction',
+&nbsp;&nbsp;&nbsp;summary:'HTML5 Webinar ',
+&nbsp;&nbsp;&nbsp;startDate: new tizen.TZDate(2011, 3, 30, 10, 0),
+&nbsp;&nbsp;&nbsp;duration: new tizen.TimeDuration(1, "HOURS"),
+&nbsp;&nbsp;&nbsp;location:'Huesca'
+});
+
+calendar.add(ev);
+console.log('Event added with uid ' + ev.id.uid);
+</pre>
 </div>
 </dd>
 <dt class="method" id="Calendar::addBatch">
@@ -1477,26 +1513,32 @@ If you wish to update an existing item, call the <em>update() </em>method instea
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">  // Defines the error callback.
-  function errorCallback(response) {
-    console.log( 'The following error occurred: ' +  response.name);
-  }
-
-  function addEventsSuccess(events) {
-    console.log("Successfully added " + events.length + " events!");
-  }
-
-  // Gets the default calendar.
-  var calendar = tizen.calendar.getDefaultCalendar("EVENT");
-
-  var ev = new tizen.CalendarEvent({description:'HTML5 Introduction',
-                                   summary:'HTML5 Webinar ',
-                                   startDate: new tizen.TZDate(2011, 3, 30, 10, 0),
-                                   duration: new tizen.TimeDuration(1, "HOURS"),
-                                   location:'Huesca'});
-
-  calendar.addBatch([ev], addEventsSuccess, errorCallback);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Defines the error callback */
+function errorCallback(response)
+{
+&nbsp;&nbsp;&nbsp;console.log('The following error occurred: ' + response.name);
+}
+
+function addEventsSuccess(events)
+{
+&nbsp;&nbsp;&nbsp;console.log("Successfully added " + events.length + " events!");
+}
+
+/* Gets the default calendar */
+var calendar = tizen.calendar.getDefaultCalendar("EVENT");
+
+var ev = new tizen.CalendarEvent(
+{
+&nbsp;&nbsp;&nbsp;description:'HTML5 Introduction',
+&nbsp;&nbsp;&nbsp;summary:'HTML5 Webinar ',
+&nbsp;&nbsp;&nbsp;startDate: new tizen.TZDate(2011, 3, 30, 10, 0),
+&nbsp;&nbsp;&nbsp;duration: new tizen.TimeDuration(1, "HOURS"),
+&nbsp;&nbsp;&nbsp;location:'Huesca'
+});
+
+calendar.addBatch([ev], addEventsSuccess, errorCallback);
+</pre>
 </div>
 </dd>
 <dt class="method" id="Calendar::update">
@@ -1560,27 +1602,30 @@ In case of recurring events, the default behavior is to update all their instanc
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">  var myCalendar;
-
-  // Defines the error callback.
-  function errorCallback(response) {
-    console.log( 'The following error occurred: ' +  response.name);
-  }
-
-  // Defines the event success callback.
-  function eventSearchSuccessCallback(events) {
-    events[0].description = 'New Description';
-    // Updates the first existing event.
-    myCalendar.update(events[0]);
-    console.log("The first item description was updated!");
-  }
-
-  // Gets the default calendar.
-  myCalendar = tizen.calendar.getDefaultCalendar("EVENT");
-
-  // Finds all events in a Calendar.
-  myCalendar.find(eventSearchSuccessCallback, errorCallback);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var myCalendar;
+
+/* Defines the error callback */
+function errorCallback(response)
+{
+&nbsp;&nbsp;&nbsp;console.log('The following error occurred: ' + response.name);
+}
+
+/* Defines the event success callback */
+function eventSearchSuccessCallback(events)
+{
+&nbsp;&nbsp;&nbsp;events[0].description = 'New Description';
+&nbsp;&nbsp;&nbsp;/* Updates the first existing event */
+&nbsp;&nbsp;&nbsp;myCalendar.update(events[0]);
+&nbsp;&nbsp;&nbsp;console.log("The first item description was updated!");
+}
+
+/* Gets the default calendar */
+myCalendar = tizen.calendar.getDefaultCalendar("EVENT");
+
+/* Finds all events in a Calendar */
+myCalendar.find(eventSearchSuccessCallback, errorCallback);
+</pre>
 </div>
 </dd>
 <dt class="method" id="Calendar::updateBatch">
@@ -1655,32 +1700,36 @@ UnknownError - if any other error occurs.              </li>
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">  var myCalendar;
-
-  // Defines the error callback.
-  function errorCallback(response) {
-    console.log( 'The following error occurred: ' +  response.name);
-  }
-
-  // Defines the success callback.
-  function updateEventsSuccess() {
-    console.log("Successfully updated !" );
-  }
-
-  // Defines the event success callback.
-  function eventSearchSuccessCallback(events) {
-    events[0].description = 'New Description 1';
-    events[1].description = 'New Description 2';
-    // Updates the first two existing events.
-    myCalendar.updateBatch(events.slice(0,2), updateEventsSuccess, errorCallback);
-  }
-
-  // Gets the default calendar.
-  myCalendar = tizen.calendar.getDefaultCalendar("EVENT");
-
-  // Finds all events in Calendar.
-  myCalendar.find(eventSearchSuccessCallback, errorCallback);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var myCalendar;
+
+/* Defines the error callback */
+function errorCallback(response)
+{
+&nbsp;&nbsp;&nbsp;console.log('The following error occurred: ' + response.name);
+}
+
+/* Defines the success callback */
+function updateEventsSuccess()
+{
+&nbsp;&nbsp;&nbsp;console.log("Successfully updated !");
+}
+
+/* Defines the event success callback */
+function eventSearchSuccessCallback(events)
+{
+&nbsp;&nbsp;&nbsp;events[0].description = 'New Description 1';
+&nbsp;&nbsp;&nbsp;events[1].description = 'New Description 2';
+&nbsp;&nbsp;&nbsp;/* Updates the first two existing events */
+&nbsp;&nbsp;&nbsp;myCalendar.updateBatch(events.slice(0,2), updateEventsSuccess, errorCallback);
+}
+
+/* Gets the default calendar */
+myCalendar = tizen.calendar.getDefaultCalendar("EVENT");
+
+/* Finds all events in Calendar */
+myCalendar.find(eventSearchSuccessCallback, errorCallback);
+</pre>
 </div>
 </dd>
 <dt class="method" id="Calendar::remove">
@@ -1741,26 +1790,29 @@ UnknownError - if any other error occurs.              </li>
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">  var myCalendar;
-
-  // Defines the error callback.
-  function errorCallback(response) {
-    console.log( 'The following error occurred: ' +  response.name);
-  }
-
-  // Defines the event success callback.
-  function eventSearchSuccessCallback(events) {
-    // Deletes the first existing event.
-    myCalendar.remove(events[0].id);
-    console.log('The first event was removed');
-  }
-
-  // Gets default calendar.
-  myCalendar = tizen.calendar.getDefaultCalendar("EVENT");
-
-  // Finds all events in Calendar.
-  myCalendar.find(eventSearchSuccessCallback, errorCallback);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var myCalendar;
+
+/* Defines the error callback */
+function errorCallback(response)
+{
+&nbsp;&nbsp;&nbsp;console.log('The following error occurred: ' + response.name);
+}
+
+/* Defines the event success callback */
+function eventSearchSuccessCallback(events)
+{
+&nbsp;&nbsp;&nbsp;/* Deletes the first existing event */
+&nbsp;&nbsp;&nbsp;myCalendar.remove(events[0].id);
+&nbsp;&nbsp;&nbsp;console.log('The first event was removed');
+}
+
+/* Gets default calendar */
+myCalendar = tizen.calendar.getDefaultCalendar("EVENT");
+
+/* Finds all events in Calendar */
+myCalendar.find(eventSearchSuccessCallback, errorCallback);
+</pre>
 </div>
 </dd>
 <dt class="method" id="Calendar::removeBatch">
@@ -1833,32 +1885,35 @@ UnknownError - if any other error occurs.              </li>
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">  var myCalendar;
-
-  // Defines the error callback.
-  function errorCallback(response) {
-    console.log( 'The following error occurred: ' +  response.name);
-  }
-
-  // Defines the removeBatch callback.
-  function removeBatchCallback() {
-    console.log("Requested events were successfully removed.");
-  }
-
-  // Defines the event search success callback.
-  function eventSearchSuccessCallback(events) {
-    // Deletes the first two existing events.
-    myCalendar.removeBatch([events[0].id, events[1].id],
-                           removeBatchCallback,
-                           errorCallback);
-  }
-
-  // Gets the default calendar.
-  myCalendar = tizen.calendar.getDefaultCalendar("EVENT");
-
-  // Retrieves all the events in Calendar.
-  myCalendar.find(eventSearchSuccessCallback, errorCallback);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var myCalendar;
+
+/* Defines the error callback */
+function errorCallback(response)
+{
+&nbsp;&nbsp;&nbsp;console.log('The following error occurred: ' + response.name);
+}
+
+/* Defines the removeBatch callback */
+function removeBatchCallback()
+{
+&nbsp;&nbsp;&nbsp;console.log("Requested events were successfully removed.");
+}
+
+/* Defines the event search success callback */
+function eventSearchSuccessCallback(events)
+{
+&nbsp;&nbsp;&nbsp;/* Deletes the first two existing events */
+&nbsp;&nbsp;&nbsp;myCalendar.removeBatch([events[0].id, events[1].id],
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;removeBatchCallback, errorCallback);
+}
+
+/* Gets the default calendar */
+myCalendar = tizen.calendar.getDefaultCalendar("EVENT");
+
+/* Retrieves all the events in Calendar */
+myCalendar.find(eventSearchSuccessCallback, errorCallback);
+</pre>
 </div>
 </dd>
 <dt class="method" id="Calendar::find">
@@ -1944,27 +1999,30 @@ If no recurrence ID is given, the filter will match both the parent event and al
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">  // Defines the error callback.
-  function errorCallback(response) {
-    console.log( 'The following error occurred: ' +  response.name);
-  }
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Defines the error callback */
+function errorCallback(response)
+{
+&nbsp;&nbsp;&nbsp;console.log('The following error occurred: ' + response.name);
+}
 
-  // Defines the event search success callback.
-  function eventSearchSuccessCallback(events) {
-    console.log(events.length + ' results found.');
-  }
+/* Defines the event search success callback */
+function eventSearchSuccessCallback(events)
+{
+&nbsp;&nbsp;&nbsp;console.log(events.length + ' results found.');
+}
 
-  // Gets the default calendar.
-  var calendar = tizen.calendar.getDefaultCalendar("EVENT");
+/* Gets the default calendar */
+var calendar = tizen.calendar.getDefaultCalendar("EVENT");
 
-  // Finds all events the calendar that contain in the summary the string Tizen.
-  var filter = new tizen.AttributeFilter('summary', 'CONTAINS', 'Tizen');
+/* Finds all events the calendar that contain in the summary the string Tizen */
+var filter = new tizen.AttributeFilter('summary', 'CONTAINS', 'Tizen');
 
-  // The events returned by the find() query will be sorted by ascending summary.
-  var sortingMode = new tizen.SortMode('summary', 'ASC');
+/* Events returned by the find() query will be sorted by ascending summary */
+var sortingMode = new tizen.SortMode('summary', 'ASC');
 
-  calendar.find(eventSearchSuccessCallback, errorCallback, filter, sortingMode);
- </pre>
+calendar.find(eventSearchSuccessCallback, errorCallback, filter, sortingMode);
+</pre>
 </div>
 </dd>
 <dt class="method" id="Calendar::addChangeListener">
@@ -2028,24 +2086,29 @@ When executed, the implementation must immediately return a subscription identif
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">  var watcherId = 0; // watcher identifier
-  var calendar; // This example assumes calendar is initialized
-
-  var watcher = {
-    onitemsadded: function(items) {
-      console.log(items.length + ' items were added');
-    },
-    onitemsupdated: function(items) {
-      console.log(items.length + ' items were updated');
-    },
-    onitemsremoved: function(ids) {
-      console.log(ids.length + ' items were removed');
-    }
-  };
-
-  // Registers to be notified when the calendar changes.
-  watcherId = calendar.addChangeListener(watcher);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var watcherId = 0; /* Watcher identifier */
+var calendar; /* This example assumes calendar is initialized */
+
+var watcher =
+{
+&nbsp;&nbsp;&nbsp;onitemsadded: function(items)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(items.length + ' items were added');
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;onitemsupdated: function(items)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(items.length + ' items were updated');
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;onitemsremoved: function(ids)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(ids.length + ' items were removed');
+&nbsp;&nbsp;&nbsp;}
+};
+
+/* Registers to be notified when the calendar changes */
+watcherId = calendar.addChangeListener(watcher);
+</pre>
 </div>
 </dd>
 <dt class="method" id="Calendar::removeChangeListener">
@@ -2099,28 +2162,33 @@ If the <em>watchId </em>argument is valid and corresponds to a subscription alre
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">  var watcherId = 0; // watcher identifier
-  var calendar; // This example assumes calendar is initialized.
-
-  // Receives calendar changes.
-  var watcher = {
-    onitemsadded: function(items) {
-      console.log(items.length + ' items were added');
-    },
-    onitemsupdated: function(items) {
-      console.log(evitemsents.length + ' items were updated');
-    },
-    onitemsremoved: function(ids) {
-      console.log(ids.length + ' items were removed');
-    }
-  };
-
-  // Registers to be notified when the calendar changes.
-  watcherId = calendar.addChangeListener(watcher);
-
-  // Cancels the watch operation.
-  calendar.removeChangeListener(watcherId);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var watcherId = 0; /* Watcher identifier */
+var calendar; /* This example assumes calendar is initialized */
+
+/* Receives calendar changes */
+var watcher =
+{
+&nbsp;&nbsp;&nbsp;onitemsadded: function(items)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(items.length + ' items were added');
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;onitemsupdated: function(items)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(evitemsents.length + ' items were updated');
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;onitemsremoved: function(ids)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(ids.length + ' items were removed');
+&nbsp;&nbsp;&nbsp;}
+};
+
+/* Registers to be notified when the calendar changes */
+watcherId = calendar.addChangeListener(watcher);
+
+/* Cancels the watch operation */
+calendar.removeChangeListener(watcherId);
+</pre>
 </div>
 </dd>
 </dl>
@@ -2324,8 +2392,9 @@ The default value is an empty string.
  1.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">  event.description = 'Tizen Codefest';
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+event.description = 'Tizen Codefest';
+</pre>
 </div>
 </li>
 <li class="attribute" id="CalendarItem::summary">
@@ -2343,8 +2412,9 @@ The default value is an empty string.
  1.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">  event.summary = 'Launching the Tizen reference implementation';
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+event.summary = 'Launching the Tizen reference implementation';
+</pre>
 </div>
 </li>
 <li class="attribute" id="CalendarItem::isAllDay">
@@ -2364,8 +2434,9 @@ The default value for this attribute is <var>false</var>.
  1.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">  event.isAllDay = true; // All-Day event
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+event.isAllDay = true; /* All-day event */
+</pre>
 </div>
 </li>
 <li class="attribute" id="CalendarItem::startDate">
@@ -2391,9 +2462,10 @@ This attribute is precise to the second. Milliseconds are ignored.
  1.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">  // 2010-04-30 09:00
-  event.startDate = new tizen.TZDate(2010, 3, 30, 9, 0);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* 2010-04-30 09:00 */
+event.startDate = new tizen.TZDate(2010, 3, 30, 9, 0);
+</pre>
 </div>
 </li>
 <li class="attribute" id="CalendarItem::duration">
@@ -2420,9 +2492,10 @@ This attribute is precise to the second. Milliseconds are ignored.
  Note that the implementation may not save the duration itself, rather convert it to the corresponding endDate/dueDate attribute and save it. For example, if you set the startDate and the duration attributes and save the item, you may see that the duration is <var>null</var> while endDate/dueDate is non-null after retrieving it because the implementation has calculated the endDate/dueDate based on the duration and the startDate then saved it, not the duration.
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">  // 1 hour meeting
-  event.duration = new tizen.TimeDuration(1, "HOURS");
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* 1 hour meeting */
+event.duration = new tizen.TimeDuration(1, "HOURS");
+</pre>
 </div>
 </li>
 <li class="attribute" id="CalendarItem::location">
@@ -2440,8 +2513,9 @@ The default value for this attribute is an empty string.
  1.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">  event.location = 'Huesca';
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+event.location = 'Huesca';
+</pre>
 </div>
 </li>
 <li class="attribute" id="CalendarItem::geolocation">
@@ -2454,8 +2528,9 @@ The default value for this attribute is an empty string.
  1.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">  event.geolocation = new tizen.SimpleCoordinates(60.175, 24.934);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+event.geolocation = new tizen.SimpleCoordinates(60.175, 24.934);
+</pre>
 </div>
 </li>
 <li class="attribute" id="CalendarItem::organizer">
@@ -2473,8 +2548,9 @@ By default, this attribute is initialized to an empty string.
  1.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">  event.organizer = 'Mr. Jones';
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+event.organizer = 'Mr. Jones';
+</pre>
 </div>
 </li>
 <li class="attribute" id="CalendarItem::visibility">
@@ -2507,8 +2583,9 @@ The default value for this attribute is <var>NONE</var>.
  1.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">  event.status = "TENTATIVE";
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+event.status = "TENTATIVE";
+</pre>
 </div>
 </li>
 <li class="attribute" id="CalendarItem::priority">
@@ -2537,8 +2614,9 @@ If the native item database supports another priority schema (such as a range fr
  1.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">  task.priority = "HIGH";
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+task.priority = "HIGH";
+</pre>
 </div>
 </li>
 <li class="attribute" id="CalendarItem::alarms">
@@ -2551,12 +2629,13 @@ If the native item database supports another priority schema (such as a range fr
  1.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">  ev.startDate = new tizen.TZDate(2011, 2, 11, 8, 0, 0);
-  // Gives a sound notification 30 minutes before the item's start time.
-  var alarm = new tizen.CalendarAlarm(new tizen.TimeDuration(30, "MINS"),
-                                       "SOUND");
-  ev.alarms = [alarm];
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+ev.startDate = new tizen.TZDate(2011, 2, 11, 8, 0, 0);
+/* Gives a sound notification 30 minutes before the item's start time */
+var alarm = new tizen.CalendarAlarm(new tizen.TimeDuration(30, "MINS"),
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"SOUND");
+ev.alarms = [alarm];
+</pre>
 </div>
 </li>
 <li class="attribute" id="CalendarItem::categories">
@@ -2578,8 +2657,9 @@ By default, this attribute is set to an empty array.
  1.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">  event.categories = ['Personal'];
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+event.categories = ['Personal'];
+</pre>
 </div>
 </li>
 <li class="attribute" id="CalendarItem::attendees">
@@ -2598,10 +2678,11 @@ By default, this attribute is set to an empty array.
  1.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">  var attendee = new tizen.CalendarAttendee('mailto:bob@domain.com',
-                                           {role: "CHAIR", RSVP: true});
-  event.attendees = [attendee];
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var attendee = new tizen.CalendarAttendee('mailto:bob@domain.com',
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{role: "CHAIR", RSVP: true});
+event.attendees = [attendee];
+</pre>
 </div>
 </li>
 </ul>
@@ -2666,24 +2747,27 @@ The export format is set using the format parameter.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">  // Defines the event search success callback.
-  function eventSearchSuccessCallback(events) {
-    // Converts the first event to iCalendar 2.0 format (default).
-    var vevent = events[0].convertToString("ICALENDAR_20");
-    console.log('iCalendar 2.0 representation of the event is: ' + vevent);
-  }
-
-  function errorCallback(response) {
-    console.log( 'The following error occurred: ' +  response.name);
-  }
-
-  // Gets the default calendar.
-  var myCalendar = tizen.calendar.getDefaultCalendar("EVENT");
-
-  // Finds all events in the first calendar that contain in the summary the string Tizen.
-  var filter = new tizen.AttributeFilter('summary', 'CONTAINS', 'Tizen');
-  myCalendar.find(eventSearchSuccessCallback, errorCallback, filter);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Defines the event search success callback */
+function eventSearchSuccessCallback(events)
+{
+&nbsp;&nbsp;&nbsp;/* Converts the first event to iCalendar 2.0 format (default) */
+&nbsp;&nbsp;&nbsp;var vevent = events[0].convertToString("ICALENDAR_20");
+&nbsp;&nbsp;&nbsp;console.log('iCalendar 2.0 representation of the event is: ' + vevent);
+}
+
+function errorCallback(response)
+{
+&nbsp;&nbsp;&nbsp;console.log('The following error occurred: ' + response.name);
+}
+
+/* Gets the default calendar */
+var myCalendar = tizen.calendar.getDefaultCalendar("EVENT");
+
+/* Finds all events in the first calendar that contain in the summary the string Tizen */
+var filter = new tizen.AttributeFilter('summary', 'CONTAINS', 'Tizen');
+myCalendar.find(eventSearchSuccessCallback, errorCallback, filter);
+</pre>
 </div>
 </dd>
 <dt class="method" id="CalendarItem::clone">
@@ -2732,18 +2816,19 @@ The <em>CalendarItem </em>object returned by the <em>clone()</em> method will ha
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">  // Gets the default calendar.
-  var calendar = tizen.calendar.getDefaultCalendar();
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Gets the default calendar */
+var calendar = tizen.calendar.getDefaultCalendar();
 
-  var html5seminar = new tizen.CalendarEvent({startDate: new tizen.TZDate(2012, 3, 4),
-                                              duration: new tizen.TimeDuration(3, "DAYS"),
-                                              summary: "HTML5 Seminar"});
+var html5seminar = new tizen.CalendarEvent({startDate: new tizen.TZDate(2012, 3, 4),
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;duration: new tizen.TimeDuration(3, "DAYS"),
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;summary: "HTML5 Seminar"});
 
-  calendar.add(html5seminar);
-  var tizenseminar = html5seminar.clone();
-  tizenseminar.summary = "Tizen Seminar";
-  calendar.add(tizenseminar);
- </pre>
+calendar.add(html5seminar);
+var tizenseminar = html5seminar.clone();
+tizenseminar.summary = "Tizen Seminar";
+calendar.add(tizenseminar);
+</pre>
 </div>
 </dd>
 </dl>
@@ -2768,39 +2853,47 @@ The <em>CalendarItem </em>object returned by the <em>clone()</em> method will ha
  1.0
           </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">  var taskCalendar, task;
-
-  try {
-    var task = new tizen.CalendarTask("BEGIN:VCALENDAR\r\n" +
-                  "VERSION:2.0\r\n" +
-                  "BEGIN:VTODO\r\n" +
-                  "DTSTAMP:TZID=CET:20110902T110000Z\r\n" +
-                  "DTSTART;TZID=CET:20110906T140000Z\r\n" +
-                  "DUE;TZID=CET:20110906T150000Z\r\n" +
-                  "SUMMARY:Discuss the schedule\r\n" +
-                  "DESCRIPTION:Find the feasible schedule\r\n" +
-                  "CATEGORIES:HUMAN RESOURCES\r\n" +
-                  "END:VTODO\r\n" +
-                  "END:VCALENDAR", "ICALENDAR_20");
-
-    taskCalendar = tizen.calendar.getDefaultCalendar("TASK");
-    taskCalendar.add(task);
-    console.log("Task added with ID " + task.id);
-  } catch (err) {
-    console.log("Failed to add VTODO to the calendar, error: " + err.name);
-  }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var taskCalendar, task;
+
+try
+{
+&nbsp;&nbsp;&nbsp;var task = new tizen.CalendarTask("BEGIN:VCALENDAR\r\n" +
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"VERSION:2.0\r\n" +
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"BEGIN:VTODO\r\n" +
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"DTSTAMP:TZID=CET:20110902T110000Z\r\n" +
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"DTSTART;TZID=CET:20110906T140000Z\r\n" +
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"DUE;TZID=CET:20110906T150000Z\r\n" +
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"SUMMARY:Discuss the schedule\r\n" +
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"DESCRIPTION:Find the feasible schedule\r\n" +
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"CATEGORIES:HUMAN RESOURCES\r\n" +
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"END:VTODO\r\n" +
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"END:VCALENDAR", "ICALENDAR_20");
+
+&nbsp;&nbsp;&nbsp;taskCalendar = tizen.calendar.getDefaultCalendar("TASK");
+&nbsp;&nbsp;&nbsp;taskCalendar.add(task);
+&nbsp;&nbsp;&nbsp;console.log("Task added with ID " + task.id);
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log("Failed to add VTODO to the calendar, error: " + err.name);
+}
+</pre>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var taskInit = { description: "HTML5 Introduction",
-                  summary: "HTML5 Webinar",
-                  startDate: new tizen.TZDate(2011, 3, 30, 10, 0),
-                  dueDate: new tizen.TZDate(2011, 5, 30, 10, 0),
-                  completedDate: new tizen.TZDate(2011, 4, 30, 10, 0),
-                  progress: "0" };
-
- var ev = new tizen.CalendarTask(taskInit);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var taskInit =
+{
+&nbsp;&nbsp;&nbsp;description: "HTML5 Introduction",
+&nbsp;&nbsp;&nbsp;summary: "HTML5 Webinar",
+&nbsp;&nbsp;&nbsp;startDate: new tizen.TZDate(2011, 3, 30, 10, 0),
+&nbsp;&nbsp;&nbsp;dueDate: new tizen.TZDate(2011, 5, 30, 10, 0),
+&nbsp;&nbsp;&nbsp;completedDate: new tizen.TZDate(2011, 4, 30, 10, 0),
+&nbsp;&nbsp;&nbsp;progress: "0"
+};
+
+var ev = new tizen.CalendarTask(taskInit);
+</pre>
 </div>
         
       <div class="constructors">
@@ -2833,8 +2926,9 @@ The default value is <var>null</var>. If no value is provided, the task does not
  1.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">  task.dueDate = new tizen.TZDate(2011, 2, 11);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+task.dueDate = new tizen.TZDate(2011, 2, 11);
+</pre>
 </div>
 </li>
 <li class="attribute" id="CalendarTask::completedDate">
@@ -2855,8 +2949,9 @@ The default value is <var>null</var>. If no value is provided, the task is not c
  1.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">  task.completedDate = new tizen.TZDate(2011, 2, 11);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+task.completedDate = new tizen.TZDate(2011, 2, 11);
+</pre>
 </div>
 </li>
 <li class="attribute" id="CalendarTask::progress">
@@ -2880,8 +2975,9 @@ The default value is <var>0</var>, implies that the task has not been started.
  1.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">  task.progress = 50; // 50% done
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+task.progress = 50; /* 50% done */
+</pre>
 </div>
 </li>
 </ul>
@@ -2913,36 +3009,44 @@ The default value is <var>0</var>, implies that the task has not been started.
  1.0
           </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">  // Gets the default calendar.
-  var calendar = tizen.calendar.getDefaultCalendar("EVENT");
-
-  try {
-    var ev = new tizen.CalendarEvent("BEGIN:VCALENDAR\r\n" +
-                  "BEGIN:VEVENT\r\n" +
-                  "DTSTAMP:19970901T1300Z\r\n" +
-                  "DTSTART:19970903T163000Z\r\n" +
-                  "DTEND:19970903T190000Z\r\n" +
-                  "SUMMARY:Annual Employee Review\r\n" +
-                  "CATEGORIES:BUSINESS,HUMAN RESOURCES\r\n" +
-                  "END:VEVENT\r\n" +
-                  "END:VCALENDAR", "ICALENDAR_20");
-
-    calendar.add(ev);
-    console.log('Event added with UID ' + ev.id.uid);
-  } catch (err) {
-    console.log("Failed to add VEVENT to the calendar, error: " + err.name);
-  }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Gets the default calendar */
+var calendar = tizen.calendar.getDefaultCalendar("EVENT");
+
+try
+{
+&nbsp;&nbsp;&nbsp;var ev = new tizen.CalendarEvent("BEGIN:VCALENDAR\r\n" +
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"BEGIN:VEVENT\r\n" +
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"DTSTAMP:19970901T1300Z\r\n" +
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"DTSTART:19970903T163000Z\r\n" +
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"DTEND:19970903T190000Z\r\n" +
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"SUMMARY:Annual Employee Review\r\n" +
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"CATEGORIES:BUSINESS,HUMAN RESOURCES\r\n" +
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"END:VEVENT\r\n" +
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"END:VCALENDAR", "ICALENDAR_20");
+
+&nbsp;&nbsp;&nbsp;calendar.add(ev);
+&nbsp;&nbsp;&nbsp;console.log('Event added with UID ' + ev.id.uid);
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log("Failed to add VEVENT to the calendar, error: " + err.name);
+}
+</pre>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var eventInit = { description: "HTML5 Introduction",
-                   summary: "HTML5 Webinar",
-                   startDate: new tizen.TZDate(2011, 3, 30, 10, 0),
-                   duration: new tizen.TimeDuration(1, "HOURS"),
-                   location: "Huesca" };
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var eventInit =
+{
+&nbsp;&nbsp;&nbsp;description: "HTML5 Introduction",
+&nbsp;&nbsp;&nbsp;summary: "HTML5 Webinar",
+&nbsp;&nbsp;&nbsp;startDate: new tizen.TZDate(2011, 3, 30, 10, 0),
+&nbsp;&nbsp;&nbsp;duration: new tizen.TimeDuration(1, "HOURS"),
+&nbsp;&nbsp;&nbsp;location: "Huesca"
+};
  
- var ev = new tizen.CalendarEvent(eventInit);
- </pre>
+var ev = new tizen.CalendarEvent(eventInit);
+</pre>
 </div>
         
       <div class="constructors">
@@ -2989,9 +3093,10 @@ The default value for this attribute is <var>null</var>.
  1.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">  // 2010-04-30 09:00
-  event.endDate = new tizen.TZDate(2010, 3, 30, 9, 0);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* 2010-04-30 09:00 */
+event.endDate = new tizen.TZDate(2010, 3, 30, 9, 0);
+</pre>
 </div>
 </li>
 <li class="attribute" id="CalendarEvent::availability">
@@ -3027,10 +3132,11 @@ The detached instances (specific instances that have been modified as saved to t
  1.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">  // Repeats daily for 7 days.
-  var rule = new tizen.CalendarRecurrenceRule("DAILY", {occurrenceCount: 7});
-  event.recurrenceRule = rule;
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Repeats daily for 7 days */
+var rule = new tizen.CalendarRecurrenceRule("DAILY", {occurrenceCount: 7});
+event.recurrenceRule = rule;
+</pre>
 </div>
 </li>
 </ul>
@@ -3113,29 +3219,31 @@ UnknownError - if any other error occurs.              </li>
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">  // eventId should be set to ID of event obtained with the find function.
-  var eventId;
-  // Defines the error callback.
-  function errorCallback(response) {
-    console.log( 'The following error occurred: ' +  response.name);
-  }
-
-  // Defines the event expanding success callback.
-  function eventExpandingSuccessCallback(events) {
-    console.log(events.length + ' event instances were returned.');
-  }
-
-  var calendar = tizen.calendar.getDefaultCalendar();
-  var event = calendar.get(eventId);
-
-  if (event.recurrenceRule != null) {
-    // This is a recurring event. Expands all the instances during August 2011.
-    event.expandRecurrence(new tizen.TZDate(2011, 7, 1),
-                          new tizen.TZDate(2011, 7, 31),
-                          eventExpandingSuccessCallback,
-                          errorCallback);
-  }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* eventId should be set to ID of event obtained with the find function */
+var eventId;
+/* Defines the error callback */
+function errorCallback(response)
+{
+&nbsp;&nbsp;&nbsp;console.log('The following error occurred: ' + response.name);
+}
+
+/* Defines the event expanding success callback */
+function eventExpandingSuccessCallback(events)
+{
+&nbsp;&nbsp;&nbsp;console.log(events.length + ' event instances were returned.');
+}
+
+var calendar = tizen.calendar.getDefaultCalendar();
+var event = calendar.get(eventId);
+
+if (event.recurrenceRule != null)
+{
+&nbsp;&nbsp;&nbsp;/* This is a recurring event. Expands all the instances during August 2011 */
+&nbsp;&nbsp;&nbsp;event.expandRecurrence(new tizen.TZDate(2011, 7, 1), new tizen.TZDate(2011, 7, 31),
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;eventExpandingSuccessCallback, errorCallback);
+}
+</pre>
 </div>
 </dd>
 </dl>
@@ -3208,10 +3316,11 @@ By default, each of the attributes of this interface are undefined.
           </p>
          </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">  var attendee = new tizen.CalendarAttendee('mailto:bob@domain.com',
-                                           {role: "CHAIR", RSVP: true});
-  event.attendees = [attendee];
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var attendee = new tizen.CalendarAttendee('mailto:bob@domain.com',
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{role: "CHAIR", RSVP: true});
+event.attendees = [attendee];
+</pre>
 </div>
 <div class="constructors">
 <h4 id="CalendarAttendee::constructor">Constructors</h4>
@@ -3404,10 +3513,11 @@ For more information about the members, see <em>CalendarRecurrenceRule </em>inte
  1.0
           </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">  // Repeats daily for 7 days.
-  var rule = new tizen.CalendarRecurrenceRule("DAILY", {occurrenceCount:7});
-  event.recurrenceRule = rule;
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Repeats daily for 7 days */
+var rule = new tizen.CalendarRecurrenceRule("DAILY", {occurrenceCount:7});
+event.recurrenceRule = rule;
+</pre>
 </div>
 <div class="constructors">
 <h4 id="CalendarRecurrenceRule::constructor">Constructors</h4>
@@ -3657,12 +3767,13 @@ By default, this attribute is set to <var>null</var>.
  1.0
           </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Creates a sound alarm at the specified time
- var alarm1 = new tizen.CalendarAlarm(new tizen.TZDate(2011, 3, 30, 10, 0), "SOUND");
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Creates a sound alarm at the specified time */
+var alarm1 = new tizen.CalendarAlarm(new tizen.TZDate(2011, 3, 30, 10, 0), "SOUND");
 
- // Creates a sound alarm before an event starts
- var alarm2 = new tizen.CalendarAlarm(new tizen.TimeDuration(1, "MINS"), "SOUND");
- </pre>
+/* Creates a sound alarm before an event starts */
+var alarm2 = new tizen.CalendarAlarm(new tizen.TimeDuration(1, "MINS"), "SOUND");
+</pre>
 </div>
 <div class="constructors">
 <h4 id="CalendarAlarm::constructor">Constructors</h4>
@@ -3779,29 +3890,31 @@ The default value is an empty string.
         </ul>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">  // eventId should be set to ID of event obtained with the find function.
-  var eventId;
-  // Defines the error callback.
-  function errorCallback(response) {
-    console.log( 'The following error occurred: ' +  response.name);
-  }
-
-  // CalendarEventArraySuccessCallback instance
-  function calendarEventArraySuccessCB(events) {
-    console.log(events.length + ' event instances were returned.');
-  }
-
-  var calendar = tizen.calendar.getDefaultCalendar();
-  var event = calendar.get(eventId);
-
-  if (event.recurrenceRule != null) {
-    // This is a recurring event. Expands all the instances during August 2011.
-    event.expandRecurrence(new tizen.TZDate(2011, 7, 1),
-                          new tizen.TZDate(2011, 7, 31),
-                          calendarEventArraySuccessCB,
-                          errorCallback);
-  }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* eventId should be set to ID of event obtained with the find function */
+var eventId;
+/* Defines the error callback */
+function errorCallback(response)
+{
+&nbsp;&nbsp;&nbsp;console.log('The following error occurred: ' + response.name);
+}
+
+/* CalendarEventArraySuccessCallback instance */
+function calendarEventArraySuccessCB(events)
+{
+&nbsp;&nbsp;&nbsp;console.log(events.length + ' event instances were returned.');
+}
+
+var calendar = tizen.calendar.getDefaultCalendar();
+var event = calendar.get(eventId);
+
+if (event.recurrenceRule != null)
+{
+&nbsp;&nbsp;&nbsp;/* This is a recurring event. Expands all the instances during August 2011 */
+&nbsp;&nbsp;&nbsp;event.expandRecurrence(new tizen.TZDate(2011, 7, 1), new tizen.TZDate(2011, 7, 31),
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;calendarEventArraySuccessCB, errorCallback);
+}
+</pre>
 </div>
 </dd>
 </dl>
@@ -3846,27 +3959,33 @@ The default value is an empty string.
         </ul>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">  // Defines the error callback.
-  function errorCallback(response) {
-    console.log( 'The following error occurred: ' +  response.name);
-  }
-
-  // CalendarItemArraySuccessCallback instance
-  function calendarItemArraySuccessCB(events) {
-    console.log("Successfully added " + events.length + " events!");
-  }
-
-  // Gets the default calendar.
-  var calendar = tizen.calendar.getDefaultCalendar("EVENT");
-
-  var ev = new tizen.CalendarEvent({description:'HTML5 Introduction',
-                                   summary:'HTML5 Webinar ',
-                                   startDate: new tizen.TZDate(2011, 3, 30, 10, 0),
-                                   duration: new tizen.TimeDuration(1, "HOURS"),
-                                   location:'Huesca'});
-
-  calendar.addBatch([ev],  calendarItemArraySuccessCB, errorCallback);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Defines the error callback */
+function errorCallback(response)
+{
+&nbsp;&nbsp;&nbsp;console.log('The following error occurred: ' + response.name);
+}
+
+/* CalendarItemArraySuccessCallback instance */
+function calendarItemArraySuccessCB(events)
+{
+&nbsp;&nbsp;&nbsp;console.log("Successfully added " + events.length + " events!");
+}
+
+/* Gets the default calendar */
+var calendar = tizen.calendar.getDefaultCalendar("EVENT");
+
+var ev = new tizen.CalendarEvent(
+{
+&nbsp;&nbsp;&nbsp;description:'HTML5 Introduction',
+&nbsp;&nbsp;&nbsp;summary:'HTML5 Webinar ',
+&nbsp;&nbsp;&nbsp;startDate: new tizen.TZDate(2011, 3, 30, 10, 0),
+&nbsp;&nbsp;&nbsp;duration: new tizen.TimeDuration(1, "HOURS"),
+&nbsp;&nbsp;&nbsp;location:'Huesca'
+});
+
+calendar.addBatch([ev], calendarItemArraySuccessCB, errorCallback);
+</pre>
 </div>
 </dd>
 </dl>
@@ -3911,45 +4030,53 @@ The default value is an empty string.
         </ul>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">  var calendar;
-
-  function eventFoundCallback(events) {
-    // The event has been successfully found.
-    // Changes the summary.
-    events[0].summary = 'HTML6 Webinar';
-    calendar.update(events[0]);
-    console.log('First event was updated!');
-  }
-
-  // Defines the error callback for all the asynchronous calls.
-  function errorCallback(response) {
-    console.log( 'The following error occurred: ' +  response.name);
-  }
-
-  // CalendarArraySuccessCallback instance
-  function calendarArraySuccessCB(calendars) {
-    if(calendars.length &gt; 0) {
-      calendar = calendars[0];
-      console.log('The calendar id is ' + calendar.id + ' and name ' + calendar.name);
-
-      var ev = new tizen.CalendarEvent({description:'HTML5 Introduction',
-                                         summary:'HTML5 Webinar',
-                                         startDate: new tizen.TZDate(2011, 3, 30, 10, 0),
-                                         duration: new tizen.TimeDuration(1, "HOURS"),
-                                         location:'Huesca'});
-      calendar.add(ev);
-
-      // The event has been successfully added.
-      // Checks whether the added event can be retrieved from the calendar.
-      // If the calendar was empty, only the item added through add() should be returned.
-      var filter = new tizen.AttributeFilter('summary', 'CONTAINS', 'HTML5');
-      calendar.find(eventFoundCallback, errorCallback, filter);
-    }
-  }
-
-  // Gets a list of available calendars.
-  tizen.calendar.getCalendars("EVENT",  calendarArraySuccessCB, errorCallback);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var calendar;
+
+function eventFoundCallback(events)
+{
+&nbsp;&nbsp;&nbsp;/* Event has been successfully found */
+&nbsp;&nbsp;&nbsp;/* Changes the summary */
+&nbsp;&nbsp;&nbsp;events[0].summary = 'HTML6 Webinar';
+&nbsp;&nbsp;&nbsp;calendar.update(events[0]);
+&nbsp;&nbsp;&nbsp;console.log('First event was updated!');
+}
+
+/* Defines the error callback for all the asynchronous calls */
+function errorCallback(response)
+{
+&nbsp;&nbsp;&nbsp;console.log('The following error occurred: ' + response.name);
+}
+
+/* CalendarArraySuccessCallback instance */
+function calendarArraySuccessCB(calendars)
+{
+&nbsp;&nbsp;&nbsp;if (calendars.length &gt; 0)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;calendar = calendars[0];
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('The calendar id is ' + calendar.id + ' and name ' + calendar.name);
+
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var ev = new tizen.CalendarEvent(
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;description:'HTML5 Introduction',
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;summary:'HTML5 Webinar',
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;startDate: new tizen.TZDate(2011, 3, 30, 10, 0),
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;duration: new tizen.TimeDuration(1, "HOURS"),
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;location:'Huesca'
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;});
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;calendar.add(ev);
+
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Event has been successfully added */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Checks whether the added event can be retrieved from the calendar */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* If the calendar was empty, only the item added through add() should be returned */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var filter = new tizen.AttributeFilter('summary', 'CONTAINS', 'HTML5');
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;calendar.find(eventFoundCallback, errorCallback, filter);
+&nbsp;&nbsp;&nbsp;}
+}
+
+/* Gets a list of available calendars */
+tizen.calendar.getCalendars("EVENT", calendarArraySuccessCB, errorCallback);
+</pre>
 </div>
 </dd>
 </dl>
@@ -3997,30 +4124,38 @@ The default value is an empty string.
         </ul>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">  var watcherId = 0; // watcher identifier
-  var calendar; // This example assumes calendar is initialized
-
-  var watcher = {
-    onitemsadded: function(items) {
-      console.log('New item ' + items[0].id + ' added');
-    },
-    onitemsupdated: function(items) {
-      // ...
-    },
-    onitemsremoved: function(ids) {
-      // ...
-    }
-  };
-
-  // Registers to be notified when the calendar changes.
-  watcherId = calendar.addChangeListener(watcher);
-
-  var ev = new tizen.CalendarEvent({description:'HTML5 Introduction',
-                                    summary:'HTML5 Webinar ',
-                                    startDate: new tizen.TZDate(2011, 3, 30, 10, 0),
-                                    duration: new tizen.TimeDuration(1, "HOURS"),
-                                    location:'Huesca'});
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var watcherId = 0; /* Watcher identifier */
+var calendar; /* This example assumes calendar is initialized */
+
+var watcher =
+{
+&nbsp;&nbsp;&nbsp;onitemsadded: function(items)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('New item ' + items[0].id + ' added');
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;onitemsupdated: function(items)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Do something */
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;onitemsremoved: function(ids)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Do something */
+&nbsp;&nbsp;&nbsp;}
+};
+
+/* Registers to be notified when the calendar changes */
+watcherId = calendar.addChangeListener(watcher);
+
+var ev = new tizen.CalendarEvent(
+{
+&nbsp;&nbsp;&nbsp;description:'HTML5 Introduction',
+&nbsp;&nbsp;&nbsp;summary:'HTML5 Webinar ',
+&nbsp;&nbsp;&nbsp;startDate: new tizen.TZDate(2011, 3, 30, 10, 0),
+&nbsp;&nbsp;&nbsp;duration: new tizen.TimeDuration(1, "HOURS"),
+&nbsp;&nbsp;&nbsp;location:'Huesca'
+});
+</pre>
 </div>
 </dd>
 <dt class="method" id="CalendarChangeCallback::onitemsupdated">
@@ -4046,32 +4181,41 @@ The default value is an empty string.
         </ul>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">  var watcherId = 0; // watcher identifier
-  var calendar; // This example assumes calendar is initialized
-
-  var watcher = {
-    onitemsadded: function(items) {
-      if (calendar.update) {
-        items[0].location = 'New York';
-        calendar.update(items[0]);
-      }
-    },
-    onitemsupdated: function(items) {
-      console.log('Item updated');
-    },
-    onitemsremoved: function(ids) {
-      // ...
-    }
-  };
-
-  // Registers to be notified when the calendar changes.
-  watcherId = calendar.addChangeListener(watcher);
-  var ev = new tizen.CalendarEvent({description:'HTML5 Introduction',
-                                    summary:'HTML5 Webinar ',
-                                    startDate: new tizen.TZDate(2011, 3, 30, 10, 0),
-                                    duration: new tizen.TimeDuration(1, "HOURS"),
-                                    location:'Huesca'});
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var watcherId = 0; /* Watcher identifier */
+var calendar; /* This example assumes calendar is initialized */
+
+var watcher =
+{
+&nbsp;&nbsp;&nbsp;onitemsadded: function(items)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (calendar.update)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;items[0].location = 'New York';
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;calendar.update(items[0]);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;onitemsupdated: function(items)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('Item updated');
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;onitemsremoved: function(ids)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Do something */
+&nbsp;&nbsp;&nbsp;}
+};
+
+/* Registers to be notified when the calendar changes */
+watcherId = calendar.addChangeListener(watcher);
+var ev = new tizen.CalendarEvent(
+{
+&nbsp;&nbsp;&nbsp;description:'HTML5 Introduction',
+&nbsp;&nbsp;&nbsp;summary:'HTML5 Webinar ',
+&nbsp;&nbsp;&nbsp;startDate: new tizen.TZDate(2011, 3, 30, 10, 0),
+&nbsp;&nbsp;&nbsp;duration: new tizen.TimeDuration(1, "HOURS"),
+&nbsp;&nbsp;&nbsp;location:'Huesca'
+});
+</pre>
 </div>
 </dd>
 <dt class="method" id="CalendarChangeCallback::onitemsremoved">
@@ -4097,32 +4241,41 @@ The default value is an empty string.
         </ul>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">  var watcherId = 0; // watcher identifier
-  var calendar; // This example assumes calendar is initialized
-
-  var watcher = {
-    onitemsadded: function(items) {
-      if (calendar.remove) {
-        calendar.remove(items[0].id);
-      }
-    },
-    onitemsupdated: function(items) {
-      // ...
-    },
-    onitemsremoved: function(ids) {
-      console.log('Item removed');
-    }
-  };
-
-  // Registers to be notified when the calendar changes.
-  watcherId = calendar.addChangeListener(watcher);
-
-  var ev = new tizen.CalendarEvent({description:'HTML5 Introduction',
-                                    summary:'HTML5 Webinar ',
-                                    startDate: new tizen.TZDate(2011, 3, 30, 10, 0),
-                                    duration: new tizen.TimeDuration(1, "HOURS"),
-                                    location:'Huesca'});
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var watcherId = 0; /* Watcher identifier */
+var calendar; /* This example assumes calendar is initialized */
+
+var watcher =
+{
+&nbsp;&nbsp;&nbsp;onitemsadded: function(items)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (calendar.remove)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;calendar.remove(items[0].id);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;onitemsupdated: function(items)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Do something */
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;onitemsremoved: function(ids)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('Item removed');
+&nbsp;&nbsp;&nbsp;}
+};
+
+/* Registers to be notified when the calendar changes */
+watcherId = calendar.addChangeListener(watcher);
+
+var ev = new tizen.CalendarEvent(
+{
+&nbsp;&nbsp;&nbsp;description:'HTML5 Introduction',
+&nbsp;&nbsp;&nbsp;summary:'HTML5 Webinar ',
+&nbsp;&nbsp;&nbsp;startDate: new tizen.TZDate(2011, 3, 30, 10, 0),
+&nbsp;&nbsp;&nbsp;duration: new tizen.TimeDuration(1, "HOURS"),
+&nbsp;&nbsp;&nbsp;location:'Huesca'
+});
+</pre>
 </div>
 </dd>
 </dl>
index 94e8bed..8c245fe 100644 (file)
@@ -436,64 +436,55 @@ If the limit is 0, the query result has no limit.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Defines success callback
- function onSuccess(results) {
-     console.log(results.length + " call history item(s) found!");
-     for (var i=0; i&lt;results.length; i++) {
-         console.log(i + ". " + results[i].toString()); // process the CallHistoryEntry
-     }
- }
-
- // Defines error callback
- function onError(error) {
-     console.log("Query failed" + error.name);
- }
-
- // Defines filter: list CS calls, most recent first
- var filter = new tizen.AttributeFilter("type", "EXACTLY", "TEL");
-
- // Defines sort mode: descending on call start time.
- var sortMode = new tizen.SortMode("startTime", "DESC");
-
- // Makes the query and wires up the callbacks
- tizen.callhistory.find(onSuccess,
-                         onError,
-                         filter,
-                         sortMode);
-
- var numberfilter = new tizen.AttributeFilter(
-                                 "remoteParties.remoteParty",
-                                 "EXACTLY",
-                                 "123456789");
-
- // Creates a composite filter for time constraints
- var y2009Filter = new tizen.AttributeRangeFilter(
-                                "startTime",
-                                new Date(2009, 0, 1),
-                                new Date(2010, 0, 1));
-
- var y2011Filter = new tizen.AttributeRangeFilter(
-                                "startTime",
-                                new Date(2011, 0, 1),
-                                new Date(2012, 0, 1));
-
- var datefilter = new tizen.CompositeFilter("UNION", [y2009Filter, y2011Filter]);
-
- // Creates a filter to find all video calls (including cellular, skype, etc)
- // The filter matches any features from the "features" array exactly
- var tfilter = new tizen.AttributeFilter("features", "EXACTLY", "VIDEOCALL");
-
- // Creates a composite filter
- var ifilter = new tizen.CompositeFilter("INTERSECTION",
-                                         [numberFilter, dateFilter, tfilter]);
-
- // Makes the query and wires up the callbacks; reuse sortMode
- tizen.callhistory.find(onSuccess,
-                         onError,
-                         ifilter,
-                         sortMode);
-
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Defines success callback */
+function onSuccess(results)
+{
+&nbsp;&nbsp;&nbsp;console.log(results.length + " call history item(s) found!");
+&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; results.length; i++)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(i + ". " + results[i].toString()); /* Process the CallHistoryEntry */
+&nbsp;&nbsp;&nbsp;}
+}
+
+/* Defines error callback */
+function onError(error)
+{
+&nbsp;&nbsp;&nbsp;console.log("Query failed" + error.name);
+}
+
+/* Defines filter: list CS calls, most recent first */
+var filter = new tizen.AttributeFilter("type", "EXACTLY", "TEL");
+
+/* Defines sort mode: descending on call start time */
+var sortMode = new tizen.SortMode("startTime", "DESC");
+
+/* Makes the query and wires up the callbacks */
+tizen.callhistory.find(onSuccess, onError, filter, sortMode);
+
+var numberfilter = new tizen.AttributeFilter("remoteParties.remoteParty",
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"EXACTLY", "123456789");
+
+/* Creates a composite filter for time constraints */
+var y2009Filter = new tizen.AttributeRangeFilter("startTime", new Date(2009, 0, 1),
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;new Date(2010, 0, 1));
+
+var y2011Filter = new tizen.AttributeRangeFilter("startTime", new Date(2011, 0, 1),
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;new Date(2012, 0, 1));
+
+var datefilter = new tizen.CompositeFilter("UNION", [y2009Filter, y2011Filter]);
+
+/* Creates a filter to find all video calls (including cellular, skype, etc) */
+/* Filter matches any features from the "features" array exactly */
+var tfilter = new tizen.AttributeFilter("features", "EXACTLY", "VIDEOCALL");
+
+/* Creates a composite filter */
+var ifilter = new tizen.CompositeFilter("INTERSECTION",
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[numberFilter, dateFilter, tfilter]);
+
+/* Makes the query and wires up the callbacks; reuse sortMode */
+tizen.callhistory.find(onSuccess, onError, ifilter, sortMode);
+</pre>
 </div>
 </dd>
 <dt class="method" id="CallHistory::remove">
@@ -548,21 +539,23 @@ If the limit is 0, the query result has no limit.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Defines success callback
- function onSuccess(results) {
-     if (results.length &gt; 0)
-         tizen.callhistory.remove(results[0]);
- }
-
- // Defines error callback
- function onError(error) {
-     console.log("Query failed" + error.name);
- }
-
- // Makes the query and wires up the callbacks
- tizen.callhistory.find(onSuccess, onError);
-
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Defines success callback */
+function onSuccess(results)
+{
+&nbsp;&nbsp;&nbsp;if (results.length &gt; 0)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tizen.callhistory.remove(results[0]);
+}
+
+/* Defines error callback */
+function onError(error)
+{
+&nbsp;&nbsp;&nbsp;console.log("Query failed" + error.name);
+}
+
+/* Makes the query and wires up the callbacks */
+tizen.callhistory.find(onSuccess, onError);
+</pre>
 </div>
 </dd>
 <dt class="method" id="CallHistory::removeBatch">
@@ -630,20 +623,22 @@ UnknownError - If any other error occurs.              </li>
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Defines success callback
- function onSuccess(results) {
-     tizen.callhistory.removeBatch(results);
- }
-
- // Defines error callback
- function onError(error) {
-     console.log("Query failed" + error.name);
- }
-
- // Makes the query and wires up the callbacks
- tizen.callhistory.find(onSuccess, onError);
-
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Defines success callback */
+function onSuccess(results)
+{
+&nbsp;&nbsp;&nbsp;tizen.callhistory.removeBatch(results);
+}
+
+/* Defines error callback */
+function onError(error)
+{
+&nbsp;&nbsp;&nbsp;console.log("Query failed" + error.name);
+}
+
+/* Makes the query and wires up the callbacks */
+tizen.callhistory.find(onSuccess, onError);
+</pre>
 </div>
 </dd>
 <dt class="method" id="CallHistory::removeAll">
@@ -763,37 +758,48 @@ UnknownError - If any other error occurs.              </li>
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var onListenerCB = {
-     onadded: function(newItems) {
-         console.log("New Item added");
-         for (var i in newItems) {
-             console.log("Item " + i + " startTime: " + newItems[i].startTime);
-         }
-     },
-     onchanged: function(changedItems) {
-         console.log("Items changed");
-         for (var i in changedItems) {
-             console.log("Item " + i + " direction: " + changedItems[i].direction);
-         }
-     },
-     onremoved: function(removedItems) {
-         console.log("Items removed");
-         for(var i in removedItems)  {
-            console.log("Item " + i + " : " + removedItems[i]);
-         }
-     }};
-
- try {
-     // Registers a call history callback
-     var handle = tizen.callhistory.addChangeListener(onListenerCB);
-
-     // Unregisters a previously registered listener
-     tizen.callhistory.removeChangeListener(handle);
- } catch (error) {
-     console.log("Exception - code: " + error.name + " message: " + error.message);
- }
-
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var onListenerCB =
+{
+&nbsp;&nbsp;&nbsp;onadded: function(newItems)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("New Item added");
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;for (var i in newItems)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Item " + i + " startTime: " + newItems[i].startTime);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;onchanged: function(changedItems)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Items changed");
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;for (var i in changedItems)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Item " + i + " direction: " + changedItems[i].direction);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;onremoved: function(removedItems)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Items removed");
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;for (var i in removedItems) 
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Item " + i + ": " + removedItems[i]);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;}
+};
+
+try
+{
+&nbsp;&nbsp;&nbsp;/* Registers a call history callback */
+&nbsp;&nbsp;&nbsp;var handle = tizen.callhistory.addChangeListener(onListenerCB);
+
+&nbsp;&nbsp;&nbsp;/* Unregisters a previously registered listener */
+&nbsp;&nbsp;&nbsp;tizen.callhistory.removeChangeListener(handle);
+}
+catch (error)
+{
+&nbsp;&nbsp;&nbsp;console.log("Exception - code: " + error.name + " message: " + error.message);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="CallHistory::removeChangeListener">
index e7fba8c..6d40ecc 100644 (file)
@@ -659,58 +659,72 @@ is not compatible with the expected type for that parameter.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">  var addressbook;
-
-  // Defines the error callback for all the asynchronous calls.
-  function errorCB(err) {
-    console.log( 'The following error occurred: ' +  err.name);
-  }
-
-  function contactsFoundCB(contacts) {
-    // The contact is successfully found.
-    // Tries to change the first name.
-    contacts[0].name.firstName = 'Jeffrey Ross';
-    try {
-      addressbook.update(contacts[0]);
-    } catch (err) {
-      console.log( 'The following error occurred while updating: ' +  err.name);
-    }
-    console.log('First contact was updated');
-  }
-
-  // Defines the success callback for retrieving all the
-  // Address Books.
-  function addressBooksCB(addressbooks) {
-    if(addressbooks.length &gt; 0) {
-      addressbook = addressbooks[0];
-      console.log('The addressbook type is ' + addressbook.type +
-            ' and name ' + addressbook.name);
-
-      var contact = new tizen.Contact(
-                         {name: new tizen.ContactName({firstName:'Jeffrey',
-                                 lastName:'Hyman',
-                                 nicknames:['joey ramone']}),
-                          emails:[new tizen.ContactEmailAddress('user@domain.com')],
-                          phoneNumbers:[new tizen.ContactPhoneNumber('123456789')]});
-
-      addressbook.add(contact);
-
-      // The contact has been successfully added.
-      // Checks whether the added contact can be retrieved from the address book or not.
-      // If the address book is empty, only the item added through saveContact
-      // should be returned.
-      var filter = new tizen.AttributeFilter('name.firstName', 'CONTAINS', 'Jeffrey');
-      try {
-        addressbook.find(contactsFoundCB, errorCB, filter);
-      } catch (err) {
-        console.log( 'The following error occurred while finding: ' +  err.name);
-      }
-    }
-  }
-
-  // Gets a list of available address books.
-  tizen.contact.getAddressBooks(addressBooksCB, errorCB);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var addressbook;
+
+/* Defines the error callback for all the asynchronous calls */
+function errorCB(err)
+{
+&nbsp;&nbsp;&nbsp;console.log('The following error occurred: ' + err.name);
+}
+
+function contactsFoundCB(contacts)
+{
+&nbsp;&nbsp;&nbsp;/* Contact is successfully found */
+&nbsp;&nbsp;&nbsp;/* Tries to change the first name */
+&nbsp;&nbsp;&nbsp;contacts[0].name.firstName = 'Jeffrey Ross';
+&nbsp;&nbsp;&nbsp;try
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;addressbook.update(contacts[0]);
+&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;catch (err)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('The following error occurred while updating: ' + err.name);
+&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;console.log('First contact was updated');
+}
+
+/* Defines the success callback for retrieving all the Address Books */
+function addressBooksCB(addressbooks)
+{
+&nbsp;&nbsp;&nbsp;if (addressbooks.length &gt; 0)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;addressbook = addressbooks[0];
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('The addressbook type is ' + addressbook.type +
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;' and name ' + addressbook.name);
+
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var contact = new tizen.Contact(
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;name: new tizen.ContactName(
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;firstName:'Jeffrey',
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;lastName:'Hyman',
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;nicknames:['joey ramone']
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}),
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;emails:[new tizen.ContactEmailAddress('user@domain.com')],
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;phoneNumbers:[new tizen.ContactPhoneNumber('123456789')]
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;});
+
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;addressbook.add(contact);
+
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Contact has been successfully added */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Checks whether the added contact can be retrieved from the address book */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* If the address book is empty, only the item added through saveContact should be returned */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var filter = new tizen.AttributeFilter('name.firstName', 'CONTAINS', 'Jeffrey');
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;try
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;addressbook.find(contactsFoundCB, errorCB, filter);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;catch (err)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('The following error occurred while finding: ' + err.name);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;}
+}
+
+/* Gets a list of available address books */
+tizen.contact.getAddressBooks(addressBooksCB, errorCB);
+</pre>
 </div>
 </dd>
 <dt class="method" id="ContactManager::getUnifiedAddressBook">
@@ -762,53 +776,69 @@ and it is set to <var>null</var>.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">  var addressbook;
-
-  // Defines the error callback
-  function errorCB(err) {
-    console.log( 'The following error occurred: ' +  err.name);
-  }
-
-  function contactsFoundCB(contacts) {
-    // The contact has been successfully found.
-    // Tries to change the first name.
-    contacts[0].name.firstName = 'Jeffrey Ross';
-    try {
-      addressbook.update(contacts[0]);
-      console.log('First contact was updated');
-    } catch (err) {
-      console.log( 'The following error occurred while updating: ' +  err.name);
-    }
-  }
-
-  // Gets the unified address book.
-  addressbook = tizen.contact.getUnifiedAddressBook();
-
-  // Adds a new contact.
-  var contact = new tizen.Contact(
-                     {name: new tizen.ContactName({firstName:'Jeffrey',
-                             lastName:'Hyman',
-                             nicknames:['joey ramone']}),
-                      emails:[new tizen.ContactEmailAddress('user@domain.com')],
-                      phoneNumbers:[new tizen.ContactPhoneNumber('123456789')]});
-
-  try {
-    addressbook.add(contact);
-  } catch (err) {
-    console.log( 'The following error occurred while adding: ' +  err.name);
-  }
-
-  // The contact has been successfully added.
-  // Tries to check whether the added contact can be retrieved from the address book
-  // If the address book is empty, only the item added
-  // through saveContact should be returned.
-  var filter = new tizen.AttributeFiilter('name.firstName', 'CONTAINS', 'Jeffrey');
-  try {
-    addressbook.find(contactsFoundCB, errorCB, filter);
-  } catch (err) {
-    console.log( 'The following error occurred while finding: ' +  err.name);
-  }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var addressbook;
+
+/* Defines the error callback */
+function errorCB(err)
+{
+&nbsp;&nbsp;&nbsp;console.log('The following error occurred: ' + err.name);
+}
+
+function contactsFoundCB(contacts)
+{
+&nbsp;&nbsp;&nbsp;/* Contact has been successfully found */
+&nbsp;&nbsp;&nbsp;/* Tries to change the first name */
+&nbsp;&nbsp;&nbsp;contacts[0].name.firstName = 'Jeffrey Ross';
+&nbsp;&nbsp;&nbsp;try
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;addressbook.update(contacts[0]);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('First contact was updated');
+&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;catch (err)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('The following error occurred while updating: ' + err.name);
+&nbsp;&nbsp;&nbsp;}
+}
+
+/* Gets the unified address book */
+addressbook = tizen.contact.getUnifiedAddressBook();
+
+/* Adds a new contact */
+var contact = new tizen.Contact(
+{
+&nbsp;&nbsp;&nbsp;name: new tizen.ContactName(
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;firstName:'Jeffrey',
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;lastName:'Hyman',
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;nicknames:['joey ramone']
+&nbsp;&nbsp;&nbsp;}),
+&nbsp;&nbsp;&nbsp;emails:[new tizen.ContactEmailAddress('user@domain.com')],
+&nbsp;&nbsp;&nbsp;phoneNumbers:[new tizen.ContactPhoneNumber('123456789')]
+});
+
+try
+{
+&nbsp;&nbsp;&nbsp;addressbook.add(contact);
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log('The following error occurred while adding: ' + err.name);
+}
+
+/* Contact has been successfully added */
+/* Tries to check whether the added contact can be retrieved from the address book */
+/* If the address book is empty, only the item added through saveContact should be returned */
+var filter = new tizen.AttributeFiilter('name.firstName', 'CONTAINS', 'Jeffrey');
+try
+{
+&nbsp;&nbsp;&nbsp;addressbook.find(contactsFoundCB, errorCB, filter);
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log('The following error occurred while finding: ' + err.name);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="ContactManager::getDefaultAddressBook">
@@ -857,53 +887,69 @@ The default address book is one of the addressBooks that is the appointed addres
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">  var addressbook;
-
-  // Defines the error callback.
-  function errorCB(err) {
-    console.log( 'The following error occurred: ' +  err.name);
-  }
-
-  function contactsFoundCB(contacts) {
-    // The contact has been successfully found.
-    // Tries to change the first name.
-    contacts[0].name.firstName = 'Jeffrey Ross';
-    try {
-      addressbook.update(contacts[0]);
-      console.log('First contact was updated');
-    } catch (err) {
-      console.log( 'The following error occurred while updating: ' +  err.name);
-    }
-  }
-
-  // Gets the default address book.
-  addressbook = tizen.contact.getDefaultAddressBook();
-
-  // Adds a new contact.
-  var contact = new tizen.Contact(
-                     {name: new tizen.ContactName({firstName:'Jeffrey',
-                             lastName:'Hyman',
-                             nicknames:['joey ramone']}),
-                      emails:[new tizen.ContactEmailAddress('user@domain.com')],
-                      phoneNumbers:[new tizen.ContactPhoneNumber('123456789')]});
-
-  try {
-    addressbook.add(contact);
-  } catch (err) {
-    console.log( 'The following error occurred while adding: ' +  err.name);
-  }
-
-  // The contact has been successfully added.
-  // Checks whether the added contact can be retrieved from the address book.
-  // If the address book is empty, only the item added
-  // through saveContact should be returned.
-  var filter = new tizen.AttributeFiilter('name.firstName', 'CONTAINS', 'Jeffrey');
-  try {
-    addressbook.find(contactsFoundCB, errorCB, filter);
-  } catch (err) {
-    console.log( 'The following error occurred while finding: ' +  err.name);
-  }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var addressbook;
+
+/* Defines the error callback */
+function errorCB(err)
+{
+&nbsp;&nbsp;&nbsp;console.log('The following error occurred: ' + err.name);
+}
+
+function contactsFoundCB(contacts)
+{
+&nbsp;&nbsp;&nbsp;/* Contact has been successfully found */
+&nbsp;&nbsp;&nbsp;/* Tries to change the first name */
+&nbsp;&nbsp;&nbsp;contacts[0].name.firstName = 'Jeffrey Ross';
+&nbsp;&nbsp;&nbsp;try
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;addressbook.update(contacts[0]);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('First contact was updated');
+&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;catch (err)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('The following error occurred while updating: ' + err.name);
+&nbsp;&nbsp;&nbsp;}
+}
+
+/* Gets the default address book */
+addressbook = tizen.contact.getDefaultAddressBook();
+
+/* Adds a new contact */
+var contact = new tizen.Contact(
+{
+&nbsp;&nbsp;&nbsp;name: new tizen.ContactName(
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;firstName:'Jeffrey',
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;lastName:'Hyman',
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;nicknames:['joey ramone']
+&nbsp;&nbsp;&nbsp;}),
+&nbsp;&nbsp;&nbsp;emails:[new tizen.ContactEmailAddress('user@domain.com')],
+&nbsp;&nbsp;&nbsp;phoneNumbers:[new tizen.ContactPhoneNumber('123456789')]
+});
+
+try
+{
+&nbsp;&nbsp;&nbsp;addressbook.add(contact);
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log('The following error occurred while adding: ' + err.name);
+}
+
+/* Contact has been successfully added */
+/* Checks whether the added contact can be retrieved from the address book */
+/* If the address book is empty, only the item added through saveContact should be returned */
+var filter = new tizen.AttributeFiilter('name.firstName', 'CONTAINS', 'Jeffrey');
+try
+{
+&nbsp;&nbsp;&nbsp;addressbook.find(contactsFoundCB, errorCB, filter);
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log('The following error occurred while finding: ' + err.name);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="ContactManager::addAddressBook">
@@ -962,20 +1008,22 @@ is not compatible with the expected type for that parameter.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var appId = tizen.application.getCurrentApplication().appInfo.id;
- tizen.account.getAccounts(function(accounts) {
-     var account = accounts[0];
-     if(account) {
-         var addressbook = new tizen.AddressBook(
-             account.id,
-             'remote addressbook'
-         );
-         tizen.contact.addAddressBook(addressbook);
-     }
- }, function(e) {
-     console.log('Error: ' + e.message);
- }, appId);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var appId = tizen.application.getCurrentApplication().appInfo.id;
+tizen.account.getAccounts(function(accounts)
+{
+&nbsp;&nbsp;&nbsp;var account = accounts[0];
+&nbsp;&nbsp;&nbsp;if (account)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var addressbook = new tizen.AddressBook(account.id,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'remote addressbook');
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tizen.contact.addAddressBook(addressbook);
+&nbsp;&nbsp;&nbsp;}
+}, function(e)
+{
+&nbsp;&nbsp;&nbsp;console.log('Error: ' + e.message);
+}, appId);
+</pre>
 </div>
 </dd>
 <dt class="method" id="ContactManager::removeAddressBook">
@@ -1043,21 +1091,23 @@ to an unknown error.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var appId = tizen.application.getCurrentApplication().appInfo.id;
- tizen.account.getAccounts(function(accounts) {
-     var account = accounts[0];
-     if(account) {
-         var addressbook = new tizen.AddressBook(
-             account.id,
-             'remote addressbook'
-         );
-         tizen.contact.addAddressBook(addressbook);
-         tizen.contact.removeAddressBook(addressbook.id);
-     }
- }, function(e) {
-     console.log('Error: ' + e.message);
- }, appId);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var appId = tizen.application.getCurrentApplication().appInfo.id;
+tizen.account.getAccounts(function(accounts)
+{
+&nbsp;&nbsp;&nbsp;var account = accounts[0];
+&nbsp;&nbsp;&nbsp;if (account)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var addressbook = new tizen.AddressBook(account.id,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'remote addressbook');
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tizen.contact.addAddressBook(addressbook);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tizen.contact.removeAddressBook(addressbook.id);
+&nbsp;&nbsp;&nbsp;}
+}, function(e)
+{
+&nbsp;&nbsp;&nbsp;console.log('Error: ' + e.message);
+}, appId);
+</pre>
 </div>
 </dd>
 <dt class="method" id="ContactManager::getAddressBook">
@@ -1122,16 +1172,20 @@ parameters contain an invalid value.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var contactRef; // ContactRef supposed to be initialized
- try {
-   // Retrieves the Contact corresponding to a given ContactRef.
-   var addressBook = tizen.contact.getAddressBook(contactRef.addressBookId);
-   var contact = addressBook.get(contactRef.contactId);
-   console.log("Successfully resolved contact with id: " + contactRef.contactId);
- } catch(err) {
-   console.log("Error: " + err.name);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var contactRef; /* ContactRef supposed to be initialized */
+try
+{
+&nbsp;&nbsp;&nbsp;/* Retrieves the Contact corresponding to a given ContactRef */
+&nbsp;&nbsp;&nbsp;var addressBook = tizen.contact.getAddressBook(contactRef.addressBookId);
+&nbsp;&nbsp;&nbsp;var contact = addressBook.get(contactRef.contactId);
+&nbsp;&nbsp;&nbsp;console.log("Successfully resolved contact with id: " + contactRef.contactId);
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log("Error: " + err.name);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="ContactManager::get">
@@ -1202,17 +1256,21 @@ parameters contain an invalid value.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var contactRef; // ContactRef supposed to be initialized
- try {
-   // Retrieves the Person corresponding to a Contact.
-   var addressBook = tizen.contact.getAddressBook(contactRef.addressBookId);
-   var contact = addressBook.get(contactRef.contactId);
-   var person = tizen.contact.get(contact.personId);
-   console.log("Successfully resolved person with id: " + contact.personId);
- } catch(err) {
-   console.log("Error: " + err.name);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var contactRef; /* ContactRef supposed to be initialized */
+try
+{
+&nbsp;&nbsp;&nbsp;/* Retrieves the Person corresponding to a Contact */
+&nbsp;&nbsp;&nbsp;var addressBook = tizen.contact.getAddressBook(contactRef.addressBookId);
+&nbsp;&nbsp;&nbsp;var contact = addressBook.get(contactRef.contactId);
+&nbsp;&nbsp;&nbsp;var person = tizen.contact.get(contact.personId);
+&nbsp;&nbsp;&nbsp;console.log("Successfully resolved person with id: " + contact.personId);
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log("Error: " + err.name);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="ContactManager::update">
@@ -1273,29 +1331,38 @@ to an unknown error.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">  // Defines the error callback.
-  function errorCB(err) {
-    console.log( 'The following error occurred: ' +  err.name);
-  }
-
-  function personsFoundCB(persons) {
-    // The person has been successfully found.
-    // Tries to change the isFavorite attribute.
-    persons[0].isFavorite = true;
-    try {
-      tizen.contact.update(persons[0]);
-      console.log('First person was updated');
-    } catch (err) {
-      console.log( 'The following error occurred while updating: ' +  err.name);
-    }
-  }
-
-  try {
-    tizen.contact.find(personsFoundCB, errorCB);
-  } catch (err) {
-    console.log( 'The following error occurred while finding: ' +  err.name);
-  }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Defines the error callback */
+function errorCB(err)
+{
+&nbsp;&nbsp;&nbsp;console.log('The following error occurred: ' + err.name);
+}
+
+function personsFoundCB(persons)
+{
+&nbsp;&nbsp;&nbsp;/* Person has been successfully found */
+&nbsp;&nbsp;&nbsp;/* Tries to change the isFavorite attribute */
+&nbsp;&nbsp;&nbsp;persons[0].isFavorite = true;
+&nbsp;&nbsp;&nbsp;try
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tizen.contact.update(persons[0]);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('First person was updated');
+&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;catch (err)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('The following error occurred while updating: ' + err.name);
+&nbsp;&nbsp;&nbsp;}
+}
+
+try
+{
+&nbsp;&nbsp;&nbsp;tizen.contact.find(personsFoundCB, errorCB);
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log('The following error occurred while finding: ' + err.name);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="ContactManager::updateBatch">
@@ -1369,33 +1436,44 @@ is not compatible with the expected type for that parameter.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">  // Defines the error callback for all the asynchronous calls.
-  function errorCB(err) {
-    console.log('The following error occurred: ' +  err.name);
-  }
-
-  function personsUpdatedCB() {
-    console.log('Contacts were updated');
-  }
-
-  function personsFoundCB(persons) {
-    // The person has been successfully found.
-    for(var i = 0; i &lt; persons.length; i++) {
-      persons[i].isFavorite = true;
-    }
-    try {
-      tizen.contact.updateBatch(persons, personsUpdatedCB, errorCB);
-    } catch (err) {
-      console.log('The following error occurred while updating: ' +  err.name);
-    }
-  }
-
-  try {
-    tizen.contact.find(personsFoundCB, errorCB);
-  } catch (err) {
-    console.log('The following error occurred while finding: ' +  err.name);
-  }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Defines the error callback for all the asynchronous calls */
+function errorCB(err)
+{
+&nbsp;&nbsp;&nbsp;console.log('The following error occurred: ' + err.name);
+}
+
+function personsUpdatedCB()
+{
+&nbsp;&nbsp;&nbsp;console.log('Contacts were updated');
+}
+
+function personsFoundCB(persons)
+{
+&nbsp;&nbsp;&nbsp;/* Person has been successfully found */
+&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; persons.length; i++)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;persons[i].isFavorite = true;
+&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;try
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tizen.contact.updateBatch(persons, personsUpdatedCB, errorCB);
+&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;catch (err)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('The following error occurred while updating: ' + err.name);
+&nbsp;&nbsp;&nbsp;}
+}
+
+try
+{
+&nbsp;&nbsp;&nbsp;tizen.contact.find(personsFoundCB, errorCB);
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log('The following error occurred while finding: ' + err.name);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="ContactManager::remove">
@@ -1461,31 +1539,43 @@ to an unknown error.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">  // Defines the error callback.
-  function errorCB(err) {
-    console.log('The following error occurred: ' +  err.name);
-  }
-
-  function personsFoundCB(persons) {
-    // The person has been successfully found.
-    if(persons.length &gt; 0) {
-      try {
-        tizen.contact.remove(persons[0].id);
-        console.log('First person was removed');
-      } catch (err) {
-        console.log('The following error occurred while removing: ' +  err.name);
-      }
-    } else {
-      console.log( 'No persons.');
-    }
-  }
-
-  try {
-    tizen.contact.find(personsFoundCB, errorCB);
-  } catch (err) {
-    console.log( 'The following error occurred while finding: ' +  err.name);
-  }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Defines the error callback */
+function errorCB(err)
+{
+&nbsp;&nbsp;&nbsp;console.log('The following error occurred: ' + err.name);
+}
+
+function personsFoundCB(persons)
+{
+&nbsp;&nbsp;&nbsp;/* Person has been successfully found */
+&nbsp;&nbsp;&nbsp;if (persons.length &gt; 0)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;try
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tizen.contact.remove(persons[0].id);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('First person was removed');
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;catch (err)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('The following error occurred while removing: ' + err.name);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;else
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('No persons.');
+&nbsp;&nbsp;&nbsp;}
+}
+
+try
+{
+&nbsp;&nbsp;&nbsp;tizen.contact.find(personsFoundCB, errorCB);
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log('The following error occurred while finding: ' + err.name);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="ContactManager::removeBatch">
@@ -1559,34 +1649,47 @@ is not compatible with the expected type for that parameter.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">  // Defines the error callback.
-  function errorCB(err) {
-    console.log( 'The following error occurred: ' +  err.name);
-  }
-
-  function personsRemovedCB() {
-    console.log('Contacts were removed');
-  }
-
-  function personsFoundCB(persons) {
-    // The person has been successfully found.
-    if(persons.length &gt; 2) {
-      try {
-        tizen.contact.removeBatch([persons[0].id, persons[1].id], personsRemovedCB, errorCB);
-      } catch (err) {
-        console.log( 'The following error occurred while removing: ' +  err.name);
-      }
-    } else {
-      console.log( 'Not enough persons.');
-    }
-  }
-
-  try {
-    tizen.contact.find(personsFoundCB, errorCB);
-  } catch (err) {
-    console.log( 'The following error occurred while finding: ' +  err.name);
-  }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Defines the error callback */
+function errorCB(err)
+{
+&nbsp;&nbsp;&nbsp;console.log('The following error occurred: ' + err.name);
+}
+
+function personsRemovedCB()
+{
+&nbsp;&nbsp;&nbsp;console.log('Contacts were removed');
+}
+
+function personsFoundCB(persons)
+{
+&nbsp;&nbsp;&nbsp;/* Person has been successfully found */
+&nbsp;&nbsp;&nbsp;if (persons.length &gt; 2)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;try
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tizen.contact.removeBatch([persons[0].id, persons[1].id], personsRemovedCB, errorCB);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;catch (err)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('The following error occurred while removing: ' + err.name);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;else
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('Not enough persons.');
+&nbsp;&nbsp;&nbsp;}
+}
+
+try
+{
+&nbsp;&nbsp;&nbsp;tizen.contact.find(personsFoundCB, errorCB);
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log('The following error occurred while finding: ' + err.name);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="ContactManager::find">
@@ -1669,28 +1772,33 @@ is not compatible with the expected type for that parameter.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">  // Defines the error callback.
-  function errorCB(err) {
-    console.log( 'The following error occurred: ' +  err.name);
-  }
-
-  // Defines the person search success callback.
-  function personsFoundCB(persons) {
-    console.log(persons.length + ' results found.');
-  }
-
-  // Finds all the persons in the contact DB that have the word Ramone in their display name.
-  var filter = new tizen.AttributeFilter('displayName', 'CONTAINS', 'Ramone');
-
-  // The persons returned by the find() query will be sorted in the ascending order of their display name.
-  var sortingMode =  new tizen.SortMode('displayName', 'ASC');
-  try {
-    tizen.contact.find(personsFoundCB, errorCB,
-                     filter, sortingMode);
-  } catch (err) {
-    console.log( 'The following error occurred while finding: ' +  err.name);
-  }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Defines the error callback */
+function errorCB(err)
+{
+&nbsp;&nbsp;&nbsp;console.log('The following error occurred: ' + err.name);
+}
+
+/* Defines the person search success callback */
+function personsFoundCB(persons)
+{
+&nbsp;&nbsp;&nbsp;console.log(persons.length + ' results found.');
+}
+
+/* Finds all the persons in the contact DB that have the word Ramone in their display name */
+var filter = new tizen.AttributeFilter('displayName', 'CONTAINS', 'Ramone');
+
+/* Persons returned by the find() query will be sorted in the ascending order of their display name */
+var sortingMode =  new tizen.SortMode('displayName', 'ASC');
+try
+{
+&nbsp;&nbsp;&nbsp;tizen.contact.find(personsFoundCB, errorCB, filter, sortingMode);
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log('The following error occurred while finding: ' + err.name);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="ContactManager::findByUsageCount">
@@ -1773,29 +1881,35 @@ is not compatible with the expected type for that parameter.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">  // Defines the error callback.
-  function errorCB(err) {
-    console.log( 'The following error occurred: ' +  err.name);
-  }
-
-  // Defines the person search success callback.
-  function personsFoundCB(persons) {
-    console.log(persons.length + ' results found.');
-  }
-
-  // Finds all the persons in the contact DB that have exactly five OUTGOING_CALL
-  var filter = new tizen.AttributeFilter('OUTGOING_CALL', 'EXACTLY', 5);
-  // Finds all the persons in the contact DB that have OUTGOING_CALL in range &lt;0, 5&gt;
-  //var filter = new tizen.AttributeRangeFilter('OUTGOING_CALL', 0, 5);
-  try {
-    // Finds three most used contacts from contacts found with filter
-    tizen.contact.findByUsageCount(filter, personsFoundCB, errorCB, 'DESC', 3, 0);
-    // Finds three least used contacts from contacts found with filter
-    //tizen.contact.findByUsageCount(filter, personsFoundCB, errorCB, 'ASC', 3, 0);
-  } catch (err) {
-    console.log( 'The following error occurred while finding: ' +  err.name);
-  }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Defines the error callback */
+function errorCB(err)
+{
+&nbsp;&nbsp;&nbsp;console.log('The following error occurred: ' + err.name);
+}
+
+/* Defines the person search success callback */
+function personsFoundCB(persons)
+{
+&nbsp;&nbsp;&nbsp;console.log(persons.length + ' results found.');
+}
+
+/* Finds all the persons in the contact DB that have exactly five OUTGOING_CALL */
+var filter = new tizen.AttributeFilter('OUTGOING_CALL', 'EXACTLY', 5);
+/* Finds all the persons in the contact DB that have OUTGOING_CALL in range &lt;0, 5&gt; */
+/* var filter = new tizen.AttributeRangeFilter('OUTGOING_CALL', 0, 5); */
+try
+{
+&nbsp;&nbsp;&nbsp;/* Finds three most used contacts from contacts found with filter */
+&nbsp;&nbsp;&nbsp;tizen.contact.findByUsageCount(filter, personsFoundCB, errorCB, 'DESC', 3, 0);
+&nbsp;&nbsp;&nbsp;/* Finds three least used contacts from contacts found with filter */
+&nbsp;&nbsp;&nbsp;/* tizen.contact.findByUsageCount(filter, personsFoundCB, errorCB, 'ASC', 3, 0); */
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log('The following error occurred while finding: ' + err.name);
+}
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre> 3 results found.
@@ -1867,23 +1981,28 @@ contain an invalid value.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var watcherId = 0; // watcher identifier
-
- var watcher = {
-   onpersonsadded: function(persons) {
-     console.log(persons.length + ' persons were added');
-   },
-   onpersonsupdated: function(persons) {
-     console.log(persons.length + ' persons were updated');
-   },
-   onpersonsremoved: function(ids) {
-     console.log(ids.length + ' persons were deleted');
-   }
- };
-
- // Registers to be notified when the person changes.
- watcherId = tizen.contact.addChangeListener(watcher);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var watcherId = 0; /* Watcher identifier */
+
+var watcher =
+{
+&nbsp;&nbsp;&nbsp;onpersonsadded: function(persons)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(persons.length + ' persons were added');
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;onpersonsupdated: function(persons)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(persons.length + ' persons were updated');
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;onpersonsremoved: function(ids)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(ids.length + ' persons were deleted');
+&nbsp;&nbsp;&nbsp;}
+};
+
+/* Registers to be notified when the person changes */
+watcherId = tizen.contact.addChangeListener(watcher);
+</pre>
 </div>
 </dd>
 <dt class="method" id="ContactManager::removeChangeListener">
@@ -1952,29 +2071,35 @@ with the given identifier.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var watcherId = 0; // watcher identifier
-
- // Receives person changes.
- var watcher = {
-   onpersonsadded: function(persons) {
-     console.log(persons.length + ' persons were added');
-   },
-   onpersonsupdated: function(persons) {
-     console.log(persons.length + ' persons were updated');
-   },
-   onpersonsremoved: function(ids) {
-     console.log(ids.length + ' persons were removed');
-   }
- };
-
- // Cancels the watch operation.
- function cancelWatch() {
-    tizen.contact.removeChangeListener(watcherId);
- }
-
- // Registers to be notified of person changes.
- watcherId = tizen.contact.addChangeListener(watcher);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var watcherId = 0; /* Watcher identifier */
+
+/* Receives person changes */
+var watcher =
+{
+&nbsp;&nbsp;&nbsp;onpersonsadded: function(persons)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(persons.length + ' persons were added');
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;onpersonsupdated: function(persons)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(persons.length + ' persons were updated');
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;onpersonsremoved: function(ids)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(ids.length + ' persons were removed');
+&nbsp;&nbsp;&nbsp;}
+};
+
+/* Cancels the watch operation */
+function cancelWatch()
+{
+&nbsp;&nbsp;&nbsp;tizen.contact.removeChangeListener(watcherId);
+}
+
+/* Registers to be notified of person changes */
+watcherId = tizen.contact.addChangeListener(watcher);
+</pre>
 </div>
 </dd>
 </dl>
@@ -2075,22 +2200,24 @@ This interface also offers the following methods to manipulate groups within the
           </ul>
          </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var appId = tizen.application.getCurrentApplication().appInfo.id;
- tizen.account.getAccounts(function(accounts) {
-     var account = accounts[0];
-     if(account) {
-         var addressbook = new tizen.AddressBook(
-             account.id,
-             'remote addressbook'
-         );
-
-         // 'addressbook' variable is not available until it is inserted into database.
-         tizen.contact.addAddressBook(addressbook);
-     }
- }, function(e) {
-     console.log('Error: ' + e.message);
- }, appId);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var appId = tizen.application.getCurrentApplication().appInfo.id;
+tizen.account.getAccounts(function(accounts)
+{
+&nbsp;&nbsp;&nbsp;var account = accounts[0];
+&nbsp;&nbsp;&nbsp;if (account)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var addressbook = new tizen.AddressBook(account.id,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'remote addressbook');
+
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* 'addressbook' variable is not available until it is inserted into database */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tizen.contact.addAddressBook(addressbook);
+&nbsp;&nbsp;&nbsp;}
+}, function(e)
+{
+&nbsp;&nbsp;&nbsp;console.log('Error: ' + e.message);
+}, appId);
+</pre>
 </div>
 <div class="constructors">
 <h4 id="AddressBook::constructor">Constructors</h4>
@@ -2218,16 +2345,20 @@ parameters contain an invalid value.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var contactRef; // ContactRef supposed to be initialized
- try {
-   // Retrieves the Contact corresponding to a given ContactRef.
-   var addressBook = tizen.contact.getAddressBook(contactRef.addressBookId);
-   var contact = addressBook.get(contactRef.contactId);
-   console.log("Successfully resolved contact with id: " + contactRef.contactId);
- } catch(err) {
-   console.log("Error: " + err.name);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var contactRef; /* ContactRef supposed to be initialized */
+try
+{
+&nbsp;&nbsp;&nbsp;/* Retrieves the Contact corresponding to a given ContactRef */
+&nbsp;&nbsp;&nbsp;var addressBook = tizen.contact.getAddressBook(contactRef.addressBookId);
+&nbsp;&nbsp;&nbsp;var contact = addressBook.get(contactRef.contactId);
+&nbsp;&nbsp;&nbsp;console.log("Successfully resolved contact with id: " + contactRef.contactId);
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log("Error: " + err.name);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="AddressBook::add">
@@ -2299,23 +2430,33 @@ is not compatible with the expected type for that parameter.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">  var addressbook;
-
-  // Gets the default address book.
-  addressbook = tizen.contact.getDefaultAddressBook();
-
-  try {
-    var contact = new tizen.Contact({name: new tizen.ContactName({firstName:'Jeffrey',
-                                          lastName:'Hyman',
-                                          nicknames:['joey ramone']}),
-                                    emails:[new tizen.ContactEmailAddress('user@domain.com')],
-                                    phoneNumbers:[new tizen.ContactPhoneNumber('123456789')]});
-    addressbook.add(contact);
-    console.log('Contact added with id ' + contact.id);
-  } catch (err) {
-    console.log( 'The following error occurred while adding: ' +  err.name);
-  }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var addressbook;
+
+/* Gets the default address book */
+addressbook = tizen.contact.getDefaultAddressBook();
+
+try
+{
+&nbsp;&nbsp;&nbsp;var contact = new tizen.Contact(
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;name: new tizen.ContactName(
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;firstName:'Jeffrey',
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;lastName:'Hyman',
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;nicknames:['joey ramone']
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}),
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;emails:[new tizen.ContactEmailAddress('user@domain.com')],
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;phoneNumbers:[new tizen.ContactPhoneNumber('123456789')]
+&nbsp;&nbsp;&nbsp;});
+&nbsp;&nbsp;&nbsp;addressbook.add(contact);
+&nbsp;&nbsp;&nbsp;console.log('Contact added with id ' + contact.id);
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log('The following error occurred while adding: ' + err.name);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="AddressBook::addBatch">
@@ -2402,39 +2543,57 @@ is not compatible with the expected type for that parameter.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">  var addressbook;
-
-  // Defines the error callback
-  function errorCB(err) {
-    console.log( 'The following error occurred: ' +  err.name);
-  }
-
-  // Defines the add contact success callback
-  function contactsAddedCB(contacts) {
-    console.log( contacts.length + ' contact(s) were successfully added to an Address Book' );
-  };
-
-  // Gets the default address book
-  addressbook = tizen.contact.getDefaultAddressBook();
-
-  var c1 = new tizen.Contact({name: new tizen.ContactName({firstName:'Jeffrey',
-                             lastName:'Hyman',
-                             nicknames:['joey ramone']}),
-                             emails:[new tizen.ContactEmailAddress('user1@domain.com')],
-                             phoneNumbers:[new tizen.ContactPhoneNumber('123456789')]});
-
-  var c2 = new tizen.Contact({name: new tizen.ContactName({firstName:'Elton',
-                             lastName:'John',
-                             nicknames:['El']}),
-                             emails:[new tizen.ContactEmailAddress('user2@domain.com')],
-                             phoneNumbers:[new tizen.ContactPhoneNumber('987654321')]});
-
-  try {
-    addressbook.addBatch([c1, c2], contactsAddedCB, errorCB);
-  } catch (err) {
-    console.log( 'The following error occurred while adding: ' +  err.name);
-  }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var addressbook;
+
+/* Defines the error callback */
+function errorCB(err)
+{
+&nbsp;&nbsp;&nbsp;console.log('The following error occurred: ' + err.name);
+}
+
+/* Defines the add contact success callback */
+function contactsAddedCB(contacts)
+{
+&nbsp;&nbsp;&nbsp;console.log(contacts.length + ' contact(s) were successfully added to an Address Book');
+};
+
+/* Gets the default address book */
+addressbook = tizen.contact.getDefaultAddressBook();
+
+var c1 = new tizen.Contact(
+{
+&nbsp;&nbsp;&nbsp;name: new tizen.ContactName(
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;firstName:'Jeffrey',
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;lastName:'Hyman',
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;nicknames:['joey ramone']
+&nbsp;&nbsp;&nbsp;}),
+&nbsp;&nbsp;&nbsp;emails:[new tizen.ContactEmailAddress('user1@domain.com')],
+&nbsp;&nbsp;&nbsp;phoneNumbers:[new tizen.ContactPhoneNumber('123456789')]
+});
+
+var c2 = new tizen.Contact(
+{
+&nbsp;&nbsp;&nbsp;name: new tizen.ContactName(
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;firstName:'Elton',
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;lastName:'John',
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;nicknames:['El']
+&nbsp;&nbsp;&nbsp;}),
+&nbsp;&nbsp;&nbsp;emails:[new tizen.ContactEmailAddress('user2@domain.com')],
+&nbsp;&nbsp;&nbsp;phoneNumbers:[new tizen.ContactPhoneNumber('987654321')]
+});
+
+try
+{
+&nbsp;&nbsp;&nbsp;addressbook.addBatch([c1, c2], contactsAddedCB, errorCB);
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log('The following error occurred while adding: ' + err.name);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="AddressBook::update">
@@ -2495,35 +2654,44 @@ to an unknown error.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">  var addressbook;
-
-  // Defines the error callback
-  function errorCB(err) {
-    console.log( 'The following error occurred: ' +  err.name);
-  }
-
-  function contactsFoundCB(contacts) {
-    // The contact has been successfully found.
-    // Tries to change the first name.
-    contacts[0].name.firstName = 'Christopher';
-    try {
-      addressbook.update(contacts[0]);
-      console.log('First contact was updated');
-    } catch (err) {
-      console.log( 'The following error occurred while updating: ' +  err.name);
-    }
-  }
-
-  // Gets the default address book.
-  addressbook = tizen.contact.getDefaultAddressBook();
-
-  var filter = new tizen.AttributeFilter('name.firstName', 'CONTAINS', 'Chris');
-  try {
-    addressbook.find(contactsFoundCB, errorCB, filter);
-  } catch (err) {
-    console.log( 'The following error occurred while finding: ' +  err.name);
-  }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var addressbook;
+
+/* Defines the error callback */
+function errorCB(err)
+{
+&nbsp;&nbsp;&nbsp;console.log('The following error occurred: ' + err.name);
+}
+
+function contactsFoundCB(contacts)
+{
+&nbsp;&nbsp;&nbsp;/* Contact has been successfully found */
+&nbsp;&nbsp;&nbsp;/* Tries to change the first name */
+&nbsp;&nbsp;&nbsp;contacts[0].name.firstName = 'Christopher';
+&nbsp;&nbsp;&nbsp;try
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;addressbook.update(contacts[0]);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('First contact was updated');
+&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;catch (err)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('The following error occurred while updating: ' + err.name);
+&nbsp;&nbsp;&nbsp;}
+}
+
+/* Gets the default address book */
+addressbook = tizen.contact.getDefaultAddressBook();
+
+var filter = new tizen.AttributeFilter('name.firstName', 'CONTAINS', 'Chris');
+try
+{
+&nbsp;&nbsp;&nbsp;addressbook.find(contactsFoundCB, errorCB, filter);
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log('The following error occurred while finding: ' + err.name);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="AddressBook::updateBatch">
@@ -2598,39 +2766,50 @@ is not compatible with the expected type for that parameter.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">  var addressbook;
-
-  // Defines the error callback for all the asynchronous calls.
-  function errorCB(err) {
-    console.log('The following error occurred: ' +  err.name);
-  }
-
-  function contactsUpdatedCB() {
-    console.log('Contacts were updated');
-  }
-
-  function contactsFoundCB(contacts) {
-    // The contact has been successfully found.
-    for(var i = 0; i &lt; contacts.length; i++) {
-      contacts[i].name.firstName = 'Christopher';
-    }
-    try {
-      addressbook.updateBatch(contacts, contactsUpdatedCB, errorCB);
-    } catch (err) {
-      console.log('The following error occurred while updating: ' +  err.name);
-    }
-  }
-
-  // Gets the default address book.
-  addressbook = tizen.contact.getDefaultAddressBook();
-
-  var filter = new tizen.AttributeFilter('name.firstName', 'CONTAINS', 'Chris');
-  try {
-    addressbook.find(contactsFoundCB, errorCB, filter);
-  } catch (err) {
-    console.log('The following error occurred while finding: ' +  err.name);
-  }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var addressbook;
+
+/* Defines the error callback for all the asynchronous calls */
+function errorCB(err)
+{
+&nbsp;&nbsp;&nbsp;console.log('The following error occurred: ' + err.name);
+}
+
+function contactsUpdatedCB()
+{
+&nbsp;&nbsp;&nbsp;console.log('Contacts were updated');
+}
+
+function contactsFoundCB(contacts)
+{
+&nbsp;&nbsp;&nbsp;/* Contact has been successfully found */
+&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; contacts.length; i++)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;contacts[i].name.firstName = 'Christopher';
+&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;try
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;addressbook.updateBatch(contacts, contactsUpdatedCB, errorCB);
+&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;catch (err)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('The following error occurred while updating: ' + err.name);
+&nbsp;&nbsp;&nbsp;}
+}
+
+/* Gets the default address book */
+addressbook = tizen.contact.getDefaultAddressBook();
+
+var filter = new tizen.AttributeFilter('name.firstName', 'CONTAINS', 'Chris');
+try
+{
+&nbsp;&nbsp;&nbsp;addressbook.find(contactsFoundCB, errorCB, filter);
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log('The following error occurred while finding: ' + err.name);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="AddressBook::remove">
@@ -2699,37 +2878,49 @@ to an unknown error.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">  var addressbook;
-
-  // Defines the error callback.
-  function errorCB(err) {
-    console.log('The following error occurred: ' +  err.name);
-  }
-
-  function contactsFoundCB(contacts) {
-    // The contact has been successfully found.
-    if(contacts.length &gt; 0) {
-      try {
-        addressbook.remove(contacts[0].id);
-        console.log('First contact was removed');
-      } catch (err) {
-        console.log('The following error occurred while removing: ' +  err.name);
-      }
-    } else {
-      console.log( 'No contacts.');
-    }
-  }
-
-  // Gets the default address book.
-  addressbook = tizen.contact.getDefaultAddressBook();
-
-  var filter = new tizen.AttributeFilter('name.firstName', 'CONTAINS', 'Chris');
-  try {
-    addressbook.find(contactsFoundCB, errorCB, filter);
-  } catch (err) {
-    console.log( 'The following error occurred while finding: ' +  err.name);
-  }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var addressbook;
+
+/* Defines the error callback */
+function errorCB(err)
+{
+&nbsp;&nbsp;&nbsp;console.log('The following error occurred: ' + err.name);
+}
+
+function contactsFoundCB(contacts)
+{
+&nbsp;&nbsp;&nbsp;/* Contact has been successfully found */
+&nbsp;&nbsp;&nbsp;if (contacts.length &gt; 0)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;try
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;addressbook.remove(contacts[0].id);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('First contact was removed');
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;catch (err)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('The following error occurred while removing: ' + err.name);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;else
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('No contacts.');
+&nbsp;&nbsp;&nbsp;}
+}
+
+/* Gets the default address book */
+addressbook = tizen.contact.getDefaultAddressBook();
+
+var filter = new tizen.AttributeFilter('name.firstName', 'CONTAINS', 'Chris');
+try
+{
+&nbsp;&nbsp;&nbsp;addressbook.find(contactsFoundCB, errorCB, filter);
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log('The following error occurred while finding: ' + err.name);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="AddressBook::removeBatch">
@@ -2800,40 +2991,53 @@ is not compatible with the expected type for that parameter.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">  var addressbook;
-
-  // Defines the error callback.
-  function errorCB(err) {
-    console.log( 'The following error occurred: ' +  err.name);
-  }
-
-  function contactsRemovedCB() {
-    console.log('Contacts were removed');
-  }
-
-  function contactsFoundCB(contacts) {
-    // The contact has been successfully found.
-    if(contacts.length &gt; 2) {
-      try {
-        addressbook.removeBatch([contacts[0].id, contacts[1].id], contactsRemovedCB, errorCB);
-      } catch (err) {
-        console.log( 'The following error occurred while removing: ' +  err.name);
-      }
-    } else {
-      console.log( 'Not enough contacts.');
-    }
-  }
-
-  // Gets the default address book.
-  addressbook = tizen.contact.getDefaultAddressBook();
-
-  var filter = new tizen.AttributeFilter('name.firstName', 'CONTAINS', 'Chris');
-  try {
-    addressbook.find(contactsFoundCB, errorCB, filter);
-  } catch (err) {
-    console.log( 'The following error occurred while finding: ' +  err.name);
-  }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var addressbook;
+
+/* Defines the error callback */
+function errorCB(err)
+{
+&nbsp;&nbsp;&nbsp;console.log('The following error occurred: ' + err.name);
+}
+
+function contactsRemovedCB()
+{
+&nbsp;&nbsp;&nbsp;console.log('Contacts were removed');
+}
+
+function contactsFoundCB(contacts)
+{
+&nbsp;&nbsp;&nbsp;/* Contact has been successfully found */
+&nbsp;&nbsp;&nbsp;if (contacts.length &gt; 2)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;try
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;addressbook.removeBatch([contacts[0].id, contacts[1].id], contactsRemovedCB, errorCB);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;catch (err)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('The following error occurred while removing: ' + err.name);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;else
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('Not enough contacts.');
+&nbsp;&nbsp;&nbsp;}
+}
+
+/* Gets the default address book */
+addressbook = tizen.contact.getDefaultAddressBook();
+
+var filter = new tizen.AttributeFilter('name.firstName', 'CONTAINS', 'Chris');
+try
+{
+&nbsp;&nbsp;&nbsp;addressbook.find(contactsFoundCB, errorCB, filter);
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log('The following error occurred while finding: ' + err.name);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="AddressBook::find">
@@ -2917,34 +3121,38 @@ is not compatible with the expected type for that parameter.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">  var addressbook;
-
-  // Defines the error callback.
-  function errorCB(err) {
-    console.log( 'The following error occurred: ' +  err.name);
-  }
-
-  // Defines the contact search success callback.
-  function contactsFoundCB(contacts) {
-     console.log(contacts.length + ' results found.');
-  }
-
-  // Gets the default address book.
-  addressbook = tizen.contact.getDefaultAddressBook();
-
-  // Finds all contacts in the address book that have "Ramone" in the nick name.
-  var filter = new tizen.AttributeFilter('name.nicknames', 'CONTAINS', 'Ramone');
-
-  // The contacts returned by the find() query will be sorted by
-  // ascending last name.
-  var sortingMode =  new tizen.SortMode('name.lastName', 'ASC');
-  try {
-    addressbook.find(contactsFoundCB, errorCB,
-                     filter, sortingModes);
-  } catch (err) {
-    console.log( 'The following error occurred while finding: ' +  err.name);
-  }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var addressbook;
+
+/* Defines the error callback */
+function errorCB(err)
+{
+&nbsp;&nbsp;&nbsp;console.log('The following error occurred: ' + err.name);
+}
+
+/* Defines the contact search success callback */
+function contactsFoundCB(contacts)
+{
+&nbsp;&nbsp;&nbsp;console.log(contacts.length + ' results found.');
+}
+
+/* Gets the default address book */
+addressbook = tizen.contact.getDefaultAddressBook();
+
+/* Finds all contacts in the address book that have "Ramone" in the nick name */
+var filter = new tizen.AttributeFilter('name.nicknames', 'CONTAINS', 'Ramone');
+
+/* Contacts returned by the find() query will be sorted by ascending last name */
+var sortingMode =  new tizen.SortMode('name.lastName', 'ASC');
+try
+{
+&nbsp;&nbsp;&nbsp;addressbook.find(contactsFoundCB, errorCB, filter, sortingModes);
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log('The following error occurred while finding: ' + err.name);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="AddressBook::addChangeListener">
@@ -3016,24 +3224,29 @@ contain an invalid value.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var watcherId = 0; // watcher identifier
- var addressbook; // This example assumes addressbook is initialized
-
- var watcher = {
-   oncontactsadded: function(contacts) {
-     console.log(contacts.length + ' contacts were added');
-   },
-   oncontactsupdated: function(contacts) {
-     console.log(contacts.length + ' contacts were updated');
-   },
-   oncontactsremoved: function(ids) {
-     console.log(ids.length + ' contacts were deleted');
-   }
- };
-
- // Registers to be notified when the address book changes.
- watcherId = addressbook.addChangeListener(watcher);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var watcherId = 0; /* Watcher identifier */
+var addressbook; /* This example assumes addressbook is initialized */
+
+var watcher =
+{
+&nbsp;&nbsp;&nbsp;oncontactsadded: function(contacts)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(contacts.length + ' contacts were added');
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;oncontactsupdated: function(contacts)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(contacts.length + ' contacts were updated');
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;oncontactsremoved: function(ids)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(ids.length + ' contacts were deleted');
+&nbsp;&nbsp;&nbsp;}
+};
+
+/* Registers to be notified when the address book changes */
+watcherId = addressbook.addChangeListener(watcher);
+</pre>
 </div>
 </dd>
 <dt class="method" id="AddressBook::removeChangeListener">
@@ -3102,30 +3315,36 @@ with the given identifier.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var watcherId = 0; // watcher identifier
- var addressbook; // This example assumes addressbook is initialized
-
- // Receives address book changes.
- var watcher = {
-   oncontactsadded: function(contacts) {
-     console.log(contacts.length + ' contacts were added');
-   },
-   oncontactsupdated: function(contacts) {
-     console.log(contacts.length + ' contacts were updated');
-   },
-   oncontactsremoved: function(ids) {
-     console.log(ids.length + ' contacts were removed');
-   }
- };
-
- // Cancels the watch operation.
- function cancelWatch() {
-    addressbook.removeChangeListener(watcherId);
- }
-
- // Registers to be notified when the address book changes.
- watcherId = addressbook.addChangeListener(watcher);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var watcherId = 0; /* Watcher identifier */
+var addressbook; /* This example assumes addressbook is initialized */
+
+/* Receives address book changes */
+var watcher =
+{
+&nbsp;&nbsp;&nbsp;oncontactsadded: function(contacts)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(contacts.length + ' contacts were added');
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;oncontactsupdated: function(contacts)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(contacts.length + ' contacts were updated');
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;oncontactsremoved: function(ids)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(ids.length + ' contacts were removed');
+&nbsp;&nbsp;&nbsp;}
+};
+
+/* Cancels the watch operation */
+function cancelWatch()
+{
+&nbsp;&nbsp;&nbsp;addressbook.removeChangeListener(watcherId);
+}
+
+/* Registers to be notified when the address book changes */
+watcherId = addressbook.addChangeListener(watcher);
+</pre>
 </div>
 </dd>
 <dt class="method" id="AddressBook::getGroup">
@@ -3190,16 +3409,20 @@ parameters contain an invalid value.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> try {
-   // Retrieves the Person corresponding to a Contact.
-   var addressBook = tizen.contact.getAddressBook(contactRef.addressBookId);
-   var contact = addressBook.get(contactRef.contactId);
-   var group = addressBook.getGroup(contact.groupIds[0].id);
-   console.log("Successfully resolved group with id: " + contact.groupIds[0].id);
- } catch(err) {
-   console.log("Error: " + err.name);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+try
+{
+&nbsp;&nbsp;&nbsp;/* Retrieves the Person corresponding to a Contact */
+&nbsp;&nbsp;&nbsp;var addressBook = tizen.contact.getAddressBook(contactRef.addressBookId);
+&nbsp;&nbsp;&nbsp;var contact = addressBook.get(contactRef.contactId);
+&nbsp;&nbsp;&nbsp;var group = addressBook.getGroup(contact.groupIds[0].id);
+&nbsp;&nbsp;&nbsp;console.log("Successfully resolved group with id: " + contact.groupIds[0].id);
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log("Error: " + err.name);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="AddressBook::addGroup">
@@ -3266,19 +3489,23 @@ contains invalid values.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">  var addressbook;
-
-  // Gets the address book.
-  var addressbook = tizen.contact.getDefaultAddressBook();
-
-  try {
-    var group = new tizen.ContactGroup('Company');
-    addressbook.addGroup(group);
-    console.log('Group added with id ' + group.id);
-  } catch (err) {
-    console.log( 'The following error occurred while adding: ' +  err.name);
-  }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var addressbook;
+
+/* Gets the address book */
+var addressbook = tizen.contact.getDefaultAddressBook();
+
+try
+{
+&nbsp;&nbsp;&nbsp;var group = new tizen.ContactGroup('Company');
+&nbsp;&nbsp;&nbsp;addressbook.addGroup(group);
+&nbsp;&nbsp;&nbsp;console.log('Group added with id ' + group.id);
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log('The following error occurred while adding: ' + err.name);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="AddressBook::updateGroup">
@@ -3336,20 +3563,24 @@ to an unknown error.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">  var addressbook;
-
-  // Gets the address book.
-  var addressbook = tizen.contact.getDefaultAddressBook();
-
-  try {
-    groups = addressbook.getGroups();
-    groups[0].name = 'Friends';
-    addressbook.updateGroup(groups[0]);
-    console.log('First group was updated');
-  } catch (err) {
-    console.log( 'The following error occurred while adding: ' +  err.name);
-  }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var addressbook;
+
+/* Gets the address book */
+var addressbook = tizen.contact.getDefaultAddressBook();
+
+try
+{
+&nbsp;&nbsp;&nbsp;groups = addressbook.getGroups();
+&nbsp;&nbsp;&nbsp;groups[0].name = 'Friends';
+&nbsp;&nbsp;&nbsp;addressbook.updateGroup(groups[0]);
+&nbsp;&nbsp;&nbsp;console.log('First group was updated');
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log('The following error occurred while adding: ' + err.name);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="AddressBook::removeGroup">
@@ -3416,19 +3647,23 @@ to an unknown error.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">  var addressbook;
-
-  // Gets the default address book.
-  var addressbook = tizen.contact.getDefaultAddressBook();
-
-  try {
-    groups = addressbook.getGroups();
-    addressbook.removeGroup(groups[0].id);
-    console.log('First group was removed');
-  } catch (err) {
-    console.log( 'The following error occurred while finding: ' +  err.name);
-  }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var addressbook;
+
+/* Gets the default address book */
+var addressbook = tizen.contact.getDefaultAddressBook();
+
+try
+{
+&nbsp;&nbsp;&nbsp;groups = addressbook.getGroups();
+&nbsp;&nbsp;&nbsp;addressbook.removeGroup(groups[0].id);
+&nbsp;&nbsp;&nbsp;console.log('First group was removed');
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log('The following error occurred while finding: ' + err.name);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="AddressBook::getGroups">
@@ -3485,18 +3720,22 @@ to an unknown error.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var addressbook;
-
-  // Gets the default address book.
-  var addressbook = tizen.contact.getDefaultAddressBook();
-
-  try {
-    groups = addressbook.getGroups();
-    console.log('Number of groups is ' + groups.length);
-  } catch (err) {
-    console.log( 'The following error occurred while finding: ' +  err.name);
-  }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var addressbook;
+
+/* Gets the default address book */
+var addressbook = tizen.contact.getDefaultAddressBook();
+
+try
+{
+&nbsp;&nbsp;&nbsp;groups = addressbook.getGroups();
+&nbsp;&nbsp;&nbsp;console.log('Number of groups is ' + groups.length);
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log('The following error occurred while finding: ' + err.name);
+}
+</pre>
 </div>
 </dd>
 </dl>
@@ -3726,27 +3965,36 @@ contains invalid values.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">  // Defines the error callback for all the asynchronous calls.
-  function errorCB(err) {
-    console.log( 'The following error occurred: ' +  err.name);
-  }
-
-  function personsFoundCB(persons) {
-    // The persons have been successfully found.
-    try {
-      persons[0].link(persons[1].id);
-      console.log('Second person was merged to the first person.');
-    } catch (err) {
-      console.log( 'The following error occurred while updating: ' +  err.name);
-    }
-  }
-
-  try {
-    tizen.contact.find(personsFoundCB, errorCB);
-  } catch (err) {
-    console.log( 'The following error occurred while adding: ' +  err.name);
-  }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Defines the error callback for all the asynchronous calls */
+function errorCB(err)
+{
+&nbsp;&nbsp;&nbsp;console.log('The following error occurred: ' + err.name);
+}
+
+function personsFoundCB(persons)
+{
+&nbsp;&nbsp;&nbsp;/* Persons have been successfully found */
+&nbsp;&nbsp;&nbsp;try
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;persons[0].link(persons[1].id);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('Second person was merged to the first person.');
+&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;catch (err)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('The following error occurred while updating: ' + err.name);
+&nbsp;&nbsp;&nbsp;}
+}
+
+try
+{
+&nbsp;&nbsp;&nbsp;tizen.contact.find(personsFoundCB, errorCB);
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log('The following error occurred while adding: ' + err.name);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="Person::unlink">
@@ -3810,47 +4058,58 @@ contains invalid values.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">  var myPersonId = '1'; //ID of modified
-
-  var addressbook; // Default addressbook
-  var person;    // Existing person obtained from addressbook
-  var newPerson; // New person, which will be created during unlink
-
-  // Defines the error callback.
-  function errorCB(err) {
-    console.log( 'The following error occurred: ' +  err.name);
-  }
-
-  // Defines the contact search success callback.
-  function contactsFoundCB(contacts) {
-    if (contacts.length &gt; 1) {
-      try {
-        // Unlinks the first contact.
-        newPerson = person.unlink(contacts[0].id);
-      } catch (err) {
-        console.log( 'The following error occurred while unlink: ' +  err.name);
-      }
-    } else {
-        console.log( 'Not enough contacts ');
-    }
-  }
-
-  try {
-    // Gets the person.
-    person = tizen.contact.get(myPersonId);
-
-    // Gets the default address book.
-    addressbook = tizen.contact.getDefaultAddressBook();
-
-    // Finds all the contacts in the default address book with personId
-    // as exactly myPersonId.
-    var filter = new tizen.AttributeFilter('personId', 'EXACTLY', myPersonId);
-
-    addressbook.find(contactsFoundCB, errorCB, filter);
-  } catch (err) {
-    console.log( 'The following error occurred while processing: ' +  err.name);
-  }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var myPersonId = '1'; /* ID of modified */
+
+var addressbook; /* Default addressbook */
+var person; /* Existing person obtained from addressbook */
+var newPerson; /* New person, which will be created during unlink */
+
+/* Defines the error callback */
+function errorCB(err)
+{
+&nbsp;&nbsp;&nbsp;console.log('The following error occurred: ' + err.name);
+}
+
+/* Defines the contact search success callback */
+function contactsFoundCB(contacts)
+{
+&nbsp;&nbsp;&nbsp;if (contacts.length &gt; 1)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;try
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Unlinks the first contact */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;newPerson = person.unlink(contacts[0].id);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;catch (err)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('The following error occurred while unlink: ' + err.name);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;else
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('Not enough contacts ');
+&nbsp;&nbsp;&nbsp;}
+}
+
+try
+{
+&nbsp;&nbsp;&nbsp;/* Gets the person */
+&nbsp;&nbsp;&nbsp;person = tizen.contact.get(myPersonId);
+
+&nbsp;&nbsp;&nbsp;/* Gets the default address book */
+&nbsp;&nbsp;&nbsp;addressbook = tizen.contact.getDefaultAddressBook();
+
+&nbsp;&nbsp;&nbsp;/* Finds all the contacts in the default address book with personId as exactly myPersonId */
+&nbsp;&nbsp;&nbsp;var filter = new tizen.AttributeFilter('personId', 'EXACTLY', myPersonId);
+
+&nbsp;&nbsp;&nbsp;addressbook.find(contactsFoundCB, errorCB, filter);
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log('The following error occurred while processing: ' + err.name);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="Person::getUsageCount">
@@ -3901,15 +4160,16 @@ is not compatible with the expected type for that parameter.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var myPersonId = '1'; // ID of person
- var person = tizen.contact.get(myPersonId);
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var myPersonId = '1'; /* ID of person */
+var person = tizen.contact.get(myPersonId);
 
- var outCalls = person.getUsageCount(OUTGOING_CALL);
- var allUsages = person.getUsageCount();
+var outCalls = person.getUsageCount(OUTGOING_CALL);
+var allUsages = person.getUsageCount();
 
- console.log('Number of outgoing calls: ' + outCalls);
- console.log('Number of all usages: ' + allUsages);
- </pre>
+console.log('Number of outgoing calls: ' + outCalls);
+console.log('Number of all usages: ' + allUsages);
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre> Number of outgoing calls: 12
@@ -3966,12 +4226,13 @@ is not compatible with the expected type for that parameter.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var myPersonId = '1'; // ID of person
- var person = tizen.contact.get(myPersonId);
- console.log('Usage count before reset: ' + person.getUsageCount());
- person.resetUsageCount();
- console.log('Usage count after reset: ' + person.getUsageCount());
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var myPersonId = '1'; /* ID of person */
+var person = tizen.contact.get(myPersonId);
+console.log('Usage count before reset: ' + person.getUsageCount());
+person.resetUsageCount();
+console.log('Usage count after reset: ' + person.getUsageCount());
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre> Usage count before reset: 2
@@ -4077,72 +4338,91 @@ This dictionary is used to input parameters when contacts are created.
  1.0
           </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">  // Gets the default address book.
-  var addressbook = tizen.contact.getDefaultAddressBook();
-
-  var contact = null;
-
-  try {
-    contact = new tizen.Contact(
-                      "BEGIN:VCARD\n"+
-                      "VERSION:3.0\n"+
-                      "N:Gump;Forrest\n"+
-                      "FN:Forrest Gump\n"+
-                      "ORG:Bubba Gump Shrimp Co.\n"+
-                      "TITLE:Shrimp Man\n"+
-                      "TEL;WORK:(111) 555-1212\n"+
-                      "TEL;HOME:(404) 555-1212\n"+
-                      "EMAIL;WORK;PREF:forrestgump@example.com\n"+
-                      "END:VCARD");
-  } catch (err) {
-    console.log( 'The following error occurred while converting: ' +  err.name);
-  }
-
-  try {
-    if (contact) {
-      addressbook.add(contact);
-      console.log('Contact was added with ID ' + contact.id);
-    }
-  } catch (err) {
-    console.log( 'The following error occurred while adding: ' +  err.name);
-  }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Gets the default address book */
+var addressbook = tizen.contact.getDefaultAddressBook();
+
+var contact = null;
+
+try
+{
+&nbsp;&nbsp;&nbsp;contact = new tizen.Contact("BEGIN:VCARD\n"+
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"VERSION:3.0\n"+
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"N:Gump;Forrest\n"+
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"FN:Forrest Gump\n"+
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"ORG:Bubba Gump Shrimp Co.\n"+
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"TITLE:Shrimp Man\n"+
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"TEL;WORK:(111) 555-1212\n"+
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"TEL;HOME:(404) 555-1212\n"+
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"EMAIL;WORK;PREF:forrestgump@example.com\n"+
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"END:VCARD");
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log('The following error occurred while converting: ' + err.name);
+}
+
+try
+{
+&nbsp;&nbsp;&nbsp;if (contact)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;addressbook.add(contact);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('Contact was added with ID ' + contact.id);
+&nbsp;&nbsp;&nbsp;}
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log('The following error occurred while adding: ' + err.name);
+}
+</pre>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Gets the default address book.
- var addressbook = tizen.contact.getDefaultAddressBook();
- var contact = null;
-
- var name = new tizen.ContactName({
-   firstName: "Forrest",
-   lastName: "Gump"
- });
- var addresses = [ new tizen.ContactAddress({
-                       city: "New York",
-                       streetAddress: "46th St.",
-                       isDefault: true }) ];
- var phoneNumbers = [ new tizen.ContactPhoneNumber("(111) 555-1212"),
-                      new tizen.ContactPhoneNumber("(111) 555-1213") ];
-
- try {
-   contact = new tizen.Contact({
-     name: name,
-     addresses: addresses,
-     phoneNumbers: phoneNumbers
-   });
- } catch (err) {
-   console.log( 'The following error occurred while creating contact: ' + err.name);
- }
-
- try {
-   if (contact) {
-     addressbook.add(contact);
-     console.log('Contact was added with ID ' + contact.id);
-   }
- } catch (err) {
-   console.log( 'The following error occurred while adding: ' + err.name);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Gets the default address book */
+var addressbook = tizen.contact.getDefaultAddressBook();
+var contact = null;
+
+var name = new tizen.ContactName(
+{
+&nbsp;&nbsp;&nbsp;firstName: "Forrest",
+&nbsp;&nbsp;&nbsp;lastName: "Gump"
+});
+var addresses = [new tizen.ContactAddress(
+{
+&nbsp;&nbsp;&nbsp;city: "New York",
+&nbsp;&nbsp;&nbsp;streetAddress: "46th St.",
+&nbsp;&nbsp;&nbsp;isDefault: true
+})];
+var phoneNumbers = [new tizen.ContactPhoneNumber("(111) 555-1212"),
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;new tizen.ContactPhoneNumber("(111) 555-1213")];
+
+try
+{
+&nbsp;&nbsp;&nbsp;contact = new tizen.Contact(
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;name: name,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;addresses: addresses,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;phoneNumbers: phoneNumbers
+&nbsp;&nbsp;&nbsp;});
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log('The following error occurred while creating contact: ' + err.name);
+}
+
+try
+{
+&nbsp;&nbsp;&nbsp;if (contact)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;addressbook.add(contact);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('Contact was added with ID ' + contact.id);
+&nbsp;&nbsp;&nbsp;}
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log('The following error occurred while adding: ' + err.name);
+}
+</pre>
 </div>
 <div class="constructors">
 <h4 id="Contact::constructor">Constructors</h4>
@@ -4232,10 +4512,12 @@ By default, this attribute is set to <var>false</var>.
  1.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">   if (contact.isFavorite) {
-     // ...
-   }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+if (contact.isFavorite)
+{
+&nbsp;&nbsp;&nbsp;/* Do something */
+}
+</pre>
 </div>
 </li>
 <li class="attribute" id="Contact::name">
@@ -4262,13 +4544,17 @@ By default, this attribute is set to an empty array.
  1.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var contactInit = {};
- var contactAddr = new tizen.ContactAddress({streetAddress:'Gran Via, 32',
-                                             postalCode:'50013',
-                                             city:'Zaragoza',
-                                             country:'ES'});
- contactInit.addresses = [contactAddr];
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var contactInit = {};
+var contactAddr = new tizen.ContactAddress(
+{
+&nbsp;&nbsp;&nbsp;streetAddress:'Gran Via, 32',
+&nbsp;&nbsp;&nbsp;postalCode:'50013',
+&nbsp;&nbsp;&nbsp;city:'Zaragoza',
+&nbsp;&nbsp;&nbsp;country:'ES'
+});
+contactInit.addresses = [contactAddr];
+</pre>
 </div>
 </li>
 <li class="attribute" id="Contact::photoURI">
@@ -4290,11 +4576,13 @@ By default, this attribute is set to <var>null</var>.
  1.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">  var contactInit = {};
-  tizen.filesystem.resolve('images/mypicture.jpg', function(imageFile) {
-    contactInit.photoURI = imageFile.toURI();
-  });
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var contactInit = {};
+tizen.filesystem.resolve('images/mypicture.jpg', function(imageFile)
+{
+&nbsp;&nbsp;&nbsp;contactInit.photoURI = imageFile.toURI();
+});
+</pre>
 </div>
 </li>
 <li class="attribute" id="Contact::phoneNumbers">
@@ -4312,10 +4600,11 @@ By default, this attribute is set to an empty array.
  1.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">   var contactInit = {};
-   var phoneNumber = new tizen.ContactPhoneNumber('123456789');
-   contactInit.phoneNumbers = [phoneNumber];
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var contactInit = {};
+var phoneNumber = new tizen.ContactPhoneNumber('123456789');
+contactInit.phoneNumbers = [phoneNumber];
+</pre>
 </div>
 </li>
 <li class="attribute" id="Contact::emails">
@@ -4333,10 +4622,11 @@ By default, this attribute is set to an empty array.
  1.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">   var contactInit = {};
-   var email = new tizen.ContactEmailAddress('deedee@ramones.com');
-   contactInit.emails = [email];
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var contactInit = {};
+var email = new tizen.ContactEmailAddress('deedee@ramones.com');
+contactInit.emails = [email];
+</pre>
 </div>
 </li>
 <li class="attribute" id="Contact::messengers">
@@ -4354,10 +4644,11 @@ By default, this attribute is set to an empty array.
  2.3
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">   var contactInit = {};
-   var messenger = new tizen.ContactInstantMessenger('user@example.com');
-   contactInit.messengers = [messenger];
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var contactInit = {};
+var messenger = new tizen.ContactInstantMessenger('user@example.com');
+contactInit.messengers = [messenger];
+</pre>
 </div>
 </li>
 <li class="attribute" id="Contact::relationships">
@@ -4378,11 +4669,12 @@ By default, this attribute is set to an empty array.
  2.3
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">   var contactInit = {};
-   // Contact is brother of 'Anna'.
-   var relationship = new tizen.ContactRelationship('Anna', "BROTHER");
-   contactInit.relationships = [relationship];
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var contactInit = {};
+/* Contact is brother of 'Anna' */
+var relationship = new tizen.ContactRelationship('Anna', "BROTHER");
+contactInit.relationships = [relationship];
+</pre>
 </div>
 </li>
 <li class="attribute" id="Contact::extensions">
@@ -4400,10 +4692,11 @@ By default, this attribute is set to an empty array.
  3.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">  var contactInit = {};
-  var extension =  new tizen.ContactExtension({ data1: 20, data2: 'Place of birth: ElblÄ…g' });
-  contactInit.extensions = [extension];
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var contactInit = {};
+var extension = new tizen.ContactExtension({data1: 20, data2: 'Place of birth: ElblÄ…g'});
+contactInit.extensions = [extension];
+</pre>
 </div>
 </li>
 <li class="attribute" id="Contact::birthday">
@@ -4423,9 +4716,10 @@ By default, this attribute is set to <var>null</var>.
  1.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">   var contactInit = {};
-   contactInit.birthday = new Date(1996, 4, 15);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var contactInit = {};
+contactInit.birthday = new Date(1996, 4, 15);
+</pre>
 </div>
 </li>
 <li class="attribute" id="Contact::anniversaries">
@@ -4446,10 +4740,11 @@ By default, this attribute is set to an empty array.
  1.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">   var contactInit = {};
-   var marriage_anniv = new tizen.ContactAnniversary(new Date(1976, 11, 2), 'Marriage');
-   contactInit.anniversaries = [marriage_anniv];
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var contactInit = {};
+var marriage_anniv = new tizen.ContactAnniversary(new Date(1976, 11, 2), 'Marriage');
+contactInit.anniversaries = [marriage_anniv];
+</pre>
 </div>
 </li>
 <li class="attribute" id="Contact::organizations">
@@ -4638,35 +4933,44 @@ is not compatible with the expected type for that parameter.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">  var addressbook;
-
-  // Defines the error callback.
-  function errorCB(err) {
-    console.log( 'The following error occurred: ' +  err.name);
-  }
-
-  // Defines the contact find success callback.
-  function contactsFoundCB(contacts) {
-    try {
-      // Converts the first contact to vCard 3.0 format.
-      var vcard = contacts[0].convertToString("VCARD_30");
-      console.log('textual representation of the contact is: ' + vcard);
-    } catch (err) {
-      console.log( 'The following error occurred while converting: ' +  err.name);
-    }
-  }
-
-  // Gets the default address book.
-  addressbook = tizen.contact.getDefaultAddressBook();
-
-  // Finds all contacts in the address book whose first name contains the string 'Chris'.
-  var filter = new tizen.AttributeFilter('firstName', 'CONTAINS', 'Chris');
-  try {
-    addressbook.find(contactsFoundCB, errorCB, filter);
-  } catch (err) {
-    console.log( 'The following error occurred while finding: ' +  err.name);
-  }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var addressbook;
+
+/* Defines the error callback */
+function errorCB(err)
+{
+&nbsp;&nbsp;&nbsp;console.log('The following error occurred: ' + err.name);
+}
+
+/* Defines the contact find success callback */
+function contactsFoundCB(contacts)
+{
+&nbsp;&nbsp;&nbsp;try
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Converts the first contact to vCard 3.0 format */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var vcard = contacts[0].convertToString("VCARD_30");
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('textual representation of the contact is: ' + vcard);
+&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;catch (err)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('The following error occurred while converting: ' + err.name);
+&nbsp;&nbsp;&nbsp;}
+}
+
+/* Gets the default address book */
+addressbook = tizen.contact.getDefaultAddressBook();
+
+/* Finds all contacts in the address book whose first name contains the string 'Chris' */
+var filter = new tizen.AttributeFilter('firstName', 'CONTAINS', 'Chris');
+try
+{
+&nbsp;&nbsp;&nbsp;addressbook.find(contactsFoundCB, errorCB, filter);
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log('The following error occurred while finding: ' + err.name);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="Contact::clone">
@@ -4708,17 +5012,17 @@ set to <var>null</var> and will be detached from any address book.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">  // Gets the default address book.
-  var addressbook = tizen.contact.getDefaultAddressBook();
-
-  var bob = new tizen.Contact();
-  bob.name = new tizen.ContactName({firstName:'Bob',
-                                    lastName:'Smith'});
-  addressbook.add(bob);
-  var alice = bob.clone();
-  contact.name.firstName = "Alice"; // Bob's wife
-  addressbook.add(alice);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Gets the default address book */
+var addressbook = tizen.contact.getDefaultAddressBook();
+
+var bob = new tizen.Contact();
+bob.name = new tizen.ContactName({firstName:'Bob', lastName:'Smith'});
+addressbook.add(bob);
+var alice = bob.clone();
+contact.name.firstName = "Alice"; /* Bob's wife */
+addressbook.add(alice);
+</pre>
 </div>
 </dd>
 </dl>
@@ -4753,17 +5057,18 @@ This interface is used by other APIs to uniquely and globally identify contacts.
 <dl>
 <pre class="webidl prettyprint">ContactRef(<a href="#AddressBookId">AddressBookId</a> addressBookId, <a href="#ContactId">ContactId</a> contactId);</pre>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">   // Gets the default address book.
-   var addressbook = tizen.contact.getDefaultAddressBook();
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Gets the default address book */
+var addressbook = tizen.contact.getDefaultAddressBook();
 
-   // Creates a new contact:
-   var eve = new tizen.Contact();
-   eve.name = new tizen.ContactName({firstName:'Eve', lastName:'Green'});
-   addressbook.add(eve);
+/* Creates a new contact */
+var eve = new tizen.Contact();
+eve.name = new tizen.ContactName({firstName:'Eve', lastName:'Green'});
+addressbook.add(eve);
 
-   // Creates a reference to this contact:
-   var refToEve = new tizen.ContactRef(addressbook.id, eve.id);
- </pre>
+/* Creates a reference to this contact */
+var refToEve = new tizen.ContactRef(addressbook.id, eve.id);
+</pre>
 </div>
 </dl>
 </div>
@@ -4853,9 +5158,12 @@ See the ContactName interface for more information about the members.
 <dl>
 <pre class="webidl prettyprint">ContactName(optional <a href="#ContactNameInit">ContactNameInit</a>? nameInitDict);</pre>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">   var myContactName = new tizen.ContactName(
-      {prefix : "Mr.", firstName : "John", lastName : "Doe"});
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var myContactName = new tizen.ContactName(
+{
+&nbsp;&nbsp;&nbsp;prefix: "Mr.", firstName: "John", lastName: "Doe"
+});
+</pre>
 </div>
 </dl>
 </div>
@@ -4877,8 +5185,9 @@ By default, this attribute is initialized to
  1.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">   contact.name.prefix = "Dr.";
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+contact.name.prefix = "Dr.";
+</pre>
 </div>
 </li>
 <li class="attribute" id="ContactName::suffix">
@@ -4896,8 +5205,9 @@ By default, this attribute is initialized to
  2.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">   contact.name.suffix = "Jr.";
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+contact.name.suffix = "Jr.";
+</pre>
 </div>
 </li>
 <li class="attribute" id="ContactName::firstName">
@@ -4915,8 +5225,9 @@ By default, this attribute is initialized to
  1.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">   contact.name.firstName = 'Douglas';
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+contact.name.firstName = 'Douglas';
+</pre>
 </div>
 </li>
 <li class="attribute" id="ContactName::middleName">
@@ -4934,8 +5245,9 @@ By default, this attribute is initialized to
  1.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">   contact.name.middleName = 'Glenn';
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+contact.name.middleName = 'Glenn';
+</pre>
 </div>
 </li>
 <li class="attribute" id="ContactName::lastName">
@@ -4953,8 +5265,9 @@ By default, this attribute is initialized to
  1.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">   contact.name.lastName = 'Colvin';
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+contact.name.lastName = 'Colvin';
+</pre>
 </div>
 </li>
 <li class="attribute" id="ContactName::nicknames">
@@ -4980,8 +5293,9 @@ See RFC 2426, Section 3.1.3.
  1.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">   contact.name.nickNames = ['Dee Dee'];
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+contact.name.nickNames = ['Dee Dee'];
+</pre>
 </div>
 </li>
 <li class="attribute" id="ContactName::phoneticFirstName">
@@ -5120,8 +5434,9 @@ For more details, see RFC 2426, Section 3.5.
           </p>
          </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var organization = new tizen.ContactOrganization({name: "Nice Company", role: "SW Engineer"});
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var organization = new tizen.ContactOrganization({name: "Nice Company", role: "SW Engineer"});
+</pre>
 </div>
 <div class="constructors">
 <h4 id="ContactOrganization::constructor">Constructors</h4>
@@ -5233,10 +5548,11 @@ For more details, see RFC 2426, Section 3.6.8.
           </p>
          </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">  var contactInit = {}
-  var blog = new tizen.ContactWebSite('http://www.domain.com', 'BLOG');
-  contactInit.urls = [blog];
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var contactInit = {}
+var blog = new tizen.ContactWebSite('http://www.domain.com', 'BLOG');
+contactInit.urls = [blog];
+</pre>
 </div>
 <div class="constructors">
 <h4 id="ContactWebSite::constructor">Constructors</h4>
@@ -5297,10 +5613,11 @@ By default, this attribute is set to HOMEPAGE.
  1.0
           </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">  var contactInit = {}
-  var marriage_anniv = new tizen.ContactAnniversary(new Date(1976, 11, 2), 'Marriage');
-  contactInit.anniversaries = [marriage_anniv];
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var contactInit = {}
+var marriage_anniv = new tizen.ContactAnniversary(new Date(1976, 11, 2), 'Marriage');
+contactInit.anniversaries = [marriage_anniv];
+</pre>
 </div>
 <div class="constructors">
 <h4 id="ContactAnniversary::constructor">Constructors</h4>
@@ -5402,12 +5719,16 @@ For more details, see RFC 2426, Section 3.2.1.
           </p>
          </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">   var contactInit = {};
-   var contactAddress = new tizen.ContactAddress({streetAddress:'Gran Via, 32',
-                                                  postalCode:'50013', city:'Zaragoza',
-                                                 country:'ES', types:['WORK']});
-   contactInit.contactAddress = [contactAddress];
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var contactInit = {};
+var contactAddress = new tizen.ContactAddress(
+{
+&nbsp;&nbsp;&nbsp;streetAddress:'Gran Via, 32',
+&nbsp;&nbsp;&nbsp;postalCode:'50013', city:'Zaragoza',
+&nbsp;&nbsp;&nbsp;country:'ES', types:['WORK']
+});
+contactInit.contactAddress = [contactAddress];
+</pre>
 </div>
 <div class="constructors">
 <h4 id="ContactAddress::constructor">Constructors</h4>
@@ -5587,10 +5908,11 @@ For more details, see RFC 2426, Section 3.3.1
           </p>
          </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">   var contactInit = {};
-   var phoneNumber = new tizen.ContactPhoneNumber('123456789', ['WORK','VOICE'], true);
-   contactInit.phoneNumbers = [phoneNumber];
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var contactInit = {};
+var phoneNumber = new tizen.ContactPhoneNumber('123456789', ['WORK','VOICE'], true);
+contactInit.phoneNumbers = [phoneNumber];
+</pre>
 </div>
 <div class="constructors">
 <h4 id="ContactPhoneNumber::constructor">Constructors</h4>
@@ -5729,10 +6051,11 @@ For more details, see RFC 2426, Section 3.3.2.
           </p>
          </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">  var contactInit = {};
-  var email = new tizen.ContactEmailAddress('user@domain.com', ['WORK']);
-  contactInit.emails = [email];
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var contactInit = {};
+var email = new tizen.ContactEmailAddress('user@domain.com', ['WORK']);
+contactInit.emails = [email];
+</pre>
 </div>
 <div class="constructors">
 <h4 id="ContactEmailAddress::constructor">Constructors</h4>
@@ -5845,10 +6168,11 @@ By default, this attribute is initialized to <var>null</var>.
  2.3
           </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">  var contactInit = {};
-  var messenger = new tizen.ContactInstantMessenger('user@domain.com', 'GOOGLE');
-  contactInit.messengers = [messenger];
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var contactInit = {};
+var messenger = new tizen.ContactInstantMessenger('user@domain.com', 'GOOGLE');
+contactInit.messengers = [messenger];
+</pre>
 </div>
 <div class="constructors">
 <h4 id="ContactInstantMessenger::constructor">Constructors</h4>
@@ -5922,41 +6246,50 @@ By default, this attribute is initialized to <var>null</var>.
  2.0
           </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">  var addressbook = null;
-  var group = null;
-  var ringtones = null;
-
-  // Defines the error callback for all the asynchronous calls.
-  function errorCB(err) {
-    console.log( 'The following error occurred: ' +  err.name);
-  }
-
-  // Defines the success callback for retrieving all the
-  // Address Books.
-  function addressBooksCB(addressbooks) {
-    addressbook = addressbooks[0];
-    try {
-      group = new tizen.ContactGroup('Family', ringtones.resolve('ring.mp3').toURI());
-    } catch (err) {
-      console.log( 'The following error occurred while converting: ' +  err.name);
-    }
-
-    try {
-      if (group) {
-        addressbook.addGroup(group);
-        console.log('Group was added with ID ' + group.id);
-      }
-    } catch (err) {
-      console.log( 'The following error occurred while adding: ' +  err.name);
-    }
-  }
-
-  tizen.filesystem.resolve("ringtones", function(dir) {
-    ringtones = dir;
-    tizen.contact.getAddressBooks(addressBooksCB, errorCB);
-  });
-
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var addressbook = null;
+var group = null;
+var ringtones = null;
+
+/* Defines the error callback for all the asynchronous calls */
+function errorCB(err)
+{
+&nbsp;&nbsp;&nbsp;console.log('The following error occurred: ' + err.name);
+}
+
+/* Defines the success callback for retrieving all the Address Books */
+function addressBooksCB(addressbooks)
+{
+&nbsp;&nbsp;&nbsp;addressbook = addressbooks[0];
+&nbsp;&nbsp;&nbsp;try
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;group = new tizen.ContactGroup('Family', ringtones.resolve('ring.mp3').toURI());
+&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;catch (err)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('The following error occurred while converting: ' + err.name);
+&nbsp;&nbsp;&nbsp;}
+
+&nbsp;&nbsp;&nbsp;try
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (group)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;addressbook.addGroup(group);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('Group was added with ID ' + group.id);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;catch (err)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('The following error occurred while adding: ' + err.name);
+&nbsp;&nbsp;&nbsp;}
+}
+
+tizen.filesystem.resolve("ringtones", function(dir)
+{
+&nbsp;&nbsp;&nbsp;ringtones = dir;
+&nbsp;&nbsp;&nbsp;tizen.contact.getAddressBooks(addressBooksCB, errorCB);
+});
+</pre>
 </div>
 <div class="constructors">
 <h4 id="ContactGroup::constructor">Constructors</h4>
@@ -6080,11 +6413,12 @@ See code example below.
           </p>
          </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">  var contactInit = {};
-  // Contact is brother of 'Anna'
-  var relationship = new tizen.ContactRelationship('Anna', 'BROTHER');
-  contactInit.relationships = [relationship];
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var contactInit = {};
+/* Contact is brother of 'Anna' */
+var relationship = new tizen.ContactRelationship('Anna', 'BROTHER');
+contactInit.relationships = [relationship];
+</pre>
 </div>
 <div class="constructors">
 <h4 id="ContactRelationship::constructor">Constructors</h4>
@@ -6205,17 +6539,19 @@ See code example below.
           </p>
          </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var name = new tizen.ContactName({ firstName: 'Anna' });
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var name = new tizen.ContactName({firstName: 'Anna'});
 
- var contact_extension1 = new tizen.ContactExtension({ data1: 20, data2: 'Place of birth: ElblÄ…g' });
- var contact_extension2 = new tizen.ContactExtension({ data3: 'Favourite color: green' });
- var contact1 = new tizen.Contact({
-   name: name,
-   extensions: [ contact_extension1, contact_extension2 ]
- });
+var contact_extension1 = new tizen.ContactExtension({data1: 20, data2: 'Place of birth: ElblÄ…g'});
+var contact_extension2 = new tizen.ContactExtension({data3: 'Favourite color: green'});
+var contact1 = new tizen.Contact(
+{
+&nbsp;&nbsp;&nbsp;name: name,
+&nbsp;&nbsp;&nbsp;extensions: [contact_extension1, contact_extension2]
+});
 
- console.log(contact1.extensions[1].data3);   // It shows: 'Favourite color: green'
- </pre>
+console.log(contact1.extensions[1].data3); /* It shows: 'Favourite color: green' */
+</pre>
 </div>
 <div class="constructors">
 <h4 id="ContactExtension::constructor">Constructors</h4>
@@ -6381,25 +6717,32 @@ get or save a list of persons.
         </ul>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">   function onerror(err) {
-     console.log("The following error occurred " + err.name);
-   }
-
-   function onsuccess(persons) {
-     var p;
-
-     // log each found person's name to the console:
-     for (p = 0; p &lt; persons.length; p += 1) {
-       console.log("Name: " + persons[p].displayName);
-     }
-   }
-
-   try {
-     tizen.contact.find(onsuccess, onerror);
-   } catch (err) {
-     console.log("The following error occurred while finding: " + err.name);
-   }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function onerror(err)
+{
+&nbsp;&nbsp;&nbsp;console.log("The following error occurred " + err.name);
+}
+
+function onsuccess(persons)
+{
+&nbsp;&nbsp;&nbsp;var p;
+
+&nbsp;&nbsp;&nbsp;/* Log each found person's name to the console */
+&nbsp;&nbsp;&nbsp;for (p = 0; p &lt; persons.length; p += 1)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Name: " + persons[p].displayName);
+&nbsp;&nbsp;&nbsp;}
+}
+
+try
+{
+&nbsp;&nbsp;&nbsp;tizen.contact.find(onsuccess, onerror);
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log("The following error occurred while finding: " + err.name);
+}
+</pre>
 </div>
 </dd>
 </dl>
@@ -6500,18 +6843,21 @@ get address books.
         </ul>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">   function errorCB(err) {
-     console.log("An error occurred: " + err.name);
-   }
-
-   // A callback invoked on successful retrieval of all the Address Books.
-   function addressBooksCB(addressBooks) {
-     console.log(addressBooks.length + " address books available.");
-   }
-
-   // Gets a list of available address books.
-   tizen.contact.getAddressBooks(addressBooksCB, errorCB);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function errorCB(err)
+{
+&nbsp;&nbsp;&nbsp;console.log("An error occurred: " + err.name);
+}
+
+/* Callback invoked on successful retrieval of all the Address Books */
+function addressBooksCB(addressBooks)
+{
+&nbsp;&nbsp;&nbsp;console.log(addressBooks.length + " address books available.");
+}
+
+/* Gets a list of available address books */
+tizen.contact.getAddressBooks(addressBooksCB, errorCB);
+</pre>
 </div>
 </dd>
 </dl>
@@ -6566,36 +6912,49 @@ book change occurs (contact addition/update/deletion).
         </ul>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">   var watcherId = 0; // watcher identifier
-   var addressbook = tizen.contact.getDefaultAddressBook();
-
-   var watcher = {
-     oncontactsadded: function(contacts) {
-       console.log(contacts.length + " contacts were added");
-     },
-     oncontactsupdated: function(contacts) {
-       console.log(contacts.length + " contacts were updated");
-     },
-     oncontactsremoved: function(ids) {
-       console.log(ids.length + " contacts were removed");
-     }
-   };
-
-   // Registers to be notified when the address book changes.
-   watcherId = addressbook.addChangeListener(watcher);
-
-   // Adds a new contact to invoke an oncontactsadded call:
-   try {
-     var contact = new tizen.Contact({name : new tizen.ContactName({
-                                         firstName : 'John', lastName : 'Doe',
-                                         nicknames : ['Johnny']}),
-                                      emails : [new tizen.ContactEmailAddress('john@doe.com')],
-                                      phoneNumbers : [new tizen.ContactPhoneNumber('789456123')]});
-     addressbook.add(contact);
-   } catch (err) {
-     console.log('An error occurred while adding a contact: ' + err.name + ", " + err.message);
-   }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var watcherId = 0; /* Watcher identifier */
+var addressbook = tizen.contact.getDefaultAddressBook();
+
+var watcher =
+{
+&nbsp;&nbsp;&nbsp;oncontactsadded: function(contacts)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(contacts.length + " contacts were added");
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;oncontactsupdated: function(contacts)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(contacts.length + " contacts were updated");
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;oncontactsremoved: function(ids)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(ids.length + " contacts were removed");
+&nbsp;&nbsp;&nbsp;}
+};
+
+/* Registers to be notified when the address book changes */
+watcherId = addressbook.addChangeListener(watcher);
+
+/* Adds a new contact to invoke an oncontactsadded call */
+try
+{
+&nbsp;&nbsp;&nbsp;var contact = new tizen.Contact(
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;name: new tizen.ContactName(
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;firstName: 'John',
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;lastName: 'Doe',
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;nicknames: ['Johnny']
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}),
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;emails: [new tizen.ContactEmailAddress('john@doe.com')],
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;phoneNumbers: [new tizen.ContactPhoneNumber('789456123')]});
+&nbsp;&nbsp;&nbsp;addressbook.add(contact);
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log('An error occurred while adding a contact: ' + err.name + ", " + err.message);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="AddressBookChangeCallback::oncontactsupdated">
@@ -6621,46 +6980,59 @@ book change occurs (contact addition/update/deletion).
         </ul>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">   var watcherId = 0; // watcher identifier
-   var addressbook = tizen.contact.getDefaultAddressBook();
-
-   var watcher = {
-     oncontactsadded: function(contacts) {
-       console.log(contacts.length + " contacts were added");
-     },
-     oncontactsupdated: function(contacts) {
-       console.log(contacts.length + " contacts were updated");
-     },
-     oncontactsremoved: function(ids) {
-       console.log(ids.length + " contacts were removed");
-     }
-   };
-
-   // Registers to be notified when the address book changes.
-   watcherId = addressbook.addChangeListener(watcher);
-
-   // Updates a contact to invoke an oncontactsupdated call:
-   function errorCB(error) {
-     console.log(error.name + ": " + error.message);
-   }
-
-   function contactsFoundCB(contacts) {
-     contacts[0].name.firstName = 'Stanley';
-     try {
-       addressbook.update(contacts[0]);
-       console.log('Successfully updated.');
-     } catch (error) {
-       console.log(error.name + ": " + error.message);
-     }
-   }
-
-   var filter = new tizen.AttributeFilter('name.lastName', 'EXACTLY', 'Doe');
-   try {
-     addressbook.find(contactsFoundCB, errorCB, filter);
-   } catch (error) {
-     console.log(error.name + ": " + error.message);
-   }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var watcherId = 0; /* Watcher identifier */
+var addressbook = tizen.contact.getDefaultAddressBook();
+
+var watcher =
+{
+&nbsp;&nbsp;&nbsp;oncontactsadded: function(contacts)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(contacts.length + " contacts were added");
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;oncontactsupdated: function(contacts)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(contacts.length + " contacts were updated");
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;oncontactsremoved: function(ids)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(ids.length + " contacts were removed");
+&nbsp;&nbsp;&nbsp;}
+};
+
+/* Registers to be notified when the address book changes */
+watcherId = addressbook.addChangeListener(watcher);
+
+/* Updates a contact to invoke an oncontactsupdated call */
+function errorCB(error)
+{
+&nbsp;&nbsp;&nbsp;console.log(error.name + ": " + error.message);
+}
+
+function contactsFoundCB(contacts)
+{
+&nbsp;&nbsp;&nbsp;contacts[0].name.firstName = 'Stanley';
+&nbsp;&nbsp;&nbsp;try
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;addressbook.update(contacts[0]);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('Successfully updated.');
+&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;catch (error)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(error.name + ": " + error.message);
+&nbsp;&nbsp;&nbsp;}
+}
+
+var filter = new tizen.AttributeFilter('name.lastName', 'EXACTLY', 'Doe');
+try
+{
+&nbsp;&nbsp;&nbsp;addressbook.find(contactsFoundCB, errorCB, filter);
+}
+catch (error)
+{
+&nbsp;&nbsp;&nbsp;console.log(error.name + ": " + error.message);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="AddressBookChangeCallback::oncontactsremoved">
@@ -6686,50 +7058,65 @@ book change occurs (contact addition/update/deletion).
         </ul>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">   var watcherId = 0; // watcher identifier
-   var addressbook = tizen.contact.getDefaultAddressBook();
-
-   var watcher = {
-     oncontactsadded: function(contacts) {
-       console.log(contacts.length + " contacts were added");
-     },
-     oncontactsupdated: function(contacts) {
-       console.log(contacts.length + " contacts were updated");
-     },
-     oncontactsremoved: function(ids) {
-       console.log(ids.length + " contacts were removed");
-     }
-   };
-
-   // Registers to be notified when the address book changes.
-   watcherId = addressbook.addChangeListener(watcher);
-
-   // Removes a first contact whose name is 'Doe'
-   // to invoke oncontactsremoved call:
-   function onErrorCB(err) {
-     console.log('An error occurred: ' + err.name);
-   }
-
-   function onContactsFoundCB(contacts) {
-     if(contacts.length &gt; 0) {
-       try {
-         addressbook.remove(contacts[0].id);
-         console.log('First contact has been removed.');
-       } catch (err) {
-         console.log('An error occurred while removing: ' + err.name);
-       }
-     } else {
-       console.log('No contacts to delete.');
-     }
-   }
-
-   var filter = new tizen.AttributeFilter('name.lastName', 'EXACTLY', 'Doe');
-   try {
-     addressbook.find(onContactsFoundCB, onErrorCB, filter);
-   } catch (err) {
-     console.log('An error occured while finding: ' + err.name);
-   }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var watcherId = 0; /* Watcher identifier */
+var addressbook = tizen.contact.getDefaultAddressBook();
+
+var watcher =
+{
+&nbsp;&nbsp;&nbsp;oncontactsadded: function(contacts)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(contacts.length + " contacts were added");
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;oncontactsupdated: function(contacts)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(contacts.length + " contacts were updated");
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;oncontactsremoved: function(ids)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(ids.length + " contacts were removed");
+&nbsp;&nbsp;&nbsp;}
+};
+
+/* Registers to be notified when the address book changes */
+watcherId = addressbook.addChangeListener(watcher);
+
+/* Removes a first contact whose name is 'Doe' to invoke oncontactsremoved call */
+function onErrorCB(err)
+{
+&nbsp;&nbsp;&nbsp;console.log('An error occurred: ' + err.name);
+}
+
+function onContactsFoundCB(contacts)
+{
+&nbsp;&nbsp;&nbsp;if (contacts.length &gt; 0)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;try
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;addressbook.remove(contacts[0].id);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('First contact has been removed.');
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;catch (err)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('An error occurred while removing: ' + err.name);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;else
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('No contacts to delete.');
+&nbsp;&nbsp;&nbsp;}
+}
+
+var filter = new tizen.AttributeFilter('name.lastName', 'EXACTLY', 'Doe');
+try
+{
+&nbsp;&nbsp;&nbsp;addressbook.find(onContactsFoundCB, onErrorCB, filter);
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log('An error occurred while finding: ' + err.name);
+}
+</pre>
 </div>
 </dd>
 </dl>
@@ -6783,23 +7170,28 @@ list change occurs (person addition/update/deletion).
         </ul>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">   var watcherId = 0; // watcher identifier
-
-   var watcher = {
-     onpersonsadded: function(persons) {
-       console.log(persons.length + " persons were added");
-     },
-     onpersonsupdated: function(persons) {
-       console.log(persons.length + " persons were updated");
-     },
-     onpersonsremoved: function(ids) {
-       console.log(ids.length + " persons were deleted");
-     }
-   };
-
-   // Registers to be notified when the address book changes.
-   watcherId = tizen.contact.addChangeListener(watcher);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var watcherId = 0; /* Watcher identifier */
+
+var watcher =
+{
+&nbsp;&nbsp;&nbsp;onpersonsadded: function(persons)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(persons.length + " persons were added");
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;onpersonsupdated: function(persons)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(persons.length + " persons were updated");
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;onpersonsremoved: function(ids)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(ids.length + " persons were deleted");
+&nbsp;&nbsp;&nbsp;}
+};
+
+/* Registers to be notified when the address book changes */
+watcherId = tizen.contact.addChangeListener(watcher);
+</pre>
 </div>
 </dd>
 <dt class="method" id="PersonsChangeCallback::onpersonsupdated">
@@ -6825,23 +7217,28 @@ list change occurs (person addition/update/deletion).
         </ul>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">   var watcherId = 0; // watcher identifier
-
-   var watcher = {
-     onpersonsadded: function(persons) {
-       console.log(persons.length + " persons were added");
-     },
-     onpersonsupdated: function(persons) {
-       console.log(persons.length + " persons were updated");
-     },
-     onpersonsremoved: function(ids) {
-       console.log(ids.length + " persons were deleted");
-     }
-   };
-
-   // Registers to be notified when the address book changes.
-   watcherId = tizen.contact.addChangeListener(watcher);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var watcherId = 0; /* Watcher identifier */
+
+var watcher =
+{
+&nbsp;&nbsp;&nbsp;onpersonsadded: function(persons)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(persons.length + " persons were added");
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;onpersonsupdated: function(persons)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(persons.length + " persons were updated");
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;onpersonsremoved: function(ids)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(ids.length + " persons were deleted");
+&nbsp;&nbsp;&nbsp;}
+};
+
+/* Registers to be notified when the address book changes */
+watcherId = tizen.contact.addChangeListener(watcher);
+</pre>
 </div>
 </dd>
 <dt class="method" id="PersonsChangeCallback::onpersonsremoved">
@@ -6867,23 +7264,28 @@ list change occurs (person addition/update/deletion).
         </ul>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">   var watcherId = 0; // watcher identifier
-
-   var watcher = {
-     onpersonsadded: function(persons) {
-       console.log(persons.length + " persons were added");
-     },
-     onpersonsupdated: function(persons) {
-       console.log(persons.length + " persons were updated");
-     },
-     onpersonsremoved: function(ids) {
-       console.log(ids.length + " persons were deleted");
-     }
-   };
-
-   // Registers to be notified when the address book changes.
-   watcherId = tizen.contact.addChangeListener(watcher);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var watcherId = 0; /* Watcher identifier */
+
+var watcher =
+{
+&nbsp;&nbsp;&nbsp;onpersonsadded: function(persons)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(persons.length + " persons were added");
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;onpersonsupdated: function(persons)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(persons.length + " persons were updated");
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;onpersonsremoved: function(ids)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(ids.length + " persons were deleted");
+&nbsp;&nbsp;&nbsp;}
+};
+
+/* Registers to be notified when the address book changes */
+watcherId = tizen.contact.addChangeListener(watcher);
+</pre>
 </div>
 </dd>
 </dl>
index b3381c4..421d041 100644 (file)
@@ -450,13 +450,15 @@ contain an invalid value.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Assume the content is a Content object as a result of find method.
- // Check the description is editable, and then set a description.
- if (content.editableAttributes.indexOf("description") &gt;= 0) {
-     content.description = "Sample content";
- }
- tizen.content.update(content);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Assume the content is a Content object as a result of find method */
+/* Check the description is editable, and then set a description */
+if (content.editableAttributes.indexOf("description") &gt;= 0)
+{
+&nbsp;&nbsp;&nbsp;content.description = "Sample content";
+}
+tizen.content.update(content);
+</pre>
 </div>
 </dd>
 <dt class="method" id="ContentManager::updateBatch">
@@ -531,23 +533,27 @@ is not compatible with the expected type for that parameter.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // The following example increases rating of an content by 1
-
- function errorCB(err) {
-     console.log( 'The following error occurred: ' +  err.name);
- }
-
- function successCB() {
-     console.log('Attributes set successfully');
- }
-
- // Assume the content is a Content object as a result of find method.
- // Check the rating is editable, and then increase by 1.
- if (content.editableAttributes.indexOf("rating") &gt;= 0) {
-     content.rating++;
- }
- tizen.content.updateBatch([content], successCB, errorCB);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Following example increases rating of a content by 1 */
+
+function errorCB(err)
+{
+&nbsp;&nbsp;&nbsp;console.log('The following error occurred: ' +  err.name);
+}
+
+function successCB()
+{
+&nbsp;&nbsp;&nbsp;console.log('Attributes set successfully');
+}
+
+/* Assume the content is a Content object as a result of find method */
+/* Check the rating is editable, and then increase by 1 */
+if (content.editableAttributes.indexOf("rating") &gt;= 0)
+{
+&nbsp;&nbsp;&nbsp;content.rating++;
+}
+tizen.content.updateBatch([content], successCB, errorCB);
+</pre>
 </div>
 </dd>
 <dt class="method" id="ContentManager::getDirectories">
@@ -598,21 +604,26 @@ is not compatible with the expected type for that parameter.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // The following example retrieves content directories in the storage.
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Following example retrieves content directories in the storage */
 
- function errorCB(err) {
-     console.log( 'The following error occurred: ' +  err.name);
- }
+function errorCB(err)
+{
+&nbsp;&nbsp;&nbsp;console.log('The following error occurred: ' +  err.name);
+}
 
- function printDirectory(directory, index, directories) {
-     console.log('directoryURI: ' + directory.directoryURI + ' Title: ' + directory.title);
- }
- function getDirectoriesCB(directories) {
-     directories.forEach(printDirectory);
- }
+function printDirectory(directory, index, directories)
+{
+&nbsp;&nbsp;&nbsp;console.log('directoryURI: ' + directory.directoryURI + ' Title: ' + directory.title);
+}
 
- tizen.content.getDirectories(getDirectoriesCB, errorCB);
- </pre>
+function getDirectoriesCB(directories)
+{
+&nbsp;&nbsp;&nbsp;directories.forEach(printDirectory);
+}
+
+tizen.content.getDirectories(getDirectoriesCB, errorCB);
+</pre>
 </div>
 </dd>
 <dt class="method" id="ContentManager::find">
@@ -699,35 +710,40 @@ is not compatible with the expected type for that parameter.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // The following example retrieves all songs from the album "The Joshua Tree", by artist "U2", ordered by the name.
- var count = 100;
- var offset = 0;
- var sortMode = new tizen.SortMode("name", "ASC");
- var artistFilter = new tizen.AttributeFilter("artists", "EXACTLY", "U2");
- var albumFilter = new tizen.AttributeFilter("album", "EXACTLY", "The Joshua Tree");
- var filter = new tizen.CompositeFilter("INTERSECTION", [albumFilter, artistFilter]);
-
- function errorCB(err) {
-     console.log( 'The following error occurred: ' +  err.name);
- }
-
- function printContent(content, index, contents) {
-     console.log('Name: ' + content.name + ' Title: ' + content.title + 'URL: ' + content.contentURI + 'MIME: ' + content.mimeType);
- }
-
- function findCB(contents) {
-     console.log('The Joshua Tree by U2:');
-     contents.forEach(printContent);
-     // Increase the offset as much as the count and then find content again.
-     if (contents.length === count) {
-         offset += count;
-         tizen.content.find(findCB, errorCB, null, filter, sortMode, count, offset);
-     }
- }
-
- tizen.content.find(findCB, errorCB, null, filter, sortMode, count, offset);
-
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Following example retrieves all songs from the album "The Joshua Tree", by artist "U2", ordered by the name */
+var count = 100;
+var offset = 0;
+var sortMode = new tizen.SortMode("name", "ASC");
+var artistFilter = new tizen.AttributeFilter("artists", "EXACTLY", "U2");
+var albumFilter = new tizen.AttributeFilter("album", "EXACTLY", "The Joshua Tree");
+var filter = new tizen.CompositeFilter("INTERSECTION", [albumFilter, artistFilter]);
+
+function errorCB(err)
+{
+&nbsp;&nbsp;&nbsp;console.log('The following error occurred: ' +  err.name);
+}
+
+function printContent(content, index, contents)
+{
+&nbsp;&nbsp;&nbsp;console.log('Name: ' + content.name + ' Title: ' + content.title +
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'URL: ' + content.contentURI + 'MIME: ' + content.mimeType);
+}
+
+function findCB(contents)
+{
+&nbsp;&nbsp;&nbsp;console.log('The Joshua Tree by U2:');
+&nbsp;&nbsp;&nbsp;contents.forEach(printContent);
+&nbsp;&nbsp;&nbsp;/* Increase the offset as much as the count and then find content again */
+&nbsp;&nbsp;&nbsp;if (contents.length === count)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;offset += count;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tizen.content.find(findCB, errorCB, null, filter, sortMode, count, offset);
+&nbsp;&nbsp;&nbsp;}
+}
+
+tizen.content.find(findCB, errorCB, null, filter, sortMode, count, offset);
+</pre>
 </div>
 </dd>
 <dt class="method" id="ContentManager::scanFile">
@@ -799,21 +815,24 @@ contain an invalid value (e.g. given <em>contentURI</em> is an empty string).
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // The following example scan 'tizen.jpg' in media directory
-
- function errorCB(err) {
-     console.log( 'The following error occurred: ' +  err.name);
- }
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Following example scans 'tizen.jpg' in media directory */
 
- function successCB(path) {
-     console.log('scanning is completed');
- }
+function errorCB(err)
+{
+&nbsp;&nbsp;&nbsp;console.log('The following error occurred: ' +  err.name);
+}
 
- tizen.filesystem.resolve("images/tizen.jpg", function(imageFile) {
-     tizen.content.scanFile(imageFile.toURI(), successCB, errorCB);
- });
+function successCB(path)
+{
+&nbsp;&nbsp;&nbsp;console.log('scanning is completed');
+}
 
- </pre>
+tizen.filesystem.resolve("images/tizen.jpg", function(imageFile)
+{
+&nbsp;&nbsp;&nbsp;tizen.content.scanFile(imageFile.toURI(), successCB, errorCB);
+});
+</pre>
 </div>
 </dd>
 <dt class="method" id="ContentManager::scanDirectory">
@@ -893,21 +912,24 @@ contain an invalid value (e.g. given <em>contentDirURI</em> is an empty string).
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // The following example scans 'images' directory
-
- function errorCB(err) {
-     console.log( 'The following error occurred: ' +  err.name);
- }
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Following example scans 'images' directory */
 
- function successCB(path) {
-     console.log('scanning is completed');
- }
+function errorCB(err)
+{
+&nbsp;&nbsp;&nbsp;console.log('The following error occurred: ' +  err.name);
+}
 
- tizen.filesystem.resolve("images", function(directory) {
-     tizen.content.scanDirectory(directory.toURI(), true, successCB, errorCB);
- });
+function successCB(path)
+{
+&nbsp;&nbsp;&nbsp;console.log('scanning is completed');
+}
 
- </pre>
+tizen.filesystem.resolve("images", function(directory)
+{
+&nbsp;&nbsp;&nbsp;tizen.content.scanDirectory(directory.toURI(), true, successCB, errorCB);
+});
+</pre>
 </div>
 </dd>
 <dt class="method" id="ContentManager::cancelScanDirectory">
@@ -962,9 +984,9 @@ contain an invalid value (e.g. given <em>contentDirURI</em> is an empty string).
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> tizen.content.cancelScanDirectory(directory.toURI());
-
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+tizen.content.cancelScanDirectory(directory.toURI());
+</pre>
 </div>
 </dd>
 <dt class="method" id="ContentManager::addChangeListener">
@@ -1006,32 +1028,40 @@ contain an invalid value (e.g. given <em>contentDirURI</em> is an empty string).
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var listener = {
-    oncontentadded: function(content) {
-        console.log(content.contentURI + ' content is added');
-    },
-    oncontentupdated: function(content) {
-        console.log(content.contentURI + ' content is updated');
-    },
-    oncontentremoved: function(id) {
-        console.log(id + ' is removed');
-    },
-    oncontentdiradded: function(contentDir) {
-        console.log(contentDir.directoryURI + ' content directory is added');
-    },
-    oncontentdirupdated: function(contentDir) {
-        console.log(contentDir.directoryURI + ' content directory is updated');
-    },
-    oncontentdirremoved: function(id) {
-        console.log(id + ' directory is removed');
-    }
- };
-
- // Adds the listener
- var listenerId = tizen.content.addChangeListener(listener);
-
- console.log('Listener ID: ' + listenerId);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var listener =
+{
+&nbsp;&nbsp;&nbsp;oncontentadded: function(content)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(content.contentURI + ' content is added');
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;oncontentupdated: function(content) 
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(content.contentURI + ' content is updated');
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;oncontentremoved: function(id)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(id + ' is removed');
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;oncontentdiradded: function(contentDir)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(contentDir.directoryURI + ' content directory is added');
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;oncontentdirupdated: function(contentDir)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(contentDir.directoryURI + ' content directory is updated');
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;oncontentdirremoved: function(id)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(id + ' directory is removed');
+&nbsp;&nbsp;&nbsp;}
+};
+
+/* Adds the listener */
+var listenerId = tizen.content.addChangeListener(listener);
+
+console.log('Listener ID: ' + listenerId);
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre> Listener ID: 1
@@ -1069,34 +1099,42 @@ contain an invalid value (e.g. given <em>contentDirURI</em> is an empty string).
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var listener = {
-    oncontentadded: function(content) {
-        console.log(content.contentURI + ' content is added');
-    },
-    oncontentupdated: function(content) {
-        console.log(content.contentURI + ' content is updated');
-    },
-    oncontentremoved: function(id) {
-        console.log(id + ' is removed');
-    },
-    oncontentdiradded: function(contentDir) {
-        console.log(contentDir.directoryURI + ' content directory is added');
-    },
-    oncontentdirupdated: function(contentDir) {
-        console.log(contentDir.directoryURI + ' content directory is updated');
-    },
-    oncontentdirremoved: function(id) {
-        console.log(id + ' directory is removed');
-    }
- };
-
- var listenerId = tizen.content.addChangeListener(listener);
-
- // Do some job here and when the listener is not needed anymore remove it
-
- // Removes the listener
- tizen.content.removeChangeListener(listenerId);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var listener =
+{
+&nbsp;&nbsp;&nbsp;oncontentadded: function(content)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(content.contentURI + ' content is added');
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;oncontentupdated: function(content)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(content.contentURI + ' content is updated');
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;oncontentremoved: function(id)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(id + ' is removed');
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;oncontentdiradded: function(contentDir)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(contentDir.directoryURI + ' content directory is added');
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;oncontentdirupdated: function(contentDir)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(contentDir.directoryURI + ' content directory is updated');
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;oncontentdirremoved: function(id)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(id + ' directory is removed');
+&nbsp;&nbsp;&nbsp;}
+};
+
+var listenerId = tizen.content.addChangeListener(listener);
+
+/* Do some job here and when the listener is not needed anymore remove it */
+
+/* Removes the listener */
+tizen.content.removeChangeListener(listenerId);
+</pre>
 </div>
 </dd>
 <dt class="deprecated method" id="ContentManager::setChangeListener">
@@ -1152,31 +1190,38 @@ developers to add a listener and get notified when content is added, removed or
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var listener= {
-    oncontentadded: function(content) {
-        console.log(content.contentURI + ' content is added');
-    },
-    oncontentupdated: function(content) {
-        console.log(content.contentURI + ' content is updated');
-    },
-    oncontentremoved: function(id) {
-        console.log(id + ' is removed');
-    },
-    oncontentdiradded: function(contentDir) {
-        console.log(contentDir.directoryURI + ' content directory is added');
-    },
-    oncontentdirupdated: function(contentDir) {
-        console.log(contentDir.directoryURI + ' content directory is updated');
-    },
-    oncontentdirremoved: function(id) {
-        console.log(id + ' directory is removed');
-    }
- };
-
- // Registers to be notified when the content changes
- tizen.content.setChangeListener(listener);
-
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var listener =
+{
+&nbsp;&nbsp;&nbsp;oncontentadded: function(content)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(content.contentURI + ' content is added');
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;oncontentupdated: function(content)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(content.contentURI + ' content is updated');
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;oncontentremoved: function(id)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(id + ' is removed');
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;oncontentdiradded: function(contentDir)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(contentDir.directoryURI + ' content directory is added');
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;oncontentdirupdated: function(contentDir)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(contentDir.directoryURI + ' content directory is updated');
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;oncontentdirremoved: function(id)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(id + ' directory is removed');
+&nbsp;&nbsp;&nbsp;}
+};
+
+/* Registers to be notified when the content changes */
+tizen.content.setChangeListener(listener);
+</pre>
 </div>
 </dd>
 <dt class="deprecated method" id="ContentManager::unsetChangeListener">
@@ -1216,9 +1261,9 @@ developers to add a listener and get notified when content is added, removed or
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> tizen.content.unsetChangeListener();
-
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+tizen.content.unsetChangeListener();
+</pre>
 </div>
 </dd>
 <dt class="method" id="ContentManager::getPlaylists">
@@ -1277,24 +1322,28 @@ UnknownError: In case of any error              </li>
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var gPlaylists;
-
- function getPlaylistsFail(err) {
-     console.log("getPlaylists failed: " + err);
- }
-
- function getPlaylistsSuccess(playlists) {
-     var cur, i;
-     gPlaylists = playlists;
-     for(i = 0; i &lt; gPlaylists.length; ++i) {
-         cur = gPlaylists[i];
-         console.log("[" + i + "] name:" + cur.name + " num tracks:" +
-                 cur.numberOfTracks);
-     }
- }
-
- tizen.content.getPlaylists(getPlaylistsSuccess, getPlaylistsFail);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var gPlaylists;
+
+function getPlaylistsFail(err)
+{
+&nbsp;&nbsp;&nbsp;console.log("getPlaylists failed: " + err);
+}
+
+function getPlaylistsSuccess(playlists)
+{
+&nbsp;&nbsp;&nbsp;var cur, i;
+&nbsp;&nbsp;&nbsp;gPlaylists = playlists;
+&nbsp;&nbsp;&nbsp;for (i = 0; i &lt; gPlaylists.length; ++i)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cur = gPlaylists[i];
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("[" + i + "] name:" + cur.name + " num tracks:" +
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cur.numberOfTracks);
+&nbsp;&nbsp;&nbsp;}
+}
+
+tizen.content.getPlaylists(getPlaylistsSuccess, getPlaylistsFail);
+</pre>
 </div>
 </dd>
 <dt class="method" id="ContentManager::createPlaylist">
@@ -1363,50 +1412,58 @@ UnknownError: In case of any other error              </li>
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var gPlaylists;
- var gPlaylist;
-
- function getPlaylistsFail(err) {
-     console.log("getPlaylists failed: " + err.message);
- }
-
- function getPlaylistsSuccess(playlists) {
-     var cur, i;
-     gPlaylists = playlists;
-     for(i = 0; i &lt; gPlaylists.length; ++i) {
-         cur = gPlaylists[i];
-         console.log("[" + i + "] name:" + cur.name + " num tracks:" +
-                 cur.numberOfTracks);
-     }
- }
-
- function findSuccess(contents) {
-     if (contents.length &gt; 0) {
-         gPlaylist.add(contents[0]);
-     }
-
-     tizen.content.getPlaylists(getPlaylistsSuccess, getPlaylistsFail);
- }
-
- function findFail(err) {
-     console.log("find FAIL: " + err.message);
- }
-
- function createSuccess(playlist) {
-     console.log("create SUCCESS");
-
-     gPlaylist = playlist;
-     tizen.content.find(findSuccess, findFail, null,
-             new tizen.AttributeFilter("type", "EXACTLY", "AUDIO"));
- }
-
- function createFail(err) {
-     console.log("create FAIL: " + err.message);
- }
-
- tizen.content.createPlaylist("My new playlist", createSuccess, createFail);
-
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var gPlaylists;
+var gPlaylist;
+
+function getPlaylistsFail(err)
+{
+&nbsp;&nbsp;&nbsp;console.log("getPlaylists failed: " + err.message);
+}
+
+function getPlaylistsSuccess(playlists)
+{
+&nbsp;&nbsp;&nbsp;var cur, i;
+&nbsp;&nbsp;&nbsp;gPlaylists = playlists;
+&nbsp;&nbsp;&nbsp;for (i = 0; i &lt; gPlaylists.length; ++i)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cur = gPlaylists[i];
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("[" + i + "] name:" + cur.name + " num tracks:" +
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cur.numberOfTracks);
+&nbsp;&nbsp;&nbsp;}
+}
+
+function findSuccess(contents)
+{
+&nbsp;&nbsp;&nbsp;if (contents.length &gt; 0)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;gPlaylist.add(contents[0]);
+&nbsp;&nbsp;&nbsp;}
+
+&nbsp;&nbsp;&nbsp;tizen.content.getPlaylists(getPlaylistsSuccess, getPlaylistsFail);
+}
+
+function findFail(err)
+{
+&nbsp;&nbsp;&nbsp;console.log("find FAIL: " + err.message);
+}
+
+function createSuccess(playlist)
+{
+&nbsp;&nbsp;&nbsp;console.log("create SUCCESS");
+
+&nbsp;&nbsp;&nbsp;gPlaylist = playlist;
+&nbsp;&nbsp;&nbsp;tizen.content.find(findSuccess, findFail, null,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;new tizen.AttributeFilter("type", "EXACTLY", "AUDIO"));
+}
+
+function createFail(err)
+{
+&nbsp;&nbsp;&nbsp;console.log("create FAIL: " + err.message);
+}
+
+tizen.content.createPlaylist("My new playlist", createSuccess, createFail);
+</pre>
 </div>
 </dd>
 <dt class="method" id="ContentManager::removePlaylist">
@@ -1469,44 +1526,51 @@ UnknownError: In case of any error              </li>
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var gPlaylists;
-
- function removePlaylistSuccess() {
-     console.log("removePlaylist SUCCESS");
- }
-
- function removePlaylistFail(err) {
-     console.log("removePlaylist FAIL: " + err);
- }
-
- function getPlaylistsFail(err) {
-     console.log("getPlaylists failed: " + err);
- }
-
- function getPlaylistsSuccess(playlists) {
-     var cur, i;
-     gPlaylists = playlists;
-     for(i = 0; i &lt; gPlaylists.length; ++i) {
-         cur = gPlaylists[i];
-         console.log("[" + i + "] name:" + cur.name + " num tracks:" +
-                 cur.numberOfTracks);
-     }
-
-     if(gPlaylists.length &lt; 1) {
-         console.log("Please add at least 1 playlist");
-         return;
-     }
-
-     console.log("will remove playlist at index [0] name:"
-             + gPlaylists[0].name);
-
-     tizen.content.removePlaylist(gPlaylists[0].id, removePlaylistSuccess,
-             removePlaylistFail);
- }
-
- tizen.content.getPlaylists(getPlaylistsSuccess, getPlaylistsFail);
-
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var gPlaylists;
+
+function removePlaylistSuccess()
+{
+&nbsp;&nbsp;&nbsp;console.log("removePlaylist SUCCESS");
+}
+
+function removePlaylistFail(err)
+{
+&nbsp;&nbsp;&nbsp;console.log("removePlaylist FAIL: " + err);
+}
+
+function getPlaylistsFail(err)
+{
+&nbsp;&nbsp;&nbsp;console.log("getPlaylists failed: " + err);
+}
+
+function getPlaylistsSuccess(playlists)
+{
+&nbsp;&nbsp;&nbsp;var cur, i;
+&nbsp;&nbsp;&nbsp;gPlaylists = playlists;
+&nbsp;&nbsp;&nbsp;for (i = 0; i &lt; gPlaylists.length; ++i)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cur = gPlaylists[i];
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("[" + i + "] name:" + cur.name + " num tracks:" +
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cur.numberOfTracks);
+&nbsp;&nbsp;&nbsp;}
+
+&nbsp;&nbsp;&nbsp;if (gPlaylists.length &lt; 1)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Please add at least 1 playlist");
+
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return;
+&nbsp;&nbsp;&nbsp;}
+
+&nbsp;&nbsp;&nbsp;console.log("will remove playlist at index [0] name:"
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;+ gPlaylists[0].name);
+
+&nbsp;&nbsp;&nbsp;tizen.content.removePlaylist(gPlaylists[0].id, removePlaylistSuccess,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;removePlaylistFail);
+}
+
+tizen.content.getPlaylists(getPlaylistsSuccess, getPlaylistsFail);
+</pre>
 </div>
 </dd>
 <dt class="method" id="ContentManager::createThumbnail">
@@ -1571,18 +1635,22 @@ AbortError: In case of any error.              </li>
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function createCB(path) {
-   console.log("The thumbnail path is " + path);
- }
-
- function findCB(contents) {
-   if (contents.length &gt; 0) {
-     tizen.content.createThumbnail(contents[0], createCB);
-   }
- }
-
- tizen.content.find(findCB);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function createCB(path)
+{
+&nbsp;&nbsp;&nbsp;console.log("The thumbnail path is " + path);
+}
+
+function findCB(contents)
+{
+&nbsp;&nbsp;&nbsp;if (contents.length &gt; 0)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tizen.content.createThumbnail(contents[0], createCB);
+&nbsp;&nbsp;&nbsp;}
+}
+
+tizen.content.find(findCB);
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre> The thumbnail path is /home/owner/share/media/.thumb/phone/.jpg-bed1d5f494830f7a52e1217f1e924aff.jpg
@@ -2820,59 +2888,71 @@ UnknownError: In case of any error              </li>
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var gPlaylists, gItems, gCurPlaylist;
-
- function get2Fail(err) {
-     console.log("get items (after remove) failed: " + err);
- }
-
- function get2Success(items) {
-    console.log("Playlist items:");
-    for(var i = 0; i &lt; items.length ; ++i) {
-        console.log("[" + i + "]: name:" + items[i].content.name);
-    }
- }
-
- function getSuccess(items) {
-    gItems = items;
-
-    if(gItems.length &lt; 1) {
-        console.log("Please add at least 1 tracks to playlist!");
-        return;
-    }
-
-    console.log("Original playlist:");
-    for(var i = 0; i &lt; gItems.length ; ++i) {
-        console.log("[" + i + "]: name:" + gItems[i].content.name);
-    }
-
-    console.log("Will remove item at index [0] name:" + gItems[0].content.name);
-    gCurPlaylist.remove(gItems[0]);
-    gCurPlaylist.get(get2Success, get2Fail);
- }
-
- function getFail(err) {
-     console.log("get items failed: " + err);
- }
-
- function getPlaylistsFail(err) {
-     console.log("getPlaylists failed: " + err);
- }
-
- function getPlaylistsSuccess(playlists) {
-     gPlaylists = playlists;
-     if(gPlaylists.length === 0) {
-         console.log("Please create at least 1 playlist!");
-         return;
-     }
-
-     gCurPlaylist = gPlaylists[0];
-     gCurPlaylist.get(getSuccess, getFail);
- }
-
- tizen.content.getPlaylists(getPlaylistsSuccess, getPlaylistsFail);
-
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var gPlaylists, gItems, gCurPlaylist;
+
+function get2Fail(err)
+{
+&nbsp;&nbsp;&nbsp;console.log("get items (after remove) failed: " + err);
+}
+
+function get2Success(items)
+{
+&nbsp;&nbsp;&nbsp;console.log("Playlist items:");
+&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; items.length; ++i)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("[" + i + "]: name:" + items[i].content.name);
+&nbsp;&nbsp;&nbsp;}
+}
+
+function getSuccess(items)
+{
+&nbsp;&nbsp;&nbsp;gItems = items;
+
+&nbsp;&nbsp;&nbsp;if (gItems.length &lt; 1)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Please add at least 1 tracks to playlist!");
+
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return;
+&nbsp;&nbsp;&nbsp;}
+
+&nbsp;&nbsp;&nbsp;console.log("Original playlist:");
+&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; gItems.length; ++i)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("[" + i + "]: name:" + gItems[i].content.name);
+&nbsp;&nbsp;&nbsp;}
+
+&nbsp;&nbsp;&nbsp;console.log("Will remove item at index [0] name:" + gItems[0].content.name);
+&nbsp;&nbsp;&nbsp;gCurPlaylist.remove(gItems[0]);
+&nbsp;&nbsp;&nbsp;gCurPlaylist.get(get2Success, get2Fail);
+}
+
+function getFail(err)
+{
+&nbsp;&nbsp;&nbsp;console.log("get items failed: " + err);
+}
+
+function getPlaylistsFail(err)
+{
+&nbsp;&nbsp;&nbsp;console.log("getPlaylists failed: " + err);
+}
+
+function getPlaylistsSuccess(playlists)
+{
+&nbsp;&nbsp;&nbsp;gPlaylists = playlists;
+&nbsp;&nbsp;&nbsp;if (gPlaylists.length === 0)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Please create at least 1 playlist!");
+
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return;
+&nbsp;&nbsp;&nbsp;}
+
+&nbsp;&nbsp;&nbsp;gCurPlaylist = gPlaylists[0];
+&nbsp;&nbsp;&nbsp;gCurPlaylist.get(getSuccess, getFail);
+}
+
+tizen.content.getPlaylists(getPlaylistsSuccess, getPlaylistsFail);
+</pre>
 </div>
 </dd>
 <dt class="method" id="Playlist::removeBatch">
@@ -2935,69 +3015,82 @@ UnknownError: In case of any other error              </li>
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var gPlaylists, gItems, gCurPlaylist;
-
- function get2Fail(err) {
-     console.log("get items (after remove batch) failed: " + err);
- }
-
- function get2Success(items) {
-    console.log("Playlist after remove batch:");
-    for(var i = 0; i &lt; items.length ; ++i) {
-        console.log("[" + i + "]: name:" + items[i].content.name);
-    }
- }
-
- function removeBatchSuccess() {
-     console.log("removeBatch success");
-     gCurPlaylist.get(get2Success, get2Fail);
- }
-
- function removeBatchFail(err) {
-     console.log("removeBatch failed: " + err);
- }
-
- function getSuccess(items) {
-    gItems = items;
-
-    if(gItems.length &lt; 4) {
-        console.log("Please add at least 4 tracks to playlist!");
-        return;
-    }
-
-    console.log("Original playlist:");
-    for(var i = 0; i &lt; gItems.length ; ++i) {
-        console.log("[" + i + "]: name:" + gItems[i].content.name);
-    }
-
-    console.log("Will remove items at index [0](name:" + gItems[0].content.name
-            + ") and at index [2](name:" + gItems[2].content.name + ")");
-    gCurPlaylist.removeBatch([gItems[2], gItems[0]],
-            removeBatchSuccess, removeBatchFail);
- }
-
- function getFail(err) {
-     console.log("get items failed: " + err);
- }
-
- function getPlaylistsFail(err) {
-     console.log("getPlaylists failed: " + err);
- }
-
- function getPlaylistsSuccess(playlists) {
-     gPlaylists = playlists;
-     if(gPlaylists.length === 0) {
-         console.log("Please create at least 1 playlist!");
-         return;
-     }
-
-     gCurPlaylist = gPlaylists[0];
-     gCurPlaylist.get(getSuccess, getFail);
- }
-
- tizen.content.getPlaylists(getPlaylistsSuccess, getPlaylistsFail);
-
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var gPlaylists, gItems, gCurPlaylist;
+
+function get2Fail(err)
+{
+&nbsp;&nbsp;&nbsp;console.log("get items (after remove batch) failed: " + err);
+}
+
+function get2Success(items)
+{
+&nbsp;&nbsp;&nbsp;console.log("Playlist after remove batch:");
+&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; items.length; ++i)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("[" + i + "]: name:" + items[i].content.name);
+&nbsp;&nbsp;&nbsp;}
+}
+
+function removeBatchSuccess()
+{
+&nbsp;&nbsp;&nbsp;console.log("removeBatch success");
+&nbsp;&nbsp;&nbsp;gCurPlaylist.get(get2Success, get2Fail);
+}
+
+function removeBatchFail(err)
+{
+&nbsp;&nbsp;&nbsp;console.log("removeBatch failed: " + err);
+}
+
+function getSuccess(items)
+{
+&nbsp;&nbsp;&nbsp;gItems = items;
+
+&nbsp;&nbsp;&nbsp;if (gItems.length &lt; 4)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Please add at least 4 tracks to playlist!");
+
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return;
+&nbsp;&nbsp;&nbsp;}
+
+&nbsp;&nbsp;&nbsp;console.log("Original playlist:");
+&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; gItems.length; ++i)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("[" + i + "]: name:" + gItems[i].content.name);
+&nbsp;&nbsp;&nbsp;}
+
+&nbsp;&nbsp;&nbsp;console.log("Will remove items at index [0](name:" + gItems[0].content.name
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;+ ") and at index [2](name:" + gItems[2].content.name + ")");
+&nbsp;&nbsp;&nbsp;gCurPlaylist.removeBatch([gItems[2], gItems[0]], removeBatchSuccess, removeBatchFail);
+}
+
+function getFail(err)
+{
+&nbsp;&nbsp;&nbsp;console.log("get items failed: " + err);
+}
+
+function getPlaylistsFail(err)
+{
+&nbsp;&nbsp;&nbsp;console.log("getPlaylists failed: " + err);
+}
+
+function getPlaylistsSuccess(playlists)
+{
+&nbsp;&nbsp;&nbsp;gPlaylists = playlists;
+&nbsp;&nbsp;&nbsp;if (gPlaylists.length === 0)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Please create at least 1 playlist!");
+
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return;
+&nbsp;&nbsp;&nbsp;}
+
+&nbsp;&nbsp;&nbsp;gCurPlaylist = gPlaylists[0];
+&nbsp;&nbsp;&nbsp;gCurPlaylist.get(getSuccess, getFail);
+}
+
+tizen.content.getPlaylists(getPlaylistsSuccess, getPlaylistsFail);
+</pre>
 </div>
 </dd>
 <dt class="method" id="Playlist::get">
@@ -3066,38 +3159,46 @@ UnknownError: In case of any error              </li>
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var gPlaylists, gItems, gCurPlaylist;
-
- function getSuccess(items) {
-     gItems = items;
-     console.log("Playlist items:");
-     for(var i = 0; i &lt; items.length ; ++i) {
-         console.log("[" + i + "]: name:" + items[i].name);
-     }
- }
-
- function getFail(err) {
-     console.log("get items failed: " + err);
- }
-
- function getPlaylistsFail(err) {
-     console.log("getPlaylists failed: " + err);
- }
-
- function getPlaylistsSuccess(playlists) {
-     gPlaylists = playlists;
-     if(gPlaylists.length === 0) {
-         console.log("Please create at least 1 playlist!");
-         return;
-     }
-
-     gCurPlaylist = gPlaylists[0];
-     // To retrieves all playlist items of 'gCurPlaylist' playlist.
-     gCurPlaylist.get(getSuccess, getFail);
- }
-
- tizen.content.getPlaylists(getPlaylistsSuccess, getPlaylistsFail);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var gPlaylists, gItems, gCurPlaylist;
+
+function getSuccess(items)
+{
+&nbsp;&nbsp;&nbsp;gItems = items;
+&nbsp;&nbsp;&nbsp;console.log("Playlist items:");
+&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; items.length; ++i)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("[" + i + "]: name:" + items[i].name);
+&nbsp;&nbsp;&nbsp;}
+}
+
+function getFail(err)
+{
+&nbsp;&nbsp;&nbsp;console.log("get items failed: " + err);
+}
+
+function getPlaylistsFail(err)
+{
+&nbsp;&nbsp;&nbsp;console.log("getPlaylists failed: " + err);
+}
+
+function getPlaylistsSuccess(playlists)
+{
+&nbsp;&nbsp;&nbsp;gPlaylists = playlists;
+&nbsp;&nbsp;&nbsp;if (gPlaylists.length === 0)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Please create at least 1 playlist!");
+
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return;
+&nbsp;&nbsp;&nbsp;}
+
+&nbsp;&nbsp;&nbsp;gCurPlaylist = gPlaylists[0];
+&nbsp;&nbsp;&nbsp;/* To retrieve all playlist items of 'gCurPlaylist' playlist */
+&nbsp;&nbsp;&nbsp;gCurPlaylist.get(getSuccess, getFail);
+}
+
+tizen.content.getPlaylists(getPlaylistsSuccess, getPlaylistsFail);
+</pre>
 </div>
 </dd>
 <dt class="method" id="Playlist::setOrder">
@@ -3162,74 +3263,89 @@ UnknownError: In case of any other error              </li>
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var gPlaylists, gItems, gCurPlaylist, gExpectedOrder;
-
- function get2Fail(err) {
-     console.log("get items (after set order) failed: " + err);
- }
-
- function get2Success(items) {
-    console.log("Playlist order after setOrder:");
-    for(var i = 0; i &lt; items.length ; ++i) {
-        console.log("[" + i + "]: name:" + items[i].content.name);
-    }
- }
-
- function setOrderSuccess() {
-     console.log("set items order SUCCESS");
-     gCurPlaylist.get(get2Success, get2Fail);
- }
-
- function setOrderFail(err) {
-     console.log("set items order failed: " + err);
- }
-
- function getSuccess(items) {
-    gItems = items;
-
-    if(gItems.length &lt; 2) {
-        console.log("Please add at least 2 tracks to playlist!");
-        return;
-    }
-
-    console.log("Original order:");
-    for(var i = 0; i &lt; gItems.length ; ++i) {
-        console.log("[" + i + "]: name:" + gItems[i].content.name);
-    }
-
-    gExpectedOrder = gItems.slice(0);
-    gExpectedOrder.reverse();
-
-    console.log("New order:");
-    for(var i = 0; i &lt; gExpectedOrder.length ; ++i) {
-        console.log("[" + i + "]: name:" + gExpectedOrder[i].content.name);
-    }
-
-    gCurPlaylist.setOrder(gExpectedOrder, setOrderSuccess, setOrderFail);
- }
-
- function getFail(err) {
-     console.log("get items failed: " + err);
- }
-
- function getPlaylistsFail(err) {
-     console.log("getPlaylists failed: " + err);
- }
-
- function getPlaylistsSuccess(playlists) {
-     gPlaylists = playlists;
-     if(gPlaylists.length === 0) {
-         console.log("Please create at least 1 playlist!");
-         return;
-     }
-
-     gCurPlaylist = gPlaylists[0];
-     gCurPlaylist.get(getSuccess, getFail);
- }
-
- tizen.content.getPlaylists(getPlaylistsSuccess, getPlaylistsFail);
-
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var gPlaylists, gItems, gCurPlaylist, gExpectedOrder;
+
+function get2Fail(err)
+{
+&nbsp;&nbsp;&nbsp;console.log("get items (after set order) failed: " + err);
+}
+
+function get2Success(items)
+{
+&nbsp;&nbsp;&nbsp;console.log("Playlist order after setOrder:");
+&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; items.length; ++i)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("[" + i + "]: name:" + items[i].content.name);
+&nbsp;&nbsp;&nbsp;}
+}
+
+function setOrderSuccess()
+{
+&nbsp;&nbsp;&nbsp;console.log("set items order SUCCESS");
+&nbsp;&nbsp;&nbsp;gCurPlaylist.get(get2Success, get2Fail);
+}
+
+function setOrderFail(err)
+{
+&nbsp;&nbsp;&nbsp;console.log("set items order failed: " + err);
+}
+
+function getSuccess(items)
+{
+&nbsp;&nbsp;&nbsp;gItems = items;
+
+&nbsp;&nbsp;&nbsp;if (gItems.length &lt; 2)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Please add at least 2 tracks to playlist!");
+
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return;
+&nbsp;&nbsp;&nbsp;}
+
+&nbsp;&nbsp;&nbsp;console.log("Original order:");
+&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; gItems.length; ++i)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("[" + i + "]: name:" + gItems[i].content.name);
+&nbsp;&nbsp;&nbsp;}
+
+&nbsp;&nbsp;&nbsp;gExpectedOrder = gItems.slice(0);
+&nbsp;&nbsp;&nbsp;gExpectedOrder.reverse();
+
+&nbsp;&nbsp;&nbsp;console.log("New order:");
+&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; gExpectedOrder.length; ++i)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("[" + i + "]: name:" + gExpectedOrder[i].content.name);
+&nbsp;&nbsp;&nbsp;}
+
+&nbsp;&nbsp;&nbsp;gCurPlaylist.setOrder(gExpectedOrder, setOrderSuccess, setOrderFail);
+}
+
+function getFail(err)
+{
+&nbsp;&nbsp;&nbsp;console.log("get items failed: " + err);
+}
+
+function getPlaylistsFail(err)
+{
+&nbsp;&nbsp;&nbsp;console.log("getPlaylists failed: " + err);
+}
+
+function getPlaylistsSuccess(playlists)
+{
+&nbsp;&nbsp;&nbsp;gPlaylists = playlists;
+&nbsp;&nbsp;&nbsp;if (gPlaylists.length === 0)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Please create at least 1 playlist!");
+
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return;
+&nbsp;&nbsp;&nbsp;}
+
+&nbsp;&nbsp;&nbsp;gCurPlaylist = gPlaylists[0];
+&nbsp;&nbsp;&nbsp;gCurPlaylist.get(getSuccess, getFail);
+}
+
+tizen.content.getPlaylists(getPlaylistsSuccess, getPlaylistsFail);
+</pre>
 </div>
 </dd>
 <dt class="method" id="Playlist::move">
@@ -3307,69 +3423,84 @@ UnknownError: In case of any other error              </li>
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var gPlaylists, gItems, gCurPlaylist;
-
- function get2Fail(err) {
-     console.log("get items (after move item) failed: " + err);
- }
-
- function get2Success(items) {
-    console.log("Playlist order after move:");
-    for(var i = 0; i &lt; items.length ; ++i) {
-        console.log("[" + i + "]: name:" + items[i].content.name);
-    }
- }
-
- function moveSuccess() {
-     console.log("move item SUCCESS");
-     gCurPlaylist.get(get2Success, get2Fail);
- }
-
- function moveFail(err) {
-     console.log("move item failed: " + err);
- }
-
- function getSuccess(items) {
-    gItems = items;
-
-    if(gItems.length &lt; 2) {
-        console.log("Please add at least 2 tracks to playlist!");
-        return;
-    }
-
-    console.log("Original order:");
-    for(var i = 0; i &lt; gItems.length ; ++i) {
-        console.log("[" + i + "]: name:" + gItems[i].content.name);
-    }
-
-    console.log("Will move item at index [1] (name: " +
-            gItems[1].content.name + ") up by one place (to [0])");
-
-    gCurPlaylist.move(gItems[1], -1, moveSuccess, moveFail);
-    gItems.unshift(gItems.splice(1, 1)[0]);
- }
-
- function getFail(err) {
-     console.log("get items failed: " + err);
- }
-
- function getPlaylistsFail(err) {
-     console.log("getPlaylists failed: " + err);
- }
-
- function getPlaylistsSuccess(playlists) {
-     gPlaylists = playlists;
-     if(gPlaylists.length === 0) {
-         console.log("Please create at least 1 playlist!");
-         return;
-     }
-
-     gCurPlaylist = gPlaylists[0];
-     gCurPlaylist.get(getSuccess, getFail);
- }
-
- tizen.content.getPlaylists(getPlaylistsSuccess, getPlaylistsFail);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var gPlaylists, gItems, gCurPlaylist;
+
+function get2Fail(err)
+{
+&nbsp;&nbsp;&nbsp;console.log("get items (after move item) failed: " + err);
+}
+
+function get2Success(items)
+{
+&nbsp;&nbsp;&nbsp;console.log("Playlist order after move:");
+&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; items.length; ++i)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("[" + i + "]: name:" + items[i].content.name);
+&nbsp;&nbsp;&nbsp;}
+}
+
+function moveSuccess()
+{
+&nbsp;&nbsp;&nbsp;console.log("move item SUCCESS");
+&nbsp;&nbsp;&nbsp;gCurPlaylist.get(get2Success, get2Fail);
+}
+
+function moveFail(err)
+{
+&nbsp;&nbsp;&nbsp;console.log("move item failed: " + err);
+}
+
+function getSuccess(items)
+{
+&nbsp;&nbsp;&nbsp;gItems = items;
+
+&nbsp;&nbsp;&nbsp;if (gItems.length &lt; 2)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Please add at least 2 tracks to playlist!");
+
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return;
+&nbsp;&nbsp;&nbsp;}
+
+&nbsp;&nbsp;&nbsp;console.log("Original order:");
+&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; gItems.length; ++i)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("[" + i + "]: name:" + gItems[i].content.name);
+&nbsp;&nbsp;&nbsp;}
+
+&nbsp;&nbsp;&nbsp;console.log("Will move item at index [1] (name: " +
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;gItems[1].content.name + ") up by one place (to [0])");
+
+&nbsp;&nbsp;&nbsp;gCurPlaylist.move(gItems[1], -1, moveSuccess, moveFail);
+&nbsp;&nbsp;&nbsp;gItems.unshift(gItems.splice(1, 1)[0]);
+}
+
+function getFail(err)
+{
+&nbsp;&nbsp;&nbsp;console.log("get items failed: " + err);
+}
+
+function getPlaylistsFail(err)
+{
+&nbsp;&nbsp;&nbsp;console.log("getPlaylists failed: " + err);
+}
+
+function getPlaylistsSuccess(playlists)
+{
+&nbsp;&nbsp;&nbsp;gPlaylists = playlists;
+&nbsp;&nbsp;&nbsp;if (gPlaylists.length === 0)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Please create at least 1 playlist!");
+
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return;
+&nbsp;&nbsp;&nbsp;}
+
+&nbsp;&nbsp;&nbsp;gCurPlaylist = gPlaylists[0];
+&nbsp;&nbsp;&nbsp;gCurPlaylist.get(getSuccess, getFail);
+}
+
+tizen.content.getPlaylists(getPlaylistsSuccess, getPlaylistsFail);
+</pre>
 </div>
 </dd>
 </dl>
index dd88313..edecbf9 100644 (file)
@@ -3,7 +3,7 @@
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
 <link rel="stylesheet" type="text/css" href="../tizen.css" media="screen">
-<script type="text/javascript" src="snippet.js"></script><title>Console API</title>
+<script type="text/javascript" src="../snippet.js"></script><title>Console API</title>
 </head>
 <body id="page-content" onload="prettyPrint()">
 <div class="api" id="::Console">
@@ -121,8 +121,7 @@ The text will be logged as a standard message.
         </ul>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> console.log('A is for Alice.');
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">console.log('A is for Alice.');</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>A is for Alice.
@@ -153,8 +152,7 @@ The text will be logged as an error message.
         </ul>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> console.error('B is for Bob.');
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">console.error('B is for Bob.');</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>B is for Bob.
@@ -185,8 +183,7 @@ The text will be logged as a warning message.
         </ul>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> console.warn('C is for Christopher.');
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">console.warn('C is for Christopher.');</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>C is for Christopher.
@@ -217,8 +214,7 @@ The text will be logged as an info message.
         </ul>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> console.info('D is for Dorothy.');
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">console.info('D is for Dorothy.');</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>D is for Dorothy.
@@ -249,8 +245,7 @@ The text will be logged as a debug message.
         </ul>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> console.debug('E is for Eve.');
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">console.debug('E is for Eve.');</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>E is for Eve.
@@ -285,11 +280,12 @@ the message is written to the console.
         </ul>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var felix = 'Felix';
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var felix = 'Felix';
 
- // This assertion checks whether the first letter in name 'Felix' is 'A':
- console.assert(felix.charAt(0) === 'A', felix + ' does not start with A.');
- </pre>
+/* This assertion checks whether the first letter in name 'Felix' is 'A' */
+console.assert(felix.charAt(0) === 'A', felix + ' does not start with A.');
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Felix does not start with A.
@@ -321,9 +317,10 @@ Object view is forced.
         </ul>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var john = {name: "John", surname: "Doe"};
- console.dir(john.name);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var john = {name: "John", surname: "Doe"};
+console.dir(john.name);
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>John
@@ -354,9 +351,10 @@ if possible or the JavaScript Object if it is not.
         </ul>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var john = {name: "John", surname: "Doe"};
- console.dirxml(john.surname);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var john = {name: "John", surname: "Doe"};
+console.dirxml(john.surname);
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Doe
@@ -388,13 +386,15 @@ is displayed in the console. Timer values are accurate to the sub-millisecond.
         </ul>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> console.time("Big array initialization");
- var array = new Array(1000000);
- for (var i = array.length - 1; i &gt;= 0; i -= 1) {
-   array[i] = new Object();
- };
- console.timeEnd("Big array initialization");
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+console.time("Big array initialization");
+var array = new Array(1000000);
+for (var i = array.length - 1; i &gt;= 0; i -= 1)
+{
+&nbsp;&nbsp;&nbsp;array[i] = new Object();
+};
+console.timeEnd("Big array initialization");
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Big array initialization: 461.989ms
@@ -424,13 +424,15 @@ is displayed in the console. Timer values are accurate to the sub-millisecond.
         </ul>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> console.time("Big array initialization");
- var array = new Array(1000000);
- for (var i = array.length - 1; i &gt;= 0; i -= 1) {
-   array[i] = new Object();
- };
- console.timeEnd("Big array initialization");
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+console.time("Big array initialization");
+var array = new Array(1000000);
+for (var i = array.length - 1; i &gt;= 0; i -= 1)
+{
+&nbsp;&nbsp;&nbsp;array[i] = new Object();
+};
+console.timeEnd("Big array initialization");
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Big array initialization: 461.989ms
index 50365fd..b596947 100644 (file)
@@ -3,7 +3,7 @@
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
 <link rel="stylesheet" type="text/css" href="../tizen.css" media="screen">
-<script type="text/javascript" src="snippet.js"></script><title>Cordova API</title>
+<script type="text/javascript" src="../snippet.js"></script><title>Cordova API</title>
 </head>
 <body id="page-content" onload="prettyPrint()">
 <div class="api" id="::Cordova">
index 4326230..cd18e3c 100644 (file)
@@ -3,7 +3,7 @@
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
 <link rel="stylesheet" type="text/css" href="../tizen.css" media="screen">
-<script type="text/javascript" src="snippet.js"></script><title>DeviceMotion API</title>
+<script type="text/javascript" src="../snippet.js"></script><title>DeviceMotion API</title>
 </head>
 <body id="page-content" onload="prettyPrint()">
 <div class="api" id="::DeviceMotion">
@@ -133,19 +133,22 @@ Original documentation: <a href="https://cordova.apache.org/docs/en/3.0.0/cordov
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function onSuccess(acceleration) {
-   console.log('Acceleration X: ' + acceleration.x + '\n' +
-               'Acceleration Y: ' + acceleration.y + '\n' +
-               'Acceleration Z: ' + acceleration.z + '\n' +
-               'Timestamp: '      + acceleration.timestamp);
- };
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function onSuccess(acceleration)
+{
+&nbsp;&nbsp;&nbsp;console.log('Acceleration X: ' + acceleration.x + '\n' +
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'Acceleration Y: ' + acceleration.y + '\n' +
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'Acceleration Z: ' + acceleration.z + '\n' +
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'Timestamp: ' + acceleration.timestamp);
+};
 
- function onError() {
-   console.log('onError!');
- };
+function onError()
+{
+&nbsp;&nbsp;&nbsp;console.log('onError!');
+};
 
- navigator.accelerometer.getCurrentAcceleration(onSuccess, onError);
- </pre>
+navigator.accelerometer.getCurrentAcceleration(onSuccess, onError);
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Acceleration X: 0.00
@@ -197,22 +200,25 @@ Timestamp: 1456480118000
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function onSuccess(acceleration) {
-   console.log('Acceleration X: ' + acceleration.x + '\n' +
-               'Acceleration Y: ' + acceleration.y + '\n' +
-               'Acceleration Z: ' + acceleration.z + '\n' +
-               'Timestamp: '      + acceleration.timestamp);
-   console.log('Please wait 3 seconds for the next measurement...');
- };
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function onSuccess(acceleration)
+{
+&nbsp;&nbsp;&nbsp;console.log('Acceleration X: ' + acceleration.x + '\n' +
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'Acceleration Y: ' + acceleration.y + '\n' +
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'Acceleration Z: ' + acceleration.z + '\n' +
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'Timestamp: ' + acceleration.timestamp);
+&nbsp;&nbsp;&nbsp;console.log('Please wait 3 seconds for the next measurement...');
+};
 
- function onError() {
-   console.log('onError!');
- };
+function onError()
+{
+&nbsp;&nbsp;&nbsp;console.log('onError!');
+};
 
- var options = { frequency: 3000 };  // Update every 3 seconds
+var options = {frequency: 3000}; /* Update every 3 seconds */
 
- var watchID = navigator.accelerometer.watchAcceleration(onSuccess, onError, options);
- </pre>
+var watchID = navigator.accelerometer.watchAcceleration(onSuccess, onError, options);
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Acceleration X: 0.00
@@ -259,26 +265,30 @@ Please wait 3 seconds for the next measurement...
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var counter = 0, watchID;
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var counter = 0, watchID;
 
- function onSuccess(acceleration) {
-   console.log('Acceleration X: ' + acceleration.x + '\n' +
-               'Acceleration Y: ' + acceleration.y + '\n' +
-               'Acceleration Z: ' + acceleration.z + '\n' +
-               'Timestamp: '      + acceleration.timestamp);
-   if(3 == ++counter) {
-     navigator.accelerometer.clearWatch(watchID);
-   }
- };
+function onSuccess(acceleration)
+{
+&nbsp;&nbsp;&nbsp;console.log('Acceleration X: ' + acceleration.x + '\n' +
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'Acceleration Y: ' + acceleration.y + '\n' +
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'Acceleration Z: ' + acceleration.z + '\n' +
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'Timestamp: ' + acceleration.timestamp);
+&nbsp;&nbsp;&nbsp;if (3 == ++counter)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;navigator.accelerometer.clearWatch(watchID);
+&nbsp;&nbsp;&nbsp;}
+};
 
- function onError() {
-   console.log('onError!');
- };
+function onError()
+{
+&nbsp;&nbsp;&nbsp;console.log('onError!');
+};
 
- var options = { frequency: 30 };  // Update every 0.03 seconds
+var options = {frequency: 30}; /* Update every 0.03 seconds */
 
- watchID = navigator.accelerometer.watchAcceleration(onSuccess, onError, options);
- </pre>
+watchID = navigator.accelerometer.watchAcceleration(onSuccess, onError, options);
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Acceleration X: 0.00
index 974550e..80e68c9 100644 (file)
@@ -3,7 +3,7 @@
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
 <link rel="stylesheet" type="text/css" href="../tizen.css" media="screen">
-<script type="text/javascript" src="snippet.js"></script><title>Device API</title>
+<script type="text/javascript" src="../snippet.js"></script><title>Device API</title>
 </head>
 <body id="page-content" onload="prettyPrint()">
 <div class="api" id="::Device">
@@ -94,12 +94,14 @@ Original documentation: <a href="https://cordova.apache.org/docs/en/3.0.0/cordov
  Returns the version of Cordova running on the device.
             </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> document.addEventListener('deviceready', onDeviceReady, false);
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+document.addEventListener('deviceready', onDeviceReady, false);
 
- function onDeviceReady() {
-   console.log('Device Cordova: '  + device.cordova);
- }
- </pre>
+function onDeviceReady()
+{
+&nbsp;&nbsp;&nbsp;console.log('Device Cordova: ' + device.cordova);
+}
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Device Cordova: 5.1.1
@@ -112,12 +114,14 @@ Original documentation: <a href="https://cordova.apache.org/docs/en/3.0.0/cordov
  Get the the name of the device's model or product. The value is set by the device manufacturer and may be different across versions of the same product.
             </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> document.addEventListener('deviceready', onDeviceReady, false);
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+document.addEventListener('deviceready', onDeviceReady, false);
 
- function onDeviceReady() {
-   console.log('Device Model: '  + device.model);
- }
- </pre>
+function onDeviceReady()
+{
+&nbsp;&nbsp;&nbsp;console.log('Device Model: ' + device.model);
+}
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Device Model: tm1
@@ -130,12 +134,14 @@ Original documentation: <a href="https://cordova.apache.org/docs/en/3.0.0/cordov
  Get the device's operating system name.
             </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> document.addEventListener('deviceready', onDeviceReady, false);
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+document.addEventListener('deviceready', onDeviceReady, false);
 
- function onDeviceReady() {
-   console.log('Device Platform: '  + device.platform);
- }
- </pre>
+function onDeviceReady()
+{
+&nbsp;&nbsp;&nbsp;console.log('Device Platform: ' + device.platform);
+}
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Device Platform: Tizen
@@ -148,12 +154,14 @@ Original documentation: <a href="https://cordova.apache.org/docs/en/3.0.0/cordov
  Get the device's Universally Unique Identifier (UUID). The details of how a UUID is generated are determined by the device manufacturer and are specific to the device's platform or model.
             </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> document.addEventListener('deviceready', onDeviceReady, false);
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+document.addEventListener('deviceready', onDeviceReady, false);
 
- function onDeviceReady() {
-   console.log('Device UUID: '  + device.uuid);
- }
- </pre>
+function onDeviceReady()
+{
+&nbsp;&nbsp;&nbsp;console.log('Device UUID: ' + device.uuid);
+}
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Device UUID: 2LR1b3MXfEUSFvH04m4e1EXYvQA=
@@ -166,12 +174,14 @@ Original documentation: <a href="https://cordova.apache.org/docs/en/3.0.0/cordov
  Get the operating system version.
             </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> document.addEventListener('deviceready', onDeviceReady, false);
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+document.addEventListener('deviceready', onDeviceReady, false);
 
- function onDeviceReady() {
-   console.log('Device Version: '  + device.version);
- }
- </pre>
+function onDeviceReady()
+{
+&nbsp;&nbsp;&nbsp;console.log('Device Version: ' + device.version);
+}
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Device Version: 3.0
index 10d12b0..1143a2c 100644 (file)
@@ -3,7 +3,7 @@
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
 <link rel="stylesheet" type="text/css" href="../tizen.css" media="screen">
-<script type="text/javascript" src="snippet.js"></script><title>Dialogs API</title>
+<script type="text/javascript" src="../snippet.js"></script><title>Dialogs API</title>
 </head>
 <body id="page-content" onload="prettyPrint()">
 <div class="api" id="::Dialogs">
@@ -140,13 +140,15 @@ The <em>navigator.notification</em> object allows access to the Dialogs API.
         </ul>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var alertDismissed = function() {
-    console.log('Alert was dismissed');
- }
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var alertDismissed = function()
+{
+&nbsp;&nbsp;&nbsp;console.log('Alert was dismissed');
+}
 
- navigator.notification.alert('Please click OK button', alertDismissed,
-                              'OK click alert', 'OK');
- </pre>
+navigator.notification.alert('Please click OK button', alertDismissed,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'OK click alert', 'OK');
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Alert was dismissed
@@ -189,13 +191,15 @@ Callback provides index of button pressed (1,2,3 etc.) or 0, if dialog was dismi
         </ul>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var confirmCallback = function(buttonIndex) {
-    console.log('Selected option was ' + buttonIndex);
- }
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var confirmCallback = function(buttonIndex)
+{
+&nbsp;&nbsp;&nbsp;console.log('Selected option was ' + buttonIndex);
+}
 
- navigator.notification.confirm('Choose one option', confirmCallback,
-                              'Options', ['Option1', 'Option2']);
- </pre>
+navigator.notification.confirm('Choose one option', confirmCallback,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'Options', ['Option1', 'Option2']);
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Selected option was 1
@@ -242,16 +246,15 @@ Callback provides <em>PromptData</em> object, which holds all data provided by u
         </ul>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var promptCallback = function(results) {
-    console.log('Hello ' + results.input1 + ', you selected option ' + results.buttonIndex);
- }
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var promptCallback = function(results)
+{
+&nbsp;&nbsp;&nbsp;console.log('Hello ' + results.input1 + ', you selected option ' + results.buttonIndex);
+}
 
- navigator.notification.prompt('Please enter your name',
-                               promptCallback,
-                              'Registration Box',
-                              ['Ok', 'Exit'],
-                              'e.g. Jane Doe');
- </pre>
+navigator.notification.prompt('Please enter your name', promptCallback,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'Registration Box', ['Ok', 'Exit'], 'e.g. Jane Doe');
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Hello Jane Doe, you selected option 1
@@ -281,10 +284,11 @@ Callback provides <em>PromptData</em> object, which holds all data provided by u
         </ul>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var times = 2;
- console.log('Device would beep ' + times + ' times');
- navigator.notification.beep(times);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var times = 2;
+console.log('Device would beep ' + times + ' times');
+navigator.notification.beep(times);
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Device would beep 2 times
index c12cb82..acd3d1d 100644 (file)
@@ -3,7 +3,7 @@
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
 <link rel="stylesheet" type="text/css" href="../tizen.css" media="screen">
-<script type="text/javascript" src="snippet.js"></script><title>Events API</title>
+<script type="text/javascript" src="../snippet.js"></script><title>Events API</title>
 </head>
 <body id="page-content" onload="prettyPrint()">
 <div class="api" id="::Events">
@@ -211,12 +211,14 @@ The deviceready event behaves somewhat differently from others. Any event handle
 Original documentation: <a href="https://cordova.apache.org/docs/en/latest/cordova/events/events.deviceready.html">Cordova deviceredy event</a>          </p>
          </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> document.addEventListener('deviceready', onDeviceReady, false);
-
- function onDeviceReady() {
-   // Now safe to use device APIs
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+document.addEventListener('deviceready', onDeviceReady, false);
+
+function onDeviceReady()
+{
+&nbsp;&nbsp;&nbsp;/* Now safe to use device APIs */
+}
+</pre>
 </div>
 </div>
 <div class="interface" id="PauseEventCallback">
@@ -243,16 +245,19 @@ Applications typically should use document.addEventListener() to attach an event
 Original documentation: <a href="https://cordova.apache.org/docs/en/latest/cordova/events/events.pause.html">Cordova pause event</a>          </p>
          </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> document.addEventListener('deviceready', onDeviceReady, false);
-
- function onDeviceReady() {
-   document.addEventListener('pause', onPause, false);
- }
-
- function onPause() {
-   // Handle the pause event
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+document.addEventListener('deviceready', onDeviceReady, false);
+
+function onDeviceReady()
+{
+&nbsp;&nbsp;&nbsp;document.addEventListener('pause', onPause, false);
+}
+
+function onPause()
+{
+&nbsp;&nbsp;&nbsp;/* Handle the pause event */
+}
+</pre>
 </div>
 </div>
 <div class="interface" id="ResumeEventCallback">
@@ -279,16 +284,19 @@ Applications typically should use document.addEventListener() to attach an event
 Original documentation: <a href="https://cordova.apache.org/docs/en/latest/cordova/events/events.resume.html">Cordova resume event</a>          </p>
          </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> document.addEventListener('deviceready', onDeviceReady, false);
-
- function onDeviceReady() {
-   document.addEventListener('resume', onResume, false);
- }
-
- function onResume() {
-   // Handle the resume event
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+document.addEventListener('deviceready', onDeviceReady, false);
+
+function onDeviceReady()
+{
+&nbsp;&nbsp;&nbsp;document.addEventListener('resume', onResume, false);
+}
+
+function onResume()
+{
+&nbsp;&nbsp;&nbsp;/* Handle the resume event */
+}
+</pre>
 </div>
 </div>
 <div class="interface" id="BackButtonEventCallback">
@@ -313,16 +321,19 @@ It is no longer necessary to call any other method to override the back-button b
 Original documentation: <a href="https://cordova.apache.org/docs/en/latest/cordova/events/events.backbutton.html">Cordova backbutton event</a>          </p>
          </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> document.addEventListener('deviceready', onDeviceReady, false);
-
- function onDeviceReady() {
-   document.addEventListener('backbutton', onBackKeyDown, false);
- }
-
- function onBackKeyDown() {
-    // Handle the back button
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+document.addEventListener('deviceready', onDeviceReady, false);
+
+function onDeviceReady()
+{
+&nbsp;&nbsp;&nbsp;document.addEventListener('backbutton', onBackKeyDown, false);
+}
+
+function onBackKeyDown()
+{
+&nbsp;&nbsp;&nbsp;/* Handle the back button */
+}
+</pre>
 </div>
 </div>
 <div class="interface" id="MenuButtonEventCallback">
@@ -349,16 +360,19 @@ Applications typically should use document.addEventListener() to attach an event
 Original documentation: <a href="https://cordova.apache.org/docs/en/latest/cordova/events/events.menubutton.html">Cordova menubutton event</a>          </p>
          </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> document.addEventListener('deviceready', onDeviceReady, false);
-
- function onDeviceReady() {
-   document.addEventListener('menubutton', onMenuKeyDown, false);
- }
-
- function onMenuKeyDown() {
-   // Handle the back button
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+document.addEventListener('deviceready', onDeviceReady, false);
+
+function onDeviceReady()
+{
+&nbsp;&nbsp;&nbsp;document.addEventListener('menubutton', onMenuKeyDown, false);
+}
+
+function onMenuKeyDown()
+{
+&nbsp;&nbsp;&nbsp;/* Handle the back button */
+}
+</pre>
 </div>
 </div>
 <div class="interface" id="SearchButtonEventCallback">
@@ -385,16 +399,19 @@ Applications typically should use document.addEventListener() to attach an event
 Original documentation: <a href="https://cordova.apache.org/docs/en/latest/cordova/events/events.searchbutton.html">Cordova searchbutton event</a>          </p>
          </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> document.addEventListener('deviceready', onDeviceReady, false);
-
- function onDeviceReady() {
-   document.addEventListener('searchbutton', onSearchKeyDown, false);
- }
-
- function onSearchKeyDown() {
-   // Handle the search button
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+document.addEventListener('deviceready', onDeviceReady, false);
+
+function onDeviceReady()
+{
+&nbsp;&nbsp;&nbsp;document.addEventListener('searchbutton', onSearchKeyDown, false);
+}
+
+function onSearchKeyDown()
+{
+&nbsp;&nbsp;&nbsp;/* Handle the search button */
+}
+</pre>
 </div>
 </div>
 <div class="interface" id="StartCallEventCallback">
@@ -421,16 +438,19 @@ Applications typically should use document.addEventListener() to attach an event
 Original documentation: <a href="https://cordova.apache.org/docs/en/latest/cordova/events/events.startcallbutton.html">Cordova startcallbutton event</a>          </p>
          </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> document.addEventListener('deviceready', onDeviceReady, false);
-
- function onDeviceReady() {
-   document.addEventListener('startcallbutton', onStartCallKeyDown, false);
- }
-
- function onStartCallKeyDown() {
-   // Handle the start call button
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+document.addEventListener('deviceready', onDeviceReady, false);
+
+function onDeviceReady()
+{
+&nbsp;&nbsp;&nbsp;document.addEventListener('startcallbutton', onStartCallKeyDown, false);
+}
+
+function onStartCallKeyDown()
+{
+&nbsp;&nbsp;&nbsp;/* Handle the start call button */
+}
+</pre>
 </div>
 </div>
 <div class="interface" id="EndCallButtonEventCallback">
@@ -457,16 +477,19 @@ Applications typically should use document.addEventListener() to attach an event
 Original documentation: <a href="https://cordova.apache.org/docs/en/latest/cordova/events/events.endcallbutton.html">Cordova endcallbutton event</a>          </p>
          </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> document.addEventListener('deviceready', onDeviceReady, false);
-
- function onDeviceReady() {
-   document.addEventListener('endcallbutton', onEndCallKeyDown, false);
- }
-
- function onEndCallKeyDown() {
-   // Handle the end call button
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+document.addEventListener('deviceready', onDeviceReady, false);
+
+function onDeviceReady()
+{
+&nbsp;&nbsp;&nbsp;document.addEventListener('endcallbutton', onEndCallKeyDown, false);
+}
+
+function onEndCallKeyDown()
+{
+&nbsp;&nbsp;&nbsp;/* Handle the end call button */
+}
+</pre>
 </div>
 </div>
 <div class="interface" id="VolumeDownButtonEventCallback">
@@ -493,16 +516,19 @@ Applications typically should use document.addEventListener() to attach an event
 Original documentation: <a href="https://cordova.apache.org/docs/en/latest/cordova/events/events.volumedownbutton.html">Cordova volumedownbutton event</a>          </p>
          </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> document.addEventListener('deviceready', onDeviceReady, false);
-
- function onDeviceReady() {
-   document.addEventListener('volumedownbutton', onVolumeDownKeyDown, false);
- }
-
- function onVolumeDownKeyDown() {
-   // Handle the volume down button
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+document.addEventListener('deviceready', onDeviceReady, false);
+
+function onDeviceReady()
+{
+&nbsp;&nbsp;&nbsp;document.addEventListener('volumedownbutton', onVolumeDownKeyDown, false);
+}
+
+function onVolumeDownKeyDown()
+{
+&nbsp;&nbsp;&nbsp;/* Handle the volume down button */
+}
+</pre>
 </div>
 </div>
 <div class="interface" id="VolumeUpButtonEventCallback">
@@ -529,16 +555,19 @@ Applications typically should use document.addEventListener() to attach an event
 Original documentation: <a href="https://cordova.apache.org/docs/en/latest/cordova/events/events.volumeupbutton.html">Cordova volumeupbutton event</a>          </p>
          </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> document.addEventListener('deviceready', onDeviceReady, false);
-
- function onDeviceReady() {
-   document.addEventListener('volumeupbutton', onVolumeUpKeyDown, false);
- }
-
- function onVolumeUpKeyDown() {
-   // Handle the volume up button
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+document.addEventListener('deviceready', onDeviceReady, false);
+
+function onDeviceReady()
+{
+&nbsp;&nbsp;&nbsp;document.addEventListener('volumeupbutton', onVolumeUpKeyDown, false);
+}
+
+function onVolumeUpKeyDown()
+{
+&nbsp;&nbsp;&nbsp;/* Handle the volume up button */
+}
+</pre>
 </div>
 </div>
 </div>
index b5af2e9..9756308 100644 (file)
@@ -3,7 +3,7 @@
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
 <link rel="stylesheet" type="text/css" href="../tizen.css" media="screen">
-<script type="text/javascript" src="snippet.js"></script><title>File API</title>
+<script type="text/javascript" src="../snippet.js"></script><title>File API</title>
 </head>
 <body id="page-content" onload="prettyPrint()">
 <div class="api" id="::File">
@@ -332,12 +332,14 @@ Original documentation: <a href="https://www.npmjs.com/package/cordova-plugin-fi
  3.0
           </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var eventInit = {
-   loaded: 128,
-   total: 1024
- };
- var event = new ProgressEvent('submit', eventInit);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var eventInit =
+{
+&nbsp;&nbsp;&nbsp;loaded: 128,
+&nbsp;&nbsp;&nbsp;total: 1024
+};
+var event = new ProgressEvent('submit', eventInit);
+</pre>
 </div>
 <div class="constructors">
 <h4 id="ProgressEvent::constructor">Constructors</h4>
@@ -501,8 +503,7 @@ This manager interface exposes the Filesystem base API constants.
  3.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> console.log("The directory where the application is installed " + cordova.file.applicationDirectory);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">console.log("The directory where the application is installed " + cordova.file.applicationDirectory);</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>The directory where the application is installed file:///opt/usr/apps/WfigBlWDyf/res/wgt/
@@ -519,8 +520,7 @@ This manager interface exposes the Filesystem base API constants.
  3.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> console.log("Root directory of the application's sandbox " + cordova.file.applicationStorageDirectory);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">console.log("Root directory of the application's sandbox " + cordova.file.applicationStorageDirectory);</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Root directory of the application's sandbox file:///opt/usr/apps/WfigBlWDyf/
@@ -537,8 +537,7 @@ This manager interface exposes the Filesystem base API constants.
  3.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> console.log("Data directory " + cordova.file.dataDirectory);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">console.log("Data directory " + cordova.file.dataDirectory);</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Data directory file:///opt/usr/apps/WfigBlWDyf/data/
@@ -555,8 +554,7 @@ This manager interface exposes the Filesystem base API constants.
  3.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> console.log("Cache directory " + cordova.file.cacheDirectory);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">console.log("Cache directory " + cordova.file.cacheDirectory);</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Cache directory file:///opt/usr/apps/WfigBlWDyf/tmp/
@@ -573,8 +571,7 @@ This manager interface exposes the Filesystem base API constants.
  3.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> console.log("Space on external storage " + cordova.file.externalApplicationStorageDirectory);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">console.log("Space on external storage " + cordova.file.externalApplicationStorageDirectory);</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Space on external storage null
@@ -591,8 +588,7 @@ This manager interface exposes the Filesystem base API constants.
  3.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> console.log("Data files on external storage " + cordova.file.externalDataDirectory);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">console.log("Data files on external storage " + cordova.file.externalDataDirectory);</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Data files on external storage null
@@ -609,8 +605,7 @@ This manager interface exposes the Filesystem base API constants.
  3.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> console.log("Cache on external storage " + cordova.file.externalCacheDirectory);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">console.log("Cache on external storage " + cordova.file.externalCacheDirectory);</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Cache on external storage null
@@ -627,8 +622,7 @@ This manager interface exposes the Filesystem base API constants.
  3.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> console.log("Root on external storage " + cordova.file.externalRootDirectory);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">console.log("Root on external storage " + cordova.file.externalRootDirectory);</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Root on external storage file:///usr/storage/sdcard/
@@ -645,8 +639,7 @@ This manager interface exposes the Filesystem base API constants.
  3.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> console.log("Temp directory " + cordova.file.tempDirectory);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">console.log("Temp directory " + cordova.file.tempDirectory);</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Temp directory null
@@ -663,8 +656,7 @@ This manager interface exposes the Filesystem base API constants.
  3.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> console.log("Synced data directory " + cordova.file.syncedDataDirectory);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">console.log("Synced data directory " + cordova.file.syncedDataDirectory);</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Synced data directory null
@@ -681,8 +673,7 @@ This manager interface exposes the Filesystem base API constants.
  3.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> console.log("Documents directory " + cordova.file.documentsDirectory);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">console.log("Documents directory " + cordova.file.documentsDirectory);</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Documents directory null
@@ -699,8 +690,7 @@ This manager interface exposes the Filesystem base API constants.
  3.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> console.log("Files globally available to all applications " + cordova.file.sharedDirectory);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">console.log("Files globally available to all applications " + cordova.file.sharedDirectory);</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Files globally available to all applications file:///opt/usr/media/
@@ -743,10 +733,12 @@ The specifics of naming filesystems is unspecified, but a name must be unique ac
  3.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> requestFileSystem(TEMPORARY, 100, function (fileSystem) {
-        console.log('Name of the filesystem: '+fileSystem.name);
- });
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+requestFileSystem(TEMPORARY, 100, function(fileSystem)
+{
+&nbsp;&nbsp;&nbsp;console.log('Name of the filesystem: ' + fileSystem.name);
+});
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Name of the filesystem: temporary
@@ -1007,17 +999,19 @@ The specifics of naming filesystems is unspecified, but a name must be unique ac
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> successCallback = function(fs) {
-     console.log('File system name ' + fs.name);
- };
-
- errorCallback = function(err) {
-     console.log(err.code);
- };
-
- requestFileSystem(TEMPORARY, 1024*1024, successCallback, errorCallback);
-
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+successCallback = function(fs)
+{
+&nbsp;&nbsp;&nbsp;console.log('File system name ' + fs.name);
+};
+
+errorCallback = function(err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.code);
+};
+
+requestFileSystem(TEMPORARY, 1024 * 1024, successCallback, errorCallback);
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>File system name temporary
@@ -1070,18 +1064,20 @@ The specifics of naming filesystems is unspecified, but a name must be unique ac
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> successCallback = function(entry) {
-     console.log('Entry name ' + entry.name);
- };
-
- errorCallback = function(err) {
-     console.log(err.code);
- };
-
- var uri = 'file:///home/owner/content/Documents/example.txt';
- resolveLocalFileSystemURL(uri, successCallback, errorCallback);
-
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+successCallback = function(entry)
+{
+&nbsp;&nbsp;&nbsp;console.log('Entry name ' + entry.name);
+};
+
+errorCallback = function(err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.code);
+};
+
+var uri = 'file:///home/owner/content/Documents/example.txt';
+resolveLocalFileSystemURL(uri, successCallback, errorCallback);
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Entry name example.txt
@@ -1224,12 +1220,15 @@ The specifics of naming filesystems is unspecified, but a name must be unique ac
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">   requestFileSystem(TEMPORARY, 100, function(fs) {
-     fs.root.getMetadata(function (metadata) {
-       console.log("Last modification time: " + metadata.modificationTime);// get metadata successfully
-     });
-   });
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+requestFileSystem(TEMPORARY, 100, function(fs)
+{
+&nbsp;&nbsp;&nbsp;fs.root.getMetadata(function(metadata)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Last modification time: " + metadata.modificationTime); /* Get metadata successfully */
+&nbsp;&nbsp;&nbsp;});
+});
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Last modification time: Fri Jan 02 2015 03:58:08 GMT+0900 (KST)
@@ -1311,16 +1310,21 @@ A move of a directory on top of an existing empty directory must attempt to dele
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">  successCallback = function(entry){console.log('Full path to the moved file: '+entry.fullPath)};
-   requestFileSystem(TEMPORARY, 100, function(fs) {
-     fs.root.getDirectory('testDirectory', {create:true}, function(direntry) {
-       fs.root.getFile("aa.txt", {create:true}, function(fileentry) {
-         console.log('Full path before move: '+fileentry.fullPath);
-         fileentry.moveTo(direntry,'newname.txt',successCallback);
-       });
-     });
-   });
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+successCallback = function(entry) {console.log('Full path to the moved file: ' + entry.fullPath)};
+
+requestFileSystem(TEMPORARY, 100, function(fs)
+{
+&nbsp;&nbsp;&nbsp;fs.root.getDirectory('testDirectory', {create:true}, function(direntry)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;fs.root.getFile("aa.txt", {create:true}, function(fileentry)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('Full path before move: ' + fileentry.fullPath);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;fileentry.moveTo(direntry, 'newname.txt', successCallback);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;});
+&nbsp;&nbsp;&nbsp;});
+});
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Full path before move: /aa.txt
@@ -1404,18 +1408,20 @@ Directory copies are always recursive--that is, they copy all contents of the di
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">   successCallback = function(entry){console.log('Full path to the copied file: '+entry.fullPath);};
-   requestFileSystem(TEMPORARY, 100, function(fs) {
-     fs.root.getDirectory('testDirectory', {create:true},
-       function(direntry) {
-         fs.root.getFile("test.txt", {create:true},
-           function(fileentry) {
-             fileentry.copyTo(direntry,'newname.txt',successCallback);
-           }
-       );
-     });
-   });
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+successCallback = function(entry) {console.log('Full path to the copied file: ' + entry.fullPath);};
+
+requestFileSystem(TEMPORARY, 100, function(fs)
+{
+&nbsp;&nbsp;&nbsp;fs.root.getDirectory('testDirectory', {create:true}, function(direntry)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;fs.root.getFile("test.txt", {create:true}, function(fileentry)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;fileentry.copyTo(direntry, 'newname.txt', successCallback);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;});
+&nbsp;&nbsp;&nbsp;});
+});
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Full path to the copied file: /testDirectory/newname.txt
@@ -1464,12 +1470,15 @@ Directory copies are always recursive--that is, they copy all contents of the di
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">   requestFileSystem(TEMPORARY, 100, function(fs) {
-     fs.root.getParent(function (entry) {
-       console.log("success");
-     });
-   });
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+requestFileSystem(TEMPORARY, 100, function(fs)
+{
+&nbsp;&nbsp;&nbsp;fs.root.getParent(function(entry)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("success");
+&nbsp;&nbsp;&nbsp;});
+});
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>success
@@ -1522,14 +1531,18 @@ Directory copies are always recursive--that is, they copy all contents of the di
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">   requestFileSystem(TEMPORARY, 100, function(fs) {
-     fs.root.getFile('test.txt', {create: true}, function(fileEntry) {
-       fileEntry.remove(function () {
-         console.log("success");
-       });
-     });
-   });
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+requestFileSystem(TEMPORARY, 100, function(fs)
+{
+&nbsp;&nbsp;&nbsp;fs.root.getFile('test.txt', {create: true}, function(fileEntry)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;fileEntry.remove(function()
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("success");
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;});
+&nbsp;&nbsp;&nbsp;});
+});
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>success
@@ -1554,14 +1567,16 @@ Directory copies are always recursive--that is, they copy all contents of the di
  URL that can be used to identify this entry.
               </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">   requestFileSystem(TEMPORARY, 100, function(fs) {
-     fs.root.getDirectory('testDirectory', {create:true},
-       function(entry) {
-         var url = entry.toURL();
-         console.log('URL: '+url);
-     });
-   });
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+requestFileSystem(TEMPORARY, 100, function(fs)
+{
+&nbsp;&nbsp;&nbsp;fs.root.getDirectory('testDirectory', {create:true}, function(entry)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var url = entry.toURL();
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('URL: ' + url);
+&nbsp;&nbsp;&nbsp;});
+});
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>URL: file:///home/owner/apps_rw/WfigBlWDyf/tmp/testDirectory/
@@ -1620,12 +1635,15 @@ Directory copies are always recursive--that is, they copy all contents of the di
  DirectoryReader
               </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">   requestFileSystem(TEMPORARY, 100, function (entry) {
-     entry.root.getDirectory("MyDocument", {create:true}, function(dirEntry) {
-          var directoryReader = dirEntry.createReader();
-      });
-   });
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+requestFileSystem(TEMPORARY, 100, function(entry)
+{
+&nbsp;&nbsp;&nbsp;entry.root.getDirectory("MyDocument", {create:true}, function(dirEntry)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var directoryReader = dirEntry.createReader();
+&nbsp;&nbsp;&nbsp;});
+});
+</pre>
 </div>
 </dd>
 <dt class="method" id="DirectoryEntry::getDirectory">
@@ -1696,12 +1714,15 @@ Otherwise, if no other error occurs, getDirectory must return a DirectoryEntry c
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">   requestFileSystem(TEMPORARY, 100, function(fs) {
-     fs.root.getDirectory("ert",{create:true},function(dir){
-         console.log('Created dir: '+dir.name);
-      })
-   });
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+requestFileSystem(TEMPORARY, 100, function(fs)
+{
+&nbsp;&nbsp;&nbsp;fs.root.getDirectory("ert", {create:true}, function(dir)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('Created dir: ' + dir.name);
+&nbsp;&nbsp;&nbsp;})
+});
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Created dir: ert
@@ -1776,12 +1797,15 @@ Otherwise, if no other error occurs, getFile must return a FileEntry correspondi
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">   requestFileSystem(TEMPORARY, 100, function(fs) {
-     fs.root.getFile("qa.txt",{create:true},function(file){
-           console.log('Created file: '+file.name);
-     });
-   });
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+requestFileSystem(TEMPORARY, 100, function(fs)
+{
+&nbsp;&nbsp;&nbsp;fs.root.getFile("qa.txt", {create:true}, function(file)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('Created file: ' + file.name);
+&nbsp;&nbsp;&nbsp;});
+});
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Created file: qa.txt
@@ -1834,15 +1858,18 @@ Otherwise, if no other error occurs, getFile must return a FileEntry correspondi
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">   requestFileSystem(TEMPORARY, 100, function(fs) {
-     fs.root.getDirectory("testDirectory", {create:true},
-       function(directoryEntry) {
-         directoryEntry.removeRecursively(function() {
-           console.log("success");
-         });
-     });
-   });
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+requestFileSystem(TEMPORARY, 100, function(fs)
+{
+&nbsp;&nbsp;&nbsp;fs.root.getDirectory("testDirectory", {create:true}, function(directoryEntry)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;directoryEntry.removeRecursively(function()
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("success");
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;});
+&nbsp;&nbsp;&nbsp;});
+});
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>success
@@ -1906,13 +1933,16 @@ Otherwise, if no other error occurs, getFile must return a FileEntry correspondi
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">   requestFileSystem(TEMPORARY, 100, function(fs) {
-     var a = fs.root.createReader();
-     a.readEntries(function successCallback(entries) {
-       console.log("success");
-     });
-   });
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+requestFileSystem(TEMPORARY, 100, function(fs)
+{
+&nbsp;&nbsp;&nbsp;var a = fs.root.createReader();
+&nbsp;&nbsp;&nbsp;a.readEntries(function successCallback(entries)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("success");
+&nbsp;&nbsp;&nbsp;});
+});
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>success
@@ -1976,20 +2006,26 @@ Otherwise, if no other error occurs, getFile must return a FileEntry correspondi
         </ul>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">   requestFileSystem(TEMPORARY, 100, function(fs) {
-     fs.root.getFile("logFile.txt", {create: true}, function (f) {
-       f.createWriter(function(fileWriter) {
-         fileWriter.write(new Blob(['hello']));
-         fileWriter.onerror = function(e) {
-           console.log('Write file failed:' + e);
-         };
-         fileWriter.onwriteend = function () {
-           console.log("success");
-         };
-       });
-     });
-   });
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+requestFileSystem(TEMPORARY, 100, function(fs)
+{
+&nbsp;&nbsp;&nbsp;fs.root.getFile("logFile.txt", {create: true}, function(f)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;f.createWriter(function(fileWriter)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;fileWriter.write(new Blob(['hello']));
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;fileWriter.onerror = function(e)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('Write file failed:' + e);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;};
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;fileWriter.onwriteend = function()
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("success");
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;};
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;});
+&nbsp;&nbsp;&nbsp;});
+});
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>success
@@ -2031,14 +2067,18 @@ Otherwise, if no other error occurs, getFile must return a FileEntry correspondi
         </ul>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">   requestFileSystem(TEMPORARY, 100, function(fs) {
-     fs.root.getFile("abcdz.txt", {create: true}, function (f) {
-       f.file(function (file) {
-         console.log("success");
-       });
-     });
-   });
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+requestFileSystem(TEMPORARY, 100, function(fs)
+{
+&nbsp;&nbsp;&nbsp;fs.root.getFile("abcdz.txt", {create: true}, function(f)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;f.file(function(file)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("success");
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;});
+&nbsp;&nbsp;&nbsp;});
+});
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>success
@@ -2090,12 +2130,14 @@ Otherwise, if no other error occurs, getFile must return a FileEntry correspondi
  3.0
           </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var deviceReady, fileReader;
- deviceReady = function() {
-     fileReader = new FileReader();
- };
- document.addEventListener('deviceready', deviceReady, true);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var deviceReady, fileReader;
+deviceReady = function()
+{
+&nbsp;&nbsp;&nbsp;fileReader = new FileReader();
+};
+document.addEventListener('deviceready', deviceReady, true);
+</pre>
 </div>
 <div class="constructors">
 <h4 id="FileReader::constructor">Constructors</h4>
@@ -2236,17 +2278,20 @@ Returns a Blob's data as a DOMString, or byte[], or null, depending on the read
  3.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var blob = new Blob(['abc']);
- var fileReader = new FileReader();
- fileReader.onload = function(){
-     console.log('Loaded');
- };
- fileReader.onabort = function(){
-     console.log('aborted');
- };
- fileReader.readAsDataURL(blob);
- fileReader.abort();
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var blob = new Blob(['abc']);
+var fileReader = new FileReader();
+fileReader.onload = function()
+{
+&nbsp;&nbsp;&nbsp;console.log('Loaded');
+};
+fileReader.onabort = function()
+{
+&nbsp;&nbsp;&nbsp;console.log('aborted');
+};
+fileReader.readAsDataURL(blob);
+fileReader.abort();
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>aborted
@@ -2295,13 +2340,15 @@ Returns a Blob's data as a DOMString, or byte[], or null, depending on the read
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var blob = new Blob(['abc']);
- var fileReader = new FileReader();
- fileReader.onload = function(){
-     console.log('Loaded, result = '+fileReader.result);
- };
-  fileReader.readAsDataURL(blob);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var blob = new Blob(['abc']);
+var fileReader = new FileReader();
+fileReader.onload = function()
+{
+&nbsp;&nbsp;&nbsp;console.log('Loaded, result = ' + fileReader.result);
+};
+fileReader.readAsDataURL(blob);
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Loaded, result = data:;base64,YWJj
@@ -2354,13 +2401,15 @@ Returns a Blob's data as a DOMString, or byte[], or null, depending on the read
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var blob = new Blob(['abc']);
- var fileReader = new FileReader();
- fileReader.onload = function(){
-     console.log('Loaded, result = '+fileReader.result);
- };
- fileReader.readAsText(blob);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var blob = new Blob(['abc']);
+var fileReader = new FileReader();
+fileReader.onload = function()
+{
+&nbsp;&nbsp;&nbsp;console.log('Loaded, result = ' + fileReader.result);
+};
+fileReader.readAsText(blob);
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Loaded, result = abc
@@ -2409,13 +2458,15 @@ Returns a Blob's data as a DOMString, or byte[], or null, depending on the read
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var blob = new Blob(['abc']);
- var fileReader = new FileReader();
- fileReader.onload = function(){
-     console.log('Loaded, result = '+fileReader.result);
- };
- fileReader.readAsBinaryString(blob);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var blob = new Blob(['abc']);
+var fileReader = new FileReader();
+fileReader.onload = function()
+{
+&nbsp;&nbsp;&nbsp;console.log('Loaded, result = ' + fileReader.result);
+};
+fileReader.readAsBinaryString(blob);
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Loaded, result = abc
@@ -2464,14 +2515,16 @@ Returns a Blob's data as a DOMString, or byte[], or null, depending on the read
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var blob = new Blob(['abc']);
- var fileReader = new FileReader();
- fileReader.onload = function(){
-     resultValue = fileReader.result;
-      console.log("Result: "+resultValue.toString()+'<br>'+'ByteLength: '+resultValue.byteLength);
- };
- fileReader.readAsArrayBuffer(blob);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var blob = new Blob(['abc']);
+var fileReader = new FileReader();
+fileReader.onload = function()
+{
+&nbsp;&nbsp;&nbsp;resultValue = fileReader.result;
+&nbsp;&nbsp;&nbsp;console.log("Result: " + resultValue.toString() + '&lt;br&gt;' + 'ByteLength: ' + resultValue.byteLength);
+};
+fileReader.readAsArrayBuffer(blob);
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Result: [object ArrayBuffer]
@@ -2660,24 +2713,29 @@ ByteLength: 3
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> successCallback = function(writer) {
-    writer.onwrite = function(evt) {
-         console.log('write success');
-    };
-    writer.onabort = function(e){
-          console.log('abort');
-    };
-    writer.write('some sample text');
-    writer.abort();
- };
-
- errorCallback = function(err) {
-     console.log(err.code);
- };
-
- // entry is FileEntry object retrieved by getFile() function of DirectoryEntry interface.
- entry.createWriter(successCallback, errorCallback);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+successCallback = function(writer)
+{
+&nbsp;&nbsp;&nbsp;writer.onwrite = function(evt)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('write success');
+&nbsp;&nbsp;&nbsp;};
+&nbsp;&nbsp;&nbsp;writer.onabort = function(e)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('abort');
+&nbsp;&nbsp;&nbsp;};
+&nbsp;&nbsp;&nbsp;writer.write('some sample text');
+&nbsp;&nbsp;&nbsp;writer.abort();
+};
+
+errorCallback = function(err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.code);
+};
+
+/* entry is FileEntry object retrieved by getFile() method of DirectoryEntry interface */
+entry.createWriter(successCallback, errorCallback);
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>abort
@@ -2719,18 +2777,21 @@ If the offset is a negative number the position of the file pointer is rewound.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> successCallback = function(writer) {
-    // fast forwards file pointer to the end of file.
-    writer.seek(writer.length);
- };
-
- errorCallback = function(err) {
-     console.log(err.code);
- };
-
- // entry is FileEntry object retrieved by getFile() function of DirectoryEntry interface.
- entry.createWriter(successCallback, errorCallback);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+successCallback = function(writer)
+{
+&nbsp;&nbsp;&nbsp;/* Fast forwards file pointer to the end of file */
+&nbsp;&nbsp;&nbsp;writer.seek(writer.length);
+};
+
+errorCallback = function(err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.code);
+};
+
+/* entry is FileEntry object retrieved by getFile() method of DirectoryEntry interface */
+entry.createWriter(successCallback, errorCallback);
+</pre>
 </div>
 </dd>
 <dt class="method" id="FileWriter::truncate">
@@ -2771,21 +2832,25 @@ If the offset is a negative number the position of the file pointer is rewound.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> successCallback = function(writer) {
-    writer.onwrite = function(evt) {
-         console.log('truncate success');
-    };
-
-    writer.truncate(10);
- };
-
- errorCallback = function(err) {
-     console.log(err.code);
- };
-
- // entry is FileEntry object retrieved by getFile() function of DirectoryEntry interface.
- entry.createWriter(successCallback, errorCallback);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+successCallback = function(writer)
+{
+&nbsp;&nbsp;&nbsp;writer.onwrite = function(evt)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('truncate success');
+&nbsp;&nbsp;&nbsp;};
+
+&nbsp;&nbsp;&nbsp;writer.truncate(10);
+};
+
+errorCallback = function(err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.code);
+};
+
+/* entry is FileEntry object retrieved by getFile() method of DirectoryEntry interface */
+entry.createWriter(successCallback, errorCallback);
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>truncate success
@@ -2834,21 +2899,25 @@ If the offset is a negative number the position of the file pointer is rewound.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> successCallback = function(writer) {
-    writer.onwrite = function(evt) {
-         console.log('write success');
-    };
-
-    writer.write('some sample text');
- };
-
- errorCallback = function(err) {
-     console.log(err.code);
- };
-
- // entry is FileEntry object retrieved by getFile() function of DirectoryEntry interface.
- entry.createWriter(successCallback, errorCallback);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+successCallback = function(writer)
+{
+&nbsp;&nbsp;&nbsp;writer.onwrite = function(evt)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('write success');
+&nbsp;&nbsp;&nbsp;};
+
+&nbsp;&nbsp;&nbsp;writer.write('some sample text');
+};
+
+errorCallback = function(err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.code);
+};
+
+/* entry is FileEntry object retrieved by getFile() method of DirectoryEntry interface */
+entry.createWriter(successCallback, errorCallback);
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>write success
index c6f25f7..2591b06 100644 (file)
@@ -3,7 +3,7 @@
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
 <link rel="stylesheet" type="text/css" href="../tizen.css" media="screen">
-<script type="text/javascript" src="snippet.js"></script><title>FileTransfer API</title>
+<script type="text/javascript" src="../snippet.js"></script><title>FileTransfer API</title>
 </head>
 <body id="page-content" onload="prettyPrint()">
 <div class="api" id="::FileTransfer">
@@ -169,34 +169,37 @@ The key / value type of download options values.  Currently only supports header
  3.0
           </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var fileURL; // We assume the variable fileURL contains a valid URL to a text file on the device.
-
- var win = function (r) {
-   console.log('Code = ' + r.responseCode);
-   console.log('Response = ' + r.response);
-   console.log('Sent = ' + r.bytesSent);
- }
-
- var fail = function (error) {
-   alert('An error has occurred: Code = ' + error.code);
-   console.log('upload error source ' + error.source);
-   console.log('upload error target ' + error.target);
- }
-
- var options = new FileUploadOptions();
- options.fileKey = 'file';
- options.fileName = fileURL.substr(fileURL.lastIndexOf('/') + 1);
- options.mimeType = 'text/plain';
-
- var params = {};
- params.value1 = 'test';
- params.value2 = 'param';
-
- options.params = params;
-
- var ft = new FileTransfer();
- ft.upload(fileURL, encodeURI('http://some.server.com/upload.php'), win, fail, options);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var fileURL; /* Assume the variable fileURL contains a valid URL to a text file on the device */
+
+var win = function(r)
+{
+&nbsp;&nbsp;&nbsp;console.log('Code = ' + r.responseCode);
+&nbsp;&nbsp;&nbsp;console.log('Response = ' + r.response);
+&nbsp;&nbsp;&nbsp;console.log('Sent = ' + r.bytesSent);
+}
+
+var fail = function(error)
+{
+&nbsp;&nbsp;&nbsp;alert('An error has occurred: Code = ' + error.code);
+&nbsp;&nbsp;&nbsp;console.log('upload error source ' + error.source);
+&nbsp;&nbsp;&nbsp;console.log('upload error target ' + error.target);
+}
+
+var options = new FileUploadOptions();
+options.fileKey = 'file';
+options.fileName = fileURL.substr(fileURL.lastIndexOf('/') + 1);
+options.mimeType = 'text/plain';
+
+var params = {};
+params.value1 = 'test';
+params.value2 = 'param';
+
+options.params = params;
+
+var ft = new FileTransfer();
+ft.upload(fileURL, encodeURI('http://some.server.com/upload.php'), win, fail, options);
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Code = 200
@@ -209,9 +212,10 @@ Sent = 1024
 <dl>
 <pre class="webidl prettyprint">FileUploadOptions(DOMString fileKey, DOMString fileName, DOMString mimeType, <a href="#FileUploadParams">FileUploadParams</a> params, <a href="#HeaderFields">HeaderFields</a> headers, DOMString httpMethod);</pre>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Creates a FileUploadOptions object.
- var options = new FileUploadOptions('file', 'doc.txt', 'text/plain', null, null, 'POST');
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Creates a FileUploadOptions object */
+var options = new FileUploadOptions('file', 'doc.txt', 'text/plain', null, null, 'POST');
+</pre>
 </div>
 </dl>
 </div>
@@ -502,9 +506,10 @@ Sent = 1024
 <dl>
 <pre class="webidl prettyprint">FileTransfer();</pre>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Creates a FileTransfer object.
- var file_transfer = new FileTransfer();
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Creates a FileTransfer object */
+var file_transfer = new FileTransfer();
+</pre>
 </div>
 </dl>
 </div>
@@ -519,32 +524,36 @@ Sent = 1024
  3.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var fileURL; // should be a valid url eg. cdvfile://localhost/persistent/path/to/file.txt
-
- var win = function(r) {
-   console.log('Success.  File uploaded.');
- }
-
- var fail = function(error) {
-   // error.code == FileTransferError.ABORT_ERR
-   alert('An error has occurred: Code = ' + error.code);
-   console.log('upload error source ' + error.source);
-   console.log('upload error target ' + error.target);
- };
-
- var ft = new FileTransfer();
-
- ft.onprogress = function(event) {
-   console.log('uploaded: ' + event.loaded);
- };
-
- ft.upload(fileURL, encodeURI('http://some.server.com/upload.php'), win, fail);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var fileURL; /* Must be a valid url, such as cdvfile://localhost/persistent/path/to/file.txt */
+
+var win = function(r)
+{
+&nbsp;&nbsp;&nbsp;console.log('Success. File uploaded.');
+}
+
+var fail = function(error)
+{
+&nbsp;&nbsp;&nbsp;/* error.code == FileTransferError.ABORT_ERR */
+&nbsp;&nbsp;&nbsp;alert('An error has occurred: Code = ' + error.code);
+&nbsp;&nbsp;&nbsp;console.log('upload error source ' + error.source);
+&nbsp;&nbsp;&nbsp;console.log('upload error target ' + error.target);
+};
+
+var ft = new FileTransfer();
+
+ft.onprogress = function(event)
+{
+&nbsp;&nbsp;&nbsp;console.log('uploaded: ' + event.loaded);
+};
+
+ft.upload(fileURL, encodeURI('http://some.server.com/upload.php'), win, fail);
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>uploaded: 512
 uploaded: 1024
-Success.  File uploaded.
+Success. File uploaded.
 </pre>
 </div>
 </li></ul>
@@ -607,23 +616,26 @@ Success.  File uploaded.
         </ul>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var fileURL; // should be a valid url eg. cdvfile://localhost/persistent/path/to/file.txt
-
- var win = function (r) {
-   console.log('Code = ' + r.responseCode);
-   console.log('Response = ' + r.response);
-   console.log('Sent = ' + r.bytesSent);
- }
-
- var fail = function (error) {
-   alert('An error has occurred: Code = ' + error.code);
-   console.log('upload error source ' + error.source);
-   console.log('upload error target ' + error.target);
- }
-
- var ft = new FileTransfer();
- ft.upload(fileURL, encodeURI('http://some.server.com/upload.php'), win, fail);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var fileURL; /* Must be a valid url, such as cdvfile://localhost/persistent/path/to/file.txt */
+
+var win = function(r)
+{
+&nbsp;&nbsp;&nbsp;console.log('Code = ' + r.responseCode);
+&nbsp;&nbsp;&nbsp;console.log('Response = ' + r.response);
+&nbsp;&nbsp;&nbsp;console.log('Sent = ' + r.bytesSent);
+}
+
+var fail = function(error)
+{
+&nbsp;&nbsp;&nbsp;alert('An error has occurred: Code = ' + error.code);
+&nbsp;&nbsp;&nbsp;console.log('upload error source ' + error.source);
+&nbsp;&nbsp;&nbsp;console.log('upload error target ' + error.target);
+}
+
+var ft = new FileTransfer();
+ft.upload(fileURL, encodeURI('http://some.server.com/upload.php'), win, fail);
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Code = 200
@@ -687,30 +699,28 @@ Sent = 1024
         </ul>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var fileURL; // should be a valid url eg. cdvfile://localhost/persistent/path/to/file.txt
-
- var fileTransfer = new FileTransfer();
- var uri = encodeURI('http://some.server.com/download.php');
-
- fileTransfer.download(
-   uri,
-   fileURL,
-   function(entry) {
-     console.log('download complete: ' + entry.toURL());
-   },
-   function(error) {
-     console.log('download error source ' + error.source);
-     console.log('download error target ' + error.target);
-     console.log('upload error code' + error.code);
-   },
-   false,
-   {
-     headers: {
-       'Authorization': 'Basic dGVzdHVzZXJuYW1lOnRlc3RwYXNzd29yZA=='
-     }
-   }
- );
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var fileURL; /* Must be a valid url, such as cdvfile://localhost/persistent/path/to/file.txt */
+
+var fileTransfer = new FileTransfer();
+var uri = encodeURI('http://some.server.com/download.php');
+
+fileTransfer.download(uri, fileURL, function(entry)
+{
+&nbsp;&nbsp;&nbsp;console.log('download complete: ' + entry.toURL());
+}, function(error)
+{
+&nbsp;&nbsp;&nbsp;console.log('download error source ' + error.source);
+&nbsp;&nbsp;&nbsp;console.log('download error target ' + error.target);
+&nbsp;&nbsp;&nbsp;console.log('upload error code' + error.code);
+}, false,
+{
+&nbsp;&nbsp;&nbsp;headers:
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'Authorization': 'Basic dGVzdHVzZXJuYW1lOnRlc3RwYXNzd29yZA=='
+&nbsp;&nbsp;&nbsp;}
+});
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>download complete: file:///home/owner/apps_rw/Gk6hf8hjk/tmp/file.txt
@@ -739,26 +749,29 @@ Sent = 1024
  http://tizen.org/privilege/internet
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var fileURL; // should be a valid url eg. cdvfile://localhost/persistent/path/to/file.txt
-
- var win = function(r) {
-   console.log('Should not be called.');
- }
-
- var fail = function(error) {
-   // error.code == FileTransferError.ABORT_ERR
-   alert('An error has occurred: Code = ' + error.code);
-   console.log('upload error source ' + error.source);
-   console.log('upload error target ' + error.target);
- };
-
- var ft = new FileTransfer();
- ft.upload(fileURL, encodeURI('http://some.server.com/upload.php'), win, fail);
- ft.abort();
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var fileURL; /* Must be a valid url, such as cdvfile://localhost/persistent/path/to/file.txt */
+
+var win = function(r)
+{
+&nbsp;&nbsp;&nbsp;console.log('Should not be called.');
+}
+
+var fail = function(error)
+{
+&nbsp;&nbsp;&nbsp;/* error.code == FileTransferError.ABORT_ERR */
+&nbsp;&nbsp;&nbsp;alert('An error has occurred: Code = ' + error.code);
+&nbsp;&nbsp;&nbsp;console.log('upload error source ' + error.source);
+&nbsp;&nbsp;&nbsp;console.log('upload error target ' + error.target);
+};
+
+var ft = new FileTransfer();
+ft.upload(fileURL, encodeURI('http://some.server.com/upload.php'), win, fail);
+ft.abort();
+</pre>
 </div>
 <div class="output">
-<span class="title"><p>Output example:</p></span><pre>An error has occured: Code = 4
+<span class="title"><p>Output example:</p></span><pre>An error has occurred: Code = 4
 upload error source file:///home/owner/apps_rw/Gk6hf8hjk/tmp/file.txt
 upload error target http://some.server.com/file.txt
 </pre>
index b54d264..d1dce58 100644 (file)
@@ -3,7 +3,7 @@
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
 <link rel="stylesheet" type="text/css" href="../tizen.css" media="screen">
-<script type="text/javascript" src="snippet.js"></script><title>Globalization API</title>
+<script type="text/javascript" src="../snippet.js"></script><title>Globalization API</title>
 </head>
 <body id="page-content" onload="prettyPrint()">
 <div class="api" id="::Globalization">
@@ -263,15 +263,20 @@ during this method's execution.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // When the browser is set to the en-US language,
- // this should output the text
- // similar to the results that follow.
-
- navigator.globalization.getPreferredLanguage(
-   function (language) { console.log('Language: ' + language.value); },
-   function () { console.log('Error getting language.'); }
- );
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/*
+   When the browser is set to the en-US language,
+   this outputs the text
+   similar to the results that follow
+*/
+navigator.globalization.getPreferredLanguage(function(language)
+{
+&nbsp;&nbsp;&nbsp;console.log('Language: ' + language.value);
+}, function()
+{
+&nbsp;&nbsp;&nbsp;console.log('Error getting language.');
+});
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Language: en-US
@@ -323,15 +328,20 @@ occuring while getting a locale name.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // When the browser is set to the en-US language,
- // this should output the text
- // similar to the results that follow.
-
- navigator.globalization.getLocaleName(
-   function (locale) { console.log('Locale: ' + locale.value); },
-   function () { console.log('Error getting locale.'); }
- );
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/*
+   When the browser is set to the en-US language,
+   this outputs the text
+   similar to the results that follow
+*/
+navigator.globalization.getLocaleName(function(locale)
+{
+&nbsp;&nbsp;&nbsp;console.log('Locale: ' + locale.value);
+}, function()
+{
+&nbsp;&nbsp;&nbsp;console.log('Error getting locale.');
+});
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Locale: en-US
@@ -387,17 +397,20 @@ passed as a parameter to the successCallback.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // When the browser is set to the en-US language,
- // this should output text similar to the results that follow.
- // This example uses the default conversion options.
-
- navigator.globalization.dateToString(
-   new Date(),
-   function (date) { console.log('Date: ' + date.value); },
-   function () { console.log('Error getting dateString.'); },
-   { formatLength: 'short', selector: 'date and time' }
- );
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/*
+   When the browser is set to the en-US language,
+   this outputs the text similar to the results that follow
+   This example uses the default conversion options
+*/
+navigator.globalization.dateToString(new Date(), function(date)
+{
+&nbsp;&nbsp;&nbsp;console.log('Date: ' + date.value);
+}, function()
+{
+&nbsp;&nbsp;&nbsp;console.log('Error getting dateString.');
+}, {formatLength: 'short', selector: 'date and time'});
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Date: 9/25/2012 4:21PM
@@ -450,24 +463,25 @@ for example 'USD'.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // When the browser is set to the en-US locale and the selected
- // currency is United States Dollars, this example outputs
- // text similar to the results that follow.
-
- navigator.globalization.getCurrencyPattern(
-   'USD',
-   function (pattern) {
-     console.log('pattern: '  + pattern.pattern);
-     console.log('code: ' + pattern.code);
-     console.log('fraction: ' + pattern.fraction);
-     console.log('rounding: ' + pattern.rounding);
-     console.log('decimal: '  + pattern.decimal);
-     console.log('grouping: ' + pattern.grouping);
-   },
-   function () { console.log('Error getting pattern.'); }
- );
-
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/*
+   When the browser is set to the en-US language,
+   and the selected currency is United States Dollars,
+   this outputs the text similar to the results that follow
+*/
+navigator.globalization.getCurrencyPattern('USD', function(pattern)
+{
+&nbsp;&nbsp;&nbsp;console.log('pattern: '  + pattern.pattern);
+&nbsp;&nbsp;&nbsp;console.log('code: ' + pattern.code);
+&nbsp;&nbsp;&nbsp;console.log('fraction: ' + pattern.fraction);
+&nbsp;&nbsp;&nbsp;console.log('rounding: ' + pattern.rounding);
+&nbsp;&nbsp;&nbsp;console.log('decimal: '  + pattern.decimal);
+&nbsp;&nbsp;&nbsp;console.log('grouping: ' + pattern.grouping);
+}, function()
+{
+&nbsp;&nbsp;&nbsp;console.log('Error getting pattern.');
+});
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>pattern: $#,##0.##;($#,##0.##)
@@ -527,20 +541,23 @@ The default value is <var>{type: 'wide', item: 'months'}</var>                </
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // When the browser is set to the en_US locale,
- // this example logs the names of months, as per locale settings,
- // with text similar to the results that follow.
-
- navigator.globalization.getDateNames(
-   function (names) {
-     for (var i = 0; i &lt; names.value.length; i++) {
-       console.log('month: ' + names.value[i]);
-     }
-   },
-   function () { console.log('Error getting names.'); },
-   { type: 'wide', item: 'months' }
- );
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/*
+   When the browser is set to the en-US language,
+   this example logs the names of months, as per locale settings
+   with text similar to the results that follow
+*/
+navigator.globalization.getDateNames(function(names)
+{
+&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; names.value.length; i++)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('month: ' + names.value[i]);
+&nbsp;&nbsp;&nbsp;}
+}, function()
+{
+&nbsp;&nbsp;&nbsp;console.log('Error getting names.');
+}, {type: 'wide', item: 'months'});
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>month: January
@@ -604,20 +621,25 @@ The default value is <var>{formatLength: 'short', selector: 'date and time'}</va
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // This example displays the locale date pattern.
- // When the browser is set to the en_US locale,
- // the text displayed is similar to the results that follow.
-
- function checkDatePattern () {
-   navigator.globalization.getDatePattern(
-     function (date) { console.log('Date pattern: ' + date.pattern); },
-     function () { console.log('Error getting pattern'); },
-     { formatLength: 'short', selector: 'date and time' }
-   );
- }
-
- checkDatePattern();
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/*
+   This example displays the locale date pattern
+   When the browser is set to the en-US locale,
+   this outputs the text similar to the results that follow
+*/
+function checkDatePattern()
+{
+&nbsp;&nbsp;&nbsp;navigator.globalization.getDatePattern(function(date)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('Date pattern: ' + date.pattern);
+&nbsp;&nbsp;&nbsp;}, function()
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('Error getting pattern');
+&nbsp;&nbsp;&nbsp;}, {formatLength: 'short', selector: 'date and time'});
+}
+
+checkDatePattern();
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Date pattern: M/d/yyyy h:mm a
@@ -667,14 +689,19 @@ the first day of a week.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // When the browser is set to the en_US locale,
- // this outputs the text similar to "day: 1".
-
- navigator.globalization.getFirstDayOfWeek(
-   function (day) { console.log('day: ' + day.value); },
-   function () { console.log('Error getting first day of week.'); }
- );
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/*
+   When the browser is set to the en_US locale,
+   this outputs the text similar to "day: 1"
+*/
+navigator.globalization.getFirstDayOfWeek(function(day)
+{
+&nbsp;&nbsp;&nbsp;console.log('day: ' + day.value);
+}, function()
+{
+&nbsp;&nbsp;&nbsp;console.log('Error getting first day of week.');
+});
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>day: 1
@@ -729,26 +756,26 @@ the pattern will be returned.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // When the browser is set to the en_US locale,
- // this example outputs the text
- // similar to the results that follow.
-
- navigator.globalization.getNumberPattern(
-   function (pattern) {
-     console.log('pattern: '  + pattern.pattern);
-     console.log('symbol: '   + pattern.symbol);
-     console.log('fraction: ' + pattern.fraction);
-     console.log('rounding: ' + pattern.rounding);
-     console.log('positive: ' + pattern.positive);
-     console.log('negative: ' + pattern.negative);
-     console.log('decimal: '  + pattern.decimal);
-     console.log('grouping: ' + pattern.grouping);
-   },
-   function() { console.log('An error occurred.'); },
-   { type: 'decimal' }
- );
-
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/*
+   When the browser is set to the en_US locale,
+   this outputs the text similar to the results that follow
+*/
+navigator.globalization.getNumberPattern(function(pattern)
+{
+&nbsp;&nbsp;&nbsp;console.log('pattern: ' + pattern.pattern);
+&nbsp;&nbsp;&nbsp;console.log('symbol: ' + pattern.symbol);
+&nbsp;&nbsp;&nbsp;console.log('fraction: ' + pattern.fraction);
+&nbsp;&nbsp;&nbsp;console.log('rounding: ' + pattern.rounding);
+&nbsp;&nbsp;&nbsp;console.log('positive: ' + pattern.positive);
+&nbsp;&nbsp;&nbsp;console.log('negative: ' + pattern.negative);
+&nbsp;&nbsp;&nbsp;console.log('decimal: ' + pattern.decimal);
+&nbsp;&nbsp;&nbsp;console.log('grouping: ' + pattern.grouping);
+}, function()
+{
+&nbsp;&nbsp;&nbsp;console.log('An error occurred.');
+}, {type: 'decimal'});
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>pattern: #,##0.###
@@ -811,16 +838,19 @@ errors occuring during this method's execution.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // During the summer, and if the browser
- // is set to a DST-enabled timezone,
- // this should log text similar to "dst: true":
-
- navigator.globalization.isDayLightSavingsTime(
-   new Date(),
-   function (date) { console.log('dst: ' + date.dst); },
-   function () { console.log('Error getting the DST state.'); }
- );
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/*
+   During the summer, and if the browser is set to a DST-enabled timezone,
+   this logs text similar to "dst: true"
+*/
+navigator.globalization.isDayLightSavingsTime(new Date(), function(date)
+{
+&nbsp;&nbsp;&nbsp;console.log('dst: ' + date.dst);
+}, function()
+{
+&nbsp;&nbsp;&nbsp;console.log('Error getting the DST state.');
+});
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>dst: true
@@ -884,37 +914,43 @@ The default value of this parameter is <var>{type: 'decimal'}</var>.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // When the browser is set to the en_US locale,
- // this code displays the results that follow.
-
- navigator.globalization.numberToString(
-    3.1415926,
-    function (number) { console.log('decimal number: ' + number.value); },
-    function () { console.log('Error getting number.'); },
-    { type: 'decimal' }
- );
-
- navigator.globalization.numberToString(
-    1000003,
-    function (number) { console.log('big decimal number: ' + number.value); },
-    function () { console.log('Error getting number.'); },
-    { type: 'decimal' }
- );
-
- navigator.globalization.numberToString(
-    0.3183099,
-    function (number) { console.log('percentile: ' + number.value); },
-    function () { console.log('Error getting number.'); },
-    { type: 'percent' }
- );
-
- navigator.globalization.numberToString(
-    1099.95,
-    function (number) { console.log('currency: ' + number.value); },
-    function () { console.log('Error getting number'); },
-    { type: 'currency' }
- );
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/*
+   When the browser is set to the en_US locale,
+   this code displays the results that follow
+*/
+navigator.globalization.numberToString(3.1415926, function(number)
+{
+&nbsp;&nbsp;&nbsp;console.log('decimal number: ' + number.value);
+}, function()
+{
+&nbsp;&nbsp;&nbsp;console.log('Error getting number.');
+}, {type: 'decimal'});
+
+navigator.globalization.numberToString(1000003, function(number)
+{
+&nbsp;&nbsp;&nbsp;console.log('big decimal number: ' + number.value);
+}, function()
+{
+&nbsp;&nbsp;&nbsp;console.log('Error getting number.');
+}, {type: 'decimal'});
+
+navigator.globalization.numberToString(0.3183099, function(number)
+{
+&nbsp;&nbsp;&nbsp;console.log('percentile: ' + number.value);
+}, function()
+{
+&nbsp;&nbsp;&nbsp;console.log('Error getting number.');
+}, {type: 'percent'});
+
+navigator.globalization.numberToString(1099.95, function(number)
+{
+&nbsp;&nbsp;&nbsp;console.log('currency: ' + number.value);
+}, function()
+{
+&nbsp;&nbsp;&nbsp;console.log('Error getting number');
+}, {type: 'currency'});
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>decimal number: 3.142
@@ -973,22 +1009,23 @@ The default value is <var>{formatLength: 'short', selector: 'date and time'}</va
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // when the browser is set to the en_US locale,
- // this example outputs text similar to the results that follow.
- // Note that the month integer is one less than the string,
- // as the month integer represents an array index.
-
- navigator.globalization.stringToDate(
-     '9/25/2012',
-     function (date) {
-       console.log('month: '  + date.month +
-                   ', day: '  + date.day   +
-                   ', year: ' + date.year)
-     },
-     function () { console.log('Error getting date.'); },
-     { selector: 'date' }
- );
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/*
+   When the browser is set to the en_US locale,
+   this example outputs text similar to the results that follow
+   Note that the month integer is one less than the string,
+   as the month integer represents an array index
+*/
+navigator.globalization.stringToDate('9/25/2012', function(date)
+{
+&nbsp;&nbsp;&nbsp;console.log('month: ' + date.month +
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;', day: ' + date.day +
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;', year: ' + date.year)
+}, function()
+{
+&nbsp;&nbsp;&nbsp;console.log('Error getting date.');
+}, {selector: 'date'});
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>month: 8, day: 25, year: 2012
@@ -1047,16 +1084,19 @@ The default value is <var>{type: 'decimal'}</var>                </li>
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // When the browser is set to the en_US locale,
- // this should display the text similar to the results that follow.
-
- navigator.globalization.stringToNumber(
-     '1234.56',
-     function (number) { console.log('number: ' + number.value); },
-     function () { console.log('Error getting number.'); },
-     { type: 'decimal' }
- );
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/*
+   When the browser is set to the en_US locale,
+   this displays the text similar to the results that follow
+*/
+navigator.globalization.stringToNumber('1234.56', function(number)
+{
+&nbsp;&nbsp;&nbsp;console.log('number: ' + number.value);
+}, function()
+{
+&nbsp;&nbsp;&nbsp;console.log('Error getting number.');
+}, {type: 'decimal'});
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>number: 1234.56
index b54cbca..5aa9d31 100644 (file)
@@ -3,7 +3,7 @@
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
 <link rel="stylesheet" type="text/css" href="../tizen.css" media="screen">
-<script type="text/javascript" src="snippet.js"></script><title>Media API</title>
+<script type="text/javascript" src="../snippet.js"></script><title>Media API</title>
 </head>
 <body id="page-content" onload="prettyPrint()">
 <div class="api" id="::Media">
@@ -125,8 +125,8 @@ Original documentation: <a href="https://www.npmjs.com/package/cordova-plugin-me
        void stop();
    };</pre>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var myMedia = new Media(src, successCallback, errorCallback, statusCallback);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var myMedia = new Media(src, successCallback, errorCallback, statusCallback);</pre>
 </div>
 <div class="constructors">
 <h4 id="Media::constructor">Constructors</h4>
@@ -247,28 +247,32 @@ Original documentation: <a href="https://www.npmjs.com/package/cordova-plugin-me
         </ul>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> successCallback = function() {
-    console.log('Audio file has been played back.');
- }
-
- errorCallback = function(err) {
-    console.log('Error occurred ' + err.message);
- }
-
- positionSuccessCallback = function(position) {
-    console.log('Current position is ' + position);
- }
-
- var src = 'file:///home/app/content/Documents/play.mp3';
- var myMedia = new Media(src, successCallback, errorCallback);
-
- myMedia.play();
-
- setTimeout(function() {
-     myMedia.getCurrentPosition(positionSuccessCallback);
- }, 2000);
-
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+successCallback = function()
+{
+&nbsp;&nbsp;&nbsp;console.log('Audio file has been played back.');
+}
+
+errorCallback = function(err)
+{
+&nbsp;&nbsp;&nbsp;console.log('Error occurred ' + err.message);
+}
+
+positionSuccessCallback = function(position)
+{
+&nbsp;&nbsp;&nbsp;console.log('Current position is ' + position);
+}
+
+var src = 'file:///home/app/content/Documents/play.mp3';
+var myMedia = new Media(src, successCallback, errorCallback);
+
+myMedia.play();
+
+setTimeout(function()
+{
+&nbsp;&nbsp;&nbsp;myMedia.getCurrentPosition(positionSuccessCallback);
+}, 2000);
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Audio file has been played back.
@@ -290,20 +294,23 @@ Current position is 2.000
  3.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> successCallback = function() {
-   console.log('Audio file has been played back.);
- }
-
- errorCallback = function(err) {
-    console.log('Error occurred ' + err.message);
- }
-
- var src = 'file:///home/app/content/Documents/play.mp3';
- var myMedia = new Media(src, successCallback, errorCallback);
-
- var duration = myMedia.getDuration();
- console.log('Audio duration is ' + duration);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+successCallback = function()
+{
+&nbsp;&nbsp;&nbsp;console.log('Audio file has been played back.');
+}
+
+errorCallback = function(err)
+{
+&nbsp;&nbsp;&nbsp;console.log('Error occurred ' + err.message);
+}
+
+var src = 'file:///home/app/content/Documents/play.mp3';
+var myMedia = new Media(src, successCallback, errorCallback);
+
+var duration = myMedia.getDuration();
+console.log('Audio duration is ' + duration);
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Audio duration is 281.035
@@ -324,31 +331,36 @@ Current position is 2.000
  3.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> successCallback = function() {
-   console.log('Audio file has been played back.');
- }
-
- errorCallback = function(err) {
-    console.log('Error occurred ' + err.message);
- }
-
- statusCallback = function(status) {
-    if (status == Media.MEDIA_PAUSED) {
-        console.log('Audio file has been paused');
-    }
- }
-
- var src = 'file:///home/app/content/Documents/play.mp3';
- var myMedia = new Media(src, successCallback, errorCallback, statusCallback);
-
- myMedia.play();
-
- //Pause after 2 seconds
- setTimeout(function() {
-     myMedia.pause();
- }, 2000);
-
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+successCallback = function()
+{
+&nbsp;&nbsp;&nbsp;console.log('Audio file has been played back.');
+}
+
+errorCallback = function(err)
+{
+&nbsp;&nbsp;&nbsp;console.log('Error occurred ' + err.message);
+}
+
+statusCallback = function(status)
+{
+&nbsp;&nbsp;&nbsp;if (status == Media.MEDIA_PAUSED)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('Audio file has been paused');
+&nbsp;&nbsp;&nbsp;}
+}
+
+var src = 'file:///home/app/content/Documents/play.mp3';
+var myMedia = new Media(src, successCallback, errorCallback, statusCallback);
+
+myMedia.play();
+
+/* Pause after 2 seconds */
+setTimeout(function()
+{
+&nbsp;&nbsp;&nbsp;myMedia.pause();
+}, 2000);
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Audio file has been paused.
@@ -369,19 +381,22 @@ Current position is 2.000
  3.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> successCallback = function() {
-    console.log('Audio file has been played back.');
- }
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+successCallback = function()
+{
+&nbsp;&nbsp;&nbsp;console.log('Audio file has been played back.');
+}
 
- errorCallback = function(err) {
-    console.log('Error occurred ' + err.message);
- }
+errorCallback = function(err)
+{
+&nbsp;&nbsp;&nbsp;console.log('Error occurred ' + err.message);
+}
 
- var src = 'file:///home/app/content/Documents/play.mp3';
- var myMedia = new Media(src, successCallback, errorCallback);
+var src = 'file:///home/app/content/Documents/play.mp3';
+var myMedia = new Media(src, successCallback, errorCallback);
 
- myMedia.play();
- </pre>
+myMedia.play();
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Audio file has been played back.
@@ -403,21 +418,24 @@ Applications should call the release function for any Media resource that is no
  3.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> successCallback = function() {
-    console.log('Audio file has been stopped or released.');
- }
-
- errorCallback = function(err) {
-    console.log('An error occurred: ' + err.message);
- }
-
- var src = 'file://home/app/content/Documents/play.mp3';
- var myMedia = new Media(src, successCallback, errorCallback);
-
- myMedia.play();
- myMedia.stop();
- myMedia.release();
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+successCallback = function()
+{
+&nbsp;&nbsp;&nbsp;console.log('Audio file has been stopped or released.');
+}
+
+errorCallback = function(err)
+{
+&nbsp;&nbsp;&nbsp;console.log('An error occurred: ' + err.message);
+}
+
+var src = 'file://home/app/content/Documents/play.mp3';
+var myMedia = new Media(src, successCallback, errorCallback);
+
+myMedia.play();
+myMedia.stop();
+myMedia.release();
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Audio file has been stopped or released.
@@ -448,24 +466,28 @@ Audio file has been stopped or released.
         </ul>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> successCallback = function() {
-    console.log('Audio file has been played back.');
- }
-
- errorCallback = function(err) {
-    console.log('An error occurred: ' + err.message);
- }
-
- var src = 'file://home/app/content/Documents/play.mp3';
- var myMedia = new Media(src, successCallback, errorCallback);
-
- myMedia.play();
-
- //SeekTo to 10 seconds after 5 seconds
- setTimeout(function() {
-     myMedia.seekTo(10000);
-     console.log('Playback position has been set to 10 seconds.');
- }, 5000);
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+successCallback = function()
+{
+&nbsp;&nbsp;&nbsp;console.log('Audio file has been played back.');
+}
+
+errorCallback = function(err)
+{
+&nbsp;&nbsp;&nbsp;console.log('An error occurred: ' + err.message);
+}
+
+var src = 'file://home/app/content/Documents/play.mp3';
+var myMedia = new Media(src, successCallback, errorCallback);
+
+myMedia.play();
+
+/* SeekTo to 10 seconds after 5 seconds */
+setTimeout(function()
+{
+&nbsp;&nbsp;&nbsp;myMedia.seekTo(10000);
+&nbsp;&nbsp;&nbsp;console.log('Playback position has been set to 10 seconds.');
+}, 5000);
  </pre>
 </div>
 <div class="output">
@@ -505,31 +527,36 @@ Audio file has been played back.
         </ul>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> successCallback = function() {
-    console.log('Audio file has been played back.');
- }
-
- errorCallback = function(err) {
-    console.log('Error occurred ' + err.message);
- }
-
- var src = 'file://home/app/content/Documents/play.mp3';
- var myMedia = new Media(src, successCallback, errorCallback);
-
- myMedia.play();
-
- // Mute volume after 2 seconds
- setTimeout(function() {
-     myMedia.setVolume(0.0);
-     console.log('Playback volume has been muted.');
- }, 2000);
-
- // Set volume to 1.0 after 5 seconds
- setTimeout(function() {
-    myMedia.setVolume(1.0);
-    console.log('Playback volume has been set to 1.0.');
- }, 5000);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+successCallback = function()
+{
+&nbsp;&nbsp;&nbsp;console.log('Audio file has been played back.');
+}
+
+errorCallback = function(err)
+{
+&nbsp;&nbsp;&nbsp;console.log('Error occurred ' + err.message);
+}
+
+var src = 'file://home/app/content/Documents/play.mp3';
+var myMedia = new Media(src, successCallback, errorCallback);
+
+myMedia.play();
+
+/* Mute volume after 2 seconds */
+setTimeout(function()
+{
+&nbsp;&nbsp;&nbsp;myMedia.setVolume(0.0);
+&nbsp;&nbsp;&nbsp;console.log('Playback volume has been muted.');
+}, 2000);
+
+/* Set volume to 1.0 after 5 seconds */
+setTimeout(function()
+{
+&nbsp;&nbsp;&nbsp;myMedia.setVolume(1.0);
+&nbsp;&nbsp;&nbsp;console.log('Playback volume has been set to 1.0.');
+}, 5000);
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Playback volume has been muted.
@@ -560,19 +587,22 @@ Audio file has been played back.
  http://tizen.org/privilege/mediacapture
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> successCallback = function() {
-    console.log('Started recording an audio file.');
- }
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+successCallback = function()
+{
+&nbsp;&nbsp;&nbsp;console.log('Started recording an audio file.');
+}
 
- errorCallback = function(err) {
-    console.log('Error occurred ' + err.message);
- }
+errorCallback = function(err)
+{
+&nbsp;&nbsp;&nbsp;console.log('Error occurred ' + err.message);
+}
 
- var src = 'recordAudio.mp3';
- var myRecMedia = new Media(src, successCallback, errorCallback);
+var src = 'recordAudio.mp3';
+var myRecMedia = new Media(src, successCallback, errorCallback);
 
- myRecMedia.startRecord();
- </pre>
+myRecMedia.startRecord();
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Started recording an audio file.
@@ -601,25 +631,29 @@ Audio file has been played back.
  http://tizen.org/privilege/mediacapture
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> successCallback = function() {
-    console.log('Started recording an audio file.');
- }
-
- errorCallback = function(err) {
-    console.log('Error occurred ' + err.message);
- }
-
- var src = 'recordAudio.mp3';
- var myRecMedia = new Media(src, successCallback, errorCallback);
-
- myRecMedia.startRecord();
-
- // Stop recording after 10 seconds
- setTimeout(function() {
-     myRecMedia.stopRecord();
-     console.log('Stopped recording an audio file.');
- }, 10000);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+successCallback = function()
+{
+&nbsp;&nbsp;&nbsp;console.log('Started recording an audio file.');
+}
+
+errorCallback = function(err)
+{
+&nbsp;&nbsp;&nbsp;console.log('Error occurred ' + err.message);
+}
+
+var src = 'recordAudio.mp3';
+var myRecMedia = new Media(src, successCallback, errorCallback);
+
+myRecMedia.startRecord();
+
+/* Stop recording after 10 seconds */
+setTimeout(function()
+{
+&nbsp;&nbsp;&nbsp;myRecMedia.stopRecord();
+&nbsp;&nbsp;&nbsp;console.log('Stopped recording an audio file.');
+}, 10000);
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Started recording an audio file.
@@ -641,24 +675,28 @@ Stopped recording an audio file.
  3.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> successCallback = function() {
-    console.log('Audio file has been stopped.');
- }
-
- errorCallback = function(err) {
-    console.log('Error occurred ' + err.message);
- }
-
- var src = 'file://home/app/content/Documents/play.mp3';
- var myMedia = new Media(src, successCallback, errorCallback);
-
- myMedia.play();
-
- // Stop after 10 seconds
- setTimeout(function() {
-     myMedia.stop();
- }, 10000);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+successCallback = function()
+{
+&nbsp;&nbsp;&nbsp;console.log('Audio file has been stopped.');
+}
+
+errorCallback = function(err)
+{
+&nbsp;&nbsp;&nbsp;console.log('Error occurred ' + err.message);
+}
+
+var src = 'file://home/app/content/Documents/play.mp3';
+var myMedia = new Media(src, successCallback, errorCallback);
+
+myMedia.play();
+
+/* Stop after 10 seconds */
+setTimeout(function()
+{
+&nbsp;&nbsp;&nbsp;myMedia.stop();
+}, 10000);
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Audio playback has been stopped.
index 81a6afb..1d0fc4a 100644 (file)
@@ -3,7 +3,7 @@
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
 <link rel="stylesheet" type="text/css" href="../tizen.css" media="screen">
-<script type="text/javascript" src="snippet.js"></script><title>NetworkInformation API</title>
+<script type="text/javascript" src="../snippet.js"></script><title>NetworkInformation API</title>
 </head>
 <body id="page-content" onload="prettyPrint()">
 <div class="api" id="::NetworkInformation">
@@ -112,23 +112,25 @@ The <em>navigator.connection</em> object allows access to the NetworkInformation
  http://tizen.org/privilege/telephony
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function checkConnection() {
-   var networkState = navigator.connection.type;
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function checkConnection()
+{
+&nbsp;&nbsp;&nbsp;var networkState = navigator.connection.type;
 
-   var states = {};
-   states[Connection.UNKNOWN]  = 'Unknown connection';
-   states[Connection.ETHERNET] = 'Ethernet connection';
-   states[Connection.WIFI]     = 'WiFi connection';
-   states[Connection.CELL_2G]  = 'Cell 2G connection';
-   states[Connection.CELL_3G]  = 'Cell 3G connection';
-   states[Connection.CELL_4G]  = 'Cell 4G connection';
-   states[Connection.CELL]     = 'Cell generic connection';
-   states[Connection.NONE]     = 'No network connection';
-   alert('Connection type: ' + states[networkState]);
- }
+&nbsp;&nbsp;&nbsp;var states = {};
+&nbsp;&nbsp;&nbsp;states[Connection.UNKNOWN] = 'Unknown connection';
+&nbsp;&nbsp;&nbsp;states[Connection.ETHERNET] = 'Ethernet connection';
+&nbsp;&nbsp;&nbsp;states[Connection.WIFI] = 'WiFi connection';
+&nbsp;&nbsp;&nbsp;states[Connection.CELL_2G] = 'Cell 2G connection';
+&nbsp;&nbsp;&nbsp;states[Connection.CELL_3G] = 'Cell 3G connection';
+&nbsp;&nbsp;&nbsp;states[Connection.CELL_4G] = 'Cell 4G connection';
+&nbsp;&nbsp;&nbsp;states[Connection.CELL] = 'Cell generic connection';
+&nbsp;&nbsp;&nbsp;states[Connection.NONE] = 'No network connection';
+&nbsp;&nbsp;&nbsp;alert('Connection type: ' + states[networkState]);
+}
 
- checkConnection();
- </pre>
+checkConnection();
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Connection type: Cell 3G connection
@@ -165,8 +167,7 @@ The <em>navigator.connection</em> object allows access to the NetworkInformation
  3.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> console.log(Connection.UNKNOWN);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">console.log(Connection.UNKNOWN);</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>unknown
@@ -183,8 +184,7 @@ The <em>navigator.connection</em> object allows access to the NetworkInformation
  3.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> console.log(Connection.ETHERNET);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">console.log(Connection.ETHERNET);</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>ethernet
@@ -201,8 +201,7 @@ The <em>navigator.connection</em> object allows access to the NetworkInformation
  3.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> console.log(Connection.WIFI);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">console.log(Connection.WIFI);</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>wifi
@@ -219,8 +218,7 @@ The <em>navigator.connection</em> object allows access to the NetworkInformation
  3.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> console.log(Connection.CELL_2G);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">console.log(Connection.CELL_2G);</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>2g
@@ -237,8 +235,7 @@ The <em>navigator.connection</em> object allows access to the NetworkInformation
  3.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> console.log(Connection.CELL_3G);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">console.log(Connection.CELL_3G);</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>3g
@@ -255,8 +252,7 @@ The <em>navigator.connection</em> object allows access to the NetworkInformation
  3.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> console.log(Connection.CELL_4G);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">console.log(Connection.CELL_4G);</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>4g
@@ -273,8 +269,7 @@ The <em>navigator.connection</em> object allows access to the NetworkInformation
  3.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> console.log(Connection.CELL);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">console.log(Connection.CELL);</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>cellular
@@ -291,8 +286,7 @@ The <em>navigator.connection</em> object allows access to the NetworkInformation
  3.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> console.log(Connection.NONE);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">console.log(Connection.NONE);</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>none
@@ -326,16 +320,19 @@ Applications typically should use document.addEventListener() to attach an event
 Original documentation: <a href="https://www.npmjs.com/package/cordova-plugin-network-information#online">Cordova online event</a>          </p>
          </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> document.addEventListener('deviceready', onDeviceReady, false);
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+document.addEventListener('deviceready', onDeviceReady, false);
 
- function onDeviceReady() {
-   document.addEventListener('online', onOnline, false);
- }
+function onDeviceReady()
+{
+&nbsp;&nbsp;&nbsp;document.addEventListener('online', onOnline, false);
+}
 
- function onOnline() {
-   // Handle the online event
- }
- </pre>
+function onOnline()
+{
+&nbsp;&nbsp;&nbsp;/* Handle the online event */
+}
+</pre>
 </div>
 </div>
 <div class="interface" id="OfflineEventCallback">
@@ -362,16 +359,19 @@ Applications typically should use document.addEventListener() to attach an event
 Original documentation: <a href="https://www.npmjs.com/package/cordova-plugin-network-information#offline">Cordova offline event</a>          </p>
          </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> document.addEventListener('deviceready', onDeviceReady, false);
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+document.addEventListener('deviceready', onDeviceReady, false);
 
- function onDeviceReady() {
-   document.addEventListener('offline', onOffline, false);
- }
+function onDeviceReady()
+{
+&nbsp;&nbsp;&nbsp;document.addEventListener('offline', onOffline, false);
+}
 
- function onOffline() {
-   // Handle the offline event
- }
- </pre>
+function onOffline()
+{
+&nbsp;&nbsp;&nbsp;/* Handle the offline event */
+}
+</pre>
 </div>
 </div>
 </div>
index 33575ec..81b4a6d 100644 (file)
@@ -227,25 +227,34 @@ DataControl API.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> //The data provider, a native application, should be pre-installed and launched.
- //The same provider ID should be defined for the use of this API between a native application(provider) and a web application(consumer).
- //In this example, the DictionaryDataControlProvider native sample application is used as a data control provider.
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* 
+   The data provider, a native application, should be pre-installed and launched
+   The same provider ID should be defined for the use of this API between a native application(provider) and a web application(consumer)
+   In this example, the DictionaryDataControlProvider native sample application is used as a data control provider
+*/
 
- //Gets SQL type DataControlConsumerObject
- try {
-     var globalSQLConsumer = tizen.datacontrol.getDataControlConsumer(
-     "http://tizen.org/datacontrol/provider/DictionaryDataControlProvider", "Dictionary", "SQL");
- } catch (err) {
-     console.log (err.name +": " + err.message);
- }
- // Gets MAP type DataControlConsumerObject
- try {
-      globalMappedConsumer = tizen.datacontrol.getDataControlConsumer(
-      "http://tizen.org/datacontrol/provider/DictionaryDataControlProvider", "Dictionary", "MAP");
- } catch (err) {
-      console.log (err.name +": " + err.message);
- }
- </pre>
+/* Gets SQL type DataControlConsumerObject */
+try
+{
+&nbsp;&nbsp;&nbsp;var globalSQLConsumer = tizen.datacontrol.getDataControlConsumer(
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"http://tizen.org/datacontrol/provider/DictionaryDataControlProvider", "Dictionary", "SQL");
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name +": " + err.message);
+}
+/* Gets MAP type DataControlConsumerObject */
+try
+{
+&nbsp;&nbsp;&nbsp;globalMappedConsumer = tizen.datacontrol.getDataControlConsumer(
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"http://tizen.org/datacontrol/provider/DictionaryDataControlProvider", "Dictionary", "MAP");
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name +": " + err.message);
+}
+</pre>
 </div>
 </dd>
 </dl>
@@ -394,29 +403,34 @@ The string consists of one or more components, separated by a slash('/').
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function successcb(id, insertRowId)
- {
-     console.log("ok : reqid " + id);
- }
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function successcb(id, insertRowId)
+{
+&nbsp;&nbsp;&nbsp;console.log("ok: reqid " + id);
+}
 
- function errorcb(id, error)
- {
-     console.log("error id : " + id + ", error msg : " + error.message);
- }
+function errorcb(id, error)
+{
+&nbsp;&nbsp;&nbsp;console.log("error id: " + id + ", error msg: " + error.message);
+}
 
- try {
-     var rowData = {
-         columns : ["WORD", "WORD_DESC"] ,
-         values  : ["'tizen1'", "'tizen2'"]
-     };
-     // Defines globalReqId before
-     // Increases globalReqId for uniqueness
-     globalReqId++;
-     globalSQLConsumer.insert(globalReqId, rowData, successcb, errorcb);
- } catch (err) {
-     console.log (err.name +": " + err.message);
- }
- </pre>
+try
+{
+&nbsp;&nbsp;&nbsp;var rowData =
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;columns: ["WORD", "WORD_DESC"] ,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;values: ["'tizen1'", "'tizen2'"]
+&nbsp;&nbsp;&nbsp;};
+&nbsp;&nbsp;&nbsp;/* Defines globalReqId before */
+&nbsp;&nbsp;&nbsp;/* Increases globalReqId for uniqueness */
+&nbsp;&nbsp;&nbsp;globalReqId++;
+&nbsp;&nbsp;&nbsp;globalSQLConsumer.insert(globalReqId, rowData, successcb, errorcb);
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="SQLDataControlConsumer::update">
@@ -484,29 +498,34 @@ The string consists of one or more components, separated by a slash('/').
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function successcb(id)
- {
-     console.log("ok : reqid " + id);
- }
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function successcb(id)
+{
+&nbsp;&nbsp;&nbsp;console.log("ok: reqid " + id);
+}
 
- function errorcb(id, error)
- {
-     console.log("error id : " + id + ", error msg : " + error.message);
- }
+function errorcb(id, error)
+{
+&nbsp;&nbsp;&nbsp;console.log("error id: " + id + ", error msg: " + error.message);
+}
 
- try {
-     var rowData = {
-         columns : ["WORD", "WORD_DESC"] ,
-         values  : ["'tizen1'", "'Web apps platform!'"]
-     };
-     // Defines globalReqId before
-     // Increases globalReqId for uniqueness
-     globalReqId++;
-     globalSQLConsumer.update(globalReqId, rowData, "WORD='tizen1'", successcb, errorcb);
- } catch (err) {
-     console.log (err.name +": " + err.message);
- }
- </pre>
+try
+{
+&nbsp;&nbsp;&nbsp;var rowData =
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;columns: ["WORD", "WORD_DESC"] ,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;values: ["'tizen1'", "'Web apps platform!'"]
+&nbsp;&nbsp;&nbsp;};
+&nbsp;&nbsp;&nbsp;/* Defines globalReqId before */
+&nbsp;&nbsp;&nbsp;/* Increases globalReqId for uniqueness */
+&nbsp;&nbsp;&nbsp;globalReqId++;
+&nbsp;&nbsp;&nbsp;globalSQLConsumer.update(globalReqId, rowData, "WORD='tizen1'", successcb, errorcb);
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="SQLDataControlConsumer::remove">
@@ -570,25 +589,29 @@ The string consists of one or more components, separated by a slash('/').
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function successcb(id)
- {
-     console.log("ok : reqid " + id);
- }
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function successcb(id)
+{
+&nbsp;&nbsp;&nbsp;console.log("ok: reqid " + id);
+}
 
- function errorcb(id, error)
- {
-     console.log("error id : " + id + ", error msg : " + error.message);
- }
+function errorcb(id, error)
+{
+&nbsp;&nbsp;&nbsp;console.log("error id: " + id + ", error msg: " + error.message);
+}
 
- try {
-     // Defines globalReqId before
-     // Increases globalReqId for uniqueness
-     globalReqId++;
-     globalSQLConsumer.remove(globalReqId, "WORD='tizen1'", successcb, errorcb);
- } catch (err) {
-     console.log (err.name +": " + err.message);
- }
- </pre>
+try
+{
+&nbsp;&nbsp;&nbsp;/* Defines globalReqId before */
+&nbsp;&nbsp;&nbsp;/* Increases globalReqId for uniqueness */
+&nbsp;&nbsp;&nbsp;globalReqId++;
+&nbsp;&nbsp;&nbsp;globalSQLConsumer.remove(globalReqId, "WORD='tizen1'", successcb, errorcb);
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="SQLDataControlConsumer::select">
@@ -671,46 +694,48 @@ The sorting order of the selected rows. <br>It is an SQL <var>ORDER BY</var> cla
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function getValueSuccessCB(result, id)
- {
-     console.log("getValueSuccessCB result.length: " + result.length);
-     var length = result.length;
-     for (var i = 0; i &lt; length; i++)
-     {
-         var rowData = "| ";
-         var j = 0;
-         for (j = 0; j &lt; result[i].columns.length; j++)
-         {
-             rowData += "column: " + result[i].columns[j] + ", value: " + result[i].values[j] + " | ";
-         }
-         console.log(rowData);
-     }
- }
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function getValueSuccessCB(result, id)
+{
+&nbsp;&nbsp;&nbsp;console.log("getValueSuccessCB result.length: " + result.length);
+&nbsp;&nbsp;&nbsp;var length = result.length;
+&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; length; i++)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var rowData = "| ";
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var j = 0;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;for (j = 0; j &lt; result[i].columns.length; j++)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;rowData += "column: " + result[i].columns[j] + ", value: " + result[i].values[j] + " | ";
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(rowData);
+&nbsp;&nbsp;&nbsp;}
+}
+function errorcb(id, error)
+{
+&nbsp;&nbsp;&nbsp;console.log("error id: " + id + ", error msg: " + error.message);
+}
 
- function errorcb(id, error)
- {
-     console.log("error id : " + id + ", error msg : " + error.message);
- }
-
- try {
-     // globalSQLConsumer and globalReqId should be defined before.
-     // Increases globalReqId for uniqueness
-     var columns = ["WORD", "WORD_DESC" ];
-     var whereClause = "1";
-     console.log("----- Calling for ascending order -----");
-     globalSQLConsumer.select(globalReqId, columns, whereClause, getValueSuccessCB, errorcb,
-              null, null, "WORD_DESC ASC");
-     setTimeout( function() {
-        console.log("----- Calling descending order -----");
-        globalSQLConsumer.select(globalReqId, columns, whereClause, getValueSuccessCB, errorcb,
-                  null, null, "WORD_DESC DESC");
-     }, 1000);
- }
- catch (err) {
-     console.log (err.name +": " + err.message);
- }
-
- </pre>
+try
+{
+&nbsp;&nbsp;&nbsp;/* globalSQLConsumer and globalReqId should be defined before */
+&nbsp;&nbsp;&nbsp;/* Increases globalReqId for uniqueness */
+&nbsp;&nbsp;&nbsp;var columns = ["WORD", "WORD_DESC"];
+&nbsp;&nbsp;&nbsp;var whereClause = "1";
+&nbsp;&nbsp;&nbsp;console.log("----- Calling for ascending order -----");
+&nbsp;&nbsp;&nbsp;globalSQLConsumer.select(globalReqId, columns, whereClause, getValueSuccessCB, errorcb,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;null, null, "WORD_DESC ASC");
+&nbsp;&nbsp;&nbsp;setTimeout(function()
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("----- Calling descending order -----");
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;globalSQLConsumer.select(globalReqId, columns, whereClause, getValueSuccessCB, errorcb,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;null, null, "WORD_DESC DESC");
+&nbsp;&nbsp;&nbsp;}, 1000);
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+}
+</pre>
 </div>
 </dd>
 </dl>
@@ -811,25 +836,29 @@ The sorting order of the selected rows. <br>It is an SQL <var>ORDER BY</var> cla
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function successcb(id)
- {
-     console.log("ok : reqid " + id);
- }
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function successcb(id)
+{
+&nbsp;&nbsp;&nbsp;console.log("ok: reqid " + id);
+}
 
- function errorcb(id, error)
- {
-     console.log("error id : " + id + ", error msg : " + error.message);
- }
+function errorcb(id, error)
+{
+&nbsp;&nbsp;&nbsp;console.log("error id: " + id + ", error msg: " + error.message);
+}
 
- try {
-     // Defines globalReqId before
-     // Increases globalReqId for uniqueness
-     globalReqId++;
-     globalMappedConsumer.addValue(globalReqId, "tizen", "Foo", successcb, errorcb);
- } catch (err) {
-     console.log (err.name +": " + err.message);
- }
- </pre>
+try
+{
+&nbsp;&nbsp;&nbsp;/* Defines globalReqId before */
+&nbsp;&nbsp;&nbsp;/* Increases globalReqId for uniqueness */
+&nbsp;&nbsp;&nbsp;globalReqId++;
+&nbsp;&nbsp;&nbsp;globalMappedConsumer.addValue(globalReqId, "tizen", "Foo", successcb, errorcb);
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="MappedDataControlConsumer::removeValue">
@@ -900,25 +929,29 @@ The sorting order of the selected rows. <br>It is an SQL <var>ORDER BY</var> cla
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function successcb(id)
- {
-     console.log("ok : reqid " + id);
- }
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function successcb(id)
+{
+&nbsp;&nbsp;&nbsp;console.log("ok: reqid " + id);
+}
 
- function errorcb(id, error)
- {
-     console.log("error id : " + id + ", error msg : " + error.message);
- }
+function errorcb(id, error)
+{
+&nbsp;&nbsp;&nbsp;console.log("error id: " + id + ", error msg: " + error.message);
+}
 
- try {
-     // Defines globalReqId before
-     // Increases globalReqId for uniqueness
-     globalReqId++;
-     globalMappedConsumer.removeValue(globalReqId, "tizen", "Foo", successcb, errorcb);
- } catch (err) {
-     console.log (err.name +": " + err.message);
- }
- </pre>
+try
+{
+&nbsp;&nbsp;&nbsp;/* Defines globalReqId before */
+&nbsp;&nbsp;&nbsp;/* Increases globalReqId for uniqueness */
+&nbsp;&nbsp;&nbsp;globalReqId++;
+&nbsp;&nbsp;&nbsp;globalMappedConsumer.removeValue(globalReqId, "tizen", "Foo", successcb, errorcb);
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="MappedDataControlConsumer::getValue">
@@ -985,25 +1018,29 @@ The sorting order of the selected rows. <br>It is an SQL <var>ORDER BY</var> cla
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function getValueSuccessCB(result, id)
- {
-     console.log(result.length + ":" + result[0]);
- }
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function getValueSuccessCB(result, id)
+{
+&nbsp;&nbsp;&nbsp;console.log(result.length + ":" + result[0]);
+}
 
- function errorcb(id, error)
- {
-     console.log("error id : " + id + ", error msg : " + error.message);
- }
+function errorcb(id, error)
+{
+&nbsp;&nbsp;&nbsp;console.log("error id: " + id + ", error msg: " + error.message);
+}
 
- try {
-     // Defines globalReqId before
-     // Increases globalReqId for uniqueness
-     globalReqId++;
-     globalMappedConsumer.getValue(globalReqId, "tizen", getValueSuccessCB, errorcb);
- } catch (err) {
-     console.log (err.name +": " + err.message);
- }
- </pre>
+try
+{
+&nbsp;&nbsp;&nbsp;/* Defines globalReqId before */
+&nbsp;&nbsp;&nbsp;/* Increases globalReqId for uniqueness */
+&nbsp;&nbsp;&nbsp;globalReqId++;
+&nbsp;&nbsp;&nbsp;globalMappedConsumer.getValue(globalReqId, "tizen", getValueSuccessCB, errorcb);
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="MappedDataControlConsumer::updateValue">
@@ -1078,25 +1115,29 @@ The sorting order of the selected rows. <br>It is an SQL <var>ORDER BY</var> cla
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function successcb(id)
- {
-     console.log("ok : reqid " + id);
- }
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function successcb(id)
+{
+&nbsp;&nbsp;&nbsp;console.log("ok: reqid " + id);
+}
 
- function errorcb(id, error)
- {
-     console.log("error id : " + id + ", error msg : " + error.message);
- }
+function errorcb(id, error)
+{
+&nbsp;&nbsp;&nbsp;console.log("error id: " + id + ", error msg: " + error.message);
+}
 
- try {
-     // Defines globalReqId before
-     // Increases globalReqId for uniqueness
-     globalReqId++;
-     globalMappedConsumer.updateValue(globalReqId, "tizen", "Foo", "Bar", successcb, errorcb);
- } catch (err) {
-     console.log (err.name +": " + err.message);
- }
- </pre>
+try
+{
+&nbsp;&nbsp;&nbsp;/* Defines globalReqId before */
+&nbsp;&nbsp;&nbsp;/* Increases globalReqId for uniqueness */
+&nbsp;&nbsp;&nbsp;globalReqId++;
+&nbsp;&nbsp;&nbsp;globalMappedConsumer.updateValue(globalReqId, "tizen", "Foo", "Bar", successcb, errorcb);
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+}
+</pre>
 </div>
 </dd>
 </dl>
index 76870f4..f01cdfd 100644 (file)
@@ -782,18 +782,19 @@ The profile ID is provided when the profile is successfully added.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Creates a sync info
- var syncInfo = new tizen.SyncInfo("http://example.com/sync", "myId", "myPassword", "MANUAL", "TWO_WAY");
-
- // Syncs both contacts and events
- var contactInfo = new tizen.SyncServiceInfo(true, "CONTACT", "serverContact");
- var eventInfo = new tizen.SyncServiceInfo(true, "EVENT", "serverEvent");
- var serviceInfo = [contactInfo, eventInfo];
-
- // Adds a profile to sync
- var profile = new tizen.SyncProfileInfo("MyProfile", syncInfo, serviceInfo);
- tizen.datasync.add(profile);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Creates a sync info */
+var syncInfo = new tizen.SyncInfo("http://example.com/sync", "myId", "myPassword", "MANUAL", "TWO_WAY");
+
+/* Syncs both contacts and events */
+var contactInfo = new tizen.SyncServiceInfo(true, "CONTACT", "serverContact");
+var eventInfo = new tizen.SyncServiceInfo(true, "EVENT", "serverEvent");
+var serviceInfo = [contactInfo, eventInfo];
+
+/* Adds a profile to sync */
+var profile = new tizen.SyncProfileInfo("MyProfile", syncInfo, serviceInfo);
+tizen.datasync.add(profile);
+</pre>
 </div>
 </dd>
 <dt class="method" id="DataSynchronizationManager::update">
@@ -845,13 +846,14 @@ The profile ID is provided when the profile is successfully added.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Retrieves and updates a profile
- var profile = tizen.datasync.get(profileId);
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Retrieves and updates a profile */
+var profile = tizen.datasync.get(profileId);
 
- profile.profileName = "newProfileName";
+profile.profileName = "newProfileName";
 
- tizen.datasync.update(profile);
- </pre>
+tizen.datasync.update(profile);
+</pre>
 </div>
 </dd>
 <dt class="method" id="DataSynchronizationManager::remove">
@@ -903,9 +905,10 @@ The profile ID is provided when the profile is successfully added.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Removes a profile
- tizen.datasync.remove(profileId);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Removes a profile */
+tizen.datasync.remove(profileId);
+</pre>
 </div>
 </dd>
 <dt class="method" id="DataSynchronizationManager::getMaxProfilesNum">
@@ -947,9 +950,10 @@ Normally the platform sets a limitation on the number of supported profiles. It
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Gets the maximum number of supported profiles on the platform
- var numMaxProfiles = tizen.datasync.getMaxProfilesNum();
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Gets the maximum number of supported profiles on the platform */
+var numMaxProfiles = tizen.datasync.getMaxProfilesNum();
+</pre>
 </div>
 </dd>
 <dt class="method" id="DataSynchronizationManager::getProfilesNum">
@@ -990,9 +994,10 @@ Normally the platform sets a limitation on the number of supported profiles. It
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Gets the present number of profiles on the device
- var numProfiles = tizen.datasync.getProfilesNum();
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Gets the present number of profiles on the device */
+var numProfiles = tizen.datasync.getProfilesNum();
+</pre>
 </div>
 </dd>
 <dt class="method" id="DataSynchronizationManager::get">
@@ -1053,9 +1058,10 @@ The attempt to retrieve <em>SyncProfileInfo</em> doesn't get any confidential in
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Gets the profile information with the given ID
- var profile = tizen.datasync.get(profileId);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Gets the profile information with the given ID */
+var profile = tizen.datasync.get(profileId);
+</pre>
 </div>
 </dd>
 <dt class="method" id="DataSynchronizationManager::getAll">
@@ -1101,9 +1107,10 @@ An attempt to retrieve <em>SyncProfileInfo</em> doesn't get any confidential inf
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Gets all the profile information
- var profiles = tizen.datasync.getAll();
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Gets all the profile information */
+var profiles = tizen.datasync.getAll();
+</pre>
 </div>
 </dd>
 <dt class="method" id="DataSynchronizationManager::startSync">
@@ -1167,19 +1174,23 @@ If the sync mode is set to <em>MANUAL</em>, the synchronization does not start a
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var profileId; //profileId obtained from SyncProfileInfo
- var syncCallback = {
-   onprogress: function(profileId, serviceType, isFromServer, totalPerType, syncedPerType) {
-     console.log('Total: ' + totalPerType + ', synced: ' + syncedPerType + ' for the sync type: ' + serviceType);
-   },
-   onfailed: function(profileId, error) {
-      console.log('Failed with id: ' + profileId + ', error name: ' + error.name);
-   }
- };
-
- // Starts the sync operation with the corresponding callbacks
- tizen.datasync.startSync(profileId, syncCallback);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var profileId; /* profileId obtained from SyncProfileInfo */
+var syncCallback =
+{
+&nbsp;&nbsp;&nbsp;onprogress: function(profileId, serviceType, isFromServer, totalPerType, syncedPerType)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('Total: ' + totalPerType + ', synced: ' + syncedPerType + ' for the sync type: ' + serviceType);
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;onfailed: function(profileId, error)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('Failed with id: ' + profileId + ', error name: ' + error.name);
+&nbsp;&nbsp;&nbsp;}
+};
+
+/* Starts the sync operation with the corresponding callbacks */
+tizen.datasync.startSync(profileId, syncCallback);
+</pre>
 </div>
 </dd>
 <dt class="method" id="DataSynchronizationManager::stopSync">
@@ -1231,10 +1242,11 @@ If the sync mode is set to <em>MANUAL</em>, the synchronization does not start a
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var profileId; //profileId obtained from SyncProfileInfo
- // Stops the ongoing sync operation
- tizen.datasync.stopSync(profileId);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var profileId; /* profileId obtained from SyncProfileInfo */
+/* Stops the ongoing sync operation */
+tizen.datasync.stopSync(profileId);
+</pre>
 </div>
 </dd>
 <dt class="method" id="DataSynchronizationManager::getLastSyncStatistics">
@@ -1290,10 +1302,11 @@ If the sync mode is set to <em>MANUAL</em>, the synchronization does not start a
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var profileId; //profileId obtained from SyncProfileInfo
- // Gets the sync statistics information with the given ID
- var statistics = tizen.datasync.getLastSyncStatistics(profileId);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var profileId; /* profileId obtained from SyncProfileInfo */
+/* Gets the sync statistics information with the given ID */
+var statistics = tizen.datasync.getLastSyncStatistics(profileId);
+</pre>
 </div>
 </dd>
 </dl>
index 70b8bc2..bd156e4 100644 (file)
@@ -279,11 +279,12 @@ The default value is an empty object.
  2.1
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var req = new tizen.DownloadRequest("http://download.tizen.org/tools/README.txt");
- req.httpHeader["Pragma"] = "no-cache";
- req.httpHeader["Cookie"] = "version=1; Skin=new";
- req.httpHeader["X-Agent"] = "Tizen Sample App";
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var req = new tizen.DownloadRequest("http://download.tizen.org/tools/README.txt");
+req.httpHeader["Pragma"] = "no-cache";
+req.httpHeader["Cookie"] = "version=1; Skin=new";
+req.httpHeader["X-Agent"] = "Tizen Sample App";
+</pre>
 </div>
 </li>
 </ul>
@@ -384,47 +385,59 @@ If the network is not available for downloading, the return value is -1 since Ti
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Check if Download API is supported not on a device.
- var download_api_capability = tizen.systeminfo.getCapability("http://tizen.org/feature/download");
- if (download_api_capability === false) {
-     console.log("Download API is not supported on this device.");
-     return;
- }
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Check whether Download API is supported on a device */
+var download_api_capability = tizen.systeminfo.getCapability("http://tizen.org/feature/download");
+if (download_api_capability === false)
+{
+&nbsp;&nbsp;&nbsp;console.log("Download API is not supported on this device.");
 
- var listener = {
-   onprogress: function(id, receivedSize, totalSize) {
-     console.log('Received with id: ' + id + ', ' + receivedSize + '/' + totalSize);
-   },
-   onpaused: function(id) {
-     console.log('Paused with id: ' + id);
-   },
-   oncanceled: function(id) {
-     console.log('Canceled with id: ' + id);
-   },
-   oncompleted: function(id, path) {
-     console.log('Completed with id: ' + id + ', path: ' + path);
-   },
-   onfailed: function(id, error) {
-     console.log('Failed with id: ' + id + ', error name: ' + error.name);
-   }
- };
+&nbsp;&nbsp;&nbsp;return;
+}
 
- // Starts downloading the file from the Web with the corresponding callbacks.
- var downloadRequest = new tizen.DownloadRequest("http://download.tizen.org/tools/README.txt", "documents");
- var downloadId = tizen.download.start(downloadRequest, listener);
+var listener =
+{
+&nbsp;&nbsp;&nbsp;onprogress: function(id, receivedSize, totalSize)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('Received with id: ' + id + ', ' + receivedSize + '/' + totalSize);
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;onpaused: function(id)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('Paused with id: ' + id);
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;oncanceled: function(id)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('Canceled with id: ' + id);
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;oncompleted: function(id, path)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('Completed with id: ' + id + ', path: ' + path);
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;onfailed: function(id, error)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('Failed with id: ' + id + ', error name: ' + error.name);
+&nbsp;&nbsp;&nbsp;}
+};
 
- // If you want to download a large file through Wi-Fi,
- var wifi_capability = tizen.systeminfo.getCapability("http://tizen.org/feature/network.wifi");
- var wifiDownloadRequest = new tizen.DownloadRequest("http://download.tizen.org/tools/archive/14.02.2/Ubuntu_12.04/qemu_1.6.0rc3.orig.tar.gz", "downloads", null, "WIFI");
+/* Starts downloading the file from the Web with the corresponding callbacks */
+var downloadRequest = new tizen.DownloadRequest("http://download.tizen.org/tools/README.txt", "documents");
+var downloadId = tizen.download.start(downloadRequest, listener);
 
- if (wifi_capability === true) {
-     var downlodId_wifi = tizen.download.start(wifiDownloadRequest, listener);
- } else {
-     // If you call tizen.download.start(), NotSupportedError will be thrown.
-     console.log("This device doesn't support Download API through Wi-Fi.");
- }
+/* If you want to download a large file through Wi-Fi */
+var wifi_capability = tizen.systeminfo.getCapability("http://tizen.org/feature/network.wifi");
+var wifiDownloadRequest = new tizen.DownloadRequest(
+&nbsp;&nbsp;&nbsp;"http://download.tizen.org/tools/archive/14.02.2/Ubuntu_12.04/qemu_1.6.0rc3.orig.tar.gz", "downloads", null, "WIFI");
 
- </pre>
+if (wifi_capability === true)
+{
+&nbsp;&nbsp;&nbsp;var downlodId_wifi = tizen.download.start(wifiDownloadRequest, listener);
+}
+else
+{
+&nbsp;&nbsp;&nbsp;/* If you call tizen.download.start(), NotSupportedError will be thrown */
+&nbsp;&nbsp;&nbsp;console.log("This device doesn't support Download API through Wi-Fi.");
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="DownloadManager::cancel">
@@ -468,9 +481,10 @@ If the network is not available for downloading, the return value is -1 since Ti
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Cancels the ongoing download operation with the specified ID.
- tizen.download.cancel(downloadId);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Cancels the ongoing download operation with the specified ID */
+tizen.download.cancel(downloadId);
+</pre>
 </div>
 </dd>
 <dt class="method" id="DownloadManager::pause">
@@ -515,9 +529,10 @@ The paused download operation can be resumed later by the <em>resume()</em> meth
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Pauses the ongoing download operation with the specified ID.
- tizen.download.pause(downloadId);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Pauses the ongoing download operation with the specified ID */
+tizen.download.pause(downloadId);
+</pre>
 </div>
 </dd>
 <dt class="method" id="DownloadManager::resume">
@@ -561,9 +576,10 @@ The paused download operation can be resumed later by the <em>resume()</em> meth
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Resumes the paused download operation with the specified ID.
- tizen.download.resume(downloadId);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Resumes the paused download operation with the specified ID */
+tizen.download.resume(downloadId);
+</pre>
 </div>
 </dd>
 <dt class="method" id="DownloadManager::getState">
@@ -611,9 +627,10 @@ The paused download operation can be resumed later by the <em>resume()</em> meth
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Gets the state of the download operation with the given ID.
- var state = tizen.download.getState(downloadId);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Gets the state of the download operation with the given ID */
+var state = tizen.download.getState(downloadId);
+</pre>
 </div>
 </dd>
 <dt class="method" id="DownloadManager::getDownloadRequest">
@@ -664,9 +681,10 @@ parameters contain an invalid value.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Gets the download request information with the given ID.
- var downloadRequest = tizen.download.getDownloadRequest(downloadId);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Gets the download request information with the given ID */
+var downloadRequest = tizen.download.getDownloadRequest(downloadId);
+</pre>
 </div>
 </dd>
 <dt class="method" id="DownloadManager::getMIMEType">
@@ -721,9 +739,10 @@ parameters contain an invalid value.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Get the MIME type of the download operation with the given ID.
- var MIMEtype = tizen.download.getMIMEType(downloadId);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Get the MIME type of the download operation with the given ID */
+var MIMEtype = tizen.download.getMIMEType(downloadId);
+</pre>
 </div>
 </dd>
 <dt class="method" id="DownloadManager::setListener">
@@ -775,31 +794,38 @@ parameters contain an invalid value.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var listener = {
-   onprogress: function(id, receivedSize, totalSize) {
-     console.log('Received with id: ' + id + ', ' + receivedSize + '/' + totalSize);
-   },
-   onpaused: function(id) {
-     console.log('Paused with id: ' + id);
-   },
-   oncanceled: function(id) {
-     console.log('Canceled with id: ' + id);
-   },
-   oncompleted: function(id, fileName) {
-     console.log('Completed with id: ' + id + ', file name: ' + fileName);
-   },
-   onfailed: function(id, error) {
-     console.log('Failed with id: ' + id + ', error name: ' + error.name);
-   }
- };
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var listener =
+{
+&nbsp;&nbsp;&nbsp;onprogress: function(id, receivedSize, totalSize)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('Received with id: ' + id + ', ' + receivedSize + '/' + totalSize);
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;onpaused: function(id)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('Paused with id: ' + id);
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;oncanceled: function(id)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('Canceled with id: ' + id);
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;oncompleted: function(id, fileName)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('Completed with id: ' + id + ', file name: ' + fileName);
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;onfailed: function(id, error)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('Failed with id: ' + id + ', error name: ' + error.name);
+&nbsp;&nbsp;&nbsp;}
+};
 
- // Start downloading the html file on the web with the corresponding callbacks.
- var downloadRequest = new tizen.DownloadRequest("http://download.tizen.org/tools/README.txt", "documents");
- downloadId = tizen.download.start(downloadRequest);
+/* Start downloading the html file on the web with the corresponding callbacks */
+var downloadRequest = new tizen.DownloadRequest("http://download.tizen.org/tools/README.txt", "documents");
+downloadId = tizen.download.start(downloadRequest);
 
- // Add the listener.
- tizen.download.setListener(downloadId, listener);
- </pre>
+/* Add the listener */
+tizen.download.setListener(downloadId, listener);
+</pre>
 </div>
 </dd>
 </dl>
index 0ad7642..ec9cc0a 100644 (file)
@@ -250,27 +250,33 @@ UnknownError: In any other error case              </li>
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> //Preconditions: please provide images/tizen.jpg file with present Exif data
-
- // Defines success callback
- function onSuccess(exifInfo) {
-     console.log("success to get Exif information object");
- }
-
- // Defines error callback
- function onError(error) {
-     console.log("error occurred: " + error.name);
- }
-
- function resolveSuccess(file) {
-     tizen.exif.getExifInfo(file.toURI(), onSuccess, onError);
- }
-
- function resolveFail(error) {
-    console.log("error occurred: " + error.name);
- }
- tizen.filesystem.resolve("images/tizen.jpg", resolveSuccess, resolveFail);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Preconditions: provide images/tizen.jpg file with present Exif data */
+
+/* Defines success callback */
+function onSuccess(exifInfo)
+{
+&nbsp;&nbsp;&nbsp;console.log("success to get Exif information object");
+}
+
+/* Defines error callback */
+function onError(error)
+{
+&nbsp;&nbsp;&nbsp;console.log("error occurred: " + error.name);
+}
+
+function resolveSuccess(file)
+{
+&nbsp;&nbsp;&nbsp;tizen.exif.getExifInfo(file.toURI(), onSuccess, onError);
+}
+
+function resolveFail(error)
+{
+&nbsp;&nbsp;&nbsp;console.log("error occurred: " + error.name);
+}
+
+tizen.filesystem.resolve("images/tizen.jpg", resolveSuccess, resolveFail);
+</pre>
 </div>
 </dd>
 <dt class="method" id="ExifManager::saveExifInfo">
@@ -324,41 +330,47 @@ UnknownError: In any other error case              </li>
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> //Preconditions: please provide images/tizen.jpg file with present Exif data
-
- // Defines success callback
- function onSaveSuccess() {
-     console.log("success to save Exif information");
- }
-
- // Defines error callback
- function onSaveError(error) {
-     console.log("error occur" + error.name);
- }
-
- // Defines success callback
- function onSuccess(exifInfo) {
-     console.log("success to get Exif information object");
-     exifInfo.orientation = "ROTATE_90";
-     tizen.exif.saveExifInfo(exifInfo, onSaveSuccess, onSaveError);
- }
-
- // Defines error callback
- function onError(error) {
-     console.log("error occur" + error.name);
- }
-
- function resolveSuccess(file) {
-     tizen.exif.getExifInfo(file.toURI(), onSuccess, onError);
- }
-
- function resolveFail(error) {
-    console.log("error occurred: " + error.name);
- }
-
- tizen.filesystem.resolve("images/tizen.jpg", resolveSuccess, resolveFail);
-
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Preconditions: provide images/tizen.jpg file with present Exif data */
+
+/* Defines success callback */
+function onSaveSuccess()
+{
+&nbsp;&nbsp;&nbsp;console.log("success to save Exif information");
+}
+
+/* Defines error callback */
+function onSaveError(error)
+{
+&nbsp;&nbsp;&nbsp;console.log("error occur" + error.name);
+}
+
+/* Defines success callback */
+function onSuccess(exifInfo)
+{
+&nbsp;&nbsp;&nbsp;console.log("success to get Exif information object");
+&nbsp;&nbsp;&nbsp;exifInfo.orientation = "ROTATE_90";
+&nbsp;&nbsp;&nbsp;tizen.exif.saveExifInfo(exifInfo, onSaveSuccess, onSaveError);
+}
+
+/* Defines error callback */
+function onError(error)
+{
+&nbsp;&nbsp;&nbsp;console.log("error occur" + error.name);
+}
+
+function resolveSuccess(file)
+{
+&nbsp;&nbsp;&nbsp;tizen.exif.getExifInfo(file.toURI(), onSuccess, onError);
+}
+
+function resolveFail(error)
+{
+&nbsp;&nbsp;&nbsp;console.log("error occurred: " + error.name);
+}
+
+tizen.filesystem.resolve("images/tizen.jpg", resolveSuccess, resolveFail);
+</pre>
 </div>
 </dd>
 <dt class="method" id="ExifManager::getThumbnail">
@@ -419,33 +431,39 @@ UnknownError: In any other error case              </li>
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> //Preconditions: please provide images/tizen.jpg file with present Exif data
-
- // Defines success callback
- function onSuccess(thumbData) {
-     console.log("got thumbnail data of JPEG file");
-     if (thumbData) {
-         var img = new Image();
-         img.src = thumbData;
-         document.body.appendChild(img);
-     }
- }
-
- // Defines error callback
- function onError(error) {
-     console.log("error occur" + error.name);
- }
-
- function resolveSuccess(file) {
-     tizen.exif.getThumbnail(file.toURI(), onSuccess, onError);
- }
-
- function resolveFail(error) {
-    console.log("error occurred: " + error.name);
- }
-
- tizen.filesystem.resolve("images/tizen.jpg", resolveSuccess, resolveFail);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Preconditions: provide images/tizen.jpg file with present Exif data */
+
+/* Defines success callback */
+function onSuccess(thumbData)
+{
+&nbsp;&nbsp;&nbsp;console.log("got thumbnail data of JPEG file");
+&nbsp;&nbsp;&nbsp;if (thumbData)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var img = new Image();
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;img.src = thumbData;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;document.body.appendChild(img);
+&nbsp;&nbsp;&nbsp;}
+}
+
+/* Defines error callback */
+function onError(error)
+{
+&nbsp;&nbsp;&nbsp;console.log("error occur" + error.name);
+}
+
+function resolveSuccess(file)
+{
+&nbsp;&nbsp;&nbsp;tizen.exif.getThumbnail(file.toURI(), onSuccess, onError);
+}
+
+function resolveFail(error)
+{
+&nbsp;&nbsp;&nbsp;console.log("error occurred: " + error.name);
+}
+
+tizen.filesystem.resolve("images/tizen.jpg", resolveSuccess, resolveFail);
+</pre>
 </div>
 </dd>
 </dl>
index ccbd8a7..261ab8a 100644 (file)
@@ -320,12 +320,16 @@ If this method is called without the <em>type</em> value, <em>patterns</em> are
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> try {
-     tizen.feedback.play("CHARGERCONN", "TYPE_SOUND");
- } catch (err) {
-     console.log (err.name +': ' + err.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+try
+{
+&nbsp;&nbsp;&nbsp;tizen.feedback.play("CHARGERCONN", "TYPE_SOUND");
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + ': ' + err.message);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="FeedbackManager::stop">
@@ -357,13 +361,17 @@ This function can be used to stop various types of vibration reactions that are
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> try {
-     tizen.feedback.play("BT_CONNECTED", "TYPE_VIBRATION");
-     tizen.feedback.stop();
- } catch (err) {
-     console.log (err.name +': ' + err.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+try
+{
+&nbsp;&nbsp;&nbsp;tizen.feedback.play("BT_CONNECTED", "TYPE_VIBRATION");
+&nbsp;&nbsp;&nbsp;tizen.feedback.stop();
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + ': ' + err.message);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="FeedbackManager::isPatternSupported">
@@ -409,14 +417,16 @@ This function can be used to stop various types of vibration reactions that are
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var pattern = "BT_CONNECTED", type = "TYPE_SOUND";
- var isPatternSupported = tizen.feedback.isPatternSupported(pattern, type);
- var isSupported = "";
- if(!isPatternSupported) {
- isSupported = " not";
- }
- console.log("pattern " + pattern + " is" + isSupported + " supported");
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var pattern = "BT_CONNECTED", type = "TYPE_SOUND";
+var isPatternSupported = tizen.feedback.isPatternSupported(pattern, type);
+var isSupported = "";
+if (!isPatternSupported)
+{
+&nbsp;&nbsp;&nbsp;isSupported = " not";
+}
+console.log("pattern " + pattern + " is" + isSupported + " supported");
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre> pattern BT_CONNECTED is supported
index cc19a3a..eb2608f 100644 (file)
@@ -357,41 +357,44 @@ as determining root and default locations, resolving a given location into a fil
           </p>
          </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var documentsDir;
- function onsuccess(files) {
-   for (var i = 0; i &lt; files.length; i++) {
-     console.log("File Name is " + files[i].name); // displays file name
-   }
-
-   var testFile = documentsDir.createFile("test.txt");
-
-   if (testFile != null) {
-     testFile.openStream(
-       "w",
-       function(fs) {
-         fs.write("HelloWorld");
-         fs.close();
-       }, function(e) {
-         console.log("Error " + e.message);
-       }, "UTF-8"
-     );
-   }
- }
-
- function onerror(error) {
-   console.log("The error " + error.message + " occurred when listing the files in the selected folder");
- }
-
- tizen.filesystem.resolve(
-   'documents',
-   function(dir) {
-     documentsDir = dir;
-     dir.listFiles(onsuccess, onerror);
-   }, function(e) {
-     console.log("Error" + e.message);
-   }, "rw"
- );
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var documentsDir;
+function onsuccess(files)
+{
+&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; files.length; i++)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("File Name is " + files[i].name); /* Displays file name */
+&nbsp;&nbsp;&nbsp;}
+
+&nbsp;&nbsp;&nbsp;var testFile = documentsDir.createFile("test.txt");
+
+&nbsp;&nbsp;&nbsp;if (testFile != null)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;testFile.openStream("w", function(fs)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;fs.write("HelloWorld");
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;fs.close();
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}, function(e)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Error " + e.message);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}, "UTF-8");
+&nbsp;&nbsp;&nbsp;}
+}
+
+function onerror(error)
+{
+&nbsp;&nbsp;&nbsp;console.log("The error " + error.message + " occurred when listing the files in the selected folder");
+}
+
+tizen.filesystem.resolve('documents', function(dir)
+{
+&nbsp;&nbsp;&nbsp;documentsDir = dir;
+&nbsp;&nbsp;&nbsp;dir.listFiles(onsuccess, onerror);
+}, function(e)
+{
+&nbsp;&nbsp;&nbsp;console.log("Error" + e.message);
+}, "rw");
+</pre>
 </div>
 <div class="attributes">
 <h4>Attributes</h4>
@@ -405,8 +408,9 @@ as determining root and default locations, resolving a given location into a fil
  1.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> console.log("The maximum path length is " + tizen.filesystem.maxPathLength);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+console.log("The maximum path length is " + tizen.filesystem.maxPathLength);
+</pre>
 </div>
 </li></ul>
 </div>
@@ -520,15 +524,15 @@ UnknownError - If any other error occurs.              </li>
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> tizen.filesystem.resolve(
-   'images',
-   function(dir) {
-     console.log("Mount point Name is " +  dir.path);
-   }, function(e) {
-     console.log("Error: " + e.message);
-   }, "r"
- );
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+tizen.filesystem.resolve('images', function(dir)
+{
+&nbsp;&nbsp;&nbsp;console.log("Mount point Name is " +  dir.path);
+}, function(e)
+{
+&nbsp;&nbsp;&nbsp;console.log("Error: " + e.message);
+}, "r");
+</pre>
 </div>
 </dd>
 <dt class="method" id="FileSystemManager::getStorage">
@@ -598,16 +602,19 @@ UnknownError - If any other error occurs.               </li>
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function onStorage(storage) {
-     // Do something
- }
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function onStorage(storage)
+{
+&nbsp;&nbsp;&nbsp;/* Do something */
+}
 
- function onStorageError(e) {
- console.log("Storage not found!" + e.message);
- }
+function onStorageError(e)
+{
+&nbsp;&nbsp;&nbsp;console.log("Storage not found!" + e.message);
+}
 
- tizen.filesystem.getStorage("music", onStorage, onStorageError);
- </pre>
+tizen.filesystem.getStorage("music", onStorage, onStorageError);
+</pre>
 </div>
 </dd>
 <dt class="method" id="FileSystemManager::listStorages">
@@ -676,17 +683,20 @@ UnknownError - If any other error occurs.              </li>
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function alertForCorruptedRemovableDrives(storages) {
-     for (var i = 0; i &lt; storages.length; i++) {
-         if (storages[i].type != "EXTERNAL")
-             continue;
-         if (storages[i].state == "UNMOUNTABLE")
-             console.log("External drive " + storages[i].label + " is corrupted.");
-     }
- }
-
- tizen.filesystem.listStorages(alertForCorruptedRemovableDrives);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function alertForCorruptedRemovableDrives(storages)
+{
+&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; storages.length; i++)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (storages[i].type != "EXTERNAL")
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;continue;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (storages[i].state == "UNMOUNTABLE")
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("External drive " + storages[i].label + " is corrupted.");
+&nbsp;&nbsp;&nbsp;}
+}
+
+tizen.filesystem.listStorages(alertForCorruptedRemovableDrives);
+</pre>
 </div>
 </dd>
 <dt class="method" id="FileSystemManager::addStorageStateChangeListener">
@@ -754,14 +764,16 @@ The watch operation must continue until the removeStorageStateChangeListener() m
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var watchID;
- function onStorageStateChanged(storage) {
-     if (storage.state == "MOUNTED")
-         console.log("Storage " + storage.label + " was added!");
- }
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var watchID;
+function onStorageStateChanged(storage)
+{
+&nbsp;&nbsp;&nbsp;if (storage.state == "MOUNTED")
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Storage " + storage.label + " was added!");
+}
 
- watchID = tizen.filesystem.addStorageStateChangeListener(onStorageStateChanged);
- </pre>
+watchID = tizen.filesystem.addStorageStateChangeListener(onStorageStateChanged);
+</pre>
 </div>
 </dd>
 <dt class="method" id="FileSystemManager::removeStorageStateChangeListener">
@@ -813,16 +825,17 @@ Otherwise, the method call has no effect.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var watchID;
- function onStorageStateChanged(storage) {
-     if (storage.state == "MOUNTED")
-         console.log("Storage " + storage.label + " was added!");
-     tizen.filesystem.removeStorageStateChangeListener(watchID);
- }
-
- watchID = tizen.filesystem.addStorageStateChangeListener(onStorageStateChanged);
-
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var watchID;
+function onStorageStateChanged(storage)
+{
+&nbsp;&nbsp;&nbsp;if (storage.state == "MOUNTED")
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Storage " + storage.label + " was added!");
+&nbsp;&nbsp;&nbsp;tizen.filesystem.removeStorageStateChangeListener(watchID);
+}
+
+watchID = tizen.filesystem.addStorageStateChangeListener(onStorageStateChanged);
+</pre>
 </div>
 </dd>
 </dl>
@@ -986,21 +999,25 @@ files and directories rooted as the file handle location.
           </p>
          </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function onsuccess(files) {
-   for (var i = 0; i &lt; files.length; i++) {
-     // alerts each name of dir's contents
-     console.log(files[i].name);
-   }
- }
-
- function onerror(error) {
-   console.log("The error " + error.message +
-               " occurred when listing the files in the selected folder");
- }
-
- // list directory contents
- dir.listFiles(onsuccess, onerror);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function onsuccess(files)
+{
+&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; files.length; i++)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Alerts each name of dir's contents */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(files[i].name);
+&nbsp;&nbsp;&nbsp;}
+}
+
+function onerror(error)
+{
+&nbsp;&nbsp;&nbsp;console.log("The error " + error.message +
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" occurred when listing the files in the selected folder");
+}
+
+/* List directory contents */
+dir.listFiles(onsuccess, onerror);
+</pre>
 </div>
 <div class="attributes">
 <h4>Attributes</h4>
@@ -1020,23 +1037,29 @@ This attribute is set to<var>null</var> if there is no parent directory. This al
  1.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // list directory contents
- dir.listFiles(onsuccess, onerror);
-
- function onsuccess(files) {
-   for (var i = 0; i &lt; files.length; i++) {
-     // prints the file parent, should contain the
-     // same value for all the files in the loop
-     console.log("All the files should have the same parent " +
-                 files[i].parent);
-   }
- }
-
- function onerror(error) {
-   console.log("The error " + error.message +
-               " occurred when listing the files in the selected folder");
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* List directory contents */
+dir.listFiles(onsuccess, onerror);
+
+function onsuccess(files)
+{
+&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; files.length; i++)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* 
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;   Prints the file parent, must contain the
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;   same value for all the files in the loop
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("All the files should have the same parent " +
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;files[i].parent);
+&nbsp;&nbsp;&nbsp;}
+}
+
+function onerror(error)
+{
+&nbsp;&nbsp;&nbsp;console.log("The error " + error.message +
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" occurred when listing the files in the selected folder");
+}
+</pre>
 </div>
 </li>
 <li class="attribute" id="File::readOnly">
@@ -1063,22 +1086,26 @@ This attribute represents the actual state of a file or directory in the filesys
  1.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // lists directory contents
- dir.listFiles(onsuccess, onerror);
-
- function onsuccess(files) {
-   for (var i = 0; i &lt; files.length; i++) {
-     if (files[i].readOnly)
-       console.log("Cannot write to file " + files[i].name);
-     else
-       console.log("Can write to file " + files[i].name);
-   }
- }
-
- function onerror(error) {
-   console.log("The error " + error.message + " occurred when listing the files in the selected folder");
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Lists directory contents */
+dir.listFiles(onsuccess, onerror);
+
+function onsuccess(files)
+{
+&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; files.length; i++)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (files[i].readOnly)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Cannot write to file " + files[i].name);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;else
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Can write to file " + files[i].name);
+&nbsp;&nbsp;&nbsp;}
+}
+
+function onerror(error)
+{
+&nbsp;&nbsp;&nbsp;console.log("The error " + error.message + " occurred when listing the files in the selected folder");
+}
+</pre>
 </div>
 </li>
 <li class="attribute" id="File::isFile">
@@ -1168,8 +1195,7 @@ timestamp changes when a file is moved.
  1.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> console.log(file.modified); // displays the modification timestamp
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">console.log(file.modified); /* Displays the modification timestamp */</pre>
 </div>
 </li>
 <li class="attribute" id="File::path">
@@ -1203,8 +1229,7 @@ For example, if the root is music, then the path is music. If the root is docume
  1.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> console.log(file.path); // should be 'music/' if the file is music/foo.mp3
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">console.log(file.path); /* Must be 'music/' if the file is music/foo.mp3 */</pre>
 </div>
 </li>
 <li class="attribute" id="File::name">
@@ -1233,9 +1258,10 @@ For the special case of the root itself, the <em>name </em> is an empty string.
  1.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // should be foo.mp3 if the file path is music/foo.mp3
- console.log(file.name);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Must be foo.mp3 if the file path is music/foo.mp3 */
+console.log(file.name);
+</pre>
 </div>
 </li>
 <li class="attribute" id="File::fullPath">
@@ -1266,9 +1292,10 @@ The <em>fullPath </em>is always equal to path + name.
  1.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">  // should be music/track1.mp3 if the file is music/track1.mp3
- console.log(file.fullPath);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Must be music/track1.mp3 if the file is music/track1.mp3 */
+console.log(file.fullPath);
+</pre>
 </div>
 </li>
 <li class="attribute" id="File::fileSize">
@@ -1286,9 +1313,10 @@ If an attempt to read this attribute for a directory is made, <var>undefined</va
  1.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // displays the file size
- console.log(file.fileSize);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Displays the file size */
+console.log(file.fileSize);
+</pre>
 </div>
 </li>
 <li class="attribute" id="File::length">
@@ -1306,9 +1334,10 @@ If an attempt to read this attribute for a file is made, <var>undefined</var> is
  1.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // '3' if the directory contains two files and one sub-directory
- console.log(file.length);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* '3' if the directory contains two files and one sub-directory */
+console.log(file.length);
+</pre>
 </div>
 </li>
 </ul>
@@ -1367,12 +1396,14 @@ These URIs must not be accessible to other widgets, apart from the one invoking
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> tizen.filesystem.resolve('music/ramones/RockawayBeach.mp3', function(file) {
-   var audio = new Audio(file.toURI());
-   audio.play();
-   console.log(file.toURI());
- });
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+tizen.filesystem.resolve('music/ramones/RockawayBeach.mp3', function(file)
+{
+&nbsp;&nbsp;&nbsp;var audio = new Audio(file.toURI());
+&nbsp;&nbsp;&nbsp;audio.play();
+&nbsp;&nbsp;&nbsp;console.log(file.toURI());
+});
+</pre>
 </div>
 </dd>
 <dt class="method" id="File::listFiles">
@@ -1448,23 +1479,25 @@ UnknownError - If any other error occurs.              </li>
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function onsuccess(files) {
-   console.log("There are " + files.length  + " in the selected folder");
- }
-
- function onerror(error) {
-   console.log("The error " + error.message + " occurred when listing the files in the selected folder");
- }
-
- tizen.filesystem.resolve(
-     "documents",
-     function(dir) {
-       dir.listFiles(onsuccess, onerror);
-     }, function(e) {
-       console.log("Error " + e.message);
-     }, "r"
- );
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function onsuccess(files)
+{
+&nbsp;&nbsp;&nbsp;console.log("There are " + files.length  + " in the selected folder");
+}
+
+function onerror(error)
+{
+&nbsp;&nbsp;&nbsp;console.log("The error " + error.message + " occurred when listing the files in the selected folder");
+}
+
+tizen.filesystem.resolve("documents", function(dir)
+{
+&nbsp;&nbsp;&nbsp;dir.listFiles(onsuccess, onerror);
+}, function(e)
+{
+&nbsp;&nbsp;&nbsp;console.log("Error " + e.message);
+}, "r");
+</pre>
 </div>
 </dd>
 <dt class="method" id="File::openStream">
@@ -1537,39 +1570,43 @@ UnknownError - If any other error occurs.              </li>
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var documentsDir;
- function onsuccess(files) {
-   for (var i = 0; i &lt; files.length; i++) {
-     console.log("File Name is " + files[i].name); // displays file name
-   }
-
-   var testFile = documentsDir.createFile("test.txt");
-   if (testFile != null) {
-     testFile.openStream(
-         "w",
-         function(fs) {
-           fs.write("HelloWorld");
-           fs.close();
-         }, function(e) {
-           console.log("Error " + e.message);
-         }, "UTF-8"
-     );
-   }
- }
-
- function onerror(error) {
-   console.log("The error " + error.message + " occurred when listing the files in the selected folder");
- }
-
- tizen.filesystem.resolve(
-     'documents',
-     function(dir) {
-       documentsDir = dir; dir.listFiles(onsuccess,onerror);
-     }, function(e) {
-       console.log("Error" + e.message);
-     }, "rw"
- );
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var documentsDir;
+function onsuccess(files)
+{
+&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; files.length; i++)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("File Name is " + files[i].name); /* Displays file name */
+&nbsp;&nbsp;&nbsp;}
+
+&nbsp;&nbsp;&nbsp;var testFile = documentsDir.createFile("test.txt");
+&nbsp;&nbsp;&nbsp;if (testFile != null)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;testFile.openStream("w", function(fs)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;fs.write("HelloWorld");
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;fs.close();
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}, function(e)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Error " + e.message);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}, "UTF-8");
+&nbsp;&nbsp;&nbsp;}
+}
+
+function onerror(error)
+{
+&nbsp;&nbsp;&nbsp;console.log("The error " + error.message + " occurred when listing the files in the selected folder");
+}
+
+tizen.filesystem.resolve('documents', function(dir)
+{
+&nbsp;&nbsp;&nbsp;documentsDir = dir;
+&nbsp;&nbsp;&nbsp;dir.listFiles(onsuccess, onerror);
+}, function(e)
+{
+&nbsp;&nbsp;&nbsp;console.log("Error" + e.message);
+}, "rw");
+</pre>
 </div>
 </dd>
 <dt class="method" id="File::readAsText">
@@ -1639,35 +1676,40 @@ UnknownError - If any other error occurs.              </li>
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function onsuccess(files) {
-   for (var i = 0; i &lt; files.length; i++) {
-     console.log("File Name is " + files[i].name); // displays file name
-     if (files[i].isDirectory == false)
-       files[i].readAsText(
-           function(str) {
-             console.log("The file content " + str);
-           }, function(e) {
-             console.log("Error " + e.message);
-           }, "UTF-8"
-       );
-   }
- }
-
- function onerror(error) {
-   console.log("The error " + error.message + " occurred when listing the files in the selected folder");
- }
-
- var documentsDir;
- tizen.filesystem.resolve(
-     'documents',
-     function(dir) {
-       documentsDir = dir;
-       dir.listFiles(onsuccess,onerror);
-     }, function(e) {
-       console.log("Error" + e.message);
-     }, "rw"
- );
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function onsuccess(files)
+{
+&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; files.length; i++)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("File Name is " + files[i].name); /* Displays file name */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (files[i].isDirectory == false)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;files[i].readAsText(function(str)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("The file content " + str);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}, function(e)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Error " + e.message);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}, "UTF-8");
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;}
+}
+
+function onerror(error)
+{
+&nbsp;&nbsp;&nbsp;console.log("The error " + error.message + " occurred when listing the files in the selected folder");
+}
+
+var documentsDir;
+tizen.filesystem.resolve('documents', function(dir)
+{
+&nbsp;&nbsp;&nbsp;documentsDir = dir;
+&nbsp;&nbsp;&nbsp;dir.listFiles(onsuccess, onerror);
+}, function(e)
+{
+&nbsp;&nbsp;&nbsp;console.log("Error" + e.message);
+}, "rw");
+</pre>
 </div>
 </dd>
 <dt class="method" id="File::copyTo">
@@ -1754,33 +1796,36 @@ UnknownError - If any other error occurs.              </li>
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var documentsDir;
- function onsuccess(files) {
-   for (var i = 0; i &lt; files.length; i++) {
-     if (files[i].isDirectory == false) {
-       documentsDir.copyTo(files[i].fullPath,
-                           "images/backup/" + files[i].name,
-                           false,
-                           function() {console.log("file copied");});
-     }
-   }
- }
-
- function onerror(error) {
-   console.log("The error " + error.message +
-               " occurred when listing the files in the selected folder");
- }
-
- tizen.filesystem.resolve(
-     'documents',
-     function(dir) {
-       documentsDir = dir;
-       dir.listFiles(onsuccess, onerror);
-     }, function(e) {
-       console.log("Error" + e.message);
-     }, "rw"
- );
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var documentsDir;
+function onsuccess(files)
+{
+&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; files.length; i++)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (files[i].isDirectory == false)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;documentsDir.copyTo(files[i].fullPath,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"images/backup/" + files[i].name, false,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;function() {console.log("file copied");});
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;}
+}
+
+function onerror(error)
+{
+&nbsp;&nbsp;&nbsp;console.log("The error " + error.message +
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" occurred when listing the files in the selected folder");
+}
+
+tizen.filesystem.resolve('documents', function(dir)
+{
+&nbsp;&nbsp;&nbsp;documentsDir = dir;
+&nbsp;&nbsp;&nbsp;dir.listFiles(onsuccess, onerror);
+}, function(e)
+{
+&nbsp;&nbsp;&nbsp;console.log("Error" + e.message);
+}, "rw");
+</pre>
 </div>
 </dd>
 <dt class="method" id="File::moveTo">
@@ -1867,33 +1912,36 @@ UnknownError - If any other error occurs.              </li>
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var documentsDir;
- function onsuccess(files) {
-   for (var i = 0; i &lt; files.length; i++) {
-     if (files[i].isDirectory == false) {
-       documentsDir.moveTo(files[i].fullPath,
-                           "images/newFolder/" + files[i].name,
-                           false,
-                           function() {console.log("file moved");});
-     }
-   }
- }
-
- function onerror(error) {
-   console.log("The error " + error.message +
-               " occurred during listing the files in the selected folder");
- }
-
- tizen.filesystem.resolve(
-     'documents',
-     function(dir) {
-       documentsDir = dir;
-       dir.listFiles(onsuccess, onerror);
-     }, function(e) {
-       console.log("Error" + e.message);
-     }, "rw"
- );
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var documentsDir;
+function onsuccess(files)
+{
+&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; files.length; i++)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (files[i].isDirectory == false)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;documentsDir.moveTo(files[i].fullPath,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"images/newFolder/" + files[i].name, false,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;function() {console.log("file moved");});
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;}
+}
+
+function onerror(error)
+{
+&nbsp;&nbsp;&nbsp;console.log("The error " + error.message +
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" occurred during listing the files in the selected folder");
+}
+
+tizen.filesystem.resolve('documents', function(dir)
+{
+&nbsp;&nbsp;&nbsp;documentsDir = dir;
+&nbsp;&nbsp;&nbsp;dir.listFiles(onsuccess, onerror);
+}, function(e)
+{
+&nbsp;&nbsp;&nbsp;console.log("Error" + e.message);
+}, "rw");
+</pre>
 </div>
 </dd>
 <dt class="method" id="File::createDirectory">
@@ -1970,10 +2018,11 @@ The new <em>File </em>object has "rw" access rights, as it inherits this from th
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var dir; //Directory object obtained from filesystem API
- var newDir = dir.createDirectory("newDir");
- var anotherNewDir = dir.createDirectory("newDir1/subNewDir1");
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var dir; /* Directory object obtained from filesystem API */
+var newDir = dir.createDirectory("newDir");
+var anotherNewDir = dir.createDirectory("newDir1/subNewDir1");
+</pre>
 </div>
 </dd>
 <dt class="method" id="File::createFile">
@@ -2045,8 +2094,7 @@ called.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var newFile = dir.createFile("newFilePath");
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">var newFile = dir.createFile("newFilePath");</pre>
 </div>
 </dd>
 <dt class="method" id="File::resolve">
@@ -2117,15 +2165,20 @@ The new <em>File </em>object inherits its access rights from the <em>File </em>o
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var file;
- // Resolves helloWorld.doc file that is located in the
- // documents root location
- tizen.filesystem.resolve(
-   'documents',
-   function(dir) { file = dir.resolve("helloWorld.doc");},
-   function(e) { console.log("Error" + e.message);},
-   "rw");
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var file;
+/*
+   Resolves helloWorld.doc file that is located in the
+   documents root location
+*/
+tizen.filesystem.resolve('documents', function(dir)
+{
+&nbsp;&nbsp;&nbsp;file = dir.resolve("helloWorld.doc");
+}, function(e)
+{
+&nbsp;&nbsp;&nbsp;console.log("Error" + e.message);
+}, "rw");
+</pre>
 </div>
 </dd>
 <dt class="method" id="File::deleteDirectory">
@@ -2208,36 +2261,39 @@ all data in all subdirectories and so needs to be used with caution.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var documentsDir;
- function onsuccess(files) {
-   for (var i = 0; i &lt; files.length; i++) {
-     if (files[i].isDirectory) {
-       documentsDir.deleteDirectory(
-           files[i].fullPath,
-           false,
-           function() {
-             console.log("Directory Deleted");
-           }, function(e) {
-             console.log("Error" + e.message);
-           });
-     }
-   }
- }
-
- function onerror(error) {
-   console.log("The error " + error.message + " occurred when listing the files in the selected folder");
- }
-
- tizen.filesystem.resolve(
-     'documents',
-     function(dir) {
-       documentsDir = dir;
-       dir.listFiles(onsuccess,onerror);
-     }, function(e) {
-       console.log("Error" + e.message);
-     }, "rw"
- );
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var documentsDir;
+function onsuccess(files)
+{
+&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; files.length; i++)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (files[i].isDirectory)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;documentsDir.deleteDirectory(files[i].fullPath, false, function()
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Directory Deleted");
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}, function(e)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Error" + e.message);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;});
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;}
+}
+
+function onerror(error)
+{
+&nbsp;&nbsp;&nbsp;console.log("The error " + error.message + " occurred when listing the files in the selected folder");
+}
+
+tizen.filesystem.resolve('documents', function(dir)
+{
+&nbsp;&nbsp;&nbsp;documentsDir = dir;
+&nbsp;&nbsp;&nbsp;dir.listFiles(onsuccess, onerror);
+}, function(e)
+{
+&nbsp;&nbsp;&nbsp;console.log("Error" + e.message);
+}, "rw");
+</pre>
 </div>
 </dd>
 <dt class="method" id="File::deleteFile">
@@ -2309,35 +2365,39 @@ UnknownError - If any other error occurs.              </li>
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function onsuccess(files) {
-   for (var i = 0; i &lt; files.length; i++) {
-     if (!files[i].isDirectory) {
-       documentsDir.deleteFile(
-           files[i].fullPath,
-           function() {
-             console.log("File Deleted");
-           }, function(e) {
-             console.log("Error" + e.message);
-           });
-     }
-   }
- }
-
- function onerror(error) {
-   console.log("The error " + error.message + " occurred when listing the files in the selected folder");
- }
-
- var documentsDir;
- tizen.filesystem.resolve(
-   'documents',
-   function(dir) {
-     documentsDir = dir;
-     dir.listFiles(onsuccess,onerror);
-   }, function(e) {
-     console.log("Error" + e.message);
-   }, "rw"
- );
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function onsuccess(files)
+{
+&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; files.length; i++)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (!files[i].isDirectory)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;documentsDir.deleteFile(files[i].fullPath, function()
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("File Deleted");
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}, function(e)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Error" + e.message);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;});
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;}
+}
+
+function onerror(error)
+{
+&nbsp;&nbsp;&nbsp;console.log("The error " + error.message + " occurred when listing the files in the selected folder");
+}
+
+var documentsDir;
+tizen.filesystem.resolve('documents', function(dir)
+{
+&nbsp;&nbsp;&nbsp;documentsDir = dir;
+&nbsp;&nbsp;&nbsp;dir.listFiles(onsuccess,onerror);
+}, function(e)
+{
+&nbsp;&nbsp;&nbsp;console.log("Error" + e.message);
+}, "rw");
+</pre>
 </div>
 </dd>
 </dl>
@@ -2528,10 +2588,12 @@ If set to <var>false</var>, this attribute indicates that the file pointer is no
  1.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> if (stream.eof) {
-   // file has been read completely
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+if (stream.eof)
+{
+&nbsp;&nbsp;&nbsp;/* File has been read completely */
+}
+</pre>
 </div>
 </li>
 <li class="attribute" id="FileStream::position">
@@ -2548,11 +2610,14 @@ The stream position is an offset of bytes from the start of the file stream. Whe
  1.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> console.log(stream.position); // displays current stream position
- // alters current stream position to the begin of the file,
- // like seek() in C
- stream.position = 0;
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+console.log(stream.position); /* Displays current stream position */
+/*
+   Alters current stream position to the begin of the file,
+   like seek() in C
+*/
+stream.position = 0;
+</pre>
 </div>
 </li>
 <li class="attribute" id="FileStream::bytesAvailable">
@@ -2574,8 +2639,8 @@ It corresponds to the number of bytes available after the file pointer denoted b
  1.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> console.log(stream.bytesAvailable); // displays the available bytes to be read
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+console.log(stream.bytesAvailable); /* Displays the available bytes to be read */</pre>
 </div>
 </li>
 </ul>
@@ -2611,8 +2676,9 @@ Note that pending writes might not succeed.
       http://tizen.org/privilege/filesystem.read
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> stream.close(); // closes this stream, no subsequent access to stream allowed
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+stream.close(); /* Closes this stream, no subsequent access to stream allowed */
+</pre>
 </div>
 </dd>
 <dt class="method" id="FileStream::read">
@@ -2669,9 +2735,10 @@ The resulting string length might be shorter than <em>charCount </em>if EOF is <
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var text = stream.read(file.fileSize);
- stream.close();
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var text = stream.read(file.fileSize);
+stream.close();
+</pre>
 </div>
 </dd>
 <dt class="method" id="FileStream::readBytes">
@@ -2727,12 +2794,14 @@ The resulting string length might be shorter than <em>charCount </em>if EOF is <
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // reads up to 256 bytes from the stream
- var raw = stream.readBytes(256);
- for (var i = 0; i &lt; raw.length; i++) {
-   // raw[i] contains the i-th byte of the current data chunk
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Reads up to 256 bytes from the stream */
+var raw = stream.readBytes(256);
+for (var i = 0; i &lt; raw.length; i++)
+{
+&nbsp;&nbsp;&nbsp;/* raw[i] contains the i-th byte of the current data chunk */
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="FileStream::readBase64">
@@ -2768,9 +2837,10 @@ The resulting string length might be shorter than <em>charCount </em>if EOF is <
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // reads up to 256 bytes from the stream
- var base64 = stream.readBase64(256);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Reads up to 256 bytes from the stream */
+var base64 = stream.readBase64(256);
+</pre>
 </div>
 </dd>
 <dt class="method" id="FileStream::write">
@@ -2819,9 +2889,10 @@ The resulting string length might be shorter than <em>charCount </em>if EOF is <
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var text = "Hello world";
- stream.write(text);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var text = "Hello world";
+stream.write(text);
+</pre>
 </div>
 </dd>
 <dt class="method" id="FileStream::writeBytes">
@@ -2871,10 +2942,11 @@ is not compatible with the expected type for that parameter.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var bytes = in.readBytes(256);
- // writes the bytes read from in to out
- out.writeBytes(bytes);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var bytes = in.readBytes(256);
+/* Writes the bytes read from in to out */
+out.writeBytes(bytes);
+</pre>
 </div>
 </dd>
 <dt class="method" id="FileStream::writeBase64">
@@ -2924,10 +2996,11 @@ is not compatible with the expected type for that parameter.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var base64 = in.readBase64(256);
- // writes the base64 data read from in to out
- out.writeBase64(base64);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var base64 = in.readBase64(256);
+/* Writes the base64 data read from in to out */
+out.writeBase64(base64);
+</pre>
 </div>
 </dd>
 </dl>
index fa28caf..c765a02 100644 (file)
@@ -260,10 +260,12 @@ For example, an earphone cable is commonly used as a FM antenna in mobile phones
  2.3
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> if (!tizen.fmradio.isAntennaConnected) {
-    console.log("Please plug in the earphones to listen to the radio");
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+if (!tizen.fmradio.isAntennaConnected)
+{
+&nbsp;&nbsp;&nbsp;console.log("Please plug in the earphones to listen to the radio");
+}
+</pre>
 </div>
 </li>
 <li class="attribute" id="FMRadioManager::mute">
@@ -330,14 +332,16 @@ If the user calls this method without any frequency value, <em>frequencyLowerBou
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var radioState = tizen.fmradio.state;
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var radioState = tizen.fmradio.state;
 
- if(radioState == "READY") {
-   tizen.fmradio.start(87.5);
- }
- // jump to your favorite radio station (95.9MHz) and start playing
- //tizen.fmradio.start(95.9);
- </pre>
+if (radioState == "READY")
+{
+&nbsp;&nbsp;&nbsp;tizen.fmradio.start(87.5);
+}
+/* Jump to your favorite radio station (95.9MHz) and start playing */
+/* tizen.fmradio.start(95.9); */
+</pre>
 </div>
 </dd>
 <dt class="method" id="FMRadioManager::stop">
@@ -365,12 +369,14 @@ If the user calls this method without any frequency value, <em>frequencyLowerBou
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var radioState = tizen.fmradio.state;
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var radioState = tizen.fmradio.state;
 
- if(radioState == "PLAYING") {
-   tizen.fmradio.stop();
- }
- </pre>
+if (radioState == "PLAYING")
+{
+&nbsp;&nbsp;&nbsp;tizen.fmradio.stop();
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="FMRadioManager::seekUp">
@@ -428,19 +434,23 @@ If a user call seekUp() while the radio is seeking, the errorCallback will be in
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var radioState = tizen.fmradio.state;
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var radioState = tizen.fmradio.state;
 
- function successCallback() {
-    console.log("The radio find a new frequency successfully");
- }
- function errorCallback(err) {
-    console.log("The following error occurred : " + err.name);
- }
+function successCallback()
+{
+&nbsp;&nbsp;&nbsp;console.log("The radio find a new frequency successfully");
+}
+function errorCallback(err)
+{
+&nbsp;&nbsp;&nbsp;console.log("The following error occurred: " + err.name);
+}
 
- if(radioState == "PLAYING") {
-   tizen.fmradio.seekUp(successCallback, errorCallback);
- }
- </pre>
+if (radioState == "PLAYING")
+{
+&nbsp;&nbsp;&nbsp;tizen.fmradio.seekUp(successCallback, errorCallback);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="FMRadioManager::seekDown">
@@ -498,19 +508,23 @@ If a user call seekDown() while the radio is seeking, the errorCallback will be
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var radioState = tizen.fmradio.state;
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var radioState = tizen.fmradio.state;
 
- function successCallback() {
-    console.log("The radio find a new frequency successfully");
- }
- function errorCallback(err) {
-    console.log("The following error occurred : " + err.name);
- }
+function successCallback()
+{
+&nbsp;&nbsp;&nbsp;console.log("The radio find a new frequency successfully");
+}
+function errorCallback(err)
+{
+&nbsp;&nbsp;&nbsp;console.log("The following error occurred: " + err.name);
+}
 
- if(radioState == "PLAYING") {
-   tizen.fmradio.seekDown(successCallback, errorCallback);
- }
- </pre>
+if (radioState == "PLAYING")
+{
+&nbsp;&nbsp;&nbsp;tizen.fmradio.seekDown(successCallback, errorCallback);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="FMRadioManager::scanStart">
@@ -575,27 +589,34 @@ UnknownError - If any other error occurs              </li>
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var radioState = tizen.fmradio.state;
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var radioState = tizen.fmradio.state;
 
- var radioScanCallback = {
-    onfrequencyfound: function(frequency) {
-       console.log("A new frequency found: " + frequency);
-    },
-    onfinished: function(frequencies) {
-       console.log(frequencies.length + "frequencies found!");
-       for (var i = 0; i &lt; frequencies.length; i++) {
-          console.log(i + ": " + frequencies[i]);
-       }
-    }
- };
- function errorCallback(err) {
-    console.log("The following error occurred : " + err.name);
- }
+var radioScanCallback =
+{
+&nbsp;&nbsp;&nbsp;onfrequencyfound: function(frequency)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("A new frequency found: " + frequency);
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;onfinished: function(frequencies)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(frequencies.length + "frequencies found!");
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; frequencies.length; i++)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(i + ": " + frequencies[i]);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;}
+};
+function errorCallback(err)
+{
+&nbsp;&nbsp;&nbsp;console.log("The following error occurred: " + err.name);
+}
 
- if(radioState == "READY") {
-   tizen.fmradio.scanStart(radioScanCallback, errorCallback);
- }
- </pre>
+if (radioState == "READY")
+{
+&nbsp;&nbsp;&nbsp;tizen.fmradio.scanStart(radioScanCallback, errorCallback);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="FMRadioManager::scanStop">
@@ -647,19 +668,23 @@ UnknownError - If any other error occurs              </li>
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var radioState = tizen.fmradio.state;
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var radioState = tizen.fmradio.state;
 
- function successCallback() {
-    console.log("The scanning stops");
- }
- function errorCallback(err) {
-    console.log("The following error occurred : " + err.name);
- }
+function successCallback()
+{
+&nbsp;&nbsp;&nbsp;console.log("The scanning stops");
+}
+function errorCallback(err)
+{
+&nbsp;&nbsp;&nbsp;console.log("The following error occurred: " + err.name);
+}
 
- if (radioState == "SCANNING") {
-   tizen.fmradio.scanStop(successCallback, errorCallback);
- }
- </pre>
+if (radioState == "SCANNING")
+{
+&nbsp;&nbsp;&nbsp;tizen.fmradio.scanStop(successCallback, errorCallback);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="FMRadioManager::setFMRadioInterruptedListener">
@@ -708,16 +733,20 @@ To resume playing the radio, user interaction with the device is required. This
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var interruptCallback = {
-       oninterrupted: function(reason) {
-           console.log(reason);
-       },
-       oninterruptfinished: function() {
-           console.log("The radio interruption finished.");
-       }
- };
- tizen.fmradio.setFMRadioInterruptedListener(interruptCallback);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var interruptCallback =
+{
+&nbsp;&nbsp;&nbsp;oninterrupted: function(reason)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(reason);
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;oninterruptfinished: function()
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("The radio interruption finished.");
+&nbsp;&nbsp;&nbsp;}
+};
+tizen.fmradio.setFMRadioInterruptedListener(interruptCallback);
+</pre>
 </div>
 </dd>
 <dt class="method" id="FMRadioManager::unsetFMRadioInterruptedListener">
@@ -741,8 +770,9 @@ To resume playing the radio, user interaction with the device is required. This
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> tizen.fmradio.unsetFMRadioInterruptListener();
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+tizen.fmradio.unsetFMRadioInterruptListener();
+</pre>
 </div>
 </dd>
 <dt class="method" id="FMRadioManager::setAntennaChangeListener">
@@ -777,11 +807,13 @@ To resume playing the radio, user interaction with the device is required. This
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function antennaCallback(isAntennaConnected) {
-    alert("Antenna status has been changed. It is now " + (isAntennaConnected ? "connected" : "disconnected"));
- }
- tizen.fmradio.setAntennaChangeListener(antennaCallback);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function antennaCallback(isAntennaConnected)
+{
+&nbsp;&nbsp;&nbsp;alert("Antenna status has been changed. It is now " + (isAntennaConnected ? "connected" : "disconnected"));
+}
+tizen.fmradio.setAntennaChangeListener(antennaCallback);
+</pre>
 </div>
 </dd>
 <dt class="method" id="FMRadioManager::unsetAntennaChangeListener">
@@ -805,9 +837,10 @@ To resume playing the radio, user interaction with the device is required. This
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // When you don't want to detect a change in the antenna status
- tizen.fmradio.unsetAntennaChangeListener();
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* When you don't want to detect a change in the antenna status */
+tizen.fmradio.unsetAntennaChangeListener();
+</pre>
 </div>
 </dd>
 </dl>
index 6234658..b1e273e 100644 (file)
@@ -284,17 +284,19 @@ UNKNOWN - Sleep status could not be determined            </li>
           </ul>
          </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function onchangedCB(sleepInfo) {
-     console.log("Sleep status : " + sleepInfo.status);
-     console.log("Timestamp : " + sleepInfo.timestamp);
- }
-
- tizen.humanactivitymonitor.start("SLEEP_MONITOR", onchangedCB);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function onchangedCB(sleepInfo)
+{
+&nbsp;&nbsp;&nbsp;console.log("Sleep status: " + sleepInfo.status);
+&nbsp;&nbsp;&nbsp;console.log("Timestamp: " + sleepInfo.timestamp);
+}
+
+tizen.humanactivitymonitor.start("SLEEP_MONITOR", onchangedCB);
+</pre>
 </div>
 <div class="output">
-<span class="title"><p>Output example:</p></span><pre> Sleep status : ASLEEP
- Timestamp : 1456735296123
+<span class="title"><p>Output example:</p></span><pre> Sleep status: ASLEEP
+ Timestamp: 1456735296123
  </pre>
 </div>
 </div>
@@ -420,28 +422,32 @@ The <em>ErrorCallback</em> method is launched with these error types:
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function onsuccessCB(pedometerInfo) {
-     console.log("Step status : " + pedometerInfo.stepStatus);
-     console.log("Cumulative total step count : " + pedometerInfo.cumulativeTotalStepCount);
- }
-
- function onerrorCB(error) {
-     console.log("Error occurs. name:"+error.name + ", message: "+error.message);
- }
-
- function onchangedCB(pedometerdata) {
-     console.log("From now on, you will be notified when the pedometer data changes.");
-     // To get the current data information
-     tizen.humanactivitymonitor.getHumanActivityData("PEDOMETER", onsuccessCB, onerrorCB);
- }
-
- tizen.humanactivitymonitor.start("PEDOMETER", onchangedCB);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function onsuccessCB(pedometerInfo)
+{
+&nbsp;&nbsp;&nbsp;console.log("Step status: " + pedometerInfo.stepStatus);
+&nbsp;&nbsp;&nbsp;console.log("Cumulative total step count: " + pedometerInfo.cumulativeTotalStepCount);
+}
+
+function onerrorCB(error)
+{
+&nbsp;&nbsp;&nbsp;console.log("Error occurs. name:" + error.name + ", message: " + error.message);
+}
+
+function onchangedCB(pedometerdata)
+{
+&nbsp;&nbsp;&nbsp;console.log("From now on, you will be notified when the pedometer data changes.");
+&nbsp;&nbsp;&nbsp;/* To get the current data information */
+&nbsp;&nbsp;&nbsp;tizen.humanactivitymonitor.getHumanActivityData("PEDOMETER", onsuccessCB, onerrorCB);
+}
+
+tizen.humanactivitymonitor.start("PEDOMETER", onchangedCB);
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre> From now on, you will be notified when the pedometer data changes.
- Step status : WALKING
- Cumulative total step count : 100
+ Step status: WALKING
+ Cumulative total step count: 100
  </pre>
 </div>
 </dd>
@@ -535,38 +541,47 @@ For other types, only <b>'http://tizen.org/privilege/healthinfo'</b> should be d
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function onchangedCB(pedometerInfo) {
-     console.log("Step status : " + pedometerInfo.stepStatus);
-     console.log("Cumulative total step count : " + pedometerInfo.cumulativeTotalStepCount);
- }
-
- tizen.humanactivitymonitor.start("PEDOMETER", onchangedCB);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function onchangedCB(pedometerInfo)
+{
+&nbsp;&nbsp;&nbsp;console.log("Step status: " + pedometerInfo.stepStatus);
+&nbsp;&nbsp;&nbsp;console.log("Cumulative total step count: " + pedometerInfo.cumulativeTotalStepCount);
+}
+
+tizen.humanactivitymonitor.start("PEDOMETER", onchangedCB);
+</pre>
 </div>
 <div class="output">
-<span class="title"><p>Output example:</p></span><pre> Step status : WALKING
- Cumulative total step count : 100
+<span class="title"><p>Output example:</p></span><pre> Step status: WALKING
+ Cumulative total step count: 100
  </pre>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function onchangedCB(info) {
-     var gpsInfo = info.gpsInfo;
-     for (var index = 0; index &lt; gpsInfo.length; index++) {
-         console.log("latitude: " + gpsInfo[index].latitude);
-         console.log("longitude: " + gpsInfo[index].longitude);
-     }
- }
-
- function onerrorCB(error) {
-     console.log("Error occurred. Name:" + error.name + ", message: " + error.message);
- }
-
- try {
-     tizen.humanactivitymonitor.start("GPS", onchangedCB, onerrorCB, {callbackInterval: 150000, sampleInterval: 1000});
- } catch(err) {
-     console.log(err.name + ": " + err.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function onchangedCB(info)
+{
+&nbsp;&nbsp;&nbsp;var gpsInfo = info.gpsInfo;
+&nbsp;&nbsp;&nbsp;for (var index = 0; index &lt; gpsInfo.length; index++)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("latitude: " + gpsInfo[index].latitude);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("longitude: " + gpsInfo[index].longitude);
+&nbsp;&nbsp;&nbsp;}
+}
+
+function onerrorCB(error)
+{
+&nbsp;&nbsp;&nbsp;console.log("Error occurred. Name:" + error.name + ", message: " + error.message);
+}
+
+try
+{
+&nbsp;&nbsp;&nbsp;tizen.humanactivitymonitor.start("GPS", onchangedCB, onerrorCB, {callbackInterval: 150000, sampleInterval: 1000});
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="HumanActivityMonitorManager::stop">
@@ -629,8 +644,9 @@ For other types, only <b>'http://tizen.org/privilege/healthinfo'</b> should be d
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> tizen.humanactivitymonitor.stop("PEDOMETER");
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+tizen.humanactivitymonitor.stop("PEDOMETER");
+</pre>
 </div>
 </dd>
 <dt class="method" id="HumanActivityMonitorManager::setAccumulativePedometerListener">
@@ -687,17 +703,19 @@ Note that the setAccumulativePedometerListener() method does not need to call th
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function onchangedCB(pedometerInfo) {
-        console.log("Step status : " + pedometerInfo.stepStatus);
-        console.log("Accumulative total step count : " + pedometerInfo.accumulativeTotalStepCount);
- }
-
- tizen.humanactivitymonitor.setAccumulativePedometerListener(onchangedCB);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function onchangedCB(pedometerInfo)
+{
+&nbsp;&nbsp;&nbsp;console.log("Step status: " + pedometerInfo.stepStatus);
+&nbsp;&nbsp;&nbsp;console.log("Accumulative total step count: " + pedometerInfo.accumulativeTotalStepCount);
+}
+
+tizen.humanactivitymonitor.setAccumulativePedometerListener(onchangedCB);
+</pre>
 </div>
 <div class="output">
-<span class="title"><p>Output example:</p></span><pre> Step status : WALKING
- Accumulative total step count : 100
+<span class="title"><p>Output example:</p></span><pre> Step status: WALKING
+ Accumulative total step count: 100
  </pre>
 </div>
 </dd>
@@ -735,8 +753,8 @@ Note that the setAccumulativePedometerListener() method does not need to call th
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> tizen.humanactivitymonitor.unsetAccumulativePedometerListener();
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">tizen.humanactivitymonitor.unsetAccumulativePedometerListener();
+</pre>
 </div>
 </dd>
 <dt class="method" id="HumanActivityMonitorManager::addActivityRecognitionListener">
@@ -795,22 +813,28 @@ The <em>ErrorCallback</em> method is launched with this error type:
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function errorCallback(error) {
-     console.log (error.name +': ' + error.message);
- }
-
- function listener(info) {
-     console.log('type: '      + info.type);
-     console.log('timestamp: ' + info.timestamp);
-     console.log('accuracy: '  + info.accuracy);
- }
-
- try {
-     var listenerId = tizen.humanactivitymonitor.addActivityRecognitionListener("WALKING", listener, errorCallback);
- } catch (error) {
-     console.log (error.name +': ' + error.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function errorCallback(error)
+{
+&nbsp;&nbsp;&nbsp;console.log(error.name + ': ' + error.message);
+}
+
+function listener(info)
+{
+&nbsp;&nbsp;&nbsp;console.log('type: ' + info.type);
+&nbsp;&nbsp;&nbsp;console.log('timestamp: ' + info.timestamp);
+&nbsp;&nbsp;&nbsp;console.log('accuracy: ' + info.accuracy);
+}
+
+try
+{
+&nbsp;&nbsp;&nbsp;var listenerId = tizen.humanactivitymonitor.addActivityRecognitionListener("WALKING", listener, errorCallback);
+}
+catch (error)
+{
+&nbsp;&nbsp;&nbsp;console.log(error.name + ': ' + error.message);
+}
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre> type: WALKING
@@ -855,26 +879,32 @@ The <em>ErrorCallback</em> method is launched with this error type:
         </ul>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var listenerId;
-
- function errorCallback(error) {
-     console.log (error.name +': ' + error.message);
- }
-
- function listener(info) {
-     console.log('type: '      + info.type);
-     console.log('timestamp: ' + info.timestamp);
-     console.log('accuracy: '  + info.accuracy);
-
-     tizen.humanactivitymonitor.removeActivityRecognitionListener(listenerId, errorCallback);
- }
-
- try {
-     listenerId = tizen.humanactivitymonitor.addActivityRecognitionListener("WALKING", listener, errorCallback);
- } catch (error) {
-     console.log (error.name +': ' + error.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var listenerId;
+
+function errorCallback(error)
+{
+&nbsp;&nbsp;&nbsp;console.log(error.name + ': ' + error.message);
+}
+
+function listener(info)
+{
+&nbsp;&nbsp;&nbsp;console.log('type: ' + info.type);
+&nbsp;&nbsp;&nbsp;console.log('timestamp: ' + info.timestamp);
+&nbsp;&nbsp;&nbsp;console.log('accuracy: ' + info.accuracy);
+
+&nbsp;&nbsp;&nbsp;tizen.humanactivitymonitor.removeActivityRecognitionListener(listenerId, errorCallback);
+}
+
+try
+{
+&nbsp;&nbsp;&nbsp;listenerId = tizen.humanactivitymonitor.addActivityRecognitionListener("WALKING", listener, errorCallback);
+}
+catch (error)
+{
+&nbsp;&nbsp;&nbsp;console.log(error.name + ': ' + error.message);
+}
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre> type: WALKING
index 41c29bf..e59d4ed 100644 (file)
@@ -215,22 +215,26 @@ Mandatory keys will not be retrieved by this method.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var i, keyCode = {}, supportedKeys;
- supportedKeys = tizen.inputdevice.getSupportedKeys();
- for (i = 0; i &lt; supportedKeys.length; i++) {
-     keyCode[supportedKeys[i].name] = supportedKeys[i].code;
- }
- if(keyCode.hasOwnProperty("VolumeUp")) {
-     tizen.inputdevice.registerKey("VolumeUp");
- }
- window.addEventListener("keydown", function(keyEvent) {
-     // identify the key by the numeric code from the keyEvent
-     if(keyEvent.keyCode === keyCode.VolumeUp) {
-         console.log("The VOLUME UP was pressed");
-     }
- });
-
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var i, keyCode = {}, supportedKeys;
+supportedKeys = tizen.inputdevice.getSupportedKeys();
+for (i = 0; i &lt; supportedKeys.length; i++)
+{
+&nbsp;&nbsp;&nbsp;keyCode[supportedKeys[i].name] = supportedKeys[i].code;
+}
+if (keyCode.hasOwnProperty("VolumeUp"))
+{
+&nbsp;&nbsp;&nbsp;tizen.inputdevice.registerKey("VolumeUp");
+}
+window.addEventListener("keydown", function(keyEvent)
+{
+&nbsp;&nbsp;&nbsp;/* Identify the key by the numeric code from the keyEvent */
+&nbsp;&nbsp;&nbsp;if (keyEvent.keyCode === keyCode.VolumeUp)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("The VOLUME UP was pressed");
+&nbsp;&nbsp;&nbsp;}
+});
+</pre>
 </div>
 </dd>
 <dt class="method" id="InputDeviceManager::getKey">
@@ -315,15 +319,20 @@ An application can not register the mandatory keys (ArrowLeft, ArrowRight, Arrow
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var keys = ["VolumeUp", "VolumeDown"], i;
- for (i = 0; i &lt; keys.length; i++) {
-     try {
-         tizen.inputdevice.registerKey(keys[i]);
-     } catch(error) {
-         console.log("failed to register " + keys[i] + ": " + error);
-     }
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var keys = ["VolumeUp", "VolumeDown"], i;
+for (i = 0; i &lt; keys.length; i++)
+{
+&nbsp;&nbsp;&nbsp;try
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tizen.inputdevice.registerKey(keys[i]);
+&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;catch (error)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("failed to register " + keys[i] + ": " + error);
+&nbsp;&nbsp;&nbsp;}
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="InputDeviceManager::unregisterKey">
@@ -361,8 +370,9 @@ An application can not register the mandatory keys (ArrowLeft, ArrowRight, Arrow
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> tizen.inputdevice.unregisterKey("VolumeDown");
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+tizen.inputdevice.unregisterKey("VolumeDown");
+</pre>
 </div>
 </dd>
 <dt class="method" id="InputDeviceManager::registerKeyBatch">
@@ -428,17 +438,20 @@ An application can not register the mandatory keys (ArrowLeft, ArrowRight, Arrow
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function errorCB(err) {
-     console.log( 'The following error occurred: ' +  err.name);
- }
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function errorCB(err)
+{
+&nbsp;&nbsp;&nbsp;console.log('The following error occurred: ' +  err.name);
+}
 
- function successCB() {
-     console.log('Registsered successfully');
- }
+function successCB()
+{
+&nbsp;&nbsp;&nbsp;console.log('Registered successfully');
+}
 
- var keys = ["VolumeUp", "VolumeDown"];
- tizen.inputdevice.registerKeyBatch(keys, successCB, errorCB);
- </pre>
+var keys = ["VolumeUp", "VolumeDown"];
+tizen.inputdevice.registerKeyBatch(keys, successCB, errorCB);
+</pre>
 </div>
 </dd>
 <dt class="method" id="InputDeviceManager::unregisterKeyBatch">
@@ -498,16 +511,20 @@ UnknownError: In case of any other error              </li>
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function errorCB(err) {
-     console.log( 'The following error occurred: ' +  err.name);
- }
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function errorCB(err)
+{
+&nbsp;&nbsp;&nbsp;console.log('The following error occurred: ' +  err.name);
+}
+
+function successCB()
+{
+&nbsp;&nbsp;&nbsp;console.log('Unregistsered successfully');
+}
 
- function successCB() {
-     console.log('Unregistsered successfully');
- }
- var keys = ["VolumeUp", "VolumeDown"];
- tizen.inputdevice.unregisterKeyBatch(keys, successCB, errorCB);
- </pre>
+var keys = ["VolumeUp", "VolumeDown"];
+tizen.inputdevice.unregisterKeyBatch(keys, successCB, errorCB);
+</pre>
 </div>
 </dd>
 </dl>
index b8931f0..c08e2ef 100644 (file)
@@ -214,14 +214,16 @@ UnknownError - If the method cannot be completed because of an unknown error.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var data_name = "data1", raw_data = "my data";
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var data_name = "data1", raw_data = "my data";
 
- function onSave() {
-     console.log("Successfully saved data");
- }
+function onSave()
+{
+&nbsp;&nbsp;&nbsp;console.log("Successfully saved data");
+}
 
- tizen.keymanager.saveData(data_name, raw_data, null, onSave);
- </pre>
+tizen.keymanager.saveData(data_name, raw_data, null, onSave);
+</pre>
 </div>
 </dd>
 <dt class="method" id="KeyManager::removeData">
@@ -270,31 +272,36 @@ If an application calls this method to remove data which it saved into the KeyMa
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var data_name = "data1", raw_data = "my data";
-
- function onSave() {
-
-     // do something
-
-     // Dictionary does not require package ID because the
-     // application which is calling removeData() saved "data1"
-     tizen.keymanager.removeData({
-         "name": data_name
-     });
- }
-
- tizen.keymanager.saveData(data_name, raw_data, null, onSave);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var data_name = "data1", raw_data = "my data";
+
+function onSave()
+{
+&nbsp;&nbsp;&nbsp;/* Do something */
+
+&nbsp;&nbsp;&nbsp;/*
+&nbsp;&nbsp;&nbsp;   Dictionary does not require package ID because the
+&nbsp;&nbsp;&nbsp;   application which is calling removeData() saved "data1"
+&nbsp;&nbsp;&nbsp;*/
+&nbsp;&nbsp;&nbsp;tizen.keymanager.removeData({"name": data_name});
+}
+
+tizen.keymanager.saveData(data_name, raw_data, null, onSave);
+</pre>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var aliases = tizen.keymanager.getDataAliasList();
-
- if (aliases.length != 0) {
-     // Assuming the application calling removeData() has permission
-     // to remove aliases[0]
-     var app_data = tizen.keymanager.removeData(aliases[0]);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var aliases = tizen.keymanager.getDataAliasList();
+
+if (aliases.length != 0)
+{
+&nbsp;&nbsp;&nbsp;/*
+&nbsp;&nbsp;&nbsp;   Assuming the application calling removeData() has permission
+&nbsp;&nbsp;&nbsp;   to remove aliases[0]
+&nbsp;&nbsp;&nbsp;*/
+&nbsp;&nbsp;&nbsp;var app_data = tizen.keymanager.removeData(aliases[0]);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="KeyManager::getData">
@@ -354,30 +361,36 @@ If an application calls this method to retrieve raw data which it saved into the
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var data_name = "data1", raw_data = "my data";
-
- function onSave() {
-     // Dictionary does not require package ID because the
-     // application which is calling getData() saved "data1"
-     var app_data = tizen.keymanager.getData({
-         "name": data_name
-     });
-     console.log("App data: " + app_data + " was retrieved");
- }
-
- tizen.keymanager.saveData(data_name, raw_data, null, onSave);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var data_name = "data1", raw_data = "my data";
+
+function onSave()
+{
+&nbsp;&nbsp;&nbsp;/*
+&nbsp;&nbsp;&nbsp;   Dictionary does not require package ID because the
+&nbsp;&nbsp;&nbsp;   application which is calling getData() saved "data1"
+&nbsp;&nbsp;&nbsp;*/
+&nbsp;&nbsp;&nbsp;var app_data = tizen.keymanager.getData({"name": data_name});
+&nbsp;&nbsp;&nbsp;console.log("App data: " + app_data + " was retrieved");
+}
+
+tizen.keymanager.saveData(data_name, raw_data, null, onSave);
+</pre>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var aliases = tizen.keymanager.getDataAliasList();
-
- if (aliases.length != 0) {
-     // Assuming the application calling getData() has permission to read
-     // aliases[0]
-     var app_data = tizen.keymanager.getData(aliases[0]);
-     console.log("App data: " + app_data + " was retrieved");
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var aliases = tizen.keymanager.getDataAliasList();
+
+if (aliases.length != 0)
+{
+&nbsp;&nbsp;&nbsp;/*
+&nbsp;&nbsp;&nbsp;   Assuming the application calling getData() has permission to read
+&nbsp;&nbsp;&nbsp;   aliases[0]
+&nbsp;&nbsp;&nbsp;*/
+&nbsp;&nbsp;&nbsp;var app_data = tizen.keymanager.getData(aliases[0]);
+&nbsp;&nbsp;&nbsp;console.log("App data: " + app_data + " was retrieved");
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="KeyManager::getDataAliasList">
@@ -405,14 +418,16 @@ If an application calls this method to retrieve raw data which it saved into the
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var aliases = tizen.keymanager.getDataAliasList();
-
- console.log("aliases: ");
- for (var i = 0; i &lt; aliases.length; i++) {
-     console.log("Package ID: " + aliases[i].packageId + ", Name: "
-             + aliases[i].name);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var aliases = tizen.keymanager.getDataAliasList();
+
+console.log("aliases: ");
+for (var i = 0; i &lt; aliases.length; i++)
+{
+&nbsp;&nbsp;&nbsp;console.log("Package ID: " + aliases[i].packageId + ", Name: "
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;+ aliases[i].name);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="KeyManager::setPermission">
@@ -475,41 +490,53 @@ UnknownError - If the method cannot be completed because of an unknown error.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var data_name = "data1", raw_data = "my data";
-
- function onPermissionSet() {
-     console.log("Successfully set permssion");
- }
-
- function onSave() {
-     // Dictionary does not require package ID because an
-     // application can only set permission for data which it saved
-     tizen.keymanager.setPermission({
-         "name": data_name
-     }, "9PdoiICQ4c", "READ_REMOVE", onPermissionSet);
- }
-
- tizen.keymanager.saveData(data_name, raw_data, null, onSave);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var data_name = "data1", raw_data = "my data";
+
+function onPermissionSet()
+{
+&nbsp;&nbsp;&nbsp;console.log("Successfully set permission");
+}
+
+function onSave()
+{
+&nbsp;&nbsp;&nbsp;/*
+&nbsp;&nbsp;&nbsp;   Dictionary does not require package ID because an
+&nbsp;&nbsp;&nbsp;   application can only set permission for data which it saved
+&nbsp;&nbsp;&nbsp;*/
+&nbsp;&nbsp;&nbsp;tizen.keymanager.setPermission({"name": data_name}, "9PdoiICQ4c", "READ_REMOVE",
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;onPermissionSet);
+}
+
+tizen.keymanager.saveData(data_name, raw_data, null, onSave);
+</pre>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var aliases = tizen.keymanager.getDataAliasList();
-
- function onPermissionSet() {
-     console.log("Successfully set permssion");
- }
-
- if (aliases.length != 0) {
-     // Check that the application calling setPermission() saved aliases[0] into
-     // the KeyManager
-     if (aliases[0].packageId === tizen.package.getPackageInfo().id) {
-         tizen.keymanager.setPermission(aliases[0], "9PdoiICQ4c", "READ_REMOVE",
-                 onPermissionSet);
-     } else {
-         console.log("This application did not save aliases[0] into the KeyManager");
-     }
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var aliases = tizen.keymanager.getDataAliasList();
+
+function onPermissionSet()
+{
+&nbsp;&nbsp;&nbsp;console.log("Successfully set permssion");
+}
+
+if (aliases.length != 0)
+{
+&nbsp;&nbsp;&nbsp;/*
+&nbsp;&nbsp;&nbsp;   Check that the application calling setPermission() saved aliases[0] into
+&nbsp;&nbsp;&nbsp;   the KeyManager
+&nbsp;&nbsp;&nbsp;*/
+&nbsp;&nbsp;&nbsp;if (aliases[0].packageId === tizen.package.getPackageInfo().id)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tizen.keymanager.setPermission(aliases[0], "9PdoiICQ4c", "READ_REMOVE",
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;onPermissionSet);
+&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;else
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("This application did not save aliases[0] into the KeyManager");
+&nbsp;&nbsp;&nbsp;}
+}
+</pre>
 </div>
 </dd>
 </dl>
index 59914d0..b621c25 100644 (file)
@@ -264,12 +264,16 @@ There is a <em>tizen.mediacontroller</em> object that allows access to the Media
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> try {
-     var mcClient = tizen.mediacontroller.getClient();
- } catch (err) {
-     console.log (err.name +': ' + err.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+try
+{
+&nbsp;&nbsp;&nbsp;var mcClient = tizen.mediacontroller.getClient();
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + ': ' + err.message);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="MediaControllerManager::createServer">
@@ -314,12 +318,16 @@ and is controlled by Client.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> try {
-     var mcServer = tizen.mediacontroller.createServer();
- } catch (err) {
-     console.log (err.name +': ' + err.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+try
+{
+&nbsp;&nbsp;&nbsp;var mcServer = tizen.mediacontroller.createServer();
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + ': ' + err.message);
+}
+</pre>
 </div>
 </dd>
 </dl>
@@ -419,11 +427,12 @@ how to receive playback info changes from server on client side.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var mcServer = tizen.mediacontroller.createServer();
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var mcServer = tizen.mediacontroller.createServer();
 
- mcServer.updatePlaybackState('PLAY');
- console.log('Current playback state is: ' + mcServer.playbackInfo.state);
- </pre>
+mcServer.updatePlaybackState('PLAY');
+console.log('Current playback state is: ' + mcServer.playbackInfo.state);
+</pre>
 </div>
 </dd>
 <dt class="method" id="MediaControllerServer::updatePlaybackPosition">
@@ -461,11 +470,12 @@ how to receive playback info changes from server on client side.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var mcServer = tizen.mediacontroller.createServer();
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var mcServer = tizen.mediacontroller.createServer();
 
- mcServer.updatePlaybackPosition(164);
- console.log('Current playback position is: ' + mcServer.playbackInfo.position);
- </pre>
+mcServer.updatePlaybackPosition(164);
+console.log('Current playback position is: ' + mcServer.playbackInfo.position);
+</pre>
 </div>
 </dd>
 <dt class="method" id="MediaControllerServer::updateShuffleMode">
@@ -498,11 +508,12 @@ how to receive playback info changes from server on client side.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var mcServer = tizen.mediacontroller.createServer();
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var mcServer = tizen.mediacontroller.createServer();
 
- mcServer.updateShuffleMode(true);
- console.log('Current shuffle mode is: ' + mcServer.playbackInfo.shuffleMode);
- </pre>
+mcServer.updateShuffleMode(true);
+console.log('Current shuffle mode is: ' + mcServer.playbackInfo.shuffleMode);
+</pre>
 </div>
 </dd>
 <dt class="method" id="MediaControllerServer::updateRepeatMode">
@@ -535,11 +546,12 @@ how to receive playback info changes from server on client side.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var mcServer = tizen.mediacontroller.createServer();
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var mcServer = tizen.mediacontroller.createServer();
 
- mcServer.updateRepeatMode(true);
- console.log('Current repeat mode is: ' + mcServer.playbackInfo.repeatMode);
- </pre>
+mcServer.updateRepeatMode(true);
+console.log('Current repeat mode is: ' + mcServer.playbackInfo.repeatMode);
+</pre>
 </div>
 </dd>
 <dt class="method" id="MediaControllerServer::updateMetadata">
@@ -577,14 +589,15 @@ how to receive playback info changes from server on client side.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var mcServer = tizen.mediacontroller.createServer();
- var metadata = mcServer.playbackInfo.metadata;
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var mcServer = tizen.mediacontroller.createServer();
+var metadata = mcServer.playbackInfo.metadata;
 
- metadata.artist = 'Artist Name';
- mcServer.updateMetadata(metadata);
+metadata.artist = 'Artist Name';
+mcServer.updateMetadata(metadata);
 
- console.log('Current metadata is: ' + JSON.stringify(mcServer.playbackInfo.metadata));
- </pre>
+console.log('Current metadata is: ' + JSON.stringify(mcServer.playbackInfo.metadata));
+</pre>
 </div>
 </dd>
 <dt class="method" id="MediaControllerServer::addChangeRequestPlaybackInfoListener">
@@ -628,27 +641,33 @@ requests from client.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var watcherId = 0; // watcher identifier
- var mcServer = tizen.mediacontroller.createServer();
-
- var playbackRequestListener = {
-     onplaybackstaterequest: function(state) {
-         console.log('Playback state requested to: ' + state);
-     },
-     onplaybackpositionrequest: function(position) {
-         console.log('Playback position requested to: ' + position);
-     },
-     onshufflemoderequest: function(mode) {
-         console.log('Shuffle mode requested to: ' + mode);
-     },
-     onrepeatmoderequest: function(mode) {
-         console.log('Repeat mode requested to: ' + mode);
-     }
- };
-
- // Registers to receive playback info change requests from client.
- watcherId = mcServer.addChangeRequestPlaybackInfoListener(playbackRequestListener);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var watcherId = 0; /* Watcher identifier */
+var mcServer = tizen.mediacontroller.createServer();
+
+var playbackRequestListener =
+{
+&nbsp;&nbsp;&nbsp;onplaybackstaterequest: function(state)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('Playback state requested to: ' + state);
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;onplaybackpositionrequest: function(position)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('Playback position requested to: ' + position);
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;onshufflemoderequest: function(mode)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('Shuffle mode requested to: ' + mode);
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;onrepeatmoderequest: function(mode)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('Repeat mode requested to: ' + mode);
+&nbsp;&nbsp;&nbsp;}
+};
+
+/* Registers to receive playback info change requests from client */
+watcherId = mcServer.addChangeRequestPlaybackInfoListener(playbackRequestListener);
+</pre>
 </div>
 </dd>
 <dt class="method" id="MediaControllerServer::removeChangeRequestPlaybackInfoListener">
@@ -681,30 +700,36 @@ requests from client.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var watcherId = 0; // watcher identifier
- var mcServer = tizen.mediacontroller.createServer();
-
- var playbackRequestListener = {
-     onplaybackstaterequest: function(state) {
-         console.log('Playback state requested to: ' + state);
-     },
-     onplaybackpositionrequest: function(position) {
-         console.log('Playback position requested to: ' + position);
-     },
-     onshufflemoderequest: function(mode) {
-         console.log('Shuffle mode requested to: ' + mode);
-     },
-     onrepeatmoderequest: function(mode) {
-         console.log('Repeat mode requested to: ' + mode);
-     }
- };
-
- // Registers to receive playback info change requests.
- watcherId = mcServer.addChangeRequestPlaybackInfoListener(playbackRequestListener);
-
- // Cancels the watch operation.
- mcServer.removeChangeRequestPlaybackInfoListener(watcherId);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var watcherId = 0; /* Watcher identifier */
+var mcServer = tizen.mediacontroller.createServer();
+
+var playbackRequestListener =
+{
+&nbsp;&nbsp;&nbsp;onplaybackstaterequest: function(state)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('Playback state requested to: ' + state);
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;onplaybackpositionrequest: function(position)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('Playback position requested to: ' + position);
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;onshufflemoderequest: function(mode)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('Shuffle mode requested to: ' + mode);
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;onrepeatmoderequest: function(mode)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('Repeat mode requested to: ' + mode);
+&nbsp;&nbsp;&nbsp;}
+};
+
+/* Registers to receive playback info change requests */
+watcherId = mcServer.addChangeRequestPlaybackInfoListener(playbackRequestListener);
+
+/* Cancels the watch operation */
+mcServer.removeChangeRequestPlaybackInfoListener(watcherId);
+</pre>
 </div>
 </dd>
 <dt class="method" id="MediaControllerServer::addCommandListener">
@@ -747,23 +772,23 @@ See <em>MediaControllerServerInfo</em> to check how to send custom commands from
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var watcherId = 0; // watcher identifier
- var mcServer = tizen.mediacontroller.createServer();
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var watcherId = 0; /* Watcher identifier */
+var mcServer = tizen.mediacontroller.createServer();
 
- var commandReceiveListener = function(clientName, command, data) {
-     console.log('Command ' + command + ' received from: ' + clientName +
-         ' with data: ' + JSON.stringify(data));
+var commandReceiveListener = function(clientName, command, data)
+{
+&nbsp;&nbsp;&nbsp;console.log('Command ' + command + ' received from: ' + clientName +
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;' with data: ' + JSON.stringify(data));
 
-     var reply = {
-         myReply: 'someValue'
-     };
+&nbsp;&nbsp;&nbsp;var reply = {myReply: 'someValue'};
 
-     return reply;
- };
+&nbsp;&nbsp;&nbsp;return reply;
+};
 
- // Registers to receive custom commands from client.
- watcherId = mcServer.addCommandListener(commandReceiveListener);
- </pre>
+/* Registers to receive custom commands from client */
+watcherId = mcServer.addCommandListener(commandReceiveListener);
+</pre>
 </div>
 </dd>
 <dt class="method" id="MediaControllerServer::removeCommandListener">
@@ -796,26 +821,26 @@ See <em>MediaControllerServerInfo</em> to check how to send custom commands from
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var watcherId = 0; // watcher identifier
- var mcServer = tizen.mediacontroller.createServer();
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var watcherId = 0; /* Watcher identifier */
+var mcServer = tizen.mediacontroller.createServer();
 
- var commandReceiveListener = function(clientName, command, data) {
-     console.log('Command ' + command + ' received from: ' + clientName +
-         ' with data: ' + JSON.stringify(data));
+var commandReceiveListener = function(clientName, command, data)
+{
+&nbsp;&nbsp;&nbsp;console.log('Command ' + command + ' received from: ' + clientName +
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;' with data: ' + JSON.stringify(data));
 
-     var reply = {
-         myReply: 'someValue'
-     };
+&nbsp;&nbsp;&nbsp;var reply = {myReply: 'someValue'};
 
-     return reply;
- };
+&nbsp;&nbsp;&nbsp;return reply;
+};
 
- // Registers to receive custom commands from client.
- watcherId = mcServer.addCommandListener(commandReceiveListener);
+/* Registers to receive custom commands from client */
+watcherId = mcServer.addCommandListener(commandReceiveListener);
 
- // Cancels the watch operation.
- mcServer.removeCommandListener(watcherId);
- </pre>
+/* Cancels the watch operation */
+mcServer.removeCommandListener(watcherId);
+</pre>
 </div>
 </dd>
 </dl>
@@ -907,12 +932,13 @@ Functions include operations to get the latest status of the media controller se
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Access latest server info
- var mcClient = tizen.mediacontroller.getClient();
- var mcServerInfo = mcClient.getLatestServerInfo();
- console.log('Latest server name is: ' + mcServerInfo.name +
-             ', server state: ' + mcServerInfo.name);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Access latest server info */
+var mcClient = tizen.mediacontroller.getClient();
+var mcServerInfo = mcClient.getLatestServerInfo();
+console.log('Latest server name is: ' + mcServerInfo.name +
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;', server state: ' + mcServerInfo.name);
+</pre>
 </div>
 </dd>
 </dl>
@@ -1043,15 +1069,18 @@ Provides methods to send commands to server and listen for server status change.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var mcClient = tizen.mediacontroller.getClient();
- var mcServerInfo = mcClient.getLatestServerInfo();
-
- mcServerInfo.sendPlaybackState('STOP', function() {
-     console.log('Playback has stopped');
- }, function(e) {
-     console.log('Unable to change playback state: ' + e.message);
- });
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var mcClient = tizen.mediacontroller.getClient();
+var mcServerInfo = mcClient.getLatestServerInfo();
+
+mcServerInfo.sendPlaybackState('STOP', function()
+{
+&nbsp;&nbsp;&nbsp;console.log('Playback has stopped');
+}, function(e)
+{
+&nbsp;&nbsp;&nbsp;console.log('Unable to change playback state: ' + e.message);
+});
+</pre>
 </div>
 </dd>
 <dt class="method" id="MediaControllerServerInfo::sendPlaybackPosition">
@@ -1100,15 +1129,18 @@ Provides methods to send commands to server and listen for server status change.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var mcClient = tizen.mediacontroller.getClient();
- var mcServerInfo = mcClient.getLatestServerInfo();
-
- mcServerInfo.sendPlaybackPosition(164, function() {
-     console.log('Playback position changed');
- }, function(e) {
-     console.log('Unable to change playback position: ' + e.message);
- });
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var mcClient = tizen.mediacontroller.getClient();
+var mcServerInfo = mcClient.getLatestServerInfo();
+
+mcServerInfo.sendPlaybackPosition(164, function()
+{
+&nbsp;&nbsp;&nbsp;console.log('Playback position changed');
+}, function(e)
+{
+&nbsp;&nbsp;&nbsp;console.log('Unable to change playback position: ' + e.message);
+});
+</pre>
 </div>
 </dd>
 <dt class="method" id="MediaControllerServerInfo::sendShuffleMode">
@@ -1154,15 +1186,18 @@ Provides methods to send commands to server and listen for server status change.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var mcClient = tizen.mediacontroller.getClient();
- var mcServerInfo = mcClient.getLatestServerInfo();
-
- mcServerInfo.sendShuffleMode(true, function() {
-     console.log('Shuffle mode changed');
- }, function(e) {
-     console.log('Unable to change shuffle mode: ' + e.message);
- });
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var mcClient = tizen.mediacontroller.getClient();
+var mcServerInfo = mcClient.getLatestServerInfo();
+
+mcServerInfo.sendShuffleMode(true, function()
+{
+&nbsp;&nbsp;&nbsp;console.log('Shuffle mode changed');
+}, function(e)
+{
+&nbsp;&nbsp;&nbsp;console.log('Unable to change shuffle mode: ' + e.message);
+});
+</pre>
 </div>
 </dd>
 <dt class="method" id="MediaControllerServerInfo::sendRepeatMode">
@@ -1208,15 +1243,18 @@ Provides methods to send commands to server and listen for server status change.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var mcClient = tizen.mediacontroller.getClient();
- var mcServerInfo = mcClient.getLatestServerInfo();
-
- mcServerInfo.sendRepeatMode(false, function() {
-     console.log('Repeat mode changed');
- }, function(e) {
-     console.log('Unable to change repeat mode: ' + e.message);
- });
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var mcClient = tizen.mediacontroller.getClient();
+var mcServerInfo = mcClient.getLatestServerInfo();
+
+mcServerInfo.sendRepeatMode(false, function()
+{
+&nbsp;&nbsp;&nbsp;console.log('Repeat mode changed');
+}, function(e)
+{
+&nbsp;&nbsp;&nbsp;console.log('Unable to change repeat mode: ' + e.message);
+});
+</pre>
 </div>
 </dd>
 <dt class="method" id="MediaControllerServerInfo::sendCommand">
@@ -1270,18 +1308,20 @@ and respond to custom commands.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var mcClient = tizen.mediacontroller.getClient();
- var mcServerInfo = mcClient.getLatestServerInfo();
-
- var exampleCustomCommandData = {
-     myFilter: 'rock'
- };
- mcServerInfo.sendCommand('myPlaylistFilter', exampleCustomCommandData, function(response) {
-     console.log('Command executed with result: ' + JSON.stringify(response));
- }, function(e) {
-     console.log('Error executing command: ' + e.message);
- });
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var mcClient = tizen.mediacontroller.getClient();
+var mcServerInfo = mcClient.getLatestServerInfo();
+
+var exampleCustomCommandData = {myFilter: 'rock'};
+
+mcServerInfo.sendCommand('myPlaylistFilter', exampleCustomCommandData, function(response)
+{
+&nbsp;&nbsp;&nbsp;console.log('Command executed with result: ' + JSON.stringify(response));
+}, function(e)
+{
+&nbsp;&nbsp;&nbsp;console.log('Error executing command: ' + e.message);
+});
+</pre>
 </div>
 </dd>
 <dt class="method" id="MediaControllerServerInfo::addServerStatusChangeListener">
@@ -1323,15 +1363,17 @@ and respond to custom commands.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var watcherId = 0; // watcher identifier
- var mcClient = tizen.mediacontroller.getClient();
- var mcServerInfo = mcClient.getLatestServerInfo();
-
- // Registers to be notified when server status changes.
- watcherId = mcServerInfo.addServerStatusChangeListener(function(status) {
-     console.log(mcServerInfo.name + ' server status changed to ' + status);
- });
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var watcherId = 0; /* Watcher identifier */
+var mcClient = tizen.mediacontroller.getClient();
+var mcServerInfo = mcClient.getLatestServerInfo();
+
+/* Registers to be notified when server status changes */
+watcherId = mcServerInfo.addServerStatusChangeListener(function(status)
+{
+&nbsp;&nbsp;&nbsp;console.log(mcServerInfo.name + ' server status changed to ' + status);
+});
+</pre>
 </div>
 </dd>
 <dt class="method" id="MediaControllerServerInfo::removeServerStatusChangeListener">
@@ -1364,18 +1406,20 @@ and respond to custom commands.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var watcherId = 0; // watcher identifier
- var mcClient = tizen.mediacontroller.getClient();
- var mcServerInfo = mcClient.getLatestServerInfo();
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var watcherId = 0; /* Watcher identifier */
+var mcClient = tizen.mediacontroller.getClient();
+var mcServerInfo = mcClient.getLatestServerInfo();
 
- // Registers to be notified when server status changes.
- watcherId = mcServerInfo.addServerStatusChangeListener(function(status) {
-     console.log(mcServerInfo.name + ' server status changed to ' + status);
- });
+/* Registers to be notified when server status changes */
+watcherId = mcServerInfo.addServerStatusChangeListener(function(status)
+{
+&nbsp;&nbsp;&nbsp;console.log(mcServerInfo.name + ' server status changed to ' + status);
+});
 
- // Cancels the watch operation.
- mcServerInfo.removeServerStatusChangeListener(watcherId);
- </pre>
+/* Cancels the watch operation */
+mcServerInfo.removeServerStatusChangeListener(watcherId);
+</pre>
 </div>
 </dd>
 <dt class="method" id="MediaControllerServerInfo::addPlaybackInfoChangeListener">
@@ -1417,29 +1461,35 @@ and respond to custom commands.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var watcherId = 0; // watcher identifier
- var mcClient = tizen.mediacontroller.getClient();
- var mcServerInfo = mcClient.getLatestServerInfo();
-
- var playbackListener = {
-     onplaybackchanged: function(state, position) {
-         console.log('Current playback state: ' + state);
-         console.log('Current playback position: ' + position);
-     },
-     onshufflemodechanged: function(mode) {
-         console.log('Shuffle mode changed to: ' + mode);
-     },
-     onrepeatmodechanged: function(mode) {
-         console.log('Repeat mode changed to: ' + mode);
-     },
-     onmetadatachanged: function(metadata) {
-         console.log('Playback metadata changed: ' + JSON.stringify(metadata));
-     }
- };
-
- // Registers to be notified when playback state changes.
- watcherId = mcServerInfo.addPlaybackInfoChangeListener(playbackListener);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var watcherId = 0; /* Watcher identifier */
+var mcClient = tizen.mediacontroller.getClient();
+var mcServerInfo = mcClient.getLatestServerInfo();
+
+var playbackListener =
+{
+&nbsp;&nbsp;&nbsp;onplaybackchanged: function(state, position)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('Current playback state: ' + state);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('Current playback position: ' + position);
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;onshufflemodechanged: function(mode)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('Shuffle mode changed to: ' + mode);
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;onrepeatmodechanged: function(mode)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('Repeat mode changed to: ' + mode);
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;onmetadatachanged: function(metadata)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('Playback metadata changed: ' + JSON.stringify(metadata));
+&nbsp;&nbsp;&nbsp;}
+};
+
+/* Registers to be notified when playback state changes */
+watcherId = mcServerInfo.addPlaybackInfoChangeListener(playbackListener);
+</pre>
 </div>
 </dd>
 <dt class="method" id="MediaControllerServerInfo::removePlaybackInfoChangeListener">
@@ -1472,33 +1522,39 @@ and respond to custom commands.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var watcherId = 0; // watcher identifier
- var mcClient = tizen.mediacontroller.getClient();
- var mcServerInfo = mcClient.getLatestServerInfo();
-
- // receives playback state changes
- var playbackListener = {
-     onplaybackchanged: function(state, position) {
-         console.log('Current playback state: ' + state);
-         console.log('Current playback position: ' + position);
-     },
-     onshufflemodechanged: function(mode) {
-         console.log('Shuffle mode changed to: ' + mode);
-     },
-     onrepeatmodechanged: function(mode) {
-         console.log('Repeat mode changed to: ' + mode);
-     },
-     onmetadatachanged: function(metadata) {
-         console.log('Playback metadata changed: ' + JSON.stringify(metadata));
-     }
- };
-
- // Registers to be notified when playback state changes.
- watcherId = mcServerInfo.addPlaybackInfoChangeListener(playbackListener);
-
- // Cancels the watch operation.
-  mcServerInfo.removePlaybackInfoChangeListener(watcherId);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var watcherId = 0; /* Watcher identifier */
+var mcClient = tizen.mediacontroller.getClient();
+var mcServerInfo = mcClient.getLatestServerInfo();
+
+/* Receives playback state changes */
+var playbackListener =
+{
+&nbsp;&nbsp;&nbsp;onplaybackchanged: function(state, position)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('Current playback state: ' + state);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('Current playback position: ' + position);
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;onshufflemodechanged: function(mode)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('Shuffle mode changed to: ' + mode);
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;onrepeatmodechanged: function(mode)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('Repeat mode changed to: ' + mode);
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;onmetadatachanged: function(metadata)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('Playback metadata changed: ' + JSON.stringify(metadata));
+&nbsp;&nbsp;&nbsp;}
+};
+
+/* Registers to be notified when playback state changes */
+watcherId = mcServerInfo.addPlaybackInfoChangeListener(playbackListener);
+
+/* Cancels the watch operation */
+mcServerInfo.removePlaybackInfoChangeListener(watcherId);
+</pre>
 </div>
 </dd>
 </dl>
index 4669aee..3b90ca2 100644 (file)
@@ -184,15 +184,19 @@ There is a tizen.mediakey object that allows accessing the functionality of the
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> tizen.mediakey.setMediaKeyEventListener({
-     onpressed: function(key) {
-         console.log("Pressed  key: " + key);
-     },
-     onreleased: function(key) {
-         console.log("Released key: " + key);
-     }
- });
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+tizen.mediakey.setMediaKeyEventListener(
+{
+&nbsp;&nbsp;&nbsp;onpressed: function(key)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Pressed key: " + key);
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;onreleased: function(key)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Released key: " + key);
+&nbsp;&nbsp;&nbsp;}
+});
+</pre>
 </div>
 </dd>
 <dt class="method" id="MediaKeyManager::unsetMediaKeyEventListener">
@@ -216,8 +220,9 @@ There is a tizen.mediakey object that allows accessing the functionality of the
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> tizen.mediakey.unsetMediaKeyEventListener();
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+tizen.mediakey.unsetMediaKeyEventListener();
+</pre>
 </div>
 </dd>
 </dl>
index d169f41..6fa7644 100644 (file)
@@ -229,9 +229,10 @@ The <em>tizen.messageport</em> object allows access to the functionality of the
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Requests the LocalMessagePort instance with the specified message port name
- var localMsgPort = tizen.messageport.requestLocalMessagePort('MessagePortA');
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Requests the LocalMessagePort instance with the specified message port name */
+var localMsgPort = tizen.messageport.requestLocalMessagePort('MessagePortA');
+</pre>
 </div>
 </dd>
 <dt class="method" id="MessagePortManager::requestTrustedLocalMessagePort">
@@ -281,9 +282,10 @@ Trusted local message port can communicate with applications that are signed wit
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Requests the LocalMessagePort instance with the specified message port name
- var localMsgPort = tizen.messageport.requestTrustedLocalMessagePort('MessagePortB');
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Requests the LocalMessagePort instance with the specified message port name */
+var localMsgPort = tizen.messageport.requestTrustedLocalMessagePort('MessagePortB');
+</pre>
 </div>
 </dd>
 <dt class="method" id="MessagePortManager::requestRemoteMessagePort">
@@ -334,9 +336,10 @@ If the message port name and application ID are the same, the platform returns t
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Requests the RemoteMessagePort instance with the specified message port name
- var remoteMsgPort = tizen.messageport.requestRemoteMessagePort('6xaeuflskd.App1', 'MessagePortA');
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Requests the RemoteMessagePort instance with the specified message port name */
+var remoteMsgPort = tizen.messageport.requestRemoteMessagePort('6xaeuflskd.App1', 'MessagePortA');
+</pre>
 </div>
 </dd>
 <dt class="method" id="MessagePortManager::requestTrustedRemoteMessagePort">
@@ -391,9 +394,10 @@ Trusted remote message port can communicate with applications that are signed wi
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Requests the RemoteMessagePort instance with the specified message port name.
- var remoteMsgPort = tizen.messageport.requestTrustedRemoteMessagePort('6xauflskd.App1', 'MessagePortB');
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Requests the RemoteMessagePort instance with the specified message port name */
+var remoteMsgPort = tizen.messageport.requestTrustedRemoteMessagePort('6xauflskd.App1', 'MessagePortB');
+</pre>
 </div>
 </dd>
 </dl>
@@ -488,13 +492,15 @@ Trusted remote message port can communicate with applications that are signed wi
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function onreceived(data, remoteMsgPort) {
-   console.log('Received data to \'' + remoteMsgPort.messagePortName + '\'');
- }
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function onreceived(data, remoteMsgPort)
+{
+&nbsp;&nbsp;&nbsp;console.log('Received data to \'' + remoteMsgPort.messagePortName + '\'');
+}
 
- var localMsgPort = tizen.messageport.requestLocalMessagePort('MessagePortA');
- var watchId = localMsgPort.addMessagePortListener(onreceived);
- </pre>
+var localMsgPort = tizen.messageport.requestLocalMessagePort('MessagePortA');
+var watchId = localMsgPort.addMessagePortListener(onreceived);
+</pre>
 </div>
 </dd>
 <dt class="method" id="LocalMessagePort::removeMessagePortListener">
@@ -538,11 +544,13 @@ Trusted remote message port can communicate with applications that are signed wi
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var localMsgPort = tizen.messageport.requestLocalMessagePort('MessagePortA');
- var watchId = localMsgPort.addMessagePortListener(onreceived);
- // Communication routines of your app...
- localMsgPort.removeMessagePortListener(watchId);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var localMsgPort = tizen.messageport.requestLocalMessagePort('MessagePortA');
+var watchId = localMsgPort.addMessagePortListener(onreceived);
+/* Communication routines of your app */
+
+localMsgPort.removeMessagePortListener(watchId);
+</pre>
 </div>
 </dd>
 </dl>
@@ -656,30 +664,34 @@ array must not be duplicated or empty.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Sends string message
- var localMsgPort = tizen.messageport.requestLocalMessagePort('MessagePortA');
- var remoteMsgPort = tizen.messageport.requestRemoteMessagePort('6xaeuflskd.App1', 'MessagePortB');
- localMsgPort.addMessagePortListener(function(items, remoteport) {
-   // ...
-   if(remoteport !== null) {
-     remoteport.sendMessage([{key:'RESULT', value:'OK'}]);
-   }
- });
- // stream - FileStream object
- var bytePockets = [], byteCount = 0, i = 0;
- while(byteCount  stream.bytesAvailable - 256) {
-   bytePockets[i] = stream.readBytes(256);
-   byteCount+=256;
-   i++;
- }
- bytePockets[i] = stream.readBytes(stream.bytesAvailable - byteCount);
-
- var messagePortPockets = [{key: "key1", value: "val1"},
-                        {key: "key2", value: ["val2", "val3", "val4"]},
-                        {key: "key3", value: bytePockets[0]},
-                        {key: "key4", value: bytePockets}];
- remoteMsgPort.sendMessage(messagePortPockets, localMsgPort);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Sends string message */
+var localMsgPort = tizen.messageport.requestLocalMessagePort('MessagePortA');
+var remoteMsgPort = tizen.messageport.requestRemoteMessagePort('6xaeuflskd.App1', 'MessagePortB');
+localMsgPort.addMessagePortListener(function(items, remoteport)
+{
+&nbsp;&nbsp;&nbsp;/* ... */
+&nbsp;&nbsp;&nbsp;if (remoteport !== null)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;remoteport.sendMessage([{key:'RESULT', value:'OK'}]);
+&nbsp;&nbsp;&nbsp;}
+});
+/* stream - FileStream object */
+var bytePockets = [], byteCount = 0, i = 0;
+while (byteCount &lt; stream.bytesAvailable - 256)
+{
+&nbsp;&nbsp;&nbsp;bytePockets[i] = stream.readBytes(256);
+&nbsp;&nbsp;&nbsp;byteCount+=256;
+&nbsp;&nbsp;&nbsp;i++;
+}
+bytePockets[i] = stream.readBytes(stream.bytesAvailable - byteCount);
+
+var messagePortPockets = [{key: "key1", value: "val1"},
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{key: "key2", value: ["val2", "val3", "val4"]},
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{key: "key3", value: bytePockets[0]},
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{key: "key4", value: bytePockets}];
+remoteMsgPort.sendMessage(messagePortPockets, localMsgPort);
+</pre>
 </div>
 </dd>
 </dl>
@@ -755,14 +767,16 @@ array must not be duplicated or empty.
         </ul>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // MessagePortCallback instance
- function onreceived(data, remoteMsgPort) {
-   console.log('Received data to \'' + remoteMsgPort.messagePortName + '\'');
- }
-
- var localMsgPort = tizen.messageport.requestLocalMessagePort('MessagePortA');
- var watchId = localMsgPort.addMessagePortListener(onreceived);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* MessagePortCallback instance */
+function onreceived(data, remoteMsgPort)
+{
+&nbsp;&nbsp;&nbsp;console.log('Received data to \'' + remoteMsgPort.messagePortName + '\'');
+}
+
+var localMsgPort = tizen.messageport.requestLocalMessagePort('MessagePortA');
+var watchId = localMsgPort.addMessagePortListener(onreceived);
+</pre>
 </div>
 </dd>
 </dl>
index 3907d10..838beb3 100644 (file)
@@ -361,27 +361,30 @@ of a message without the loaded body. In such situations, the method <em>Message
           </p>
          </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Defines the success callback.
- var messageSentCallback = function(recipients) {
-   console.log("Message sent successfully to " + recipients.length + " recipients.");
- }
-
- // Defines the error callback.
- function errorCallback(err) {
-   console.log(err.name + " error: " + err.message);
- }
-
- function serviceListCB(services) {
-   if (services.length &gt; 0) {
-      var msg = new tizen.Message("messaging.sms", {plainBody: "Tizen first SMS message."});
-      services[0].sendMessage(msg, messageSentCallback, errorCallback);
-   }
- }
-
- tizen.messaging.getMessageServices("messaging.sms",
-                                    serviceListCB,
-                                    errorCallback);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Defines the success callback */
+var messageSentCallback = function(recipients)
+{
+&nbsp;&nbsp;&nbsp;console.log("Message sent successfully to " + recipients.length + " recipients.");
+}
+
+/* Defines the error callback */
+function errorCallback(err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + " error: " + err.message);
+}
+
+function serviceListCB(services)
+{
+&nbsp;&nbsp;&nbsp;if (services.length &gt; 0)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var msg = new tizen.Message("messaging.sms", {plainBody: "Tizen first SMS message."});
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;services[0].sendMessage(msg, messageSentCallback, errorCallback);
+&nbsp;&nbsp;&nbsp;}
+}
+
+tizen.messaging.getMessageServices("messaging.sms", serviceListCB, errorCallback);
+</pre>
 </div>
 <div class="constructors">
 <h4 id="Message::constructor">Constructors</h4>
@@ -667,18 +670,20 @@ This array is empty if the message does not have attachments or the message body
  1.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Define the success callback.
- function serviceListCB(services) {
-     if (services.length &gt; 0) {
-         var msg = new tizen.Message("messaging.email");
-         msg.attachments = [new tizen.MessageAttachment("images/myimage.png", "image/png"),
-                            new tizen.MessageAttachment("documents/mydoc.pdf", "text/pdf")];
-     }
- }
-
- tizen.messaging.getMessageServices("messaging.email", serviceListCB);
-
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Define the success callback */
+function serviceListCB(services)
+{
+&nbsp;&nbsp;&nbsp;if (services.length &gt; 0)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var msg = new tizen.Message("messaging.email");
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;msg.attachments = [new tizen.MessageAttachment("images/myimage.png", "image/png"),
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;new tizen.MessageAttachment("documents/mydoc.pdf", "text/pdf")];
+&nbsp;&nbsp;&nbsp;}
+}
+
+tizen.messaging.getMessageServices("messaging.email", serviceListCB);
+</pre>
 </div>
 </li>
 </ul>
@@ -927,18 +932,20 @@ This property is used only with email messages.
  1.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Defines the success callback.
- function serviceListCB(services) {
-     if (services.length &gt; 0) {
-         var msg = new tizen.Message("messaging.email");
-         msg.body.htmlBody = "&lt;html&gt;&lt;body&gt;&lt;img src='myimage.png'&gt;&lt;/body&gt;&lt;/html&gt;";
-         msg.body.inlineAttachments = [new tizen.MessageAttachment("images/myimage.png")];
-     }
- }
-
- tizen.messaging.getMessageServices("messaging.email", serviceListCB);
-
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Defines the success callback */
+function serviceListCB(services)
+{
+&nbsp;&nbsp;&nbsp;if (services.length &gt; 0)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var msg = new tizen.Message("messaging.email");
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;msg.body.htmlBody = "&lt;html&gt;&lt;body&gt;&lt;img src='myimage.png'&gt;&lt;/body&gt;&lt;/html&gt;";
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;msg.body.inlineAttachments = [new tizen.MessageAttachment("images/myimage.png")];
+&nbsp;&nbsp;&nbsp;}
+}
+
+tizen.messaging.getMessageServices("messaging.email", serviceListCB);
+</pre>
 </div>
 </li>
 </ul>
@@ -1062,21 +1069,25 @@ for concrete account.
           </p>
          </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Defines the success callback.
- function serviceListCB(services) {
-   if (services.length &gt; 0) {
-     var msg = new tizen.Message("messaging.sms");
-   }
- }
-
- // Defines the error callback.
- function errorCallback(error) {
-   console.log("Cannot get messaging service " + error.message);
- }
-
- tizen.messaging.getMessageServices("messaging.sms", serviceListCB,
-                                     errorCallback);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Defines the success callback */
+function serviceListCB(services)
+{
+&nbsp;&nbsp;&nbsp;if (services.length &gt; 0)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var msg = new tizen.Message("messaging.sms");
+&nbsp;&nbsp;&nbsp;}
+}
+
+/* Defines the error callback */
+function errorCallback(error)
+{
+&nbsp;&nbsp;&nbsp;console.log("Cannot get messaging service " + error.message);
+}
+
+tizen.messaging.getMessageServices("messaging.sms", serviceListCB,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;errorCallback);
+</pre>
 </div>
 <div class="methods">
 <h4>Methods</h4>
@@ -1137,19 +1148,22 @@ is not compatible with the expected type for that parameter.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Defines the error callback.
- function errorCallback(error) {
-   console.log("Cannot get messaging service " + error.message);
- }
-
- // Defines the success callback.
- function serviceListCB(services) {
-   console.log("Found " + services.length + "email services");
- }
-
- tizen.messaging.getMessageServices("messaging.email", serviceListCB,
-                                      errorCallback);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Defines the error callback */
+function errorCallback(error)
+{
+&nbsp;&nbsp;&nbsp;console.log("Cannot get messaging service " + error.message);
+}
+
+/* Defines the success callback */
+function serviceListCB(services)
+{
+&nbsp;&nbsp;&nbsp;console.log("Found " + services.length + "email services");
+}
+
+tizen.messaging.getMessageServices("messaging.email", serviceListCB,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;errorCallback);
+</pre>
 </div>
 </dd>
 </dl>
@@ -1254,36 +1268,40 @@ The interface allows fetching of the message body for a given message using load
           </p>
          </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Defines the success callback.
- function messageSent(recipients) {
-   console.log("The SMS has been sent");
- }
-
- // Defines the error callback.
- function messageFailed(error) {
-   console.log("The SMS could not be sent " + error.message);
- }
-
- // Defines the service error callback.
- function serviceErrorCB(error) {
-   console.log("Cannot get messaging service " + error.message);
- }
-
- // Defines the success callback.
- function serviceListCB(services) {
-   if (services.length &gt; 0) {
-     // SMS sending example
-     var msg = new tizen.Message("messaging.sms", {plainBody:"I will arrive in 10 minutes.",
-                                  to:["+34666666666"]});
-     // Sends request
-     services[0].sendMessage(msg, messageSent, messageFailed);
-   }
- }
-
- tizen.messaging.getMessageServices("messaging.sms",
-                                    serviceListCB,
-                                    serviceErrorCB);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Defines the success callback */
+function messageSent(recipients)
+{
+&nbsp;&nbsp;&nbsp;console.log("The SMS has been sent");
+}
+
+/* Defines the error callback */
+function messageFailed(error)
+{
+&nbsp;&nbsp;&nbsp;console.log("The SMS could not be sent " + error.message);
+}
+
+/* Defines the service error callback */
+function serviceErrorCB(error)
+{
+&nbsp;&nbsp;&nbsp;console.log("Cannot get messaging service " + error.message);
+}
+
+/* Defines the success callback */
+function serviceListCB(services)
+{
+&nbsp;&nbsp;&nbsp;if (services.length &gt; 0)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* SMS sending example */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var msg = new tizen.Message("messaging.sms", {plainBody:"I will arrive in 10 minutes.",
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;to:["+34666666666"]});
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Sends request */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;services[0].sendMessage(msg, messageSent, messageFailed);
+&nbsp;&nbsp;&nbsp;}
+}
+
+tizen.messaging.getMessageServices("messaging.sms", serviceListCB, serviceErrorCB);
+</pre>
 </div>
 <div class="attributes">
 <h4>Attributes</h4>
@@ -1432,44 +1450,50 @@ is not compatible with the expected type for that parameter.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Defines the success callback
- function messageSent(recipients) {
-   for (var i = 0; i &lt; recipients.length; i++) {
-     console.log("The SMS has been sent to " + recipients[i]);
-   }
- }
-
- // Defines the error callback.
- function messageFailed(error) {
-   console.log("The SMS could not be sent " + error.message);
- }
-
- // Defines the success callback.
- function serviceListCB(services) {
-   if (services.length &gt; 0) {
-     // SMS sending example
-     var msg = new tizen.Message("messaging.sms", {plainBody: "I will arrive in 10 minutes.",
-                                 to: ["+34666666666", "+34888888888"]});
-     // Sends request
-     services[0].sendMessage(msg, messageSent, messageFailed);
-   }
- }
- tizen.messaging.getMessageServices("messaging.sms", serviceListCB);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Defines the success callback */
+function messageSent(recipients)
+{
+&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; recipients.length; i++)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("The SMS has been sent to " + recipients[i]);
+&nbsp;&nbsp;&nbsp;}
+}
+
+/* Defines the error callback */
+function messageFailed(error)
+{
+&nbsp;&nbsp;&nbsp;console.log("The SMS could not be sent " + error.message);
+}
+
+/* Defines the success callback */
+function serviceListCB(services)
+{
+&nbsp;&nbsp;&nbsp;if (services.length &gt; 0)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* SMS sending example */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var msg = new tizen.Message("messaging.sms", {plainBody: "I will arrive in 10 minutes.",
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;to: ["+34666666666", "+34888888888"]});
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Sends request */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;services[0].sendMessage(msg, messageSent, messageFailed);
+&nbsp;&nbsp;&nbsp;}
+}
+tizen.messaging.getMessageServices("messaging.sms", serviceListCB);
+</pre>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // **********************************************************************************
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+ // **********************************************************************************
  // *  This sample code works on a device which supports Tizen 2.3 Web Device API.   *
  // **********************************************************************************
 
- // To get how many SIM cards are available in a device
- var count = tizen.systeminfo.getCount("SIM");
- console.log("There is(are) " + count + " SIM card(s) available.");
-
- // To send a message via the last SIM
- services[0].sendMessage(msg, messageSent, messageFailed, count);
+/* To get how many SIM cards are available in a device */
+var count = tizen.systeminfo.getCount("SIM");
+console.log("There is(are) " + count + " SIM card(s) available.");
 
- </pre>
+/* To send a message via the last SIM */
+services[0].sendMessage(msg, messageSent, messageFailed, count);
+</pre>
 </div>
 </dd>
 <dt class="method" id="MessageService::loadMessageBody">
@@ -1542,28 +1566,34 @@ is not compatible with the expected type for that parameter.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Assumes messaging service is initialized.
- var service;
- // Defines the success body loaded callback.
- function successCallback(message) {
-   console.log ("body for message: " + message.subject + "from: " + message.from + "loaded.");
- }
- // Defines the error callback.
- function errorCallback(error) {
-   console.log("Cannot load message body" + error.message);
- }
-
- function messageQueryCallback(messages) {
-   for (var i = 0; i &lt; messages.length; i++) {
-     var message = messages[i];
-     if (!message.body.loaded) {
-        service.loadMessageBody(message, successCallback, errorCallback);
-     }
-   }
- }
-
- service.messageStorage.findMessages(new tizen.AttributeFilter("type", "EXACTLY", "messaging.email"), messageQueryCallback);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Assumes messaging service is initialized */
+var service;
+/* Defines the success body loaded callback */
+function successCallback(message)
+{
+&nbsp;&nbsp;&nbsp;console.log("body for message: " + message.subject + "from: " + message.from + "loaded.");
+}
+/* Defines the error callback */
+function errorCallback(error)
+{
+&nbsp;&nbsp;&nbsp;console.log("Cannot load message body" + error.message);
+}
+
+function messageQueryCallback(messages)
+{
+&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; messages.length; i++)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var message = messages[i];
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (!message.body.loaded)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;service.loadMessageBody(message, successCallback, errorCallback);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;}
+}
+
+service.messageStorage.findMessages(new tizen.AttributeFilter("type", "EXACTLY", "messaging.email"), messageQueryCallback);
+</pre>
 </div>
 </dd>
 <dt class="method" id="MessageService::loadMessageAttachment">
@@ -1635,28 +1665,34 @@ is not compatible with the expected type for that parameter.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Assumes messaging service is initialized.
- var service;
- // Defines the success body loaded callback.
- function successCallback(attachment) {
-   console.log("attachment" + attachment.id + "is loaded to:" + attachment.filePath);
- }
- // Defines the error callback.
- function errorCallback(error) {
-   console.log("Cannot load message attachment" + error.message);
- }
-
- function messagesFoundCB(messages) {
-   for (var i = 0; i &lt; messages.length; i++) {
-     var message = messages[i];
-     if (!message.attachments[0].loaded) {
-        service.loadMessageAttachment(message.attachments[0], successCallback, errorCallback);
-     }
-   }
- }
-
- service.messageStorage.findMessages(new tizen.AttributeFilter("hasAttachment", "EXACTLY", true), messagesFoundCB);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Assumes messaging service is initialized */
+var service;
+/* Defines the success body loaded callback */
+function successCallback(attachment)
+{
+&nbsp;&nbsp;&nbsp;console.log("attachment" + attachment.id + "is loaded to:" + attachment.filePath);
+}
+/* Defines the error callback */
+function errorCallback(error)
+{
+&nbsp;&nbsp;&nbsp;console.log("Cannot load message attachment" + error.message);
+}
+
+function messagesFoundCB(messages)
+{
+&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; messages.length; i++)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var message = messages[i];
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (!message.attachments[0].loaded)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;service.loadMessageAttachment(message.attachments[0], successCallback, errorCallback);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;}
+}
+
+service.messageStorage.findMessages(new tizen.AttributeFilter("hasAttachment", "EXACTLY", true), messagesFoundCB);
+</pre>
 </div>
 </dd>
 <dt class="method" id="MessageService::sync">
@@ -1734,18 +1770,21 @@ is not compatible with the expected type for that parameter.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Defines the success callback.
- function serviceSynced() {
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Defines the success callback */
+function serviceSynced()
+{
    console.log("New messages are fetched!");
- }
+}
 
- // Defines the success callback.
- function servicesListSuccessCB(services) {
+/* Defines the success callback */
+function servicesListSuccessCB(services)
+{
    services[0].sync(serviceSynced, null, 30);
-   // Subscribes to MessageStorage notification
- }
- tizen.messaging.getMessageServices("messaging.email", servicesListSuccessCB);
- </pre>
+   /* Subscribes to MessageStorage notification */
+}
+tizen.messaging.getMessageServices("messaging.email", servicesListSuccessCB);
+</pre>
 </div>
 </dd>
 <dt class="method" id="MessageService::syncFolder">
@@ -1846,31 +1885,37 @@ is not compatible with the expected type for that parameter.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var emailService; // Assumes email service is initialized
-  // Defines the error callback.
- function errorCallback(err) {
-   console.log(err.name + " error: " + err.message);
- }
- function serviceCallback(services) {
-   emailService = services[0];
-   var filter = new tizen.AttributeFilter("serviceId", "EXACTLY", emailService.id);
-
-   emailService.messageStorage.findFolders(filter, folderQueryCallback);
- }
-
- // Defines the success callback.
- function folderSynced() {
-   console.log("New messages are fetched!");
- }
- function folderQueryCallback(folders) {
-   console.log(folders.length + " folders(s) found!");
-   for (var i = 0; i &lt; folders.length; i++) {
-     emailService.syncFolder (folders[i], folderSynced, null, 30);
-   }
- }
-
- tizen.messaging.getMessageServices("messaging.email", serviceCallback, errorCallback);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var emailService; /* Assumes email service is initialized */
+/* Defines the error callback */
+function errorCallback(err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + " error: " + err.message);
+}
+function serviceCallback(services)
+{
+&nbsp;&nbsp;&nbsp;emailService = services[0];
+&nbsp;&nbsp;&nbsp;var filter = new tizen.AttributeFilter("serviceId", "EXACTLY", emailService.id);
+
+&nbsp;&nbsp;&nbsp;emailService.messageStorage.findFolders(filter, folderQueryCallback);
+}
+
+/* Defines the success callback */
+function folderSynced()
+{
+&nbsp;&nbsp;&nbsp;console.log("New messages are fetched!");
+}
+function folderQueryCallback(folders)
+{
+&nbsp;&nbsp;&nbsp;console.log(folders.length + " folders(s) found!");
+&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; folders.length; i++)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;emailService.syncFolder (folders[i], folderSynced, null, 30);
+&nbsp;&nbsp;&nbsp;}
+}
+
+tizen.messaging.getMessageServices("messaging.email", serviceCallback, errorCallback);
+</pre>
 </div>
 </dd>
 <dt class="method" id="MessageService::stopSync">
@@ -2174,27 +2219,31 @@ is not compatible with the expected type for that parameter or if the method is
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Defines the success callback.
- function successCallback() {
-   console.log("Draft message added");
- }
-
- // Defines the error callback.
- function errorCallback(error) {
-   console.log("Cannot add draft message " + error.message);
- }
-
- // Defines the service query success callback.
- function serviceListCB(services) {
-   if (services.length &gt; 0) {
-     var msg = new tizen.Message("messaging.sms", {plainBody: "Tizen draft SMS message."});
-     services[0].messageStorage.addDraftMessage(msg,
-                                                successCallback,
-                                                errorCallback);
-   }
- }
- tizen.messaging.getMessageServices("messaging.sms", serviceListCB);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Defines the success callback */
+function successCallback()
+{
+&nbsp;&nbsp;&nbsp;console.log("Draft message added");
+}
+
+/* Defines the error callback */
+function errorCallback(error)
+{
+&nbsp;&nbsp;&nbsp;console.log("Cannot add draft message " + error.message);
+}
+
+/* Defines the service query success callback */
+function serviceListCB(services)
+{
+&nbsp;&nbsp;&nbsp;if (services.length &gt; 0)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var msg = new tizen.Message("messaging.sms", {plainBody: "Tizen draft SMS message."});
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;services[0].messageStorage.addDraftMessage(msg, successCallback,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;errorCallback);
+&nbsp;&nbsp;&nbsp;}
+}
+tizen.messaging.getMessageServices("messaging.sms", serviceListCB);
+</pre>
 </div>
 </dd>
 <dt class="method" id="MessageStorage::findMessages">
@@ -2275,23 +2324,27 @@ is not compatible with the expected type for that parameter.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var service; // Assumes messaging service is initialized
- var messageStorage = service.messageStorage;
- function messageArrayCB(messages) {
-   console.log(messages.length + " message(s) fetched!");
-   for (var i = 0; i &lt; messages.length; i++) {
-     console.log(i + ". message from " + messages[i].from);
-   }
- }
-
- // Defines the error callback.
- function errorCallback(error) {
-   console.log("Cannot query messages" + error.message);
- }
-
- var filter = new tizen.AttributeFilter("from", "CONTAINS", "2593");
- messageStorage.findMessages(filter, messageArrayCB, errorCallback);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var service; /* Assumes messaging service is initialized */
+var messageStorage = service.messageStorage;
+function messageArrayCB(messages)
+{
+&nbsp;&nbsp;&nbsp;console.log(messages.length + " message(s) fetched!");
+&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; messages.length; i++)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(i + ". message from " + messages[i].from);
+&nbsp;&nbsp;&nbsp;}
+}
+
+/* Defines the error callback */
+function errorCallback(error)
+{
+&nbsp;&nbsp;&nbsp;console.log("Cannot query messages" + error.message);
+}
+
+var filter = new tizen.AttributeFilter("from", "CONTAINS", "2593");
+messageStorage.findMessages(filter, messageArrayCB, errorCallback);
+</pre>
 </div>
 </dd>
 <dt class="method" id="MessageStorage::removeMessages">
@@ -2360,29 +2413,36 @@ is not compatible with the expected type for that parameter.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Defines the success callback.
- var service; // Assumes messaging service is initialized
- var messageStorage = service.messageStorage;
- function successCallback() {
-   console.log("Messages were deleted");
- }
-
- // Defines the error callback.
- function errorCallback(error) {
-   console.log("Cannot delete messages " + error.message);
- }
-
- function messageArrayCB(messages) {
-   if (messages.length &gt; 0) {
-     messageStorage.removeMessages(messages, successCallback, errorCallback);
-   } else {
-     console.log("No messages found");
-   }
- }
-
- var filter = new tizen.AttributeFilter("from", "CONTAINS", "2593");
- messageStorage.findMessages(filter, messageArrayCB);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Defines the success callback */
+var service; /* Assumes messaging service is initialized */
+var messageStorage = service.messageStorage;
+function successCallback()
+{
+&nbsp;&nbsp;&nbsp;console.log("Messages were deleted");
+}
+
+/* Defines the error callback */
+function errorCallback(error)
+{
+&nbsp;&nbsp;&nbsp;console.log("Cannot delete messages " + error.message);
+}
+
+function messageArrayCB(messages)
+{
+&nbsp;&nbsp;&nbsp;if (messages.length &gt; 0)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;messageStorage.removeMessages(messages, successCallback, errorCallback);
+&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;else
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("No messages found");
+&nbsp;&nbsp;&nbsp;}
+}
+
+var filter = new tizen.AttributeFilter("from", "CONTAINS", "2593");
+messageStorage.findMessages(filter, messageArrayCB);
+</pre>
 </div>
 </dd>
 <dt class="method" id="MessageStorage::updateMessages">
@@ -2455,32 +2515,38 @@ is not compatible with the expected type for that parameter.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var service; // Assumes messaging service is initialized
- var messageStorage = service.messageStorage;
-
- // Defines the success callback.
- function successCallback() {
-   console.log("Messages were updated");
- }
-
- // Defines the error callback.
- function errorCallback(error) {
-   console.log("Cannot update messages " + error.message);
- }
-
- function messageArrayCB(messages) {
-   if (messages.length &gt; 0) {
-     messages[0].isRead = true;
-     messageStorage.updateMessages([messages[0]], successCallback, errorCallback);
-   } else {
-     console.log("No messages found");
-   }
- }
-
- var filter = new tizen.AttributeFilter('isRead', 'EXACTLY', false);
- messageStorage.findMessages(filter, messageArrayCB);
-
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var service; /* Assumes messaging service is initialized */
+var messageStorage = service.messageStorage;
+
+/* Defines the success callback */
+function successCallback()
+{
+&nbsp;&nbsp;&nbsp;console.log("Messages were updated");
+}
+
+/* Defines the error callback */
+function errorCallback(error)
+{
+&nbsp;&nbsp;&nbsp;console.log("Cannot update messages " + error.message);
+}
+
+function messageArrayCB(messages)
+{
+&nbsp;&nbsp;&nbsp;if (messages.length &gt; 0)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;messages[0].isRead = true;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;messageStorage.updateMessages([messages[0]], successCallback, errorCallback);
+&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;else
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("No messages found");
+&nbsp;&nbsp;&nbsp;}
+}
+
+var filter = new tizen.AttributeFilter('isRead', 'EXACTLY', false);
+messageStorage.findMessages(filter, messageArrayCB);
+</pre>
 </div>
 </dd>
 <dt class="method" id="MessageStorage::findConversations">
@@ -2561,23 +2627,27 @@ is not compatible with the expected type for that parameter.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var service; // Assumes messaging service is initialized
- var messageStorage = service.messageStorage;
- function conversationsArrayCB(conversations) {
-   console.log(conversations.length + " conversation(s) found!");
-   for (var i = 0; i &lt; conversations.length; i++) {
-     console.log(i + ". conversation preview " + conversations[i].preview);
-   }
- }
-
- // Defines the error callback.
- function errorCallback(error) {
-   console.log("Cannot query conversations" + error.message);
- }
-
- var filter = new tizen.AttributeFilter('from', 'CONTAINS', '2593');
- messageStorage.findConversations(filter, conversationsArrayCB, errorCallback);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var service; /* Assumes messaging service is initialized */
+var messageStorage = service.messageStorage;
+function conversationsArrayCB(conversations)
+{
+&nbsp;&nbsp;&nbsp;console.log(conversations.length + " conversation(s) found!");
+&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; conversations.length; i++)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(i + ". conversation preview " + conversations[i].preview);
+&nbsp;&nbsp;&nbsp;}
+}
+
+/* Defines the error callback */
+function errorCallback(error)
+{
+&nbsp;&nbsp;&nbsp;console.log("Cannot query conversations" + error.message);
+}
+
+var filter = new tizen.AttributeFilter('from', 'CONTAINS', '2593');
+messageStorage.findConversations(filter, conversationsArrayCB, errorCallback);
+</pre>
 </div>
 </dd>
 <dt class="method" id="MessageStorage::removeConversations">
@@ -2646,37 +2716,44 @@ is not compatible with the expected type for that parameter.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var service; // Assumes messaging service is initialized
- var messageStorage = service.messageStorage;
- // Defines the success callback.
- function successCallback() {
-   console.log("Conversations deleted");
- }
-
- // Defines the error callback.
- function errorCallback(error) {
-   console.log("Cannot delete conversations " + error.message);
- }
-
- function conversationsArrayCB(conversations) {
-   if (conversations.length &gt; 0) {
-     messageStorage.removeConversations(conversations, successCallback,
-                                                       errorCallback);
-   } else {
-     console.log("No conversations found");
-   }
-   console.log("Deleted " + conversations.length + " conversation(s)");
- }
-
- // Defines the error callback.
- function queryErrorCB(error) {
-   console.log("Cannot query conversations" + error.message);
- }
-
- var filter = new tizen.AttributeFilter('from', 'CONTAINS', '2593');
- messageStorage.findConversations(filter, conversationsArrayCB,
-                                          queryErrorCB);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var service; /* Assumes messaging service is initialized */
+var messageStorage = service.messageStorage;
+/* Defines the success callback */
+function successCallback()
+{
+&nbsp;&nbsp;&nbsp;console.log("Conversations deleted");
+}
+
+/* Defines the error callback */
+function errorCallback(error)
+{
+&nbsp;&nbsp;&nbsp;console.log("Cannot delete conversations " + error.message);
+}
+
+function conversationsArrayCB(conversations)
+{
+&nbsp;&nbsp;&nbsp;if (conversations.length &gt; 0)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;messageStorage.removeConversations(conversations, successCallback,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;errorCallback);
+&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;else
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("No conversations found");
+&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;console.log("Deleted " + conversations.length + " conversation(s)");
+}
+
+/* Defines the error callback */
+function queryErrorCB(error)
+{
+&nbsp;&nbsp;&nbsp;console.log("Cannot query conversations" + error.message);
+}
+
+var filter = new tizen.AttributeFilter('from', 'CONTAINS', '2593');
+messageStorage.findConversations(filter, conversationsArrayCB, queryErrorCB);
+</pre>
 </div>
 </dd>
 <dt class="method" id="MessageStorage::findFolders">
@@ -2745,17 +2822,20 @@ is not compatible with the expected type for that parameter.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var service; // Assumes messaging service is initialized
- var messageStorage = service.messageStorage;
- function folderArrayCB(folders) {
-   console.log(folders.length + " folders(s) found!");
-   for (var i = 0; i &lt; folders.length; i++) {
-     console.log(i + ", folder: " + folders[i].name);
-   }
- }
- var filter = new tizen.AttributeFilter("serviceId", "EXACTLY", service.id);
- messageStorage.findFolders(filter, folderArrayCB);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var service; /* Assumes messaging service is initialized */
+var messageStorage = service.messageStorage;
+function folderArrayCB(folders)
+{
+&nbsp;&nbsp;&nbsp;console.log(folders.length + " folders(s) found!");
+&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; folders.length; i++)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(i + ", folder: " + folders[i].name);
+&nbsp;&nbsp;&nbsp;}
+}
+var filter = new tizen.AttributeFilter("serviceId", "EXACTLY", service.id);
+messageStorage.findFolders(filter, folderArrayCB);
+</pre>
 </div>
 </dd>
 <dt class="method" id="MessageStorage::addMessagesChangeListener">
@@ -2824,19 +2904,27 @@ is not compatible with the expected type for that parameter.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var service; // Assumes messaging service is initialized
- var messageStorage = service.messageStorage;
- var messageChangeCallback = {
-       messagesupdated: function(messages) {
-         console.log(messages.length + " message(s) updated");},
-       messagesadded: function(messages) {
-         console.log(messages.length + " message(s) added");},
-       messagesremoved: function(messages) {
-         console.log(messages.length + " message(s) removed");}
- };
-
- messageStorage.addMessagesChangeListener(messageChangeCallback);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var service; /* Assumes messaging service is initialized */
+var messageStorage = service.messageStorage;
+var messageChangeCallback =
+{
+&nbsp;&nbsp;&nbsp;messagesupdated: function(messages)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(messages.length + " message(s) updated");
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;messagesadded: function(messages)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(messages.length + " message(s) added");
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;messagesremoved: function(messages)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(messages.length + " message(s) removed");
+&nbsp;&nbsp;&nbsp;}
+};
+
+messageStorage.addMessagesChangeListener(messageChangeCallback);
+</pre>
 </div>
 </dd>
 <dt class="method" id="MessageStorage::addConversationsChangeListener">
@@ -2905,19 +2993,27 @@ is not compatible with the expected type for that parameter.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var service; // Assumes messaging service is initialized
- var messageStorage = service.messageStorage;
- var conversationChangeCB = {
-       conversationsupdated: function(conversations) {
-         console.log(conversations.length + " conversations(s) updated");},
-       conversationsadded: function(conversations) {
-         console.log(conversations.length + " conversations(s) added");},
-       conversationsremoved: function(conversations) {
-         console.log(conversations.length + " conversations(s) removed");}
- };
-
- messageStorage.addConversationsChangeListener(conversationChangeCB);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var service; /* Assumes messaging service is initialized */
+var messageStorage = service.messageStorage;
+var conversationChangeCB =
+{
+&nbsp;&nbsp;&nbsp;conversationsupdated: function(conversations)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(conversations.length + " conversations(s) updated");
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;conversationsadded: function(conversations)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(conversations.length + " conversations(s) added");
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;conversationsremoved: function(conversations)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(conversations.length + " conversations(s) removed");
+&nbsp;&nbsp;&nbsp;}
+};
+
+messageStorage.addConversationsChangeListener(conversationChangeCB);
+</pre>
 </div>
 </dd>
 <dt class="method" id="MessageStorage::addFoldersChangeListener">
@@ -2986,19 +3082,27 @@ is not compatible with the expected type for that parameter.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var service; // Assumes messaging service is initialized
- var messageStorage = service.messageStorage;
- var folderChangeCB = {
-       foldersupdated: function(folders) {
-         console.log(folders.length + " folders(s) updated");},
-       foldersadded: function(folders) {
-         console.log(folders.length + " folders(s) added");},
-       foldersremoved: function(folders) {
-         console.log(folders.length + " folders(s) removed");}
- };
-
- messageStorage.addFoldersChangeListener(folderChangeCB);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var service; /* Assumes messaging service is initialized */
+var messageStorage = service.messageStorage;
+var folderChangeCB =
+{
+&nbsp;&nbsp;&nbsp;foldersupdated: function(folders)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(folders.length + " folders(s) updated");
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;foldersadded: function(folders)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(folders.length + " folders(s) added");
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;foldersremoved: function(folders)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(folders.length + " folders(s) removed");
+&nbsp;&nbsp;&nbsp;}
+};
+
+messageStorage.addFoldersChangeListener(folderChangeCB);
+</pre>
 </div>
 </dd>
 <dt class="method" id="MessageStorage::removeChangeListener">
@@ -3064,24 +3168,31 @@ is not compatible with the expected type for that parameter.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var watchId;
- var service; // Assumes messaging service is initialized
- var messageStorage = service.messageStorage;
- var folderChangeCB = {
-       foldersupdated: function(folders) {
-         console.log(folders.length + " folders(s) updated. Cancel watching.");
-         messageStorage.removeChangeListener(watchId); },
-       foldersadded: function(folders) {
-         console.log(folders.length + " folders(s) added. Cancel watching.");
-         messageStorage.removeChangeListener(watchId); },
-       foldersremoved: function(folders) {
-         console.log(folders.length + " folders(s) removed. Cancel watching.");
-         messageStorage.removeChangeListener(watchId);}
- };
-
- watchId = messageStorage.addFoldersChangeListener(folderChangeCB);
-
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var watchId;
+var service; /* Assumes messaging service is initialized */
+var messageStorage = service.messageStorage;
+var folderChangeCB =
+{
+&nbsp;&nbsp;&nbsp;foldersupdated: function(folders)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(folders.length + " folders(s) updated. Cancel watching.");
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;messageStorage.removeChangeListener(watchId);
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;foldersadded: function(folders)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(folders.length + " folders(s) added. Cancel watching.");
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;messageStorage.removeChangeListener(watchId);
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;foldersremoved: function(folders)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(folders.length + " folders(s) removed. Cancel watching.");
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;messageStorage.removeChangeListener(watchId)
+&nbsp;&nbsp;&nbsp;}
+};
+
+watchId = messageStorage.addFoldersChangeListener(folderChangeCB);
+</pre>
 </div>
 </dd>
 </dl>
index 8af62db..156b827 100644 (file)
@@ -226,13 +226,16 @@ The <em>ErrorCallback</em> method is launched with these error types:
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var statuscb = {
-   onsuccess: function() { console.log("onsuccess func is called"); },
-   ondisconnected: function() { console.log("ondisconnected func is called"); }
- };
- function ecb(e) { console.log("error callback is called : " + e.message + " : " + e.code); }
- tizen.networkbearerselection.requestRouteToHost("CELLULAR", "www.tizen.org", statuscb, ecb);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var statuscb =
+{
+&nbsp;&nbsp;&nbsp;onsuccess: function() {console.log("onsuccess func is called");},
+&nbsp;&nbsp;&nbsp;ondisconnected: function() {console.log("ondisconnected func is called");}
+};
+function ecb(e) {console.log("error callback is called: " + e.message + ": " + e.code);}
+
+tizen.networkbearerselection.requestRouteToHost("CELLULAR", "www.tizen.org", statuscb, ecb);
+</pre>
 </div>
 </dd>
 <dt class="method" id="NetworkBearerSelection::releaseRouteToHost">
@@ -321,17 +324,20 @@ The <em>ErrorCallback</em> method is launched with these error types:
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function scb() { console.log("success callback is called"); }
- function ecb(e) { console.log("error callback is called : " + e.message + " : " + e.code); }
- var statuscb = {
-   onsuccess: function() {
-     console.log("onsuccess func is called");
-     tizen.networkbearerselection.releaseRouteToHost("CELLULAR", "www.google.com", scb, ecb);
-   },
-   ondisconnected: function() { console.log("ondisconnected func is called"); }
- };
- tizen.networkbearerselection.requestRouteToHost("CELLULAR", "www.google.com", statuscb, ecb);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function scb() {console.log("success callback is called");}
+function ecb(e) {console.log("error callback is called: " + e.message + ": " + e.code);}
+var statuscb =
+{
+&nbsp;&nbsp;&nbsp;onsuccess: function()
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("onsuccess func is called");
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tizen.networkbearerselection.releaseRouteToHost("CELLULAR", "www.google.com", scb, ecb);
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;ondisconnected: function() {console.log("ondisconnected func is called");}
+};
+tizen.networkbearerselection.requestRouteToHost("CELLULAR", "www.google.com", statuscb, ecb);
+</pre>
 </div>
 </dd>
 </dl>
index ca5d56e..2ed80b5 100644 (file)
@@ -559,12 +559,16 @@ It provides access to the API functionalities through the tizen.nfc interface.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> try {
-     var adapter = tizen.nfc.getDefaultAdapter();
- } catch (err) {
-     console.log(err.name +": " + err.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+try
+{
+&nbsp;&nbsp;&nbsp;var adapter = tizen.nfc.getDefaultAdapter();
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="NFCManager::setExclusiveMode">
@@ -624,12 +628,16 @@ The exclusive mode can only be set when NFC is on. If NFC is off, the mode is ig
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> try {
-   tizen.nfc.setExclusiveMode(true) ;
- } catch (err) {
-   console.log(err.name + ": " + err.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+try
+{
+&nbsp;&nbsp;&nbsp;tizen.nfc.setExclusiveMode(true);
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+}
+</pre>
 </div>
 </dd>
 </dl>
@@ -892,33 +900,43 @@ is not compatible with the expected type for that parameter.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var gNfcAdapter;
- var onPowerOn = function(){ // Called when NFC adapter is powered on
-   try {
-     console.log("Power on succeed");
-     // Implement NFC communication routines ...
-     gNfcAdapter.setPowered(
-         false, // Disable NFC adapter
-         function () {console.log("Power off succeed"); }, // Handle success
-         function () {console.log("Power off failed"); }); // Handle failure
-   } catch (err) {
-     console.log(err.name + ": " + err.message);
-   }
- };
- try {
-   gNfcAdapter = tizen.nfc.getDefaultAdapter();
-   if (!gNfcAdapter.powered) {
-     gNfcAdapter.setPowered(
-         true, // Enable NFC adapter
-         onPowerOn,                                     // Handle success
-         function () {console.log("Power on failed")}); // Handle failure
-   } else {
-     onPowerOn();
-   }
- } catch (err) {
-   console.log(err.name + ": " + err.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var gNfcAdapter;
+var onPowerOn = function()
+{
+&nbsp;&nbsp;&nbsp;/* Called when NFC adapter is powered on */
+&nbsp;&nbsp;&nbsp;try
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Power on succeed");
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Implement NFC communication routines */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;gNfcAdapter.setPowered(false, /* Disable NFC adapter */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;function() {console.log("Power off succeed");}, /* Handle success */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;function() {console.log("Power off failed");}); /* Handle failure */
+&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;catch (err)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+&nbsp;&nbsp;&nbsp;}
+};
+try
+{
+&nbsp;&nbsp;&nbsp;gNfcAdapter = tizen.nfc.getDefaultAdapter();
+&nbsp;&nbsp;&nbsp;if (!gNfcAdapter.powered)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;gNfcAdapter.setPowered(true, /* Enable NFC adapter */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;onPowerOn, /* Handle success */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;function() {console.log("Power on failed")}); /* Handle failure */
+&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;else
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;onPowerOn();
+&nbsp;&nbsp;&nbsp;}
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="NFCAdapter::setTagListener">
@@ -990,14 +1008,21 @@ is not compatible with the expected type for that parameter.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var adapter = tizen.nfc.getDefaultAdapter();
- var onSuccessCB = {onattach : function(nfcTag) {
-     console.log("NFC Tag's type is " + nfcTag.type);
-   }, ondetach : function() {
-     console.log("NFC Tag is detached");
-   }};
- adapter.setTagListener(onSuccessCB);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var adapter = tizen.nfc.getDefaultAdapter();
+var onSuccessCB =
+{
+&nbsp;&nbsp;&nbsp;onattach: function(nfcTag)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("NFC Tag's type is " + nfcTag.type);
+&nbsp;&nbsp;&nbsp;}, 
+&nbsp;&nbsp;&nbsp;ondetach: function() 
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("NFC Tag is detached");
+&nbsp;&nbsp;&nbsp;}
+};
+adapter.setTagListener(onSuccessCB);
+</pre>
 </div>
 </dd>
 <dt class="method" id="NFCAdapter::setPeerListener">
@@ -1062,14 +1087,21 @@ is not compatible with the expected type for that parameter.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var adapter = tizen.nfc.getDefaultAdapter();
- var onSuccessCB = {onattach : function(nfcPeer) {
-     console.log("NFC Target is detected");
-   }, ondetach : function() {
-     console.log("NFC Target is detached");
-   }};
- adapter.setPeerListener(onSuccessCB);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var adapter = tizen.nfc.getDefaultAdapter();
+var onSuccessCB =
+{
+&nbsp;&nbsp;&nbsp;onattach: function(nfcPeer)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("NFC Target is detected");
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;ondetach: function()
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("NFC Target is detached");
+&nbsp;&nbsp;&nbsp;}
+};
+adapter.setPeerListener(onSuccessCB);
+</pre>
 </div>
 </dd>
 <dt class="method" id="NFCAdapter::unsetTagListener">
@@ -1115,24 +1147,28 @@ is not compatible with the expected type for that parameter.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var adapter = tizen.nfc.getDefaultAdapter();
-
- // Receives NFCTag
- var onSuccessCB = {
-     onattach : function(nfcTag) {
-         console.log("The attached NFC tag's type is " + nfcTag.type);
-     },
-     ondetach : function() {
-         console.log("NFC tag is detached.");
-
-         // Unregister the listener when the NFC tag is detached.
-         adapter.unsetTagListener();
-     }
- };
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var adapter = tizen.nfc.getDefaultAdapter();
+
+/* Receives NFCTag */
+var onSuccessCB =
+{
+&nbsp;&nbsp;&nbsp;onattach: function(nfcTag)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("The attached NFC tag's type is " + nfcTag.type);
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;ondetach: function()
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("NFC tag is detached.");
+
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Unregister the listener when the NFC tag is detached */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;adapter.unsetTagListener();
+&nbsp;&nbsp;&nbsp;}
+};
 
- // Registers to be notified when NFC tag is detected.
- adapter.setTagListener(onSuccessCB);
- </pre>
+/* Registers to be notified when NFC tag is detected */
+adapter.setTagListener(onSuccessCB);
+</pre>
 </div>
 </dd>
 <dt class="method" id="NFCAdapter::unsetPeerListener">
@@ -1178,24 +1214,28 @@ is not compatible with the expected type for that parameter.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var adapter = tizen.nfc.getDefaultAdapter();
-
- // Receives an NFC peer.
- var onSuccessCB = {
-     onattach : function(nfcPeer) {
-         console.log("NFC peer target is attached.");
-     },
-     ondetach : function() {
-         console.log("NFC peer target is detached.");
-
-         // Unregisters the listener when NFC peer target is detached.
-         adapter.unsetPeerListener();
-     }
- };
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var adapter = tizen.nfc.getDefaultAdapter();
+
+/* Receives an NFC peer */
+var onSuccessCB =
+{
+&nbsp;&nbsp;&nbsp;onattach: function(nfcPeer)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("NFC peer target is attached.");
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;ondetach: function()
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("NFC peer target is detached.");
+
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Unregisters the listener when NFC peer target is detached */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;adapter.unsetPeerListener();
+&nbsp;&nbsp;&nbsp;}
+};
 
- // Registers to be notified when NFC peer target is detected.
- adapter.setPeerListener(onSuccessCB);
- </pre>
+/* Registers to be notified when NFC peer target is detected */
+adapter.setPeerListener(onSuccessCB);
+</pre>
 </div>
 </dd>
 <dt class="method" id="NFCAdapter::addCardEmulationModeChangeListener">
@@ -1251,15 +1291,20 @@ is not compatible with the expected type for that parameter.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> try {
-   var onSuccessCB = function(mode) {
-      console.log("The card emulation mode is " + mode);
-   };
-   var listenerId = adapter.addCardEmulationModeChangeListener(onSuccessCB) ;
- } catch (err) {
-   console.log(err.name + ": " + err.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+try
+{
+&nbsp;&nbsp;&nbsp;var onSuccessCB = function(mode)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("The card emulation mode is " + mode);
+&nbsp;&nbsp;&nbsp;};
+&nbsp;&nbsp;&nbsp;var listenerId = adapter.addCardEmulationModeChangeListener(onSuccessCB);
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="NFCAdapter::removeCardEmulationModeChangeListener">
@@ -1308,12 +1353,16 @@ is not compatible with the expected type for that parameter.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> try {
-   adapter.removeCardEmulationModeChangeListener(listenerId) ;
- } catch (err) {
-   console.log(err.name + ": " + err.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+try
+{
+&nbsp;&nbsp;&nbsp;adapter.removeCardEmulationModeChangeListener(listenerId);
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="NFCAdapter::addTransactionEventListener">
@@ -1374,12 +1423,16 @@ Such an event may indicate initiating a financial transaction using the device.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> try {
-   var listenerId = adapter.addTransactionEventListener("UICC", function(aid, data){console.log("transaction event occurs");}) ;
- } catch (err) {
-   console.log(err.name + ": " + err.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+try
+{
+&nbsp;&nbsp;&nbsp;var listenerId = adapter.addTransactionEventListener("UICC", function(aid, data) {console.log("transaction event occurs");});
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="NFCAdapter::removeTransactionEventListener">
@@ -1428,12 +1481,16 @@ Such an event may indicate initiating a financial transaction using the device.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> try {
-   adapter.removeTransactionEventListener(listenerId) ;
- } catch (err) {
-   console.log(err.name + ": " + err.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+try
+{
+&nbsp;&nbsp;&nbsp;adapter.removeTransactionEventListener(listenerId);
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="NFCAdapter::addActiveSecureElementChangeListener">
@@ -1489,15 +1546,20 @@ Such an event may indicate initiating a financial transaction using the device.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> try {
-   var onSuccessCB = function(seType) {
-      console.log("Active secure element is " + seType);
-   };
-   var listenerId = adapter.addActiveSecureElementChangeListener(onSuccessCB) ;
- } catch (err) {
-   console.log(err.name + ": " + err.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+try
+{
+&nbsp;&nbsp;&nbsp;var onSuccessCB = function(seType)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Active secure element is " + seType);
+&nbsp;&nbsp;&nbsp;};
+&nbsp;&nbsp;&nbsp;var listenerId = adapter.addActiveSecureElementChangeListener(onSuccessCB);
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="NFCAdapter::removeActiveSecureElementChangeListener">
@@ -1546,12 +1608,16 @@ Such an event may indicate initiating a financial transaction using the device.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> try {
-   adapter.removeActiveSecureElementChangeListener(listenerId) ;
- } catch (err) {
-   console.log(err.name + ": " + err.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+try
+{
+&nbsp;&nbsp;&nbsp;adapter.removeActiveSecureElementChangeListener(listenerId);
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="NFCAdapter::getCachedMessage">
@@ -1598,9 +1664,10 @@ should be returned.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Gets the cached message
- var cachedMessage = tizen.nfc.getDefaultAdapter().getCachedMessage();
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Gets the cached message */
+var cachedMessage = tizen.nfc.getDefaultAdapter().getCachedMessage();
+</pre>
 </div>
 </dd>
 <dt class="method" id="NFCAdapter::setExclusiveModeForTransaction">
@@ -1670,12 +1737,16 @@ Losing priority is always allowed regardless of an application's status.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> try {
-   adapter.setExclusiveModeForTransaction(true) ;
- } catch (err) {
-   console.log(err.name + ": " + err.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+try
+{
+&nbsp;&nbsp;&nbsp;adapter.setExclusiveModeForTransaction(true);
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="NFCAdapter::addHCEEventListener">
@@ -1735,16 +1806,21 @@ Losing priority is always allowed regardless of an application's status.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> try {
-   var onDetectedCB = function(event_data) {
-             console.log("HCE event type  is " + event_data.eventType);
-             console.log("APDU is " + event_data.apdu);
-   };
-   var listenerId = adapter.addHCEEventListener(onDetectedCB) ;
- } catch (err) {
-   console.log(err.name + ": " + err.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+try
+{
+&nbsp;&nbsp;&nbsp;var onDetectedCB = function(event_data)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("HCE event type  is " + event_data.eventType);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("APDU is " + event_data.apdu);
+&nbsp;&nbsp;&nbsp;};
+&nbsp;&nbsp;&nbsp;var listenerId = adapter.addHCEEventListener(onDetectedCB);
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="NFCAdapter::removeHCEEventListener">
@@ -1793,12 +1869,16 @@ Losing priority is always allowed regardless of an application's status.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> try {
-   adapter.removeHCEEventListener(listenerId) ;
- } catch (err) {
-   console.log(err.name + ": " + err.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+try
+{
+&nbsp;&nbsp;&nbsp;adapter.removeHCEEventListener(listenerId);
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="NFCAdapter::sendHostAPDUResponse">
@@ -1870,29 +1950,35 @@ The ErrorCallback is launched with these error types:
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> try {
-   var successCB = function() {
-      console.log("Sending APDU reponse was successful.");
-   };
-
-   var errorCB = function() {
-      console.log("Sending APDU reponse failed.");
-   };
-
-   var classOfInstruction = 0x00; // No SM or no SM indication
-   var instructionCode = 0xA4; //Select File
-   var firstParam = 0x04; //Direct selection by DF name
-   var secondParam = 0x00; // First record
-   var dataFieldLength = 0x03; // Variable length 1 or 3 bytes
-   var bytes =  [ 0x20, 0x21, 0x22]; // Variable length equal to dataFieldLength
-   var maxBytesExpected = 0x02; // Maximum bytes in answer
-
-   var apdu_response= [ classOfInstruction, instructionCode, firstParam, secondParam] + bytes + [ maxBytesExpected ]; //set apdu response.
-   adapter.sendHostAPDUResponse(apdu_response, successCB, errorCB) ;
- } catch (err) {
-   console.log(err.name + ": " + err.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+try
+{
+&nbsp;&nbsp;&nbsp;var successCB = function()
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Sending APDU response was successful.");
+&nbsp;&nbsp;&nbsp;};
+
+&nbsp;&nbsp;&nbsp;var errorCB = function()
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Sending APDU response failed.");
+&nbsp;&nbsp;&nbsp;};
+
+&nbsp;&nbsp;&nbsp;var classOfInstruction = 0x00; /* No SM or no SM indication */
+&nbsp;&nbsp;&nbsp;var instructionCode = 0xA4; /* Select File */
+&nbsp;&nbsp;&nbsp;var firstParam = 0x04; /* Direct selection by DF name */
+&nbsp;&nbsp;&nbsp;var secondParam = 0x00; /* First record */
+&nbsp;&nbsp;&nbsp;var dataFieldLength = 0x03; /* Variable length 1 or 3 bytes */
+&nbsp;&nbsp;&nbsp;var bytes =  [ 0x20, 0x21, 0x22]; /* Variable length equal to dataFieldLength */
+&nbsp;&nbsp;&nbsp;var maxBytesExpected = 0x02; /* Maximum bytes in answer */
+
+&nbsp;&nbsp;&nbsp;var apdu_response = [classOfInstruction, instructionCode, firstParam, secondParam] + bytes + [maxBytesExpected]; /* Set apdu response */
+&nbsp;&nbsp;&nbsp;adapter.sendHostAPDUResponse(apdu_response, successCB, errorCB);
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="NFCAdapter::isActivatedHandlerForAID">
@@ -1956,16 +2042,21 @@ The ErrorCallback is launched with these error types:
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> try {
-   var aid = "ABC0012345";
-   var isActiveHandler = adapter.isActivatedHandlerForAID("HCE", aid);
-   if(isActiveHandler){
-      console.log("current application is activated handler for the AID");
-   }
- } catch (err) {
-   console.log(err.name + ": " + err.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+try
+{
+&nbsp;&nbsp;&nbsp;var aid = "ABC0012345";
+&nbsp;&nbsp;&nbsp;var isActiveHandler = adapter.isActivatedHandlerForAID("HCE", aid);
+&nbsp;&nbsp;&nbsp;if (isActiveHandler)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("current application is activated handler for the AID");
+&nbsp;&nbsp;&nbsp;}
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="NFCAdapter::isActivatedHandlerForCategory">
@@ -2029,15 +2120,20 @@ The ErrorCallback is launched with these error types:
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> try {
-   var isActiveHandler =  adapter.isActivatedHandlerForCategory("ESE", "PAYMENT") ;
-   if(isActiveHandler){
-      console.log("current application is activated handler for the category");
-   }
- } catch (err) {
-   console.log(err.name + ": " + err.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+try
+{
+&nbsp;&nbsp;&nbsp;var isActiveHandler = adapter.isActivatedHandlerForCategory("ESE", "PAYMENT");
+&nbsp;&nbsp;&nbsp;if (isActiveHandler)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("current application is activated handler for the category");
+&nbsp;&nbsp;&nbsp;}
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="NFCAdapter::registerAID">
@@ -2101,14 +2197,17 @@ The ErrorCallback is launched with these error types:
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> try {
-
-   var aid = "ABC0012345";
-   adapter.registerAID("HCE", aid, "PAYMENT") ;
- } catch (err) {
-   console.log(err.name + ": " + err.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+try
+{
+&nbsp;&nbsp;&nbsp;var aid = "ABC0012345";
+&nbsp;&nbsp;&nbsp;adapter.registerAID("HCE", aid, "PAYMENT");
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="NFCAdapter::unregisterAID">
@@ -2172,14 +2271,17 @@ The ErrorCallback is launched with these error types:
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> try {
-
-   var aid = "ABC0012345";
-   adapter.unregisterAID("HCE", aid, "PAYMENT") ;
- } catch (err) {
-   console.log(err.name + ": " + err.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+try
+{
+&nbsp;&nbsp;&nbsp;var aid = "ABC0012345";
+&nbsp;&nbsp;&nbsp;adapter.unregisterAID("HCE", aid, "PAYMENT");
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="NFCAdapter::getAIDsForCategory">
@@ -2255,27 +2357,33 @@ The ErrorCallback is launched with these error types:
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> try {
-
-   var successCB = function(aids) {
-     var arrayLength = aids.length;
-     for (var i = 0; i  arrayLength; i++) {
-       console.log("Get AID category was successful.");
-       console.log("AID type is " + aids[i].type);
-       console.log("AID is " + aids[i].aid);
-       console.log("AID isReadOnly is " + aids[i].readOnly);
-     }
-   };
-
-   var errorCB = function() {
-     console.log("Get AID category failed.");
-   };
-
-   adapter.getAIDsForCategory("HCE", "PAYMENT", successCB, errorCB) ;
- } catch (err) {
-   console.log(err.name + ": " + err.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+try
+{
+&nbsp;&nbsp;&nbsp;var successCB = function(aids)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var arrayLength = aids.length;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;for (var i = 0; i  arrayLength; i++)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Get AID category was successful.");
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("AID type is " + aids[i].type);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("AID is " + aids[i].aid);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("AID isReadOnly is " + aids[i].readOnly);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;};
+
+&nbsp;&nbsp;&nbsp;var errorCB = function()
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Get AID category failed.");
+&nbsp;&nbsp;&nbsp;};
+
+&nbsp;&nbsp;&nbsp;adapter.getAIDsForCategory("HCE", "PAYMENT", successCB, errorCB);
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+}
+</pre>
 </div>
 </dd>
 </dl>
@@ -2362,18 +2470,25 @@ The array's index is the pair's key and value is its value.
  1.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var adapter = tizen.nfc.getDefaultAdapter();
- var onSuccessCB = {onattach : function(nfcTag) {
-     console.log("NFC Tag's type is " + nfcTag.type);
-     for(var i in nfcTag.properties) {
-       console.log("key:" + i + " value:" + nfcTag.properties[i]);
-     }
-   }, ondetach : function() {
-     console.log("NFC Tag is detached");
-   }};
- adapter.setTagListener(onSuccessCB);
-
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var adapter = tizen.nfc.getDefaultAdapter();
+var onSuccessCB =
+{
+&nbsp;&nbsp;&nbsp;onattach: function(nfcTag)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("NFC Tag's type is " + nfcTag.type);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;for (var i in nfcTag.properties)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("key:" + i + " value:" + nfcTag.properties[i]);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;}, 
+&nbsp;&nbsp;&nbsp;ondetach: function()
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("NFC Tag is detached");
+&nbsp;&nbsp;&nbsp;}
+};
+adapter.setTagListener(onSuccessCB);
+</pre>
 </div>
 </li>
 <li class="attribute" id="NFCTag::isConnected">
@@ -2455,27 +2570,32 @@ is not compatible with the expected type for that parameter.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> try {
-
-   var successCB = function(ndefMessage) {
-     console.log("Message read was successful.");
-     for( var i = 0; i  ndefMessage.recordCount;  ++i){
-       console.log("Message record " + i + "tnf: " + ndefMessage.records[i].tnf);
-       console.log("Message record " + i + "tnf: " + ndefMessage.records[i].tnf);
-       console.log("Message record type " + ndefMessage.records[i].type.toString());
-       ...
-     }
-   };
-
-   var errorCB = function() {
-     console.log("Message read failed.");
-   };
-
-   nfcTag.readNDEF(successCB, errorCB) ;
- } catch (err) {
-   console.log(err.name + ": " + err.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+try
+{
+&nbsp;&nbsp;&nbsp;var successCB = function(ndefMessage)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Message read was successful.");
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; ndefMessage.recordCount; ++i)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Message record " + i + "tnf: " + ndefMessage.records[i].tnf);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Message record " + i + "tnf: " + ndefMessage.records[i].tnf);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Message record type " + ndefMessage.records[i].type.toString());
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;};
+
+&nbsp;&nbsp;&nbsp;var errorCB = function()
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Message read failed.");
+&nbsp;&nbsp;&nbsp;};
+
+&nbsp;&nbsp;&nbsp;nfcTag.readNDEF(successCB, errorCB);
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="NFCTag::writeNDEF">
@@ -2546,26 +2666,29 @@ is not compatible with the expected type for that parameter.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> try {
-
-   var successCB = function() {
-     console.log("Message write was successful.");
-     }
-   };
-
-   var errorCB = function() {
-     console.log("Message write failed.");
-   };
-
-
-   var record = new tizen.NDEFRecordText("Hi!", "en-GB");
-   var message = new tizen.NDEFMessage([record]);
-
-   nfcTag.writeNDEF(message, successCB, errorCB) ;
- } catch (err) {
-   console.log(err.name + ": " + err.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+try
+{
+&nbsp;&nbsp;&nbsp;var successCB = function()
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Message write was successful.");
+&nbsp;&nbsp;&nbsp;};
+
+&nbsp;&nbsp;&nbsp;var errorCB = function()
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Message write failed.");
+&nbsp;&nbsp;&nbsp;};
+
+&nbsp;&nbsp;&nbsp;var record = new tizen.NDEFRecordText("Hi!", "en-GB");
+&nbsp;&nbsp;&nbsp;var message = new tizen.NDEFMessage([record]);
+
+&nbsp;&nbsp;&nbsp;nfcTag.writeNDEF(message, successCB, errorCB);
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="NFCTag::transceive">
@@ -2635,25 +2758,29 @@ is not compatible with the expected type for that parameter.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> try {
-
-   var successCB = function(data) {
-     console.log("Message write was successful.");
-     console.log("Response is " + data.toString());
-     }
-   };
-
-   var errorCB = function() {
-     console.log("Message write failed.");
-   };
-
-   var message = [0x30, 0x00, 0x02, 0xa8];       // READ command for MIFARE tags 
-
-   nfcTag.transceive(message, successCB, errorCB) ;
- } catch (err) {
-   console.log(err.name + ": " + err.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+try
+{
+&nbsp;&nbsp;&nbsp;var successCB = function(data)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Message write was successful.");
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Response is " + data.toString());
+&nbsp;&nbsp;&nbsp;};
+
+&nbsp;&nbsp;&nbsp;var errorCB = function()
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Message write failed.");
+&nbsp;&nbsp;&nbsp;};
+
+&nbsp;&nbsp;&nbsp;var message = [0x30, 0x00, 0x02, 0xa8]; /* READ command for MIFARE tags */
+
+&nbsp;&nbsp;&nbsp;nfcTag.transceive(message, successCB, errorCB);
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+}
+</pre>
 </div>
 </dd>
 </dl>
@@ -2746,21 +2873,28 @@ is not compatible with the expected type for that parameter.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var adapter = tizen.nfc.getDefaultAdapter();
-
- // Receives NFCPeer
- var onSuccessCB = {onattach : function(nfcPeer) {
-     console.log("NFC Target is detected");
-     nfcPeer.setReceiveNDEFListener(
-         function(message){
-            console.log("Receive message");
-         });
-   }, ondetach : function() {
-     console.log("NFC Target is detached");
-   }};
-
- adapter.setPeerListener(onSuccessCB);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var adapter = tizen.nfc.getDefaultAdapter();
+
+/* Receives NFCPeer */
+var onSuccessCB =
+{
+&nbsp;&nbsp;&nbsp;onattach: function(nfcPeer)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("NFC Target is detected");
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;nfcPeer.setReceiveNDEFListener(function(message)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Receive message");
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;});
+&nbsp;&nbsp;&nbsp;}, 
+&nbsp;&nbsp;&nbsp;ondetach: function()
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("NFC Target is detached");
+&nbsp;&nbsp;&nbsp;}
+};
+
+adapter.setPeerListener(onSuccessCB);
+</pre>
 </div>
 </dd>
 <dt class="method" id="NFCPeer::unsetReceiveNDEFListener">
@@ -2800,21 +2934,27 @@ is not compatible with the expected type for that parameter.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var adapter = tizen.nfc.getDefaultAdapter();
- var onSuccessCB = {onattach : function(nfcPeer) {
-     console.log("NFC Target is detected");
-     nfcPeer.setReceiveNDEFListener(
-         function(message){
-            console.log("Receive message");
-            nfcPeer.unsetReceiveNDEFListener();
-         });
-   }, ondetach : function() {
-     console.log("NFC Target is detached");
-   }};
- }
-
- adapter.setPeerListener(onSuccessCB);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var adapter = tizen.nfc.getDefaultAdapter();
+var onSuccessCB =
+{
+&nbsp;&nbsp;&nbsp;onattach: function(nfcPeer)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("NFC Target is detected");
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;nfcPeer.setReceiveNDEFListener(function(message)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Receive message");
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;nfcPeer.unsetReceiveNDEFListener();
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;});
+&nbsp;&nbsp;&nbsp;}, 
+&nbsp;&nbsp;&nbsp;ondetach: function()
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("NFC Target is detached");
+&nbsp;&nbsp;&nbsp;}
+};
+
+adapter.setPeerListener(onSuccessCB);
+</pre>
 </div>
 </dd>
 <dt class="method" id="NFCPeer::sendNDEF">
@@ -2882,24 +3022,30 @@ is not compatible with the expected type for that parameter.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> try {
-
-   peerListener = {
-     onattach: function (peer) {
-       var record = new tizen.NDEFRecordText("sendNDEF-test", 'en-US');
-       var message = new tizen.NDEFMessage([record]);
-       returned = peer.sendNDEF(ndefMessage);
-     },
-     ondetach: t.step_func(function () {
-       adapter.unsetPeerListener();
-     }
-   };
-
-   adapter.setPeerListener(peerListener);
- } catch (err) {
-   console.log(err.name + ": " + err.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+try
+{
+&nbsp;&nbsp;&nbsp;peerListener =
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;onattach: function(peer)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var record = new tizen.NDEFRecordText("sendNDEF-test", 'en-US');
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var message = new tizen.NDEFMessage([record]);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;returned = peer.sendNDEF(ndefMessage);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ondetach: t.step_func(function()
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;adapter.unsetPeerListener();
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;};
+
+&nbsp;&nbsp;&nbsp;adapter.setPeerListener(peerListener);
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+}
+</pre>
 </div>
 </dd>
 </dl>
@@ -2926,16 +3072,20 @@ The NDEFMessage must have at least one NDEFRecord.
  1.0
           </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> try {
-   var record = new tizen.NDEFRecordText("Hi!", "en-GB");
-   var tempMessage = new tizen.NDEFMessage([record]);
-   var rawData = tempMessage.toByte();
-
-   var message = new tizen.NDEFMessage(rawData);
- } catch (err) {
-   console.log(err.name + ": " + err.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+try
+{
+&nbsp;&nbsp;&nbsp;var record = new tizen.NDEFRecordText("Hi!", "en-GB");
+&nbsp;&nbsp;&nbsp;var tempMessage = new tizen.NDEFMessage([record]);
+&nbsp;&nbsp;&nbsp;var rawData = tempMessage.toByte();
+
+&nbsp;&nbsp;&nbsp;var message = new tizen.NDEFMessage(rawData);
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+}
+</pre>
 </div>
 <div class="constructors">
 <h4 id="NDEFMessage::constructor">Constructors</h4>
@@ -2968,18 +3118,21 @@ The NDEFMessage must have at least one NDEFRecord.
  1.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> try {
-
-  // prepare two NDEFRecords:
-  var myRecordURI = new tizen.NDEFRecordURI("https://www.tizen.org/");
-  var myRecordTextPlain = new tizen.NDEFRecordMedia("text/plain", [116, 105, 122, 101, 110]);
-
-  // create a NDEFMessage composed of two NDEFRecords:
-  var myMessage = new NDEFMessage([myRecordURI, myRecordTextPlain]);
- } catch (err) {
-   console.log(err.name + ": " + err.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+try
+{
+&nbsp;&nbsp;&nbsp;/* Prepare two NDEFRecords */
+&nbsp;&nbsp;&nbsp;var myRecordURI = new tizen.NDEFRecordURI("https://www.tizen.org/");
+&nbsp;&nbsp;&nbsp;var myRecordTextPlain = new tizen.NDEFRecordMedia("text/plain", [116, 105, 122, 101, 110]);
+
+&nbsp;&nbsp;&nbsp;/* Create a NDEFMessage composed of two NDEFRecords */
+&nbsp;&nbsp;&nbsp;var myMessage = new NDEFMessage([myRecordURI, myRecordTextPlain]);
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+}
+</pre>
 </div>
 </li>
 </ul>
@@ -3022,10 +3175,11 @@ If the operation completes successfully, it returns the serial byte array of the
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Gets the cached message.
- var cachedMessage = tizen.nfc.getDefaultAdapter().getCachedMessage();
- var raw = cachedMessage.toByte();
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Gets the cached message */
+var cachedMessage = tizen.nfc.getDefaultAdapter().getCachedMessage();
+var raw = cachedMessage.toByte();
+</pre>
 </div>
 </dd>
 </dl>
@@ -3052,24 +3206,32 @@ If the operation completes successfully, it returns the serial byte array of the
  1.0
           </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> try {
-   var recordBytes = [217, 1, 2, 3, 202, 219, 218, 217, 240, 241];
-   var record = new tizen.NDEFRecord(recordBytes);
- } catch (err) {
-   console.log(err.name + ": " + err.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+try
+{
+&nbsp;&nbsp;&nbsp;var recordBytes = [217, 1, 2, 3, 202, 219, 218, 217, 240, 241];
+&nbsp;&nbsp;&nbsp;var record = new tizen.NDEFRecord(recordBytes);
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+}
+</pre>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> try {
-   var type = new Array(255),
-   var payload = new Array(256),
-   var recordId = [155, 150],
-   var newRecord = new tizen.NDEFRecord(tizen.nfc.NFC_RECORD_TNF_UNKNOWN, type, payload, recordId);
- } catch (err) {
-   console.log(err.name + ": " + err.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+try
+{
+&nbsp;&nbsp;&nbsp;var type = new Array(255),
+&nbsp;&nbsp;&nbsp;var payload = new Array(256),
+&nbsp;&nbsp;&nbsp;var recordId = [155, 150],
+&nbsp;&nbsp;&nbsp;var newRecord = new tizen.NDEFRecord(tizen.nfc.NFC_RECORD_TNF_UNKNOWN, type, payload, recordId);
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+}
+</pre>
 </div>
 <div class="constructors">
 <h4 id="NDEFRecord::constructor">Constructors</h4>
@@ -3163,10 +3325,11 @@ The byte array contains <var>0</var> to <var>(2 ** 32 - 1)</var> bytes.
  1.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Creates a new NDEF record.
- var newRecord = new tizen.NDEFRecordURI("https://www.tizen.org/");
- var payload = newRecord.payload;
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Creates a new NDEF record */
+var newRecord = new tizen.NDEFRecordURI("https://www.tizen.org/");
+var payload = newRecord.payload;
+</pre>
 </div>
 </li>
 </ul>
@@ -3227,8 +3390,9 @@ The byte array contains <var>0</var> to <var>(2 ** 32 - 1)</var> bytes.
  1.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">   var newRecord = new tizen.NDEFRecordText("Tizen", "en-US", "UTF8");
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var newRecord = new tizen.NDEFRecordText("Tizen", "en-US", "UTF8");
+</pre>
 </div>
 </li>
 </ul>
@@ -3264,10 +3428,11 @@ The byte array contains <var>0</var> to <var>(2 ** 32 - 1)</var> bytes.
  1.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">   // Creates a new NDEF record.
-   var newRecord = new tizen.NDEFRecordURI("https://www.tizen.org/");
-   var payload = newRecord.payload;
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Creates a new NDEF record */
+var newRecord = new tizen.NDEFRecordURI("https://www.tizen.org/");
+var payload = newRecord.payload;
+</pre>
 </div>
 </li></ul>
 </div>
@@ -3310,9 +3475,10 @@ The byte array contains <var>0</var> to <var>(2 ** 32 - 1)</var> bytes.
  1.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">   var myData = [116, 105, 122, 101, 110];
-   var newRecord = new tizen.NDEFRecordMedia("text/plain", myData);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var myData = [116, 105, 122, 101, 110];
+var newRecord = new tizen.NDEFRecordMedia("text/plain", myData);
+</pre>
 </div>
 </li></ul>
 </div>
@@ -3481,19 +3647,25 @@ It is used in NFCAdapter.setTagListener().
         </ul>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> try {
-   var onSuccessCB = {
-     onattach: function (nfcTag){
-       console.log("Successfully detected nfcTag type:" + nfcTag.type);
-     }
-   }
-
-   var adapter = tizen.nfc.getDefaultAdapter();
-   adapter.setTagListener(onSuccessCB);
- } catch (err) {
-   console.log(err.name + ": " + err.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+try
+{
+&nbsp;&nbsp;&nbsp;var onSuccessCB =
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;onattach: function(nfcTag)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Successfully detected nfcTag type:" + nfcTag.type);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;}
+
+&nbsp;&nbsp;&nbsp;var adapter = tizen.nfc.getDefaultAdapter();
+&nbsp;&nbsp;&nbsp;adapter.setTagListener(onSuccessCB);
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="NFCTagDetectCallback::ondetach">
@@ -3510,23 +3682,30 @@ It is used in NFCAdapter.setTagListener().
  1.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> try {
-   var adapter;
-   var onSuccessCB = {
-     onattach: function (nfcTag){
-       console.log("Successfully detected nfcTag type:" + nfcTag.type);
-     },
-     ondetach: function() {
-       adapter.unsetTagListener();
-     }
-   }
-
-   adapter = tizen.nfc.getDefaultAdapter();
-   adapter.setTagListener(onSuccessCB);
- } catch (err) {
-   console.log(err.name + ": " + err.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+try
+{
+&nbsp;&nbsp;&nbsp;var adapter;
+&nbsp;&nbsp;&nbsp;var onSuccessCB =
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;onattach: function(nfcTag)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Successfully detected nfcTag type:" + nfcTag.type);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ondetach: function()
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;adapter.unsetTagListener();
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;}
+
+&nbsp;&nbsp;&nbsp;adapter = tizen.nfc.getDefaultAdapter();
+&nbsp;&nbsp;&nbsp;adapter.setTagListener(onSuccessCB);
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+}
+</pre>
 </div>
 </dd>
 </dl>
@@ -3585,20 +3764,26 @@ It is used in NFCAdapter.setPeerListener().
         </ul>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> try {
-   var adapter;
-   var onSuccessCB = {
-     onattach: function (nfcPeer){
-       console.log("Successfully detected nfcPeer :" + nfcPeer.isConnected);
-     }
-   }
-
-   adapter = tizen.nfc.getDefaultAdapter();
-   adapter.setPeerListener(onSuccessCB);
- } catch (err) {
-   console.log(err.name + ": " + err.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+try
+{
+&nbsp;&nbsp;&nbsp;var adapter;
+&nbsp;&nbsp;&nbsp;var onSuccessCB =
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;onattach: function(nfcPeer)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Successfully detected nfcPeer:" + nfcPeer.isConnected);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;}
+
+&nbsp;&nbsp;&nbsp;adapter = tizen.nfc.getDefaultAdapter();
+&nbsp;&nbsp;&nbsp;adapter.setPeerListener(onSuccessCB);
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="NFCPeerDetectCallback::ondetach">
@@ -3615,23 +3800,30 @@ It is used in NFCAdapter.setPeerListener().
  1.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> try {
-   var adapter;
-   var onSuccessCB = {
-     onattach: function (nfcPeer){
-       console.log("Successfully detected nfcPeer :" + nfcPeer.isConnected);
-     },
-     ondetach: function() {
-       adapter.unsetPeerListener();
-     }
-   }
-
-   adapter = tizen.nfc.getDefaultAdapter();
-   adapter.setPeerListener(onSuccessCB);
- } catch (err) {
-   console.log(err.name + ": " + err.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+try
+{
+&nbsp;&nbsp;&nbsp;var adapter;
+&nbsp;&nbsp;&nbsp;var onSuccessCB =
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;onattach: function(nfcPeer)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Successfully detected nfcPeer:" + nfcPeer.isConnected);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ondetach: function()
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;adapter.unsetPeerListener();
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;}
+
+&nbsp;&nbsp;&nbsp;adapter = tizen.nfc.getDefaultAdapter();
+&nbsp;&nbsp;&nbsp;adapter.setPeerListener(onSuccessCB);
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+}
+</pre>
 </div>
 </dd>
 </dl>
@@ -3683,25 +3875,32 @@ operations, such as NFCTag.readNDEF() or NFCPeer.setReceiveNDEFListener().
         </ul>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> try {
-   var adapter;
-
-   var readCallback = function (ndefMessage) {
-     console.log("NDEFMessageReadCallback called successfully");
-   }
-
-   var tagListener = {
-     onattach: function (nfcTag){
-       var result = nfcTag.readNDEF(readCallback);
-     }
-   }
-
-   adapter = tizen.nfc.getDefaultAdapter();
-   adapter.setTagListener(tagListener);
- } catch (err) {
-   console.log(err.name + ": " + err.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+try
+{
+&nbsp;&nbsp;&nbsp;var adapter;
+
+&nbsp;&nbsp;&nbsp;var readCallback = function(ndefMessage)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("NDEFMessageReadCallback called successfully");
+&nbsp;&nbsp;&nbsp;}
+
+&nbsp;&nbsp;&nbsp;var tagListener =
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;onattach: function(nfcTag)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var result = nfcTag.readNDEF(readCallback);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;}
+
+&nbsp;&nbsp;&nbsp;adapter = tizen.nfc.getDefaultAdapter();
+&nbsp;&nbsp;&nbsp;adapter.setTagListener(tagListener);
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+}
+</pre>
 </div>
 </dd>
 </dl>
@@ -3751,20 +3950,23 @@ raw data as an input parameter. It is used in NFCTag.transceive().
         </ul>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> try {
-
-   var successCB = function(data) {
-     console.log("ByteArraySuccessCallback called successfully.");
-     }
-   };
-
-   var message = [0x30, 0x00, 0x02, 0xa8];       // READ command for MIFARE tags
-
-   nfcTag.transceive(message, successCB) ;
- } catch (err) {
-   console.log(err.name + ": " + err.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+try
+{
+&nbsp;&nbsp;&nbsp;var successCB = function(data)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("ByteArraySuccessCallback called successfully.");
+&nbsp;&nbsp;&nbsp;};
+
+&nbsp;&nbsp;&nbsp;var message = [0x30, 0x00, 0x02, 0xa8]; /* READ command for MIFARE tags */
+
+&nbsp;&nbsp;&nbsp;nfcTag.transceive(message, successCB);
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+}
+</pre>
 </div>
 </dd>
 </dl>
@@ -3808,17 +4010,21 @@ raw data as an input parameter. It is used in NFCTag.transceive().
         </ul>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> try {
-
-   var onSuccessCB = function(mode) {
-     console.log("CardEmulationModeChangeCallback called successfully");
-   };
-
-   var listenerId = adapter.addCardEmulationModeChangeListener(onSuccessCB) ;
- } catch (err) {
-   console.log(err.name + ": " + err.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+try
+{
+&nbsp;&nbsp;&nbsp;var onSuccessCB = function(mode)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("CardEmulationModeChangeCallback called successfully");
+&nbsp;&nbsp;&nbsp;};
+
+&nbsp;&nbsp;&nbsp;var listenerId = adapter.addCardEmulationModeChangeListener(onSuccessCB);
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+}
+</pre>
 </div>
 </dd>
 </dl>
@@ -3866,17 +4072,21 @@ raw data as an input parameter. It is used in NFCTag.transceive().
         </ul>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> try {
-
-   var onSuccessCB = function(aid, data) {
-     console.log("TransactionEventCallback called successfully");
-   };
-
-   var listenerId = adapter.addTransactionEventListener("UICC", onSuccessCB) ;
- } catch (err) {
-   console.log(err.name + ": " + err.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+try
+{
+&nbsp;&nbsp;&nbsp;var onSuccessCB = function(aid, data)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("TransactionEventCallback called successfully");
+&nbsp;&nbsp;&nbsp;};
+
+&nbsp;&nbsp;&nbsp;var listenerId = adapter.addTransactionEventListener("UICC", onSuccessCB);
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+}
+</pre>
 </div>
 </dd>
 </dl>
@@ -3920,17 +4130,21 @@ raw data as an input parameter. It is used in NFCTag.transceive().
         </ul>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> try {
-
-   var onSuccessCB = function(seType) {
-     console.log("ActiveSecureElementChangeCallback called successfully");
-   };
-
-   var listenerId = adapter.addActiveSecureElementChangeListener(onSuccessCB) ;
- } catch (err) {
-   console.log(err.name + ": " + err.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+try
+{
+&nbsp;&nbsp;&nbsp;var onSuccessCB = function(seType)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("ActiveSecureElementChangeCallback called successfully");
+&nbsp;&nbsp;&nbsp;};
+
+&nbsp;&nbsp;&nbsp;var listenerId = adapter.addActiveSecureElementChangeListener(onSuccessCB);
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+}
+</pre>
 </div>
 </dd>
 </dl>
@@ -3974,17 +4188,21 @@ raw data as an input parameter. It is used in NFCTag.transceive().
         </ul>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> try {
-
-   var onDetectedCB = function(event_data) {
-     console.log("HCEEventReceiveCallback called successfully");
-   };
-
-   var listenerId = adapter.addHCEEventListener(onDetectedCB) ;
- } catch (err) {
-   console.log(err.name + ": " + err.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+try
+{
+&nbsp;&nbsp;&nbsp;var onDetectedCB = function(event_data)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("HCEEventReceiveCallback called successfully");
+&nbsp;&nbsp;&nbsp;};
+
+&nbsp;&nbsp;&nbsp;var listenerId = adapter.addHCEEventListener(onDetectedCB);
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+}
+</pre>
 </div>
 </dd>
 </dl>
@@ -4028,17 +4246,21 @@ raw data as an input parameter. It is used in NFCTag.transceive().
         </ul>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> try {
-
-   var successCB = function(aids) {
-     console.log("AIDArraySuccessCallback called successfully");
-   };
-
-   adapter.getAIDsForCategory("HCE", "PAYMENT", successCB) ;
- } catch (err) {
-   console.log(err.name + ": " + err.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+try
+{
+&nbsp;&nbsp;&nbsp;var successCB = function(aids)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("AIDArraySuccessCallback called successfully");
+&nbsp;&nbsp;&nbsp;};
+
+&nbsp;&nbsp;&nbsp;adapter.getAIDsForCategory("HCE", "PAYMENT", successCB);
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+}
+</pre>
 </div>
 </dd>
 </dl>
index 42abb33..6144326 100644 (file)
@@ -309,27 +309,29 @@ parameters contain an invalid value.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> try {
-      var appControl = new tizen.ApplicationControl(
-                       "http://tizen.org/appcontrol/operation/create_content",
-                       null,
-                       "image/jpg",
-                       null);
-      var notificationDict = {
-                  content : "This is a simple notification.",
-                  iconPath : "images/image1.jpg",
-                  soundPath : "music/Over the horizon.mp3",
-                  vibration : true,
-                  appControl : appControl};
-
-      var notification = new tizen.StatusNotification("SIMPLE",
-                  "Simple notification", notificationDict);
-
-      tizen.notification.post(notification);
- } catch (err) {
-      console.log (err.name + ": " + err.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+try
+{
+&nbsp;&nbsp;&nbsp;var appControl = new tizen.ApplicationControl("http://tizen.org/appcontrol/operation/create_content",
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;null, "image/jpg", null);
+&nbsp;&nbsp;&nbsp;var notificationDict =
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;content: "This is a simple notification.",
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;iconPath: "images/image1.jpg",
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;soundPath: "music/Over the horizon.mp3",
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;vibration: true,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;appControl: appControl
+&nbsp;&nbsp;&nbsp;};
+
+&nbsp;&nbsp;&nbsp;var notification = new tizen.StatusNotification("SIMPLE", "Simple notification", notificationDict);
+
+&nbsp;&nbsp;&nbsp;tizen.notification.post(notification);
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="NotificationManager::update">
@@ -382,14 +384,18 @@ parameters contain an invalid value.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> try {
-      // Uses a variable for the previously posted notification.
-      notification.content = "My notification";
-      tizen.notification.update(notification);
- } catch (err) {
-      console.log (err.name + ": " + err.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+try
+{
+&nbsp;&nbsp;&nbsp;/* Uses a variable for the previously posted notification */
+&nbsp;&nbsp;&nbsp;notification.content = "My notification";
+&nbsp;&nbsp;&nbsp;tizen.notification.update(notification);
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="NotificationManager::remove">
@@ -441,13 +447,17 @@ parameters contain an invalid value.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> try {
-      // Uses a variable for the previously posted notification.
-      tizen.notification.remove(notification.id);
- } catch (err) {
-      console.log (err.name + ": " + err.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+try
+{
+&nbsp;&nbsp;&nbsp;/* Uses a variable for the previously posted notification */
+&nbsp;&nbsp;&nbsp;tizen.notification.remove(notification.id);
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="NotificationManager::removeAll">
@@ -484,12 +494,16 @@ parameters contain an invalid value.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> try {
-      tizen.notification.removeAll();
- } catch (err) {
-      console.log (err.name + ": " + err.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+try
+{
+&nbsp;&nbsp;&nbsp;tizen.notification.removeAll();
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="NotificationManager::get">
@@ -526,16 +540,20 @@ parameters contain an invalid value.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> try {
-      // Uses a variable for the previously posted notification
-      // Saves the notification ID for future use
-      var myId = notification.id;
-
-      var myNotification = tizen.notification.get(myId);
- } catch (err) {
-      console.log (err.name + ": " + err.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+try
+{
+&nbsp;&nbsp;&nbsp;/* Uses a variable for the previously posted notification */
+&nbsp;&nbsp;&nbsp;/* Saves the notification ID for future use */
+&nbsp;&nbsp;&nbsp;var myId = notification.id;
+
+&nbsp;&nbsp;&nbsp;var myNotification = tizen.notification.get(myId);
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="NotificationManager::getAll">
@@ -558,27 +576,31 @@ parameters contain an invalid value.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> try {
-     var notifications = tizen.notification.getAll();
-     var index = 0;
-
-     for ( index = 0; index &lt; notifications.length; index++ )
-     {
-         console.log(notifications[index].id);
-         console.log(notifications[index].title);
-         console.log(notifications[index].statusType);
-         console.log(notifications[index].type);
-         console.log(notifications[index].content);
-         console.log(notifications[index].postedTime);
-         console.log(notifications[index].iconPath);
-         console.log(notifications[index].soundPath);
-         console.log(notifications[index].vibration);
-         console.log(notifications[index].appControl);
-     }
- } catch (err) {
-     console.log (err.name + ": " + err.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+try
+{
+&nbsp;&nbsp;&nbsp;var notifications = tizen.notification.getAll();
+&nbsp;&nbsp;&nbsp;var index = 0;
+
+&nbsp;&nbsp;&nbsp;for (index = 0; index &lt; notifications.length; index++)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(notifications[index].id);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(notifications[index].title);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(notifications[index].statusType);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(notifications[index].type);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(notifications[index].content);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(notifications[index].postedTime);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(notifications[index].iconPath);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(notifications[index].soundPath);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(notifications[index].vibration);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(notifications[index].appControl);
+&nbsp;&nbsp;&nbsp;}
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="NotificationManager::playLEDCustomEffect">
@@ -649,12 +671,16 @@ is not given (in this case alpha is assumed to have value 0xff). In this case on
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> try {
-     tizen.notification.playLEDCustomEffect(1000, 1000, "#FFFF0080", ["LED_CUSTOM_DUTY_ON", "LED_CUSTOM_DEFAULT"]);
- } catch(e) {
-     console.log("Error Exception, error name : " + e.name + ", error message : " + e.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+try
+{
+&nbsp;&nbsp;&nbsp;tizen.notification.playLEDCustomEffect(1000, 1000, "#FFFF0080", ["LED_CUSTOM_DUTY_ON", "LED_CUSTOM_DEFAULT"]);
+}
+catch (e)
+{
+&nbsp;&nbsp;&nbsp;console.log("Error Exception, error name: " + e.name + ", error message: " + e.message);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="NotificationManager::stopLEDCustomEffect">
@@ -691,15 +717,20 @@ is not given (in this case alpha is assumed to have value 0xff). In this case on
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> try {
-     tizen.notification.playLEDCustomEffect(1000, 1000, "#FFFF0080", ["LED_CUSTOM_DUTY_ON", "LED_CUSTOM_DEFAULT"]);
-     setTimeout(function () {
-         tizen.notification.stopLEDCustomEffect();
-     }, 5000);
- } catch(e) {
-     console.log("Error Exception, error name : " + e.name + ", error message : " + e.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+try
+{
+&nbsp;&nbsp;&nbsp;tizen.notification.playLEDCustomEffect(1000, 1000, "#FFFF0080", ["LED_CUSTOM_DUTY_ON", "LED_CUSTOM_DEFAULT"]);
+&nbsp;&nbsp;&nbsp;setTimeout(function()
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tizen.notification.stopLEDCustomEffect();
+&nbsp;&nbsp;&nbsp;}, 5000);
+}
+catch (e)
+{
+&nbsp;&nbsp;&nbsp;console.log("Error Exception, error name: " + e.name + ", error message: " + e.message);
+}
+</pre>
 </div>
 </dd>
 </dl>
@@ -932,24 +963,29 @@ This method has effects when the device has notification LED.
  2.2
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> try {
-      var notificationDict = {
-                  content : "This is a simple notification.",
-                  iconPath : "images/image1.jpg",
-                  soundPath : "music/Over the horizon.mp3",
-                  vibration : true,
-                  ledColor : "#FFFF00",
-                  ledOnPeriod: 1000,
-                  ledOffPeriod : 500 };
-
-      var notification = new tizen.StatusNotification("SIMPLE",
-                  "Simple notification", notificationDict);
-
-      tizen.notification.post(notification);
- } catch (err) {
-      console.log (err.name + ": " + err.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+try
+{
+&nbsp;&nbsp;&nbsp;var notificationDict =
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;content: "This is a simple notification.",
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;iconPath: "images/image1.jpg",
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;soundPath: "music/Over the horizon.mp3",
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;vibration: true,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ledColor: "#FFFF00",
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ledOnPeriod: 1000,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ledOffPeriod: 500
+&nbsp;&nbsp;&nbsp;};
+
+&nbsp;&nbsp;&nbsp;var notification = new tizen.StatusNotification("SIMPLE", "Simple notification", notificationDict);
+
+&nbsp;&nbsp;&nbsp;tizen.notification.post(notification);
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+}
+</pre>
 </div>
 </li>
 <li class="attribute" id="StatusNotification::ledOnPeriod">
@@ -1031,26 +1067,30 @@ The maximum number of thumbnail path elements in the array is 4.
  2.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> try {
-
-      // Gets the current application information with tizen.application.getAppInfo
-      var myappInfo = tizen.application.getAppInfo();
-
-      var notificationDict = {
-                  content : "This is a simple notification.",
-                  iconPath : "images/image1.jpg",
-                  soundPath : "music/Over the horizon.mp3",
-                  vibration : true,
-                  appId : myappInfo.id };
-
-      var notification = new tizen.StatusNotification("SIMPLE",
-                  "Simple notification", notificationDict);
-
-      tizen.notification.post(notification);
- } catch (err) {
-      console.log (err.name + ": " + err.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+try
+{
+&nbsp;&nbsp;&nbsp;/* Gets the current application information with tizen.application.getAppInfo */
+&nbsp;&nbsp;&nbsp;var myappInfo = tizen.application.getAppInfo();
+
+&nbsp;&nbsp;&nbsp;var notificationDict =
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;content: "This is a simple notification.",
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;iconPath: "images/image1.jpg",
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;soundPath: "music/Over the horizon.mp3",
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;vibration: true,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;appId: myappInfo.id
+&nbsp;&nbsp;&nbsp;};
+
+&nbsp;&nbsp;&nbsp;var notification = new tizen.StatusNotification("SIMPLE", "Simple notification", notificationDict);
+
+&nbsp;&nbsp;&nbsp;tizen.notification.post(notification);
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+}
+</pre>
 </div>
 </li>
 <li class="attribute" id="StatusNotification::progressType">
@@ -1086,35 +1126,35 @@ Range of <em>progressValue</em>: percent (0 to 100).
  2.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> try {
-      var appControl = new tizen.ApplicationControl(
-      "http://tizen.org/appcontrol/operation/create_content",
-      null,
-      "image/jpg",
-      null);
-
-      var notificationDict = {
-                  content : "This is a progress notification.",
-                  iconPath : "images/image2.jpg",
-                  soundPath : "music/Over the horizon.mp3",
-                  vibration : true,
-                  appControl : appControl,
-                  progressValue : 20};
-      // Constructs the progress notification
-      var notification = new tizen.StatusNotification("PROGRESS",
-                         "Progress notification", notificationDict);
-      // Posts the notification
-      tizen.notification.post(notification);
-
-      // Updates the progress value of the notification
-      notification.progressValue = 59;
-      tizen.notification.update(notification);
-
-
- } catch (err) {
-     console.log (err.name + ": " + err.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+try
+{
+&nbsp;&nbsp;&nbsp;var appControl = new tizen.ApplicationControl("http://tizen.org/appcontrol/operation/create_content",
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;null, "image/jpg", null);
+
+&nbsp;&nbsp;&nbsp;var notificationDict =
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;content: "This is a progress notification.",
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;iconPath: "images/image2.jpg",
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;soundPath: "music/Over the horizon.mp3",
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;vibration: true,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;appControl: appControl,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;progressValue: 20
+&nbsp;&nbsp;&nbsp;};
+&nbsp;&nbsp;&nbsp;/* Constructs the progress notification */
+&nbsp;&nbsp;&nbsp;var notification = new tizen.StatusNotification("PROGRESS", "Progress notification", notificationDict);
+&nbsp;&nbsp;&nbsp;/* Posts the notification */
+&nbsp;&nbsp;&nbsp;tizen.notification.post(notification);
+
+&nbsp;&nbsp;&nbsp;/* Updates the progress value of the notification */
+&nbsp;&nbsp;&nbsp;notification.progressValue = 59;
+&nbsp;&nbsp;&nbsp;tizen.notification.update(notification);
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+}
+</pre>
 </div>
 </li>
 </ul>
@@ -1136,8 +1176,9 @@ Range of <em>progressValue</em>: percent (0 to 100).
  2.1
           </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var detailInfo1 = new tizen.NotificationDetailInfo('Missed Call from James', 'Feb 11 2013');
- notification.detailInfo = [detailInfo1];
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var detailInfo1 = new tizen.NotificationDetailInfo('Missed Call from James', 'Feb 11 2013');
+notification.detailInfo = [detailInfo1];
 </pre>
 </div>
 <div class="constructors">
index 137b7f1..db1c283 100644 (file)
@@ -225,31 +225,34 @@ UnknownError - If it is not allowed to install the package by the platform or an
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var onInstallation = {
-      onprogress: function(packageId, percentage) {
-         console.log("On installation(" + packageId + ") : progress(" + percentage + ")");
-      },
-      oncomplete: function(packageId) {
-         console.log("Installation(" + packageId + ") Complete");
-      }
- }
-
- var onError = function (err) {
-      console.log("Error occurred on installation : " + err.name);
- }
-
- // Let's assume that the "test.wgt" file exists in the downloads directory
- tizen.filesystem.resolve("downloads/test.wgt",
-     function (file) {
-         console.log("file URI : " + file.toURI());
-         tizen.package.install(file.toURI(), onInstallation, onError);
-     },
-     function (err) {
-         console.log("Error occurred on resolve : " + err.name);
-     },
-     "r");
-
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var onInstallation =
+{
+&nbsp;&nbsp;&nbsp;onprogress: function(packageId, percentage)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("On installation(" + packageId + "): progress(" + percentage + ")");
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;oncomplete: function(packageId)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Installation(" + packageId + ") Complete");
+&nbsp;&nbsp;&nbsp;}
+}
+
+var onError = function(err)
+{
+&nbsp;&nbsp;&nbsp;console.log("Error occurred on installation: " + err.name);
+}
+
+/* Let's assume that the "test.wgt" file exists in the downloads directory */
+tizen.filesystem.resolve("downloads/test.wgt", function(file)
+{
+&nbsp;&nbsp;&nbsp;console.log("file URI: " + file.toURI());
+&nbsp;&nbsp;&nbsp;tizen.package.install(file.toURI(), onInstallation, onError);
+}, function(err)
+{
+&nbsp;&nbsp;&nbsp;console.log("Error occurred on resolve: " + err.name);
+}, "r");
+</pre>
 </div>
 </dd>
 <dt class="method" id="PackageManager::uninstall">
@@ -320,22 +323,27 @@ UnknownError - If it is not allowed to uninstall the package from the platform o
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var onUninstallation = {
-      onprogress: function(packageId, percentage) {
-         console.log("On Uninstallation(" + packageId + ") : progress(" + percentage + ")");
-      },
-      oncomplete: function(packageId) {
-         console.log("Uninstallation(" + packageId + ") Complete");
-      }
- };
-
- var onError = function (err) {
-      console.log("Error occurred on installation : " + err.name);
- };
-
- // Let's assume that the package ID to uninstall is "testapp001"
- tizen.package.uninstall("testapp001", onUninstallation, onError);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var onUninstallation =
+{
+&nbsp;&nbsp;&nbsp;onprogress: function(packageId, percentage)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("On Uninstallation(" + packageId + "): progress(" + percentage + ")");
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;oncomplete: function(packageId)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Uninstallation(" + packageId + ") Complete");
+&nbsp;&nbsp;&nbsp;}
+};
+
+var onError = function(err)
+{
+&nbsp;&nbsp;&nbsp;console.log("Error occurred on installation: " + err.name);
+};
+
+/* Let's assume that the package ID to uninstall is "testapp001" */
+tizen.package.uninstall("testapp001", onUninstallation, onError);
+</pre>
 </div>
 </dd>
 <dt class="method" id="PackageManager::getPackagesInfo">
@@ -397,16 +405,20 @@ UnknownError - If any other platform error occurs.              </li>
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function onListInstalledPackages(packages) {
-     for (var i = 0; i &lt; packages.length; i++) {
-         console.log("Package id["+i+"] : " +packages[i].id);
-     }
- }
-
- tizen.package.getPackagesInfo(
-     onListInstalledPackages,
-     function (err) {console.log("Can't obtain packages list" + err.name);});
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function onListInstalledPackages(packages)
+{
+&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; packages.length; i++)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Package id[" + i + "]: " + packages[i].id);
+&nbsp;&nbsp;&nbsp;}
+}
+
+tizen.package.getPackagesInfo(onListInstalledPackages, function(err)
+{
+&nbsp;&nbsp;&nbsp;console.log("Can't obtain packages list" + err.name);
+});
+</pre>
 </div>
 </dd>
 <dt class="method" id="PackageManager::getPackageInfo">
@@ -468,10 +480,11 @@ The list of installed packages and their package IDs is obtained using <em>getPa
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var packageInfo = tizen.package.getPackageInfo(null);
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var packageInfo = tizen.package.getPackageInfo(null);
 
- console.log("Current Package ID : " + packageInfo.id);
- </pre>
+console.log("Current Package ID: " + packageInfo.id);
+</pre>
 </div>
 </dd>
 <dt class="method" id="PackageManager::setPackageInfoEventListener">
@@ -528,20 +541,25 @@ The callback lasts until the <em>unsetPackageInfoEventListener()</em> method is
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var packageEventCallback = {
-    oninstalled: function(packageInfo) {
-       console.log('The package ' + packageInfo.name + ' is installed');
-    },
-    onupdated: function(packageInfo) {
-       console.log('The package ' + packageInfo.name + ' is updated');
-    },
-    onuninstalled: function(packageId) {
-       console.log('The package ' + packageId + ' is uninstalled');
-    }
- };
-
- tizen.package.setPackageInfoEventListener(packageEventCallback);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var packageEventCallback =
+{
+&nbsp;&nbsp;&nbsp;oninstalled: function(packageInfo)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('The package ' + packageInfo.name + ' is installed');
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;onupdated: function(packageInfo)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('The package ' + packageInfo.name + ' is updated');
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;onuninstalled: function(packageId)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('The package ' + packageId + ' is uninstalled');
+&nbsp;&nbsp;&nbsp;}
+};
+
+tizen.package.setPackageInfoEventListener(packageEventCallback);
+</pre>
 </div>
 </dd>
 <dt class="method" id="PackageManager::unsetPackageInfoEventListener">
@@ -578,8 +596,9 @@ The callback lasts until the <em>unsetPackageInfoEventListener()</em> method is
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> tizen.package.unsetPackageInfoEventListener();
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+tizen.package.unsetPackageInfoEventListener();
+</pre>
 </div>
 </dd>
 </dl>
index 5f8a943..e8077b7 100644 (file)
@@ -281,8 +281,9 @@ parameters contain an invalid value.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> tizen.power.request("SCREEN", "SCREEN_NORMAL");
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+tizen.power.request("SCREEN", "SCREEN_NORMAL");
+</pre>
 </div>
 </dd>
 <dt class="method" id="PowerManager::release">
@@ -328,9 +329,10 @@ parameters contain an invalid value.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Release SCREEN resource.
- tizen.power.release("SCREEN");
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Release SCREEN resource */
+tizen.power.release("SCREEN");
+</pre>
 </div>
 </dd>
 <dt class="method" id="PowerManager::setScreenStateChangeListener">
@@ -376,13 +378,15 @@ parameters contain an invalid value.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function onScreenStateChanged(previousState, changedState) {
-   console.log("Screen state changed from " + previousState + " to " + changedState);
- }
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function onScreenStateChanged(previousState, changedState)
+{
+&nbsp;&nbsp;&nbsp;console.log("Screen state changed from " + previousState + " to " + changedState);
+}
 
- // Sets the screen state change listener.
- tizen.power.setScreenStateChangeListener(onScreenStateChanged);
- </pre>
+/* Sets the screen state change listener */
+tizen.power.setScreenStateChangeListener(onScreenStateChanged);
+</pre>
 </div>
 </dd>
 <dt class="method" id="PowerManager::unsetScreenStateChangeListener">
@@ -411,9 +415,10 @@ parameters contain an invalid value.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Unsets the screen state change listener.
- tizen.power.unsetScreenStateChangeListener();
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Unsets the screen state change listener */
+tizen.power.unsetScreenStateChangeListener();
+</pre>
 </div>
 </dd>
 <dt class="method" id="PowerManager::getScreenBrightness">
@@ -446,9 +451,10 @@ parameters contain an invalid value.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Gets the current screen brightness value.
- var screenBrightness = tizen.power.getScreenBrightness();
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Gets the current screen brightness value */
+var screenBrightness = tizen.power.getScreenBrightness();
+</pre>
 </div>
 </dd>
 <dt class="method" id="PowerManager::setScreenBrightness">
@@ -510,9 +516,10 @@ parameters contain an invalid value.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Sets the screen brightness value for the application.
- tizen.power.setScreenBrightness(1);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Sets the screen brightness value for the application */
+tizen.power.setScreenBrightness(1);
+</pre>
 </div>
 </dd>
 <dt class="method" id="PowerManager::isScreenOn">
@@ -545,9 +552,10 @@ parameters contain an invalid value.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Checks whether the screen is on or off.
- var isScreenOn = tizen.power.isScreenOn();
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Checks whether the screen is on or off */
+var isScreenOn = tizen.power.isScreenOn();
+</pre>
 </div>
 </dd>
 <dt class="method" id="PowerManager::restoreScreenBrightness">
@@ -576,9 +584,10 @@ parameters contain an invalid value.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Restores the screen brightness value to the system default setting value.
- tizen.power.restoreScreenBrightness();
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Restores the screen brightness value to the system default setting value */
+tizen.power.restoreScreenBrightness();
+</pre>
 </div>
 </dd>
 <dt class="method" id="PowerManager::turnScreenOn">
@@ -626,9 +635,10 @@ This API triggers turn-on process and then updates the status when it completes.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Turns the screen on.
- tizen.power.turnScreenOn();
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Turns the screen on */
+tizen.power.turnScreenOn();
+</pre>
 </div>
 </dd>
 <dt class="method" id="PowerManager::turnScreenOff">
@@ -677,9 +687,10 @@ While the operation is on-going, the isScreenOn() method returns true.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Turns the screen off.
- tizen.power.turnScreenOff();
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Turns the screen off */
+tizen.power.turnScreenOff();
+</pre>
 </div>
 </dd>
 </dl>
index 108fdf1..1fffbda 100644 (file)
@@ -210,14 +210,17 @@ The <em>tizen.preference</em> object provides access to the Preference service A
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var successCB = function(preferences) {
-   if (preferences.length) {
-     console.log('The first preference - key: ' + preferences[0].key + ' value: ' + preferences[0].value);
-   }
- };
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var successCB = function(preferences)
+{
+&nbsp;&nbsp;&nbsp;if (preferences.length)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('The first preference - key: ' + preferences[0].key + ' value: ' + preferences[0].value);
+&nbsp;&nbsp;&nbsp;}
+};
 
- tizen.preference.getAll(successCB);
- </pre>
+tizen.preference.getAll(successCB);
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre> The first preference - key: key1 value: Sample value
@@ -263,8 +266,9 @@ The <em>tizen.preference</em> object provides access to the Preference service A
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> tizen.preference.setValue('key1', 'New value');
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+tizen.preference.setValue('key1', 'New value');
+</pre>
 </div>
 </dd>
 <dt class="method" id="PreferenceManager::getValue">
@@ -309,9 +313,10 @@ The <em>tizen.preference</em> object provides access to the Preference service A
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var currentValue = tizen.preference.getValue('key1');
- console.log('The current value of the preference key1 is: ' + currentValue);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var currentValue = tizen.preference.getValue('key1');
+console.log('The current value of the preference key1 is: ' + currentValue);
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre> The current value of the preference key1 is: New value
@@ -356,8 +361,9 @@ The <em>tizen.preference</em> object provides access to the Preference service A
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> tizen.preference.remove('key1');
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+tizen.preference.remove('key1');
+</pre>
 </div>
 </dd>
 <dt class="method" id="PreferenceManager::removeAll">
@@ -386,8 +392,9 @@ The <em>tizen.preference</em> object provides access to the Preference service A
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> tizen.preference.removeAll();
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+tizen.preference.removeAll();
+</pre>
 </div>
 </dd>
 <dt class="method" id="PreferenceManager::exists">
@@ -429,12 +436,16 @@ The <em>tizen.preference</em> object provides access to the Preference service A
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> if (tizen.preference.exists('key1')) {
-   console.log('Preference with the key key1 exists');
- } else {
-   console.log('Preference with the key key1 doesn't exist');
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+if (tizen.preference.exists('key1'))
+{
+&nbsp;&nbsp;&nbsp;console.log('Preference with the key key1 exists');
+}
+else
+{
+&nbsp;&nbsp;&nbsp;console.log('Preference with the key key1 doesn't exist');
+}
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre> Preference with the key key1 exists
@@ -486,12 +497,14 @@ The <em>tizen.preference</em> object provides access to the Preference service A
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var listener = function(data) {
-   console.log('Preference with the key: ' + data.key + ' has a new value: ' + data.value);
- };
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var listener = function(data)
+{
+&nbsp;&nbsp;&nbsp;console.log('Preference with the key: ' + data.key + ' has a new value: ' + data.value);
+};
 
- tizen.preference.setChangeListener('key1', listener);
- </pre>
+tizen.preference.setChangeListener('key1', listener);
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre> Preference with the key: key1 has a new value: Sample value
@@ -536,12 +549,14 @@ The <em>tizen.preference</em> object provides access to the Preference service A
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var listener = function(data) {
-   tizen.preference.unsetChangeListener(data.key);
- };
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var listener = function(data)
+{
+&nbsp;&nbsp;&nbsp;tizen.preference.unsetChangeListener(data.key);
+};
 
- tizen.preference.setChangeListener('key1', listener);
- </pre>
+tizen.preference.setChangeListener('key1', listener);
+</pre>
 </div>
 </dd>
 </dl>
@@ -585,12 +600,14 @@ The <em>tizen.preference</em> object provides access to the Preference service A
         </ul>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var listener = function(data) {
-   tizen.preference.unsetChangeListener(data.key);
- };
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var listener = function(data)
+{
+&nbsp;&nbsp;&nbsp;tizen.preference.unsetChangeListener(data.key);
+};
 
- tizen.preference.setChangeListener('key1', listener);
- </pre>
+tizen.preference.setChangeListener('key1', listener);
+</pre>
 </div>
 </dd>
 </dl>
@@ -634,14 +651,17 @@ The <em>tizen.preference</em> object provides access to the Preference service A
         </ul>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var successCB = function(preferences) {
-   if (preferences.length) {
-     console.log('First preference - key: ' + preferences[0].key + ' value: ' + preferences[0].value);
-   }
- };
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var successCB = function(preferences)
+{
+&nbsp;&nbsp;&nbsp;if (preferences.length)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('First preference - key: ' + preferences[0].key + ' value: ' + preferences[0].value);
+&nbsp;&nbsp;&nbsp;}
+};
 
- tizen.preference.getAll(successCB);
- </pre>
+tizen.preference.getAll(successCB);
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre> First preference - key: key1 value: Sample value
index 095ac44..caa056e 100644 (file)
@@ -256,22 +256,25 @@ do not contain a valid value.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Defines the data to be used when this process is launched by notification service.
- var service = new tizen.ApplicationControl("http://tizen.org/appcontrol/operation/push_test");
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Defines the data to be used when this process is launched by notification service */
+var service = new tizen.ApplicationControl("http://tizen.org/appcontrol/operation/push_test");
 
- // Defines the error callback.
- function errorCallback(response) {
-   console.log( 'The following error occurred: ' +  response.name);
- }
+/* Defines the error callback */
+function errorCallback(response)
+{
+&nbsp;&nbsp;&nbsp;console.log('The following error occurred: ' +  response.name);
+}
 
- // Defines the registration success callback
- function registerSuccessCallback(id) {
-   console.log("Registration succeeded with id: " + id);
- }
+/* Defines the registration success callback */
+function registerSuccessCallback(id)
+{
+&nbsp;&nbsp;&nbsp;console.log("Registration succeeded with id: " + id);
+}
 
- // Requests registration.
- tizen.push.registerService(service, registerSuccessCallback, errorCallback);
- </pre>
+/* Requests registration */
+tizen.push.registerService(service, registerSuccessCallback, errorCallback);
+</pre>
 </div>
 </dd>
 <dt class="method" id="PushManager::register">
@@ -330,19 +333,22 @@ AbortError - If the operation cannot be finished properly.              </li>
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Defines the error callback.
- function errorCallback(response) {
-   console.log("The following error occurred: " +  response.name);
- }
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Defines the error callback */
+function errorCallback(response)
+{
+&nbsp;&nbsp;&nbsp;console.log("The following error occurred: " +  response.name);
+}
 
- // Defines the registration success callback
- function registerSuccessCallback(id) {
-   console.log("Registration succeeded with id: " + id);
- }
+/* Defines the registration success callback */
+function registerSuccessCallback(id)
+{
+&nbsp;&nbsp;&nbsp;console.log("Registration succeeded with id: " + id);
+}
 
- // Requests application registration.
- tizen.push.register(registerSuccessCallback, errorCallback);
- </pre>
+/* Requests application registration */
+tizen.push.register(registerSuccessCallback, errorCallback);
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre> Registration succeeded with id: 04a150867a50f48cb79695ac732cbe550b4a6782fffd23cbc14ba8dd5c5ab0025dad29a3e4ef5de8849b95b726bea7a6395c
@@ -414,19 +420,22 @@ UnknownError - If an unknown error occurs.              </li>
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Defines the error callback
- function errorCallback(response) {
-   console.log( 'The following error occurred: ' +  response.name);
- }
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Defines the error callback */
+function errorCallback(response)
+{
+&nbsp;&nbsp;&nbsp;console.log('The following error occurred: ' +  response.name);
+}
 
- // Defines the unregistration success callback
- function unregisterSuccessCallback() {
-   console.log("Unregistration succeeded.");
- }
+/* Defines the unregistration success callback */
+function unregisterSuccessCallback()
+{
+&nbsp;&nbsp;&nbsp;console.log("Unregistration succeeded.");
+}
 
- // Requests unregistration
- tizen.push.unregisterService(unregisterSuccessCallback, errorCallback);
- </pre>
+/* Requests unregistration */
+tizen.push.unregisterService(unregisterSuccessCallback, errorCallback);
+</pre>
 </div>
 </dd>
 <dt class="method" id="PushManager::unregister">
@@ -485,19 +494,22 @@ AbortError - If the operation cannot be finished properly.              </li>
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Defines the error callback
- function errorCallback(response) {
-   console.log("The following error occurred: " +  response.name);
- }
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Defines the error callback */
+function errorCallback(response)
+{
+&nbsp;&nbsp;&nbsp;console.log("The following error occurred: " +  response.name);
+}
 
- // Defines the unregistration success callback
- function unregisterSuccessCallback() {
-   console.log("Unregistration succeeded.");
- }
+/* Defines the unregistration success callback */
+function unregisterSuccessCallback()
+{
+&nbsp;&nbsp;&nbsp;console.log("Unregistration succeeded.");
+}
 
- // Requests unregistration
- tizen.push.unregister(unregisterSuccessCallback, errorCallback);
- </pre>
+/* Requests unregistration */
+tizen.push.unregister(unregisterSuccessCallback, errorCallback);
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre> Unregistration succeeded.
@@ -557,27 +569,31 @@ the <em>register()</em> method must be called before calling the <em>connectServ
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Defines the registration error callback.
- function errorCallback(response) {
-   console.log("The following error occurred: " +  response.name);
- }
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Defines the registration error callback */
+function errorCallback(response)
+{
+&nbsp;&nbsp;&nbsp;console.log("The following error occurred: " +  response.name);
+}
 
- // Defines the registration success callback
- function registerSuccessCallback(id) {
-   console.log("Registration succeeded with id: " + id);
- }
+/* Defines the registration success callback */
+function registerSuccessCallback(id)
+{
+&nbsp;&nbsp;&nbsp;console.log("Registration succeeded with id: " + id);
+}
 
- // Requests application registration.
- tizen.push.register(registerSuccessCallback, errorCallback);
+/* Requests application registration */
+tizen.push.register(registerSuccessCallback, errorCallback);
 
- // Defines the connect success callback
- function notificationCallback(noti) {
-   console.log("Notification received with alert message: " + noti.alertMessage);
- }
+/* Defines the connect success callback */
+function notificationCallback(noti)
+{
+&nbsp;&nbsp;&nbsp;console.log("Notification received with alert message: " + noti.alertMessage);
+}
 
- // Requests for push service connection
- tizen.push.connectService(notificationCallback);
- </pre>
+/* Requests for push service connection */
+tizen.push.connectService(notificationCallback);
+</pre>
 </div>
 </dd>
 <dt class="method" id="PushManager::disconnectService">
@@ -614,9 +630,10 @@ the <em>register()</em> method must be called before calling the <em>connectServ
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Requests disconnection
- tizen.push.disconnectService();
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Requests disconnection */
+tizen.push.disconnectService();
+</pre>
 </div>
 </dd>
 <dt class="method" id="PushManager::getRegistrationId">
@@ -657,11 +674,13 @@ the <em>register()</em> method must be called before calling the <em>connectServ
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var registrationId = tizen.push.getRegistrationId();
- if ( registrationId != null ) {
-   console.log("The registration id: " + registrationId);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var registrationId = tizen.push.getRegistrationId();
+if (registrationId != null)
+{
+&nbsp;&nbsp;&nbsp;console.log("The registration id: " + registrationId);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="PushManager::getUnreadNotifications">
@@ -715,16 +734,17 @@ Once a missed push notification is retrieved the server deletes it from its data
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Defines the connect success callback
- function notificationCallback(message) {
-     console.log("New push message : " + message.alertMessage + ", date : " + message.date + ", data : " + message.appData);
-   }
- }
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Defines the connect success callback */
+function notificationCallback(message)
+{
+&nbsp;&nbsp;&nbsp;console.log("New push message: " + message.alertMessage + ", date: " + message.date + ", data: " + message.appData);
+}
 
- // Requests for push service connection
- tizen.push.connectService(notificationCallback);
- tizen.push.getUnreadNotifications();
- </pre>
+/* Requests for push service connection */
+tizen.push.connectService(notificationCallback);
+tizen.push.getUnreadNotifications();
+</pre>
 </div>
 </dd>
 <dt class="method" id="PushManager::getPushMessage">
@@ -775,13 +795,17 @@ If the application was not launched by the push service, this method returns <em
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> try {
-   var message = tizen.push.getPushMessage();
-   console.log('Message received from: ' + message.sender);
- } catch (err) {
-   console.log('Exception - code: ' + err.name + ' message: ' + err.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+try
+{
+&nbsp;&nbsp;&nbsp;var message = tizen.push.getPushMessage();
+&nbsp;&nbsp;&nbsp;console.log('Message received from: ' + message.sender);
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log('Exception - code: ' + err.name + ' message: ' + err.message);
+}
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre> Message received from: xyz.AnotherApp
@@ -905,21 +929,23 @@ This data is the message that the sender wants to send and its length must be le
  3.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Defines the connect success callback
- function notificationCallback(noti) {
-   console.log('notification received on ' + noti.date + ' from: ' + noti.sender);
-   console.log('Details:');
-   console.log(' - data: ' + noti.appData);
-   console.log(' - alert message: ' + noti.alertMessage);
-   console.log(' - message: ' + noti.message);
-   console.log(' - session: ' + noti.sessionInfo);
-   console.log(' - request ID: ' + noti.requestId);
-   console.log(' - type: ' + noti.type);
- }
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Defines the connect success callback */
+function notificationCallback(noti)
+{
+&nbsp;&nbsp;&nbsp;console.log('notification received on ' + noti.date + ' from: ' + noti.sender);
+&nbsp;&nbsp;&nbsp;console.log('Details:');
+&nbsp;&nbsp;&nbsp;console.log(' - data: ' + noti.appData);
+&nbsp;&nbsp;&nbsp;console.log(' - alert message: ' + noti.alertMessage);
+&nbsp;&nbsp;&nbsp;console.log(' - message: ' + noti.message);
+&nbsp;&nbsp;&nbsp;console.log(' - session: ' + noti.sessionInfo);
+&nbsp;&nbsp;&nbsp;console.log(' - request ID: ' + noti.requestId);
+&nbsp;&nbsp;&nbsp;console.log(' - type: ' + noti.type);
+}
 
- // Requests for push service connection
- tizen.push.connectService(notificationCallback);
- </pre>
+/* Requests for push service connection */
+tizen.push.connectService(notificationCallback);
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre> Notification received on Thu Jan 01 2015 from: xyz.AnotherApp
index 3dfc434..57c4f2b 100644 (file)
@@ -225,22 +225,30 @@ The ErrorCallback is launched with these error types:
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> try {
-  function success(readers) {
-   for (var i = 0; i &lt; readers.length; i++) {
-    if (readers[i].isPresent) {
-     console.log ("Reader Name : " + readers[i].getName());
-    }
-   }
-  }
-  function error(err) {
-   console.log (err.name + ": " + err.message);
-  }
-  tizen.seService.getReaders(success, error);
- } catch (err) {
-  console.log (err.name + ": " + err.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+try
+{
+&nbsp;&nbsp;&nbsp;function success(readers)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; readers.length; i++)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (readers[i].isPresent)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Reader Name: " + readers[i].getName());
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;function error(err)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;tizen.seService.getReaders(success, error);
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="SEService::registerSEListener">
@@ -293,24 +301,32 @@ The ErrorCallback is launched with these error types:
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var listener = {
-   onSEReady: function(reader) {
-     console.log(reader.getName() + " is ready.");
-   },
-   onSENotReady: function(reader) {
-     console.log(reader.getName() + " is not ready.");
-   },
-   onSEError: function(reader, error) {
-     console.log(reader.getName() + ": error occurred: " + error.message);
-   }
- };
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var listener =
+{
+&nbsp;&nbsp;&nbsp;onSEReady: function(reader)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(reader.getName() + " is ready.");
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;onSENotReady: function(reader)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(reader.getName() + " is not ready.");
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;onSEError: function(reader, error)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(reader.getName() + ": error occurred: " + error.message);
+&nbsp;&nbsp;&nbsp;}
+};
 
- try {
-  var seListener = tizen.seService.registerSEListener(listener);
- } catch (err) {
-  console.log (err.name + ": " + err.message);
- }
- </pre>
+try
+{
+&nbsp;&nbsp;&nbsp;var seListener = tizen.seService.registerSEListener(listener);
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="SEService::unregisterSEListener">
@@ -356,13 +372,17 @@ The ErrorCallback is launched with these error types:
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var seListener; //seListener obtained from registerSEListener
- try {
-  tizen.seService.unregisterSEListener(seListener);
- } catch (err) {
-  console.log (err.name + ": " + err.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var seListener; /* seListener obtained from registerSEListener */
+try
+{
+&nbsp;&nbsp;&nbsp;tizen.seService.unregisterSEListener(seListener);
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="SEService::shutdown">
@@ -399,12 +419,16 @@ The ErrorCallback is launched with these error types:
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> try {
-  tizen.seService.shutdown();
- } catch (err) {
-  console.log (err.name + ": " + err.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+try
+{
+&nbsp;&nbsp;&nbsp;tizen.seService.shutdown();
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+}
+</pre>
 </div>
 </dd>
 </dl>
@@ -485,22 +509,30 @@ This interface offers methods to control sessions on the reader.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> try {
-  function success(readers) {
-   for (var i = 0; i &lt; readers.length; i++) {
-    if (readers[i].isPresent) {
-     console.log ("Reader Name : " + readers[i].getName());
-    }
-   }
-  }
-  function error(err) {
-   console.log (err.name + ": " + err.message);
-  }
-  tizen.seService.getReaders(success, error);
- } catch (err) {
-  console.log (err.name + ": " + err.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+try
+{
+&nbsp;&nbsp;&nbsp;function success(readers)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; readers.length; i++)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (readers[i].isPresent)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Reader Name: " + readers[i].getName());
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;function error(err)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;tizen.seService.getReaders(success, error);
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="Reader::openSession">
@@ -563,18 +595,24 @@ The ErrorCallback is launched with these error types:
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> try {
-  function success(session) {
-   console.log ("Open Session Success : " + !session.isClosed);
-  }
-  function error(err) {
-   console.log (err.name + ": " + err.message);
-  }
-  reader.openSession(success, error);
- } catch (err) {
-  console.log (err.name + ": " + err.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+try
+{
+&nbsp;&nbsp;&nbsp;function success(session) 
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Open Session Success: " + !session.isClosed);
+&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;function error(err)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;reader.openSession(success, error);
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="Reader::closeSessions">
@@ -611,12 +649,16 @@ The ErrorCallback is launched with these error types:
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> try {
-  reader.closeSessions();
- } catch (err) {
-  console.log (err.name + ": " + err.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+try
+{
+&nbsp;&nbsp;&nbsp;reader.closeSessions();
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+}
+</pre>
 </div>
 </dd>
 </dl>
@@ -736,31 +778,42 @@ is not compatible with the expected type for that parameter.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> try {
-  function successChannel(channel) {
-   if (channel.isBasicChannel) {
-    console.log ("Basic channel is opened.");
-   } else {
-    console.log ("Logical channel is opened.");
-   }
-  }
-  function errorChannel(err) {
-   console.log ("openBasicChannel Error :" + err.name +": " + err.message);
-  }
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+try
+{
+&nbsp;&nbsp;&nbsp;function successChannel(channel)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (channel.isBasicChannel)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Basic channel is opened.");
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;else
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Logical channel is opened.");
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;function errorChannel(err)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("openBasicChannel Error:" + err.name +": " + err.message);
+&nbsp;&nbsp;&nbsp;}
 
-  function successSession(session) {
-   console.log ("Open Session Success : " + !session.isClosed);
-   // This aid is for test. Use aid for your applet in secure element.
-   session.openBasicChannel([0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe], successChannel, errorChannel);
-  }
-  function errorSession(err) {
-   console.log ("openSession Error : " + err.name + ": " + err.message);
-  }
-  reader.openSession(successSession, errorSession);
- } catch (err) {
-  console.log (err.name + ": " + err.message);
- }
- </pre>
+&nbsp;&nbsp;&nbsp;function successSession(session)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Open Session Success: " + !session.isClosed);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* This aid is for test. Use aid for your applet in secure element */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;session.openBasicChannel([0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe], successChannel, errorChannel);
+&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;function errorSession(err)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("openSession Error: " + err.name + ": " + err.message);
+&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;reader.openSession(successSession, errorSession);
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="Session::openLogicalChannel">
@@ -840,25 +893,34 @@ The ErrorCallback is launched with these error types:
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var session; //Session obtained from openSession callback
- try {
-  function successChannel(channel) {
-   if (channel.isBasicChannel) {
-    console.log ("Basic channel is opened.");
-   } else {
-    console.log ("Logical channel is opened.");
-   }
-  }
-  function errorChannel(err) {
-   console.log ("openLogicalChannel Error :" + err.name + ": " + err.message);
-  }
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var session; /* Session obtained from openSession callback */
+try
+{
+&nbsp;&nbsp;&nbsp;function successChannel(channel)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (channel.isBasicChannel)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Basic channel is opened.");
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;else
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Logical channel is opened.");
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;function errorChannel(err)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("openLogicalChannel Error:" + err.name + ": " + err.message);
+&nbsp;&nbsp;&nbsp;}
 
-   // This aid is for test. Use aid for your applet in secure element.
-  session.openLogicalChannel([0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe], successChannel, errorChannel);
- } catch (err) {
-  console.log (err.name + ": " + err.message);
- }
- </pre>
+&nbsp;&nbsp;&nbsp;/* This aid is for test. Use aid for your applet in secure element */
+&nbsp;&nbsp;&nbsp;session.openLogicalChannel([0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe], successChannel, errorChannel);
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="Session::getATR">
@@ -899,13 +961,17 @@ The ErrorCallback is launched with these error types:
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var session; //Session obtained from openSession callback
- try {
-  var atr = session.getATR();
- } catch (err) {
-  console.log (err.name + ": " + err.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var session; /* Session obtained from openSession callback */
+try
+{
+&nbsp;&nbsp;&nbsp;var atr = session.getATR();
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="Session::close">
@@ -942,13 +1008,17 @@ The ErrorCallback is launched with these error types:
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var session; //Session obtained from openSession callback
- try {
-  session.close();
- } catch (err) {
-  console.log (err.name + ": " + err.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var session; /* Session obtained from openSession callback */
+try
+{
+&nbsp;&nbsp;&nbsp;session.close();
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="Session::closeChannels">
@@ -985,13 +1055,17 @@ The ErrorCallback is launched with these error types:
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var session; //Session obtained from openSession callback
- try {
-  session.closeChannels();
- } catch (err) {
-  console.log (err.name + ": " + err.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var session; /* Session obtained from openSession callback */
+try
+{
+&nbsp;&nbsp;&nbsp;session.closeChannels();
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+}
+</pre>
 </div>
 </dd>
 </dl>
@@ -1065,13 +1139,17 @@ The channel is defined in the ISO7816-4.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var channel; //Obtained from openLogicalChannel or openBasicChannel
- try {
-  channel.close();
- } catch (err) {
-  console.log (err.name + ": " + err.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var channel; /* Obtained from openLogicalChannel or openBasicChannel */
+try
+{
+&nbsp;&nbsp;&nbsp;channel.close();
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="Channel::transmit">
index 0eb43b9..27f3eec 100644 (file)
@@ -421,16 +421,20 @@ The supported sensor types are hardware-dependent. <br><br>To check if the given
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var proximityCapability = tizen.systeminfo.getCapability("http://tizen.org/feature/sensor.proximity");
-
- if (proximityCapability === true) {
-     // the device supports proximity sensor and you can get proximity sensor's data
-     var proximitySensor = tizen.sensorservice.getDefaultSensor("PROXIMITY");
- } else {
-     // If tizen.sensorservice.getDefaultSensor("PROXIMITY") is used, NotSupportedError would be thrown.
-     console.log("Proximity sensor is not supported on this device.");
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var proximityCapability = tizen.systeminfo.getCapability("http://tizen.org/feature/sensor.proximity");
+
+if (proximityCapability === true)
+{
+&nbsp;&nbsp;&nbsp;/* Device supports proximity sensor and you can get proximity sensor's data */
+&nbsp;&nbsp;&nbsp;var proximitySensor = tizen.sensorservice.getDefaultSensor("PROXIMITY");
+}
+else
+{
+&nbsp;&nbsp;&nbsp;/* If tizen.sensorservice.getDefaultSensor("PROXIMITY") is used, NotSupportedError is thrown */
+&nbsp;&nbsp;&nbsp;console.log("Proximity sensor is not supported on this device.");
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="SensorService::getAvailableSensors">
@@ -458,10 +462,11 @@ The supported sensor types are hardware-dependent. <br><br>To check if the given
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var sensorCapabilities = tizen.sensorservice.getAvailableSensors();
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var sensorCapabilities = tizen.sensorservice.getAvailableSensors();
 
- console.log("capable sensor : " + sensorCapabilities[0]);
- </pre>
+console.log("capable sensor: " + sensorCapabilities[0]);
+</pre>
 </div>
 </dd>
 </dl>
@@ -546,14 +551,16 @@ The supported sensor types are hardware-dependent. <br><br>To check if the given
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var proximitySensor = tizen.sensorservice.getDefaultSensor("PROXIMITY");
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var proximitySensor = tizen.sensorservice.getDefaultSensor("PROXIMITY");
 
- function onsuccessCB() {
-     console.log("The proximity sensor started successfully.");
- }
+function onsuccessCB()
+{
+&nbsp;&nbsp;&nbsp;console.log("The proximity sensor started successfully.");
+}
 
- proximitySensor.start(onsuccessCB);
- </pre>
+proximitySensor.start(onsuccessCB);
+</pre>
 </div>
 </dd>
 <dt class="method" id="Sensor::stop">
@@ -577,15 +584,17 @@ The supported sensor types are hardware-dependent. <br><br>To check if the given
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var proximitySensor = tizen.sensorservice.getDefaultSensor("PROXIMITY");
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var proximitySensor = tizen.sensorservice.getDefaultSensor("PROXIMITY");
 
- function onsuccessCB() {
-     console.log("proximity sensor start");
-     proximitySensor.stop();
- }
+function onsuccessCB()
+{
+&nbsp;&nbsp;&nbsp;console.log("proximity sensor start");
+&nbsp;&nbsp;&nbsp;proximitySensor.stop();
+}
 
- proximitySensor.start(onsuccessCB);
- </pre>
+proximitySensor.start(onsuccessCB);
+</pre>
 </div>
 </dd>
 <dt class="method" id="Sensor::setChangeListener">
@@ -649,21 +658,24 @@ The start() method must be called to turn on the sensor, or the sensor data will
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var lightSensor = tizen.sensorservice.getDefaultSensor("LIGHT");
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var lightSensor = tizen.sensorservice.getDefaultSensor("LIGHT");
 
- function onsuccessCB() {
+function onsuccessCB()
+{
      console.log("light sensor start");
- }
+}
 
- function onchangedCB(sensorData) {
+function onchangedCB(sensorData)
+{
      console.log("light level: " + sensorData.lightLevel);
- }
+}
 
- // interval and batchLatency can be ommitted.
- lightSensor.setChangeListener(onchangedCB, 200, 2000);
+/* interval and batchLatency can be omitted */
+lightSensor.setChangeListener(onchangedCB, 200, 2000);
 
- lightSensor.start(onsuccessCB);
- </pre>
+lightSensor.start(onsuccessCB);
+</pre>
 </div>
 </dd>
 <dt class="method" id="Sensor::unsetChangeListener">
@@ -687,16 +699,18 @@ The start() method must be called to turn on the sensor, or the sensor data will
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var proximitySensor = tizen.sensorservice.getDefaultSensor("PROXIMITY");
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var proximitySensor = tizen.sensorservice.getDefaultSensor("PROXIMITY");
 
- function onchangedCB(sensorData) {
-     console.log("proximity distance : " + sensorData.proximityState);
- }
+function onchangedCB(sensorData)
+{
+&nbsp;&nbsp;&nbsp;console.log("proximity distance: " + sensorData.proximityState);
+}
 
- proximitySensor.setChangeListener(onchangedCB);
+proximitySensor.setChangeListener(onchangedCB);
 
- proximitySensor.unsetChangeListener();
- </pre>
+proximitySensor.unsetChangeListener();
+</pre>
 </div>
 </dd>
 <dt class="method" id="Sensor::getSensorHardwareInfo">
@@ -744,20 +758,22 @@ IOError - If the platform fails to internally prepare a socket for IPC communica
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var gravitySensor = tizen.sensorservice.getDefaultSensor("GRAVITY");
- gravitySensor.getSensorHardwareInfo(onsuccessCB);
-
- function onsuccessCB(hardwareInfo){
-     console.log("name: " + hardwareInfo.name);
-     console.log("type: " + hardwareInfo.type);
-     console.log("vendor: " + hardwareInfo.vendor);
-     console.log("minValue: " + hardwareInfo.minValue);
-     console.log("maxValue: " + hardwareInfo.maxValue);
-     console.log("resolution: " + hardwareInfo.resolution);
-     console.log("minInterval: " + hardwareInfo.minInterval);
-     console.log("maxBatchCount: " + hardwareInfo.maxBatchCount);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var gravitySensor = tizen.sensorservice.getDefaultSensor("GRAVITY");
+gravitySensor.getSensorHardwareInfo(onsuccessCB);
+
+function onsuccessCB(hardwareInfo)
+{
+&nbsp;&nbsp;&nbsp;console.log("name: " + hardwareInfo.name);
+&nbsp;&nbsp;&nbsp;console.log("type: " + hardwareInfo.type);
+&nbsp;&nbsp;&nbsp;console.log("vendor: " + hardwareInfo.vendor);
+&nbsp;&nbsp;&nbsp;console.log("minValue: " + hardwareInfo.minValue);
+&nbsp;&nbsp;&nbsp;console.log("maxValue: " + hardwareInfo.maxValue);
+&nbsp;&nbsp;&nbsp;console.log("resolution: " + hardwareInfo.resolution);
+&nbsp;&nbsp;&nbsp;console.log("minInterval: " + hardwareInfo.minInterval);
+&nbsp;&nbsp;&nbsp;console.log("maxBatchCount: " + hardwareInfo.maxBatchCount);
+}
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>  name: Gravity Sensor
@@ -840,24 +856,27 @@ The <em>ErrorCallback</em> method is launched with these error types:
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var lightSensor = tizen.sensorservice.getDefaultSensor("LIGHT");
-
- function onGetSuccessCB(sensorData) {
-     console.log("light level : " + sensorData.lightLevel);
- }
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var lightSensor = tizen.sensorservice.getDefaultSensor("LIGHT");
 
- function onerrorCB(error) {
-     console.log("error occurs");
- }
+function onGetSuccessCB(sensorData)
+{
+&nbsp;&nbsp;&nbsp;console.log("light level: " + sensorData.lightLevel);
+}
 
- function onsuccessCB() {
-     console.log("sensor start");
-     lightSensor.getLightSensorData(onGetSuccessCB, onerrorCB);
- }
+function onerrorCB(error)
+{
+&nbsp;&nbsp;&nbsp;console.log("error occurred");
+}
 
- lightSensor.start(onsuccessCB);
+function onsuccessCB()
+{
+&nbsp;&nbsp;&nbsp;console.log("sensor start");
+&nbsp;&nbsp;&nbsp;lightSensor.getLightSensorData(onGetSuccessCB, onerrorCB);
+}
 
- </pre>
+lightSensor.start(onsuccessCB);
+</pre>
 </div>
 </dd>
 </dl>
@@ -929,26 +948,29 @@ The <em>ErrorCallback</em> method is launched with these error types:
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var magneticSensor = tizen.sensorservice.getDefaultSensor("MAGNETIC");
-
- function onGetSuccessCB(sensorData) {
-     console.log("magnetic field of the X axis : " + sensorData.x);
-     console.log("magnetic field of the Y axis : " + sensorData.y);
-     console.log("magnetic field of the Z axis : " + sensorData.z);
- }
-
- function onerrorCB(error) {
-     console.log("error occurs");
- }
-
- function onsuccessCB() {
-     console.log("sensor start");
-     magneticSensor.getMagneticSensorData(onGetSuccessCB, onerrorCB);
- }
-
- magneticSensor.start(onsuccessCB);
-
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var magneticSensor = tizen.sensorservice.getDefaultSensor("MAGNETIC");
+
+function onGetSuccessCB(sensorData)
+{
+&nbsp;&nbsp;&nbsp;console.log("magnetic field of the X axis: " + sensorData.x);
+&nbsp;&nbsp;&nbsp;console.log("magnetic field of the Y axis: " + sensorData.y);
+&nbsp;&nbsp;&nbsp;console.log("magnetic field of the Z axis: " + sensorData.z);
+}
+
+function onerrorCB(error)
+{
+&nbsp;&nbsp;&nbsp;console.log("error occurred");
+}
+
+function onsuccessCB()
+{
+&nbsp;&nbsp;&nbsp;console.log("sensor start");
+&nbsp;&nbsp;&nbsp;magneticSensor.getMagneticSensorData(onGetSuccessCB, onerrorCB);
+}
+
+magneticSensor.start(onsuccessCB);
+</pre>
 </div>
 </dd>
 </dl>
@@ -1020,24 +1042,27 @@ The <em>ErrorCallback</em> method is launched with these error types:
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var pressureSensor = tizen.sensorservice.getDefaultSensor("PRESSURE");
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var pressureSensor = tizen.sensorservice.getDefaultSensor("PRESSURE");
 
- function onGetSuccessCB(sensorData) {
-     console.log("pressure : " + sensorData.pressure);
- }
+function onGetSuccessCB(sensorData)
+{
+&nbsp;&nbsp;&nbsp;console.log("pressure: " + sensorData.pressure);
+}
 
- function onerrorCB(error) {
-     console.log("error occurs");
- }
+function onerrorCB(error)
+{
+&nbsp;&nbsp;&nbsp;console.log("error occurred");
+}
 
- function onsuccessCB() {
-     console.log("sensor start");
-     pressureSensor.getPressureSensorData(onGetSuccessCB, onerrorCB);
- }
+function onsuccessCB()
+{
+&nbsp;&nbsp;&nbsp;console.log("sensor start");
+&nbsp;&nbsp;&nbsp;pressureSensor.getPressureSensorData(onGetSuccessCB, onerrorCB);
+}
 
- pressureSensor.start(onsuccessCB);
-
- </pre>
+pressureSensor.start(onsuccessCB);
+</pre>
 </div>
 </dd>
 </dl>
@@ -1109,24 +1134,27 @@ The <em>ErrorCallback</em> method is launched with these error types:
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var proximitySensor = tizen.sensorservice.getDefaultSensor("PROXIMITY");
-
- function onGetSuccessCB(sensorData) {
-     console.log("proximity state : " + sensorData.proximityState);
- }
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var proximitySensor = tizen.sensorservice.getDefaultSensor("PROXIMITY");
 
- function onerrorCB(error) {
-     console.log("error occurs");
- }
+function onGetSuccessCB(sensorData)
+{
+&nbsp;&nbsp;&nbsp;console.log("proximity state: " + sensorData.proximityState);
+}
 
- function onsuccessCB() {
-     console.log("proximity sensor start");
-     proximitySensor.getProximitySensorData(onGetSuccessCB, onerrorCB);
- }
+function onerrorCB(error)
+{
+&nbsp;&nbsp;&nbsp;console.log("error occurred");
+}
 
- proximitySensor.start(onsuccessCB);
+function onsuccessCB()
+{
+&nbsp;&nbsp;&nbsp;console.log("proximity sensor start");
+&nbsp;&nbsp;&nbsp;proximitySensor.getProximitySensorData(onGetSuccessCB, onerrorCB);
+}
 
- </pre>
+proximitySensor.start(onsuccessCB);
+</pre>
 </div>
 </dd>
 </dl>
@@ -1198,24 +1226,27 @@ The <em>ErrorCallback</em> method is launched with these error types:
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var ultravioletSensor = tizen.sensorservice.getDefaultSensor("ULTRAVIOLET");
-
- function onGetSuccessCB(sensorData) {
-     console.log("ultraviolet level : " + sensorData.ultravioletLevel);
- }
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var ultravioletSensor = tizen.sensorservice.getDefaultSensor("ULTRAVIOLET");
 
- function onerrorCB(error) {
-     console.log("error occurs");
- }
+function onGetSuccessCB(sensorData)
+{
+&nbsp;&nbsp;&nbsp;console.log("ultraviolet level: " + sensorData.ultravioletLevel);
+}
 
- function onsuccessCB() {
-     console.log("ultraviolet sensor start");
-     ultravioletSensor.getUltravioletSensorData(onGetSuccessCB, onerrorCB);
- }
+function onerrorCB(error)
+{
+&nbsp;&nbsp;&nbsp;console.log("error occurred");
+}
 
- ultravioletSensor.start(onsuccessCB);
+function onsuccessCB()
+{
+&nbsp;&nbsp;&nbsp;console.log("ultraviolet sensor start");
+&nbsp;&nbsp;&nbsp;ultravioletSensor.getUltravioletSensorData(onGetSuccessCB, onerrorCB);
+}
 
- </pre>
+ultravioletSensor.start(onsuccessCB);
+</pre>
 </div>
 </dd>
 </dl>
@@ -1303,24 +1334,27 @@ The <em>ErrorCallback</em> method is launched with these error types:
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var HRMrawsensor = tizen.sensorservice.getDefaultSensor("HRM_RAW");
-
- function onGetSuccessCB(sensorData) {
-     console.log("HRMRaw light intensity : " + sensorData.lightIntensity);
- }
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var HRMrawsensor = tizen.sensorservice.getDefaultSensor("HRM_RAW");
 
- function onerrorCB(error) {
-     console.log("error occurs");
- }
+function onGetSuccessCB(sensorData)
+{
+&nbsp;&nbsp;&nbsp;console.log("HRMRaw light intensity: " + sensorData.lightIntensity);
+}
 
- function onsuccessCB() {
-     console.log("HRMRaw sensor start");
-     HRMrawsensor.getHRMRawSensorData(onGetSuccessCB, onerrorCB);
- }
+function onerrorCB(error)
+{
+&nbsp;&nbsp;&nbsp;console.log("error occurred");
+}
 
- HRMrawsensor.start(onsuccessCB);
+function onsuccessCB()
+{
+&nbsp;&nbsp;&nbsp;console.log("HRMRaw sensor start");
+&nbsp;&nbsp;&nbsp;HRMrawsensor.getHRMRawSensorData(onGetSuccessCB, onerrorCB);
+}
 
- </pre>
+HRMrawsensor.start(onsuccessCB);
+</pre>
 </div>
 </dd>
 </dl>
@@ -1392,26 +1426,30 @@ The <em>ErrorCallback</em> method is launched with these error types:
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var gravitySensor = tizen.sensorservice.getDefaultSensor("GRAVITY");
-
- function onGetSuccessCB(sensorData) {
-     console.log("######## Get the gravity sensor data ########");
-     console.log("x: " + sensorData.x);
-     console.log("y: " + sensorData.y);
-     console.log("z: " + sensorData.z);
- }
-
- function onerrorCB(error) {
-     console.log("error occurs");
- }
-
- function onsuccessCB() {
-     console.log("sensor start");
-     gravitySensor.getGravitySensorData(onGetSuccessCB, onerrorCB);
- }
-
- gravitySensor.start(onsuccessCB);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var gravitySensor = tizen.sensorservice.getDefaultSensor("GRAVITY");
+
+function onGetSuccessCB(sensorData)
+{
+&nbsp;&nbsp;&nbsp;console.log("######## Get the gravity sensor data ########");
+&nbsp;&nbsp;&nbsp;console.log("x: " + sensorData.x);
+&nbsp;&nbsp;&nbsp;console.log("y: " + sensorData.y);
+&nbsp;&nbsp;&nbsp;console.log("z: " + sensorData.z);
+}
+
+function onerrorCB(error)
+{
+&nbsp;&nbsp;&nbsp;console.log("error occurred");
+}
+
+function onsuccessCB()
+{
+&nbsp;&nbsp;&nbsp;console.log("sensor start");
+&nbsp;&nbsp;&nbsp;gravitySensor.getGravitySensorData(onGetSuccessCB, onerrorCB);
+}
+
+gravitySensor.start(onsuccessCB);
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre> sensor start
@@ -1491,26 +1529,30 @@ The <em>ErrorCallback</em> method is launched with these error types:
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var gyroscopeSensor = tizen.sensorservice.getDefaultSensor("GYROSCOPE");
-
- function onGetSuccessCB(sensorData) {
-     console.log("######## Get the gyroscope sensor date ########");
-     console.log("x: " + sensorData.x);
-     console.log("y: " + sensorData.y);
-     console.log("z: " + sensorData.z);
- }
-
- function onerrorCB(error) {
-     console.log("error occurs");
- }
-
- function onsuccessCB() {
-     console.log("sensor start");
-     gyroscopeSensor.getGyroscopeSensorData(onGetSuccessCB, onerrorCB);
- }
-
- gyroscopeSensor.start(onsuccessCB);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var gyroscopeSensor = tizen.sensorservice.getDefaultSensor("GYROSCOPE");
+
+function onGetSuccessCB(sensorData)
+{
+&nbsp;&nbsp;&nbsp;console.log("######## Get the gyroscope sensor date ########");
+&nbsp;&nbsp;&nbsp;console.log("x: " + sensorData.x);
+&nbsp;&nbsp;&nbsp;console.log("y: " + sensorData.y);
+&nbsp;&nbsp;&nbsp;console.log("z: " + sensorData.z);
+}
+
+function onerrorCB(error)
+{
+&nbsp;&nbsp;&nbsp;console.log("error occurred");
+}
+
+function onsuccessCB()
+{
+&nbsp;&nbsp;&nbsp;console.log("sensor start");
+&nbsp;&nbsp;&nbsp;gyroscopeSensor.getGyroscopeSensorData(onGetSuccessCB, onerrorCB);
+}
+
+gyroscopeSensor.start(onsuccessCB);
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre> sensor start
@@ -1590,27 +1632,31 @@ The <em>ErrorCallback</em> method is launched with these error types:
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var gyroscopeRotationVectorSensor = tizen.sensorservice.getDefaultSensor("GYROSCOPE_ROTATION_VECTOR");
-
- function onGetSuccessCB(sensorData) {
-     console.log("######## Get the gyroscope rotation vector sensor data ########");
-     console.log("x: " + sensorData.x);
-     console.log("y: " + sensorData.y);
-     console.log("z: " + sensorData.z);
-     console.log("w: " + sensorData.w);
- }
-
- function onerrorCB(error) {
-     console.log("error occurs");
- }
-
- function onsuccessCB() {
-     console.log("sensor start");
-     gyroscopeRotationVectorSensor.getGyroscopeRotationVectorSensorData(onGetSuccessCB, onerrorCB);
- }
-
- gyroscopeRotationVectorSensor.start(onsuccessCB);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var gyroscopeRotationVectorSensor = tizen.sensorservice.getDefaultSensor("GYROSCOPE_ROTATION_VECTOR");
+
+function onGetSuccessCB(sensorData)
+{
+&nbsp;&nbsp;&nbsp;console.log("######## Get the gyroscope rotation vector sensor data ########");
+&nbsp;&nbsp;&nbsp;console.log("x: " + sensorData.x);
+&nbsp;&nbsp;&nbsp;console.log("y: " + sensorData.y);
+&nbsp;&nbsp;&nbsp;console.log("z: " + sensorData.z);
+&nbsp;&nbsp;&nbsp;console.log("w: " + sensorData.w);
+}
+
+function onerrorCB(error)
+{
+&nbsp;&nbsp;&nbsp;console.log("error occurred");
+}
+
+function onsuccessCB()
+{
+&nbsp;&nbsp;&nbsp;console.log("sensor start");
+&nbsp;&nbsp;&nbsp;gyroscopeRotationVectorSensor.getGyroscopeRotationVectorSensorData(onGetSuccessCB, onerrorCB);
+}
+
+gyroscopeRotationVectorSensor.start(onsuccessCB);
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre> sensor start
@@ -1691,26 +1737,30 @@ The <em>ErrorCallback</em> method is launched with these error types:
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var linearAccelerationSensor = tizen.sensorservice.getDefaultSensor("LINEAR_ACCELERATION");
-
- function onGetSuccessCB(sensorData) {
-     console.log("######## Get the linear acceleration sensor data ########");
-     console.log("x: " + sensorData.x);
-     console.log("y: " + sensorData.y);
-     console.log("z: " + sensorData.z);
- }
-
- function onerrorCB(error) {
-     console.log("error occured");
- }
-
- function onsuccessCB() {
-     console.log("linear acceleration sensor start");
-     linearAccelerationSensor.getLinearAccelerationSensorData(onGetSuccessCB, onerrorCB);
- }
-
- linearAccelerationSensor.start(onsuccessCB);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var linearAccelerationSensor = tizen.sensorservice.getDefaultSensor("LINEAR_ACCELERATION");
+
+function onGetSuccessCB(sensorData)
+{
+&nbsp;&nbsp;&nbsp;console.log("######## Get the linear acceleration sensor data ########");
+&nbsp;&nbsp;&nbsp;console.log("x: " + sensorData.x);
+&nbsp;&nbsp;&nbsp;console.log("y: " + sensorData.y);
+&nbsp;&nbsp;&nbsp;console.log("z: " + sensorData.z);
+}
+
+function onerrorCB(error)
+{
+&nbsp;&nbsp;&nbsp;console.log("error occurred");
+}
+
+function onsuccessCB()
+{
+&nbsp;&nbsp;&nbsp;console.log("linear acceleration sensor start");
+&nbsp;&nbsp;&nbsp;linearAccelerationSensor.getLinearAccelerationSensorData(onGetSuccessCB, onerrorCB);
+}
+
+linearAccelerationSensor.start(onsuccessCB);
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre> linear acceleration sensor start
index c2fc956..594fc9c 100644 (file)
@@ -551,12 +551,14 @@ There is a tizen.sound object that allows accessing the functionality of the Sou
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var infoArr = tizen.sound.getConnectedDeviceList();
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var infoArr = tizen.sound.getConnectedDeviceList();
 
- for (var i = 0; i &lt; infoArr.length; i++) {
-     console.log( infoArr[i].device );
- }
- </pre>
+for (var i = 0; i &lt; infoArr.length; i++)
+{
+&nbsp;&nbsp;&nbsp;console.log(infoArr[i].device);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="SoundManager::getActivatedDeviceList">
@@ -584,12 +586,14 @@ There is a tizen.sound object that allows accessing the functionality of the Sou
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var infoArr = tizen.sound.getActivatedDeviceList();
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var infoArr = tizen.sound.getActivatedDeviceList();
 
- for (var i = 0; i &lt; infoArr.length; i++) {
-     console.log( infoArr[i].device );
- }
- </pre>
+for (var i = 0; i &lt; infoArr.length; i++)
+{
+&nbsp;&nbsp;&nbsp;console.log(infoArr[i].device);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="SoundManager::addDeviceStateChangeListener">
@@ -642,28 +646,36 @@ Activation: When a device chages from being activated to being deactivated or fr
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // A callback
- var onChanged = function(info) {
-     // Some code to execute when a sound device state is changed
-     if (info.isConnected) {
-         // Some code to execute if the device is connected.
-         console.log( info.device + " is connected" );
-     } else {
-         // Some code to execute if the device is not connected.
-         console.log( info.device + " is not connected" );
-     }
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Callback */
+var onChanged = function(info)
+{
+&nbsp;&nbsp;&nbsp;/* Some code to execute when a sound device state is changed */
+&nbsp;&nbsp;&nbsp;if (info.isConnected)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Some code to execute if the device is connected */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(info.device + " is connected");
+&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;else
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Some code to execute if the device is not connected */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(info.device + " is not connected");
+&nbsp;&nbsp;&nbsp;}
 
-     if (info.isActivated) {
-         // Some code to execute if the device is activated.
-         console.log( info.device + " is activated" );
-     } else {
-         // Some code to execute if the device is not activated.
-         console.log( info.device + " is not activated" );
-     }
- }
+&nbsp;&nbsp;&nbsp;if (info.isActivated)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Some code to execute if the device is activated */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(info.device + " is activated");
+&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;else
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Some code to execute if the device is not activated */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(info.device + " is not activated");
+&nbsp;&nbsp;&nbsp;}
+}
 
- var id = tizen.sound.addDeviceStateChangeListener(onChanged);
- </pre>
+var id = tizen.sound.addDeviceStateChangeListener(onChanged);
+</pre>
 </div>
 </dd>
 <dt class="method" id="SoundManager::removeDeviceStateChangeListener">
@@ -696,9 +708,10 @@ Activation: When a device chages from being activated to being deactivated or fr
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // If a listener to be called was registered previously.
- tizen.sound.removeDeviceStateChangeListener(id);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* If a listener to be called was registered previously */
+tizen.sound.removeDeviceStateChangeListener(id);
+</pre>
 </div>
 </dd>
 </dl>
index fd2f1a4..158febc 100644 (file)
@@ -509,9 +509,10 @@ and for subscribing notifications of system information changes.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // To get total amount of system memory
- console.log("The total memory size is " + tizen.systeminfo.getTotalMemory() + " bytes.");
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* To get total amount of system memory */
+console.log("The total memory size is " + tizen.systeminfo.getTotalMemory() + " bytes.");
+</pre>
 </div>
 </dd>
 <dt class="method" id="SystemInfo::getAvailableMemory">
@@ -535,9 +536,10 @@ and for subscribing notifications of system information changes.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // To get total amount of system memory
- console.log("The available memory size is " + tizen.systeminfo.getAvailableMemory() + " bytes.");
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* To get total amount of system memory */
+console.log("The available memory size is " + tizen.systeminfo.getAvailableMemory() + " bytes.");
+</pre>
 </div>
 </dd>
 <dt class="method" id="SystemInfo::getCapabilities">
@@ -569,12 +571,14 @@ The function must synchronously acquire the capabilities of the device.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var deviceCapabilities;
- deviceCapabilities = tizen.systeminfo.getCapabilities();
- if (deviceCapabilities.bluetooth) {
-     console.log("Bluetooth is supported");
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var deviceCapabilities;
+deviceCapabilities = tizen.systeminfo.getCapabilities();
+if (deviceCapabilities.bluetooth)
+{
+&nbsp;&nbsp;&nbsp;console.log("Bluetooth is supported");
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="SystemInfo::getCapability">
@@ -617,14 +621,18 @@ The additional keys for the custom device capability are specified by OEM's and
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> try {
-     // Checks if a device supports bluetooth API or not
-     var bluetooth = tizen.systeminfo.getCapability("http://tizen.org/feature/network.bluetooth");
-     console.log(" Bluetooth = " + bluetooth);
- } catch (error) {
-     console.log("Error name: " + error.name + ", message: " + error.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+try
+{
+&nbsp;&nbsp;&nbsp;/* Checks if a device supports bluetooth API */
+&nbsp;&nbsp;&nbsp;var bluetooth = tizen.systeminfo.getCapability("http://tizen.org/feature/network.bluetooth");
+&nbsp;&nbsp;&nbsp;console.log(" Bluetooth = " + bluetooth);
+}
+catch (error)
+{
+&nbsp;&nbsp;&nbsp;console.log("Error name: " + error.name + ", message: " + error.message);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="SystemInfo::getCount">
@@ -666,13 +674,17 @@ That is the length of array retrieved by the getPropertyValueArray() method for
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var count = tizen.systeminfo.getCount("SIM");
- if (count === 0) {
-     console.log("There is no available SIM card.");
- } else {
-     console.log("There is(are) " + count + " SIM card(s) available.");
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var count = tizen.systeminfo.getCount("SIM");
+if (count === 0)
+{
+&nbsp;&nbsp;&nbsp;console.log("There is no available SIM card.");
+}
+else
+{
+&nbsp;&nbsp;&nbsp;console.log("There is(are) " + count + " SIM card(s) available.");
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="SystemInfo::getPropertyValue">
@@ -751,36 +763,45 @@ NotSupportedError - If the given <var>property</var> is not supported. (since Ti
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function onSuccessCallback(cpu) {
-     console.log("The cpu load is " + cpu.load);
- }
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function onSuccessCallback(cpu)
+{
+&nbsp;&nbsp;&nbsp;console.log("The cpu load is " + cpu.load);
+}
 
- function onErrorCallback(error) {
-     console.log("An error occurred " + error.message);
- }
+function onErrorCallback(error)
+{
+&nbsp;&nbsp;&nbsp;console.log("An error occurred " + error.message);
+}
 
- tizen.systeminfo.getPropertyValue("CPU", onSuccessCallback, onErrorCallback);
- </pre>
+tizen.systeminfo.getPropertyValue("CPU", onSuccessCallback, onErrorCallback);
+</pre>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function onSuccessCallback(cellular) {
-     console.log("The status of the cellular network is " + cellular.status);
- }
-
- function onErrorCallback(error) {
-     console.log("An error occurred " + error.message);
-     // if telephony_capability is false but getPropertyValue("CELLULAR_NETWORK, ..) is called, NotSupportedError would be passed.
- }
-
- var telephony_capability = tizen.systeminfo.getCapability("http://tizen.org/feature/network.telephony");
-
- if (telephony_capability === true) {
-     // onSuccessCallback will be invoked.
-     tizen.systeminfo.getPropertyValue("CELLULAR_NETWORK", onSuccessCallback, onErrorCallback);
- } else {
-     console.log("Telephony feature is not supported. Cellular network related information cannot be retrieved.");
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function onSuccessCallback(cellular)
+{
+&nbsp;&nbsp;&nbsp;console.log("The status of the cellular network is " + cellular.status);
+}
+
+function onErrorCallback(error)
+{
+&nbsp;&nbsp;&nbsp;console.log("An error occurred " + error.message);
+&nbsp;&nbsp;&nbsp;/* If telephony_capability is false but getPropertyValue("CELLULAR_NETWORK, ..) is called, NotSupportedError is passed */
+}
+
+var telephony_capability = tizen.systeminfo.getCapability("http://tizen.org/feature/network.telephony");
+
+if (telephony_capability === true)
+{
+&nbsp;&nbsp;&nbsp;/* onSuccessCallback will be invoked */
+&nbsp;&nbsp;&nbsp;tizen.systeminfo.getPropertyValue("CELLULAR_NETWORK", onSuccessCallback, onErrorCallback);
+}
+else
+{
+&nbsp;&nbsp;&nbsp;console.log("Telephony feature is not supported. Cellular network related information cannot be retrieved.");
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="SystemInfo::getPropertyValueArray">
@@ -855,26 +876,35 @@ NotSupportedError - If the given <var>property</var> is not supported.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function successCB(property) {
-     console.log("The SIM's current state is " + property.state);
- }
-
- function successArrayCB(properties) {
-     console.log("The number of the returned system properties is " + properties.length);
-     for (var i = 0; i &lt; properties.length; i++) {
-         console.log("[" + i + "] SIM's state is " + properties[i].state);
-     }
- }
-
- var count = tizen.systeminfo.getCount("SIM");
- if (count === 0) {
-     console.log("This device does not provide SIM card.");
- } else if (count &gt; 1) {
-     tizen.systeminfo.getPropertyValueArray("SIM", successArrayCB);
- } else {
-     tizen.systeminfo.getPropertyValue("SIM", successCB);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function successCB(property)
+{
+&nbsp;&nbsp;&nbsp;console.log("The SIM's current state is " + property.state);
+}
+
+function successArrayCB(properties)
+{
+&nbsp;&nbsp;&nbsp;console.log("The number of the returned system properties is " + properties.length);
+&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; properties.length; i++)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("[" + i + "] SIM's state is " + properties[i].state);
+&nbsp;&nbsp;&nbsp;}
+}
+
+var count = tizen.systeminfo.getCount("SIM");
+if (count === 0)
+{
+&nbsp;&nbsp;&nbsp;console.log("This device does not provide SIM card.");
+}
+else if (count &gt; 1)
+{
+&nbsp;&nbsp;&nbsp;tizen.systeminfo.getPropertyValueArray("SIM", successArrayCB);
+}
+else
+{
+&nbsp;&nbsp;&nbsp;tizen.systeminfo.getPropertyValue("SIM", successCB);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="SystemInfo::addPropertyValueChangeListener">
@@ -978,12 +1008,14 @@ NotSupportedError - If the given <var>property</var> is not supported. (since Ti
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function onSuccessCallback(cpu) {
-     console.log("The cpu load : " + cpu.load);
- }
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function onSuccessCallback(cpu)
+{
+&nbsp;&nbsp;&nbsp;console.log("The cpu load: " + cpu.load);
+}
 
- tizen.systeminfo.addPropertyValueChangeListener("CPU", onSuccessCallback, {lowThreshold : 0.2});
- </pre>
+tizen.systeminfo.addPropertyValueChangeListener("CPU", onSuccessCallback, {lowThreshold: 0.2});
+</pre>
 </div>
 </dd>
 <dt class="method" id="SystemInfo::addPropertyValueArrayChangeListener">
@@ -1116,16 +1148,20 @@ parameters contain an invalid value.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var id = null;
- function onSuccessCallback(cpu) {
-    console.log("New value for CPU load is " + cpu.load);
-    if (id != null) { // After receiving the first notification, we clear it
-        tizen.systeminfo.removePropertyValueChangeListener(id);
-    }
- }
-
- id = tizen.systeminfo.addPropertyValueChangeListener("CPU", onSuccessCallback);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var id = null;
+function onSuccessCallback(cpu)
+{
+&nbsp;&nbsp;&nbsp;console.log("New value for CPU load is " + cpu.load);
+&nbsp;&nbsp;&nbsp;if (id != null)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* After receiving the first notification, clear it */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tizen.systeminfo.removePropertyValueChangeListener(id);
+&nbsp;&nbsp;&nbsp;}
+}
+
+id = tizen.systeminfo.addPropertyValueChangeListener("CPU", onSuccessCallback);
+</pre>
 </div>
 </dd>
 </dl>
@@ -3390,15 +3426,15 @@ Since: </span>
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> tizen.systeminfo.getPropertyValue("CAMERA_FLASH",
-    function (flash) {
-        console.log("Flash brightness is set to: " + (flash.brightness * 100).toFixed(0) + "%");
-    },
-    function (error) {
-        console.log("Error, name: " + error.name + ", message: " + error.message);
-    }
- );
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+tizen.systeminfo.getPropertyValue("CAMERA_FLASH", function(flash)
+{
+&nbsp;&nbsp;&nbsp;console.log("Flash brightness is set to: " + (flash.brightness * 100).toFixed(0) + "%");
+}, function(error)
+{
+&nbsp;&nbsp;&nbsp;console.log("Error, name: " + error.name + ", message: " + error.message);
+});
+</pre>
 </div>
 </li>
 <li class="attribute" id="SystemInfoCameraFlash::camera">
@@ -3509,19 +3545,22 @@ If the specified brightness value is not supported by the device, the brightness
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> tizen.systeminfo.getPropertyValue("CAMERA_FLASH",
-    function (flash) {
-        try {
-            flash.setBrightness(1);
-        } catch (error) {
-            console.log("Setting flash brightness failed: " + error.message);
-        }
-    },
-    function (error) {
-        console.log("Error, name: " + error.name + ", message: " + error.message);
-    }
- );
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+tizen.systeminfo.getPropertyValue("CAMERA_FLASH", function(flash)
+{
+&nbsp;&nbsp;&nbsp;try
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;flash.setBrightness(1);
+&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;catch (error)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Setting flash brightness failed: " + error.message);
+&nbsp;&nbsp;&nbsp;}
+}, function(error)
+{
+&nbsp;&nbsp;&nbsp;console.log("Error, name: " + error.name + ", message: " + error.message);
+});
+</pre>
 </div>
 </dd>
 </dl>
index d1c9c74..f7e87a0 100644 (file)
@@ -238,37 +238,45 @@ UnknownError - If any other error occurs              </li>
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Checks whether SystemSetting API is supported.
- var systemsetting_api_supported = tizen.systeminfo.getCapability("http://tizen.org/feature/systemsetting");
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Checks whether SystemSetting API is supported */
+var systemsetting_api_supported = tizen.systeminfo.getCapability("http://tizen.org/feature/systemsetting");
 
- // Checks whether the picture on home screen can be changed or retrieved through SystemSetting API.
- var home_screen_system_setting = tizen.systeminfo.getCapability("http://tizen.org/feature/systemsetting.home_screen");
+/* Checks whether the picture on home screen can be changed or retrieved through SystemSetting API */
+var home_screen_system_setting = tizen.systeminfo.getCapability("http://tizen.org/feature/systemsetting.home_screen");
 
- // Defines the success callback.
- function successCallback() {
-     console.log("Succeeded in changing the property");
- }
+/* Defines the success callback */
+function successCallback()
+{
+&nbsp;&nbsp;&nbsp;console.log("Succeeded in changing the property");
+}
 
- // Defines the error callback.
- function errorCallback(error) {
-   console.log("Failed to change the property. Error : " + error.message);
- }
+/* Defines the error callback */
+function errorCallback(error)
+{
+&nbsp;&nbsp;&nbsp;console.log("Failed to change the property. Error: " + error.message);
+}
 
- if (systemsetting_api_supported === true) {
-     // tizen.systemsetting will be available.
-     if (home_screen_system_setting === true) {
-         // Sets the home screen image.
-         // The newHomeScreenImagePath variable should hold the path of the image to be set as home screen background
-         tizen.systemsetting.setProperty("HOME_SCREEN", newHomeScreenImagePath, successCallback, errorCallback);
-     } else {
-         // if tizen.systemsetting.setProperty("HOME_SCREEN", ..) is invoked, NotSupportedError would be returned through ErrorCallback.
-     }
- } else {
-     // tizen.systemsetting will be 'undefined'.
-     console.log("SystemSetting API is not supported on the device.");
- }
-
- </pre>
+if (systemsetting_api_supported === true)
+{
+&nbsp;&nbsp;&nbsp;/* tizen.systemsetting will be available */
+&nbsp;&nbsp;&nbsp;if (home_screen_system_setting === true)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Sets the home screen image */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* newHomeScreenImagePath variable should hold the path of the image to be set as home screen background */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tizen.systemsetting.setProperty("HOME_SCREEN", newHomeScreenImagePath, successCallback, errorCallback);
+&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;else
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* if tizen.systemsetting.setProperty("HOME_SCREEN", ..) is invoked, NotSupportedError is returned through ErrorCallback */
+&nbsp;&nbsp;&nbsp;}
+}
+else
+{
+&nbsp;&nbsp;&nbsp;/* tizen.systemsetting will be 'undefined' */
+&nbsp;&nbsp;&nbsp;console.log("SystemSetting API is not supported on the device.");
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="SystemSettingManager::getProperty">
@@ -337,21 +345,23 @@ UnknownError - If any other error occurs               </li>
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Defines the success callback
- function getPropertySuccessCallback(value) {
-     // the case : tizen.systeminfo.getCapability("http://tizen.org/feature/systemsetting.home_screen") returns 'true'.
-     console.log("Succeeded in retrieving the property. The value is " + value);
- }
-
- // Defines the error callback.
- function errorCallback(error) {
-     console.log("Failed to get the property. Error : " + error.message);
-     // If the device does not support to get the image on home screen, NotSupportedError would be thrown.
- }
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Defines the success callback */
+function getPropertySuccessCallback(value)
+{
+&nbsp;&nbsp;&nbsp;/* Case: tizen.systeminfo.getCapability("http://tizen.org/feature/systemsetting.home_screen") returns 'true' */
+&nbsp;&nbsp;&nbsp;console.log("Succeeded in retrieving the property. The value is " + value);
+}
 
- tizen.systemsetting.getProperty("HOME_SCREEN", getPropertySuccessCallback, errorCallback);
+/* Defines the error callback */
+function errorCallback(error)
+{
+&nbsp;&nbsp;&nbsp;console.log("Failed to get the property. Error: " + error.message);
+&nbsp;&nbsp;&nbsp;/* If the device does not support to get the image on home screen, NotSupportedError is thrown */
+}
 
- </pre>
+tizen.systemsetting.getProperty("HOME_SCREEN", getPropertySuccessCallback, errorCallback);
+</pre>
 </div>
 </dd>
 </dl>
index 27b0fdd..48df608 100644 (file)
@@ -273,9 +273,10 @@ Get timezones using getLocalTimezone() and getAvailableTimezones().            <
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var current_dt = tizen.time.getCurrentDateTime();
- console.log("current date/time is " + current_dt.toLocaleString());
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var current_dt = tizen.time.getCurrentDateTime();
+console.log("current date/time is " + current_dt.toLocaleString());
+</pre>
 </div>
 </dd>
 <dt class="method" id="TimeUtil::getLocalTimezone">
@@ -303,16 +304,18 @@ Get timezones using getLocalTimezone() and getAvailableTimezones().            <
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> console.log("The local time zone is " + tizen.time.getLocalTimezone());
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+console.log("The local time zone is " + tizen.time.getLocalTimezone());
+</pre>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Note that it is possible to get the time zone description in other formats, e.g. by calling:
- now = new tizen.TZDate(new Date(), 'Asia/Manila');
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Note that it is possible to get the time zone description in other formats, e.g. by calling */
+now = new tizen.TZDate(new Date(), 'Asia/Manila');
 
- // Outputs "Wednesday, January 27, 2016, 8:46:00 PM GMT+0800 Philippines Time"
- console.log(now.toString());
- </pre>
+/* Outputs "Wednesday, January 27, 2016, 8:46:00 PM GMT+0800 Philippines Time" */
+console.log(now.toString());
+</pre>
 </div>
 </dd>
 <dt class="method" id="TimeUtil::getAvailableTimezones">
@@ -347,21 +350,26 @@ with the most general descriptor first and the most specific one last. For examp
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var tzids = tizen.time.getAvailableTimezones();
- console.log("The device supports " + tzids.length + " time zones.");
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var tzids = tizen.time.getAvailableTimezones();
+console.log("The device supports " + tzids.length + " time zones.");
+</pre>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var tzids = tizen.time.getAvailableTimezones();
- var currentLocation = 'Europe/Berlin';
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var tzids = tizen.time.getAvailableTimezones();
+var currentLocation = 'Europe/Berlin';
 
- // checks whether an entry 'Europe/Berlin' exists in the array.
- if (tzids.indexOf(currentLocation) &gt; -1) {
-   console.log('The device supports ' + currentLocation + ' timezone.');
- } else {
-   console.log('The device does not support ' + currentLocation + ' timezone.');
- }
- </pre>
+/* Checks whether an entry 'Europe/Berlin' exists in the array */
+if (tzids.indexOf(currentLocation) &gt; -1)
+{
+&nbsp;&nbsp;&nbsp;console.log('The device supports ' + currentLocation + ' timezone.');
+}
+else
+{
+&nbsp;&nbsp;&nbsp;console.log('The device does not support ' + currentLocation + ' timezone.');
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="TimeUtil::getDateFormat">
@@ -419,14 +427,15 @@ date format (23/10/2011) instead of a long date format ("Monday, October 23 2011
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Gets the long date format, e.g. "D, M d y".
- var dateFormat = tizen.time.getDateFormat();
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Gets the long date format, e.g. "D, M d y" */
+var dateFormat = tizen.time.getDateFormat();
 
- // Gets the short date format, e.g. "d/m/y".
- var shortDateFormat = tizen.time.getDateFormat(true); 
+/* Gets the short date format, e.g. "d/m/y" */
+var shortDateFormat = tizen.time.getDateFormat(true); 
 
- console.log("Long date format: " + dateFormat);
- </pre>
+console.log("Long date format: " + dateFormat);
+</pre>
 </div>
 </dd>
 <dt class="method" id="TimeUtil::getTimeFormat">
@@ -472,11 +481,12 @@ Examples of string formats include: "h:m:s ap", "h:m:s".
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Gets the time format, e.g. "h:m:s ap".
- var timeFormat = tizen.time.getTimeFormat();
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Gets the time format, e.g. "h:m:s ap" */
+var timeFormat = tizen.time.getTimeFormat();
 
- console.log(timeFormat);
- </pre>
+console.log(timeFormat);
+</pre>
 </div>
 </dd>
 <dt class="method" id="TimeUtil::isLeapYear">
@@ -523,12 +533,14 @@ parameters contain an invalid value.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var current_dt = tizen.time.getCurrentDateTime();
- var is_leap = tizen.time.isLeapYear(current_dt.getFullYear());
- if (is_leap) {
-   console.log("This year is a leap year.");
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var current_dt = tizen.time.getCurrentDateTime();
+var is_leap = tizen.time.isLeapYear(current_dt.getFullYear());
+if (is_leap)
+{
+&nbsp;&nbsp;&nbsp;console.log("This year is a leap year.");
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="TimeUtil::setDateTimeChangeListener">
@@ -570,19 +582,22 @@ Listener set with <em>setTimezoneChangeListener()</em> method is called when dev
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var changedCallback = function() {
-     try {
-         var current_dt = tizen.time.getCurrentDateTime();
-         console.log("current date/time is " + current_dt.toLocaleString());
-
-     } catch (err) {
-         console.log (err.name + ": " + err.message);
-     }
- };
-
- tizen.time.setDateTimeChangeListener(changedCallback);
-
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var changedCallback = function()
+{
+&nbsp;&nbsp;&nbsp;try
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var current_dt = tizen.time.getCurrentDateTime();
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("current date/time is " + current_dt.toLocaleString());
+&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;catch (err)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+&nbsp;&nbsp;&nbsp;}
+};
+
+tizen.time.setDateTimeChangeListener(changedCallback);
+</pre>
 </div>
 </dd>
 <dt class="method" id="TimeUtil::unsetDateTimeChangeListener">
@@ -606,19 +621,23 @@ Listener set with <em>setTimezoneChangeListener()</em> method is called when dev
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var changedCallback = function() {
-     try {
-         var current_dt = tizen.time.getCurrentDateTime();
-         console.log("current date/time is " + current_dt.toLocaleString());
-         tizen.time.unsetDateTimeChangeListener();
-     } catch (err) {
-         console.log (err.name + ": " + err.message);
-     }
- };
-
- tizen.time.setDateTimeChangeListener(changedCallback);
-
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var changedCallback = function()
+{
+&nbsp;&nbsp;&nbsp;try
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var current_dt = tizen.time.getCurrentDateTime();
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("current date/time is " + current_dt.toLocaleString());
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tizen.time.unsetDateTimeChangeListener();
+&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;catch (err)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+&nbsp;&nbsp;&nbsp;}
+};
+
+tizen.time.setDateTimeChangeListener(changedCallback);
+</pre>
 </div>
 </dd>
 <dt class="method" id="TimeUtil::setTimezoneChangeListener">
@@ -662,19 +681,23 @@ is not compatible with the expected type for that parameter.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var changedCallback = function() {
-     try {
-         // The new time zone can be retrieved through tizen.time.getLocalTimezone()
-         var zone = tizen.time.getLocalTimezone();
-         console.log("current time zone is " + zone);
-     } catch (err) {
-         console.log (err.name + ": " + err.message);
-     }
- };
-
- tizen.time.setTimezoneChangeListener(changedCallback);
-
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var changedCallback = function()
+{
+&nbsp;&nbsp;&nbsp;try
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* New time zone can be retrieved through tizen.time.getLocalTimezone() */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var zone = tizen.time.getLocalTimezone();
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("current time zone is " + zone);
+&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;catch (err)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+&nbsp;&nbsp;&nbsp;}
+};
+
+tizen.time.setTimezoneChangeListener(changedCallback);
+</pre>
 </div>
 </dd>
 <dt class="method" id="TimeUtil::unsetTimezoneChangeListener">
@@ -698,18 +721,23 @@ is not compatible with the expected type for that parameter.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var changedCallback = function() {
-     try {
-         var zone = tizen.time.getLocalTimezone();
-         console.log("current time zone is " + zone);
-         tizen.time.unsetTimezoneChangeListener();
-     } catch (err) {
-         console.log (err.name + ": " + err.message);
-     }
- };
-
- tizen.time.setTimezoneChangeListener(changedCallback);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var changedCallback = function()
+{
+&nbsp;&nbsp;&nbsp;try
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var zone = tizen.time.getLocalTimezone();
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("current time zone is " + zone);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tizen.time.unsetTimezoneChangeListener();
+&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;catch (err)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+&nbsp;&nbsp;&nbsp;}
+};
+
+tizen.time.setTimezoneChangeListener(changedCallback);
+</pre>
 </div>
 </dd>
 </dl>
@@ -843,15 +871,16 @@ If its date/time exceeds the platform limit, TZDate will be invalid.
               </ul>
              </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Creates a new TZDate object with current date/time and timezone:
- var now = new tizen.TZDate();
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Creates a new TZDate object with current date/time and timezone */
+var now = new tizen.TZDate();
  
- // Creates a new TZDate object with date set to 1st of January 2016 in time zone for Germany:
- var newYear = new tizen.TZDate(new Date("2016-01-01"), 'Europe/Berlin');
+/* Creates a new TZDate object with date set to 1st of January 2016 in time zone for Germany */
+var newYear = new tizen.TZDate(new Date("2016-01-01"), 'Europe/Berlin');
 
- // Creates a new TZDate object with values set explicitly:
- var myDate = new tizen.TZDate(1999, 11, 31, 23, 59, 59, 999, 'Europe/Berlin');
- </pre>
+/* Creates a new TZDate object with values set explicitly */
+var myDate = new tizen.TZDate(1999, 11, 31, 23, 59, 59, 999, 'Europe/Berlin');
+</pre>
 </div>
 </dl>
 </div>
@@ -876,9 +905,10 @@ If its date/time exceeds the platform limit, TZDate will be invalid.
  long The day of the month.
               </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var someDate = new tizen.TZDate(1999, 11, 31, 23, 59, 59, 999, "Europe/London");
- console.log(someDate.getDate()); // should output 31.
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var someDate = new tizen.TZDate(1999, 11, 31, 23, 59, 59, 999, "Europe/London");
+console.log(someDate.getDate()); /* Outputs 31 */
+</pre>
 </div>
 </dd>
 <dt class="method" id="TZDate::setDate">
@@ -910,10 +940,11 @@ For example, if TZDate's month is May and parameter is 32, it will be set to Jun
         </ul>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var someDate = new tizen.TZDate(1999, 11, 31, 23, 59, 59, 999, "Europe/London");
- someDate.setDate(1); // Changes the day of month to 1.
- console.log(someDate.getDate()); // should output 1.
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var someDate = new tizen.TZDate(1999, 11, 31, 23, 59, 59, 999, "Europe/London");
+someDate.setDate(1); /* Changes the day of month to 1 */
+console.log(someDate.getDate()); /* Outputs 1 */
+</pre>
 </div>
 </dd>
 <dt class="method" id="TZDate::getDay">
@@ -934,9 +965,9 @@ For example, if TZDate's month is May and parameter is 32, it will be set to Jun
  long The day of the week
               </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var someDate = new tizen.TZDate(1999, 11, 31, 23, 59, 59, 999, "Europe/London");
- console.log(someDate.getDay()); // should output "5", because 31st of December 1999 was friday.
-     
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var someDate = new tizen.TZDate(1999, 11, 31, 23, 59, 59, 999, "Europe/London");
+console.log(someDate.getDay()); /* Outputs "5", because 31st of December 1999 was Friday */
 </pre>
 </div>
 </dd>
@@ -964,9 +995,10 @@ For example, 1 = AD 1, 0 = BC 1, -1 = BC 2.
  long The year
               </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var someDate = new tizen.TZDate(1999, 11, 31, 23, 59, 59, 999, "Europe/London");
- console.log(someDate.getFullYear()); // should output 1999.
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var someDate = new tizen.TZDate(1999, 11, 31, 23, 59, 59, 999, "Europe/London");
+console.log(someDate.getFullYear()); /* Outputs 1999 */
+</pre>
 </div>
 </dd>
 <dt class="method" id="TZDate::setFullYear">
@@ -992,10 +1024,11 @@ For example, 1 = AD 1, 0 = BC 1, -1 = BC 2.
         </ul>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var someDate = new tizen.TZDate(1999, 11, 31, 23, 59, 59, 999, "Europe/London");
- someDate.setFullYear(2099); // Changes the year to 2099.
- console.log(someDate.getFullYear()); // should output 2099.
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var someDate = new tizen.TZDate(1999, 11, 31, 23, 59, 59, 999, "Europe/London");
+someDate.setFullYear(2099); /* Changes the year to 2099 */
+console.log(someDate.getFullYear()); /* Outputs 2099 */
+</pre>
 </div>
 </dd>
 <dt class="method" id="TZDate::getHours">
@@ -1016,9 +1049,10 @@ For example, 1 = AD 1, 0 = BC 1, -1 = BC 2.
  long The hour
               </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var someDate = new tizen.TZDate(1999, 11, 31, 23, 59, 59, 999, "Europe/London");
- console.log(someDate.getHours()); // should output 23.
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var someDate = new tizen.TZDate(1999, 11, 31, 23, 59, 59, 999, "Europe/London");
+console.log(someDate.getHours()); /* Outputs 23 */
+</pre>
 </div>
 </dd>
 <dt class="method" id="TZDate::setHours">
@@ -1050,10 +1084,11 @@ For example, calling setHours(24) results in setting hour to 00:00 and date to t
         </ul>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var someDate = new tizen.TZDate(1999, 11, 31, 23, 59, 59, 999, "Europe/London");
- someDate.setHours(15); // Sets the hour to 3 PM.
- console.log(someDate.getHours()); // should output 15.
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var someDate = new tizen.TZDate(1999, 11, 31, 23, 59, 59, 999, "Europe/London");
+someDate.setHours(15); /* Sets the hour to 3 PM */
+console.log(someDate.getHours()); /* Outputs 15 */
+</pre>
 </div>
 </dd>
 <dt class="method" id="TZDate::getMilliseconds">
@@ -1074,9 +1109,10 @@ For example, calling setHours(24) results in setting hour to 00:00 and date to t
  long The milliseconds
               </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var someDate = new tizen.TZDate(1999, 11, 31, 23, 59, 59, 999, "Europe/London");
- console.log(someDate.getMilliseconds()); // should output 999.
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var someDate = new tizen.TZDate(1999, 11, 31, 23, 59, 59, 999, "Europe/London");
+console.log(someDate.getMilliseconds()); /* Outputs 999 */
+</pre>
 </div>
 </dd>
 <dt class="method" id="TZDate::setMilliseconds">
@@ -1108,10 +1144,11 @@ For example, calling setMilliseconds(1000) results in setting milliseconds to 0
         </ul>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var someDate = new tizen.TZDate(1999, 11, 31, 23, 59, 59, 999, "Europe/London");
- someDate.setMilliseconds(42);
- console.log(someDate.getMilliseconds()); // should output 42.
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var someDate = new tizen.TZDate(1999, 11, 31, 23, 59, 59, 999, "Europe/London");
+someDate.setMilliseconds(42);
+console.log(someDate.getMilliseconds()); /* Outputs 42 */
+</pre>
 </div>
 </dd>
 <dt class="method" id="TZDate::getMinutes">
@@ -1132,9 +1169,10 @@ For example, calling setMilliseconds(1000) results in setting milliseconds to 0
  long The minutes
               </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var someDate = new tizen.TZDate(1999, 11, 31, 23, 59, 59, 999, "Europe/London");
- console.log(someDate.getMinutes()); // should output 59.
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var someDate = new tizen.TZDate(1999, 11, 31, 23, 59, 59, 999, "Europe/London");
+console.log(someDate.getMinutes()); /* Outputs 59 */
+</pre>
 </div>
 </dd>
 <dt class="method" id="TZDate::setMinutes">
@@ -1167,10 +1205,11 @@ For example, calling setMinutes(60) results in setting minutes to 0 and adding o
         </ul>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var someDate = new tizen.TZDate(1999, 11, 31, 23, 59, 59, 999, "Europe/London");
- someDate.setMinutes(58);
- console.log(someDate.getMinutes()); // should output 58.
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var someDate = new tizen.TZDate(1999, 11, 31, 23, 59, 59, 999, "Europe/London");
+someDate.setMinutes(58);
+console.log(someDate.getMinutes()); /* Outputs 58 */
+</pre>
 </div>
 </dd>
 <dt class="method" id="TZDate::getMonth">
@@ -1191,9 +1230,10 @@ For example, calling setMinutes(60) results in setting minutes to 0 and adding o
  long The month
               </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var someDate = new tizen.TZDate(1999, 11, 31, 23, 59, 59, 999, "Europe/London");
- console.log(someDate.getMonth()); // should output 11.
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var someDate = new tizen.TZDate(1999, 11, 31, 23, 59, 59, 999, "Europe/London");
+console.log(someDate.getMonth()); /* Outputs 11 */
+</pre>
 </div>
 </dd>
 <dt class="method" id="TZDate::setMonth">
@@ -1225,10 +1265,11 @@ For example, calling setMonth(12) results in setting month to 0 and adding one y
         </ul>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var someDate = new tizen.TZDate(1999, 11, 31, 23, 59, 59, 999, "Europe/London");
- someDate.setMonth(2); // Changes the month to March.
- console.log(someDate.getMonth()); // should output 2.
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var someDate = new tizen.TZDate(1999, 11, 31, 23, 59, 59, 999, "Europe/London");
+someDate.setMonth(2); /* Changes the month to March */
+console.log(someDate.getMonth()); /* Outputs 2 */
+</pre>
 </div>
 </dd>
 <dt class="method" id="TZDate::getSeconds">
@@ -1249,9 +1290,10 @@ For example, calling setMonth(12) results in setting month to 0 and adding one y
  long The seconds
               </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var someDate = new tizen.TZDate(1999, 11, 31, 23, 59, 59, 999, "Europe/London");
- console.log(someDate.getSeconds()); // should output 59.
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var someDate = new tizen.TZDate(1999, 11, 31, 23, 59, 59, 999, "Europe/London");
+console.log(someDate.getSeconds()); /* Outputs 59 */
+</pre>
 </div>
 </dd>
 <dt class="method" id="TZDate::setSeconds">
@@ -1283,10 +1325,11 @@ For example, calling setSeconds(60) results in setting seconds to 0 and adding o
         </ul>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var someDate = new tizen.TZDate(1999, 11, 31, 23, 59, 59, 999, "Europe/London");
- someDate.setSeconds(23);
- console.log(someDate.getSeconds()); // should output 23.
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var someDate = new tizen.TZDate(1999, 11, 31, 23, 59, 59, 999, "Europe/London");
+someDate.setSeconds(23);
+console.log(someDate.getSeconds()); /* Outputs 23 */
+</pre>
 </div>
 </dd>
 <dt class="method" id="TZDate::getUTCDate">
@@ -1307,9 +1350,10 @@ For example, calling setSeconds(60) results in setting seconds to 0 and adding o
  long The day of the month, according to universal time
               </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var someDate = new tizen.TZDate(1999, 11, 31, 23, 59, 59, 999, "Europe/London");
- console.log(someDate.getUTCDate()); // should output 31.
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var someDate = new tizen.TZDate(1999, 11, 31, 23, 59, 59, 999, "Europe/London");
+console.log(someDate.getUTCDate()); /* Outputs 31 */
+</pre>
 </div>
 </dd>
 <dt class="method" id="TZDate::setUTCDate">
@@ -1341,10 +1385,11 @@ For example, calling setUTCDate(32) when TZDate's month is May results in settin
         </ul>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var someDate = new tizen.TZDate(1999, 11, 31, 23, 59, 59, 999, "Europe/London");
- someDate.setUTCDate(5) // Change the day of month to 5th.
- console.log(someDate.getUTCDate()); // should output 5.
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var someDate = new tizen.TZDate(1999, 11, 31, 23, 59, 59, 999, "Europe/London");
+someDate.setUTCDate(5) /* Change the day of month to 5th */
+console.log(someDate.getUTCDate()); /* Outputs 5 */
+</pre>
 </div>
 </dd>
 <dt class="method" id="TZDate::getUTCDay">
@@ -1365,9 +1410,10 @@ For example, calling setUTCDate(32) when TZDate's month is May results in settin
  long The day of the week, according to universal time
               </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var someDate = new tizen.TZDate(1999, 11, 31, 23, 59, 59, 999, "Europe/London");
- console.log(someDate.getUTCDay()); // should output 5, since 31st of December 1999 was friday.
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var someDate = new tizen.TZDate(1999, 11, 31, 23, 59, 59, 999, "Europe/London");
+console.log(someDate.getUTCDay()); /* Outputs 5, since 31st of December 1999 was Friday */
+</pre>
 </div>
 </dd>
 <dt class="method" id="TZDate::getUTCFullYear">
@@ -1394,9 +1440,10 @@ For example, 1 = AD 1, 0 = BC 1, -1 = BC 2.
  long The year, according to universal time
               </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var someDate = new tizen.TZDate(1999, 11, 31, 23, 59, 59, 999, "Europe/London");
- console.log(someDate.getUTCFullYear()); // should output 1999.
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var someDate = new tizen.TZDate(1999, 11, 31, 23, 59, 59, 999, "Europe/London");
+console.log(someDate.getUTCFullYear()); /* Outputs 1999 */
+</pre>
 </div>
 </dd>
 <dt class="method" id="TZDate::setUTCFullYear">
@@ -1422,10 +1469,11 @@ For example, 1 = AD 1, 0 = BC 1, -1 = BC 2.
         </ul>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var someDate = new tizen.TZDate(1999, 11, 31, 23, 59, 59, 999, "Europe/London");
- someDate.setUTCFullYear(2099); // Change the year to 2099, universal time.
- console.log(someDate.getUTCFullYear()); // should output 2099.
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var someDate = new tizen.TZDate(1999, 11, 31, 23, 59, 59, 999, "Europe/London");
+someDate.setUTCFullYear(2099); /* Change the year to 2099, universal time */
+console.log(someDate.getUTCFullYear()); /* Outputs 2099 */
+</pre>
 </div>
 </dd>
 <dt class="method" id="TZDate::getUTCHours">
@@ -1446,9 +1494,10 @@ For example, 1 = AD 1, 0 = BC 1, -1 = BC 2.
  long The hour, according to universal time
               </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var someDate = new tizen.TZDate(1999, 11, 31, 23, 59, 59, 999, "Europe/London");
- console.log(someDate.getUTCHours()); // should output 23.
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var someDate = new tizen.TZDate(1999, 11, 31, 23, 59, 59, 999, "Europe/London");
+console.log(someDate.getUTCHours()); /* Outputs 23 */
+</pre>
 </div>
 </dd>
 <dt class="method" id="TZDate::setUTCHours">
@@ -1480,10 +1529,11 @@ For example, calling setUTCHours(24) results in setting hour to 0 and adding one
         </ul>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var someDate = new tizen.TZDate(1999, 11, 31, 23, 59, 59, 999, "Europe/London");
- someDate.setUTCHours(15);
- console.log(someDate.getUTCHours()); // should output 15.
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var someDate = new tizen.TZDate(1999, 11, 31, 23, 59, 59, 999, "Europe/London");
+someDate.setUTCHours(15);
+console.log(someDate.getUTCHours()); /* Outputs 15 */
+</pre>
 </div>
 </dd>
 <dt class="method" id="TZDate::getUTCMilliseconds">
@@ -1504,9 +1554,10 @@ For example, calling setUTCHours(24) results in setting hour to 0 and adding one
  long The milliseconds, according to universal time
               </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var someDate = new tizen.TZDate(1999, 11, 31, 23, 59, 59, 999, "Europe/London");
- console.log(someDate.getUTCMilliseconds()); // should output 999.
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var someDate = new tizen.TZDate(1999, 11, 31, 23, 59, 59, 999, "Europe/London");
+console.log(someDate.getUTCMilliseconds()); /* Outputs 999 */
+</pre>
 </div>
 </dd>
 <dt class="method" id="TZDate::setUTCMilliseconds">
@@ -1538,10 +1589,11 @@ For example, calling setUTCMilliseconds(1000) results in setting milliseconds to
         </ul>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var someDate = new tizen.TZDate(1999, 11, 31, 23, 59, 59, 999, "Europe/London");
- someDate.setUTCMillisecond(42);
- console.log(someDate.getUTCMilliseconds()); // should output 42.
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var someDate = new tizen.TZDate(1999, 11, 31, 23, 59, 59, 999, "Europe/London");
+someDate.setUTCMillisecond(42);
+console.log(someDate.getUTCMilliseconds()); /* Outputs 42 */
+</pre>
 </div>
 </dd>
 <dt class="method" id="TZDate::getUTCMinutes">
@@ -1562,9 +1614,10 @@ For example, calling setUTCMilliseconds(1000) results in setting milliseconds to
  long The minutes, according to universal time
               </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var someDate = new tizen.TZDate(1999, 11, 31, 23, 59, 59, 999, "Europe/London");
- console.log(someDate.getUTCMinutes()); // should output 59.
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var someDate = new tizen.TZDate(1999, 11, 31, 23, 59, 59, 999, "Europe/London");
+console.log(someDate.getUTCMinutes()); /* Outputs 59 */
+</pre>
 </div>
 </dd>
 <dt class="method" id="TZDate::setUTCMinutes">
@@ -1596,10 +1649,11 @@ For example, calling setUTCMinutes(60) results in setting minutes to 0 and addin
         </ul>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var someDate = new tizen.TZDate(1999, 11, 31, 23, 59, 59, 999, "Europe/London");
- someDate.setUTCMinutes(58);
- console.log(someDate.getUTCMinutes()); // should output 58.
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var someDate = new tizen.TZDate(1999, 11, 31, 23, 59, 59, 999, "Europe/London");
+someDate.setUTCMinutes(58);
+console.log(someDate.getUTCMinutes()); /* Outputs 58 */
+</pre>
 </div>
 </dd>
 <dt class="method" id="TZDate::getUTCMonth">
@@ -1620,9 +1674,10 @@ For example, calling setUTCMinutes(60) results in setting minutes to 0 and addin
  long The month, according to universal time
               </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var someDate = new tizen.TZDate(1999, 11, 31, 23, 59, 59, 999, "Europe/London");
- console.log(someDate.getUTCMonth()); // should output 11.
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var someDate = new tizen.TZDate(1999, 11, 31, 23, 59, 59, 999, "Europe/London");
+console.log(someDate.getUTCMonth()); /* Outputs 11 */
+</pre>
 </div>
 </dd>
 <dt class="method" id="TZDate::setUTCMonth">
@@ -1654,10 +1709,11 @@ For example, calling setUTCMonth(12) results in setting month to 0 and adding on
         </ul>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var someDate = new tizen.TZDate(1999, 11, 31, 23, 59, 59, 999, "Europe/London");
- someDate.setUTCMonth(2); // Sets the month to March, according to the universal time.
- console.log(someDate.getUTCMonth()); // should output 2.
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var someDate = new tizen.TZDate(1999, 11, 31, 23, 59, 59, 999, "Europe/London");
+someDate.setUTCMonth(2); /* Sets the month to March, according to the universal time */
+console.log(someDate.getUTCMonth()); /* Outputs 2 */
+</pre>
 </div>
 </dd>
 <dt class="method" id="TZDate::getUTCSeconds">
@@ -1678,9 +1734,10 @@ For example, calling setUTCMonth(12) results in setting month to 0 and adding on
  long The seconds, according to universal time
               </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var someDate = new tizen.TZDate(1999, 11, 31, 23, 59, 59, 999, "Europe/London");
- console.log(someDate.getUTCSeconds()); // should output 59.
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var someDate = new tizen.TZDate(1999, 11, 31, 23, 59, 59, 999, "Europe/London");
+console.log(someDate.getUTCSeconds()); /* Outputs 59 */
+</pre>
 </div>
 </dd>
 <dt class="method" id="TZDate::setUTCSeconds">
@@ -1712,10 +1769,11 @@ For example, calling setUTCSeconds(60) results in setting seconds to 0 and addin
         </ul>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var someDate = new tizen.TZDate(1999, 11, 31, 23, 59, 59, 999, "Europe/London");
- someDate.setUTCSeconds(23);
- console.log(someDate.getUTCSeconds()); // should output 23.
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var someDate = new tizen.TZDate(1999, 11, 31, 23, 59, 59, 999, "Europe/London");
+someDate.setUTCSeconds(23);
+console.log(someDate.getUTCSeconds()); /* Outputs 23 */
+</pre>
 </div>
 </dd>
 <dt class="method" id="TZDate::getTimezone">
@@ -1746,9 +1804,10 @@ This attribute uniquely identifies the timezone.
  DOMString The string timezone identifier <br>If TZDate is invalid, it will return 'Invalid Date'.
               </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var someDate = new tizen.TZDate(1999, 11, 31, 23, 59, 59, 999, "Europe/London");
- console.log(someDate.getTimezone()); // should output "Europe/London".
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var someDate = new tizen.TZDate(1999, 11, 31, 23, 59, 59, 999, "Europe/London");
+console.log(someDate.getTimezone()); /* Outputs "Europe/London" */
+</pre>
 </div>
 </dd>
 <dt class="method" id="TZDate::toTimezone">
@@ -1795,12 +1854,13 @@ is not recognized as a valid timezone identifier.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var someDate = new tizen.TZDate(1999, 11, 31, 23, 59, 59, 999, "Europe/London");
- var koreanDate = someDate.toTimezone("Asia/Seoul");
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var someDate = new tizen.TZDate(1999, 11, 31, 23, 59, 59, 999, "Europe/London");
+var koreanDate = someDate.toTimezone("Asia/Seoul");
 
- // Should output: "Saturday, January 1, 2000, 8:59:59 AM GMT+0900 South Korea Time" 
- console.log(someDate.toString());
- </pre>
+/* Output: "Saturday, January 1, 2000, 8:59:59 AM GMT+0900 South Korea Time" */
+console.log(someDate.toString());
+</pre>
 </div>
 </dd>
 <dt class="method" id="TZDate::toLocalTimezone">
@@ -1828,14 +1888,17 @@ is not recognized as a valid timezone identifier.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // This example assumes that the device's local time zone is set to Asia/Seoul.
- // You may get different results depending on your local time zone settings.
- var someDate = new tizen.TZDate(1999, 11, 31, 23, 59, 59, 999, "Europe/London");
- var localDate = someDate.toLocalTimezone();
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/*
+   This example assumes that the device's local time zone is set to Asia/Seoul
+   You may get different results depending on your local time zone settings
+*/
+var someDate = new tizen.TZDate(1999, 11, 31, 23, 59, 59, 999, "Europe/London");
+var localDate = someDate.toLocalTimezone();
 
- // Should output: "Saturday, January 1, 2000, 8:59:59 AM GMT+0900 South Korea Time" 
- console.log(localDate.toString());
- </pre>
+/* Output: "Saturday, January 1, 2000, 8:59:59 AM GMT+0900 South Korea Time" */
+console.log(localDate.toString());
+</pre>
 </div>
 </dd>
 <dt class="method" id="TZDate::toUTC">
@@ -1863,12 +1926,13 @@ is not recognized as a valid timezone identifier.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var someDate = new tizen.TZDate(1999, 11, 31, 23, 59, 59, 999, "Asia/Seoul");
- var utcDate = someDate.toUTC();
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var someDate = new tizen.TZDate(1999, 11, 31, 23, 59, 59, 999, "Asia/Seoul");
+var utcDate = someDate.toUTC();
 
- // Should output: "Friday, December 31, 1999, 2:59:59 PM GMT+0000 GMT" 
- console.log(utcDate.toString());
- </pre>
+/* Output: "Friday, December 31, 1999, 2:59:59 PM GMT+0000 GMT" */
+console.log(utcDate.toString());
+</pre>
 </div>
 </dd>
 <dt class="method" id="TZDate::difference">
@@ -1931,28 +1995,30 @@ is not compatible with the expected type for that parameter.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Prepares two TZDates pointing at new year eves in 2011 and 2012, respectively:
- var newYearEve2011 = new tizen.TZDate(2011, 0, 0, 0, 0, 0, 0, "Europe/London");
- var newYearEve2012 = new tizen.TZDate(2012, 0, 0, 0, 0, 0, 0, "Europe/London");
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Prepares two TZDates pointing at new year eves in 2011 and 2012, respectively */
+var newYearEve2011 = new tizen.TZDate(2011, 0, 0, 0, 0, 0, 0, "Europe/London");
+var newYearEve2012 = new tizen.TZDate(2012, 0, 0, 0, 0, 0, 0, "Europe/London");
 
- // Calculates how much is the difference between  those two dates:
- var difference = newYearEve2012.difference(newYearEve2011);
+/* Calculates how much is the difference between  those two dates */
+var difference = newYearEve2012.difference(newYearEve2011);
 
- // Should output: "The difference is 365 DAYS" (since none of those dates have time component)
- console.log("The difference is " + difference.length + " " + difference.unit);
- </pre>
+/* Output: "The difference is 365 DAYS" (since none of those dates have time component) */
+console.log("The difference is " + difference.length + " " + difference.unit);
+</pre>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Prepares two TZDates pointing at 6:00 PM and 8:00 PM on the same day:
- var joggingStart = new tizen.TZDate(2015, 6, 6, 18, 0, 0, 0, "Europe/London");
- var joggingEnd = new tizen.TZDate(2015, 6, 6, 20, 0, 0, 0, "Europe/London");
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Prepares two TZDates pointing at 6:00 PM and 8:00 PM on the same day */
+var joggingStart = new tizen.TZDate(2015, 6, 6, 18, 0, 0, 0, "Europe/London");
+var joggingEnd = new tizen.TZDate(2015, 6, 6, 20, 0, 0, 0, "Europe/London");
 
- // Calculates how much is the difference between  those two dates:
- var difference = joggingEnd.difference(joggingStart);
+/* Calculates how much is the difference between those two dates */
+var difference = joggingEnd.difference(joggingStart);
 
- // Should output: "The difference is 7200000 MSECS" (since both of those dates do have time component)
- console.log("The difference is " + difference.length + " " + difference.unit);
- </pre>
+/* Output: "The difference is 7200000 MSECS" (since both of those dates do have time component) */
+console.log("The difference is " + difference.length + " " + difference.unit);
+</pre>
 </div>
 </dd>
 <dt class="method" id="TZDate::equalsTo">
@@ -2000,31 +2066,41 @@ is not compatible with the expected type for that parameter.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var noonInEngland = new tizen.TZDate(2016, 0, 27, 12, 0, 0, 0, 'Europe/London');
- var sameTimeInKorea = noonInEngland.toTimezone('Asia/Seoul');
- var isTheSame = noonInEngland.equalsTo(sameTimeInKorea);
-
- // Those are the same dates (in different time zones), so the output should be "Those dates are equal."
- if(isTheSame) {
-   console.log("Those dates are equal.");
- } else {
-   console.log("Those dates are not equal.");
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var noonInEngland = new tizen.TZDate(2016, 0, 27, 12, 0, 0, 0, 'Europe/London');
+var sameTimeInKorea = noonInEngland.toTimezone('Asia/Seoul');
+var isTheSame = noonInEngland.equalsTo(sameTimeInKorea);
+
+/* Those are the same dates (in different time zones), so the output should be "Those dates are equal." */
+if (isTheSame)
+{
+&nbsp;&nbsp;&nbsp;console.log("Those dates are equal.");
+}
+else
+{
+&nbsp;&nbsp;&nbsp;console.log("Those dates are not equal.");
+}
+</pre>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var noonInEngland = new tizen.TZDate(2016, 0, 27, 12, 0, 0, 0, 'Europe/London');
- var noonInKorea = new tizen.TZDate(2016, 0, 27, 12, 0, 0, 0, 'Asia/Seoul');
- var isTheSame = noonInEngland.equalsTo(noonInKorea);
-
- // Those are not the same dates (obviously, noon in London is not noon in Seoul),
- // so the output should be "Those dates are not equal."
- if(isTheSame) {
-   console.log("Those dates are equal.");
- } else {
-   console.log("Those dates are not equal.");
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var noonInEngland = new tizen.TZDate(2016, 0, 27, 12, 0, 0, 0, 'Europe/London');
+var noonInKorea = new tizen.TZDate(2016, 0, 27, 12, 0, 0, 0, 'Asia/Seoul');
+var isTheSame = noonInEngland.equalsTo(noonInKorea);
+
+/*
+   Those are not the same dates (obviously, noon in London is not noon in Seoul),
+   so the output should be "Those dates are not equal."
+*/
+if (isTheSame)
+{
+&nbsp;&nbsp;&nbsp;console.log("Those dates are equal.");
+}
+else
+{
+&nbsp;&nbsp;&nbsp;console.log("Those dates are not equal.");
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="TZDate::earlierThan">
@@ -2072,18 +2148,19 @@ is not compatible with the expected type for that parameter.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Create a new TZDate object pointing to noon in London:
- var tzd1 = new tizen.TZDate(2016, 0, 1, 12, 0, 0, 0, 'Europe/London');
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Create a new TZDate object pointing to noon in London */
+var tzd1 = new tizen.TZDate(2016, 0, 1, 12, 0, 0, 0, 'Europe/London');
 
- // Create a new TZDate object pointing to 6 PM in Seoul on the same day:
- var tzd2 = new tizen.TZDate(2016, 0, 1, 18, 0, 0, 0, 'Asia/Seoul');
+/* Create a new TZDate object pointing to 6 PM in Seoul on the same day */
+var tzd2 = new tizen.TZDate(2016, 0, 1, 18, 0, 0, 0, 'Asia/Seoul');
 
- // is 12:00 local time in London earlier than 18:00 local time in Seoul?
- var isEarlier = tzd1.earlierThan(tzd2);
+/* Is 12:00 local time in London earlier than 18:00 local time in Seoul? */
+var isEarlier = tzd1.earlierThan(tzd2);
  
- // should output 'false', since local time in Seoul is GMT (London) + 9 hours.
- console.log(isEarlier);
- </pre>
+/* Outputs 'false', since local time in Seoul is GMT (London) + 9 hours */
+console.log(isEarlier);
+</pre>
 </div>
 </dd>
 <dt class="method" id="TZDate::laterThan">
@@ -2131,18 +2208,19 @@ is not compatible with the expected type for that parameter.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Create a new TZDate object pointing to noon in London:
- var tzd1 = new tizen.TZDate(2016, 0, 1, 12, 0, 0, 0, 'Europe/London');
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Create a new TZDate object pointing to noon in London */
+var tzd1 = new tizen.TZDate(2016, 0, 1, 12, 0, 0, 0, 'Europe/London');
 
- // Create a new TZDate object pointing to 6 PM in Seoul on the same day:
- var tzd2 = new tizen.TZDate(2016, 0, 1, 18, 0, 0, 0, 'Asia/Seoul');
+/* Create a new TZDate object pointing to 6 PM in Seoul on the same day */
+var tzd2 = new tizen.TZDate(2016, 0, 1, 18, 0, 0, 0, 'Asia/Seoul');
 
- // is 12:00 local time in London earlier than 18:00 local time in Seoul?
- var isLater = tzd1.laterThan(tzd2);
+/* Is 12:00 local time in London earlier than 18:00 local time in Seoul? */
+var isLater = tzd1.laterThan(tzd2);
  
- // should output 'true', since local time in Seoul is GMT (London) + 9 hours.
- console.log(isLater);
- </pre>
+/* Outputs 'true', since local time in Seoul is GMT (London) + 9 hours */
+console.log(isLater);
+</pre>
 </div>
 </dd>
 <dt class="method" id="TZDate::addDuration">
@@ -2194,9 +2272,10 @@ is not compatible with the expected type for that parameter.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var now = tizen.time.getCurrentDateTime();
- var in_one_week = now.addDuration(new tizen.TimeDuration(7, "DAYS"));
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var now = tizen.time.getCurrentDateTime();
+var in_one_week = now.addDuration(new tizen.TimeDuration(7, "DAYS"));
+</pre>
 </div>
 </dd>
 <dt class="method" id="TZDate::toLocaleDateString">
@@ -2217,11 +2296,12 @@ is not compatible with the expected type for that parameter.
  DOMString The date portion of the TZDate object as a string, using locale conventions <br>If TZDate is invalid, it will return 'Invalid Date'.
               </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var someDate = new tizen.TZDate(1999, 11, 31, 23, 59, 59, 999, 'Europe/London');
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var someDate = new tizen.TZDate(1999, 11, 31, 23, 59, 59, 999, 'Europe/London');
 
- // Output example (depends on locale settings): "Friday, December 31, 1999"
- console.log(someDate.toLocaleDateString());
- </pre>
+/* Output example (depends on locale settings): "Friday, December 31, 1999" */
+console.log(someDate.toLocaleDateString());
+</pre>
 </div>
 </dd>
 <dt class="method" id="TZDate::toLocaleTimeString">
@@ -2242,11 +2322,12 @@ is not compatible with the expected type for that parameter.
  DOMString The time portion of the TZDate object as a string, using locale conventions <br>If TZDate is invalid, it will return 'Invalid Date'.
               </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var someDate = new tizen.TZDate(1999, 11, 31, 23, 59, 59, 999, 'Europe/London');
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var someDate = new tizen.TZDate(1999, 11, 31, 23, 59, 59, 999, 'Europe/London');
 
- // Output example (depends on locale settings): "11:59:59 PM"
- console.log(someDate.toLocaleTimeString());
- </pre>
+/* Output example (depends on locale settings): "11:59:59 PM" */
+console.log(someDate.toLocaleTimeString());
+</pre>
 </div>
 </dd>
 <dt class="method" id="TZDate::toLocaleString">
@@ -2267,11 +2348,12 @@ is not compatible with the expected type for that parameter.
  DOMString The string representation of the TZDate object, using locale conventions <br>If TZDate is invalid, it will return 'Invalid Date'.
               </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var someDate = new tizen.TZDate(1999, 11, 31, 23, 59, 59, 999, 'Europe/London');
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var someDate = new tizen.TZDate(1999, 11, 31, 23, 59, 59, 999, 'Europe/London');
 
- // Output example (depends on locale settings): "Friday, December 31, 1999, 11:59:59 PM"
- console.log(someDate.toLocaleString());
- </pre>
+/* Output example (depends on locale settings): "Friday, December 31, 1999, 11:59:59 PM" */
+console.log(someDate.toLocaleString());
+</pre>
 </div>
 </dd>
 <dt class="method" id="TZDate::toDateString">
@@ -2292,11 +2374,12 @@ is not compatible with the expected type for that parameter.
  DOMString The date portion of the TZDate object as a string <br>If TZDate is invalid, it will return 'Invalid Date'.
               </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var someDate = new tizen.TZDate(1999, 11, 31, 23, 59, 59, 999, 'Europe/London');
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var someDate = new tizen.TZDate(1999, 11, 31, 23, 59, 59, 999, 'Europe/London');
 
- // Should output: "Friday, December 31, 1999"
- console.log(someDate.toDateString());
- </pre>
+/* Output: "Friday, December 31, 1999" */
+console.log(someDate.toDateString());
+</pre>
 </div>
 </dd>
 <dt class="method" id="TZDate::toTimeString">
@@ -2317,11 +2400,12 @@ is not compatible with the expected type for that parameter.
  DOMString The time portion of the TZDate object as a string <br>If TZDate is invalid, it will return 'Invalid Date'.
               </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var someDate = new tizen.TZDate(1999, 11, 31, 23, 59, 59, 999, 'Europe/London');
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var someDate = new tizen.TZDate(1999, 11, 31, 23, 59, 59, 999, 'Europe/London');
 
- // Should output: "11:59:59 PM GMT+0000 United Kingdom Time"
- console.log(someDate.toTimeString());
- </pre>
+/* Output: "11:59:59 PM GMT+0000 United Kingdom Time" */
+console.log(someDate.toTimeString());
+</pre>
 </div>
 </dd>
 <dt class="method" id="TZDate::toString">
@@ -2342,11 +2426,12 @@ is not compatible with the expected type for that parameter.
  DOMString The string representation of the TZDate object <br>If TZDate is invalid, it will return 'Invalid Date'.
               </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var someDate = new tizen.TZDate(1999, 11, 31, 23, 59, 59, 999, 'Europe/London');
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var someDate = new tizen.TZDate(1999, 11, 31, 23, 59, 59, 999, 'Europe/London');
 
- // Should output: "Friday, December 31, 1999, 11:59:59 PM GMT+0000 United Kingdom Time"
- console.log(someDate.toString());
- </pre>
+/* Output: "Friday, December 31, 1999, 11:59:59 PM GMT+0000 United Kingdom Time" */
+console.log(someDate.toString());
+</pre>
 </div>
 </dd>
 <dt class="method" id="TZDate::getTimezoneAbbreviation">
@@ -2414,11 +2499,12 @@ savings if it is in the timezone. For example, if time zone is GMT+8, it will re
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var offset = tizen.time.getCurrentDateTime().secondsFromUTC();
- var myDate = new Date();
- var exp_offset = myDate.getTimezoneOffset()*60;
- //offset is equals to exp_offset.
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var offset = tizen.time.getCurrentDateTime().secondsFromUTC();
+var myDate = new Date();
+var exp_offset = myDate.getTimezoneOffset() * 60;
+/* offset is equal to exp_offset */
+</pre>
 </div>
 </dd>
 <dt class="method" id="TZDate::isDST">
@@ -2452,12 +2538,13 @@ identified by the TZDate object.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var summertime = new tizen.TZDate(2015, 6, 1, 10, 0, 0, 0, 'Europe/London');
- var wintertime = new tizen.TZDate(2015, 0, 1, 10, 0, 0, 0, 'Europe/London');
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var summertime = new tizen.TZDate(2015, 6, 1, 10, 0, 0, 0, 'Europe/London');
+var wintertime = new tizen.TZDate(2015, 0, 1, 10, 0, 0, 0, 'Europe/London');
 
- var isDstActiveInSummer = summertime.isDST(); // true
- var isDstActiveInWinter = wintertime.isDST(); // false
- </pre>
+var isDstActiveInSummer = summertime.isDST(); /* true */
+var isDstActiveInWinter = wintertime.isDST(); /* false */
+</pre>
 </div>
 </dd>
 <dt class="method" id="TZDate::getPreviousDSTTransition">
@@ -2485,15 +2572,16 @@ identified by the TZDate object.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Creates the TZDate object pointing to January 2016.
- var winter16 = new tizen.TZDate(2016, 0, 1, 10, 0, 0, 0, 'Europe/London');
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Creates the TZDate object pointing to January 2016 */
+var winter16 = new tizen.TZDate(2016, 0, 1, 10, 0, 0, 0, 'Europe/London');
 
- // Gets the date of previous DST transition:
- var previousDstTransition = winter16.getPreviousDSTTransition();
+/* Gets the date of previous DST transition */
+var previousDstTransition = winter16.getPreviousDSTTransition();
  
- // Should output: "Sunday, October 25, 2015, 1:00:00 AM GMT+0000 United Kingdom Time"
- console.log(previousDstTransition.toString());
- </pre>
+/* Output: "Sunday, October 25, 2015, 1:00:00 AM GMT+0000 United Kingdom Time" */
+console.log(previousDstTransition.toString());
+</pre>
 </div>
 </dd>
 <dt class="method" id="TZDate::getNextDSTTransition">
@@ -2521,15 +2609,16 @@ identified by the TZDate object.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Creates the TZDate object pointing to January 2016.
- var winter16 = new tizen.TZDate(2016, 0, 1, 10, 0, 0, 0, 'Europe/London');
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Creates the TZDate object pointing to January 2016 */
+var winter16 = new tizen.TZDate(2016, 0, 1, 10, 0, 0, 0, 'Europe/London');
 
- // Gets the date of next DST transition:
- var nextDstTransition = winter16.getNextDSTTransition();
+/* Gets the date of next DST transition */
+var nextDstTransition = winter16.getNextDSTTransition();
  
- // Should output: "Sunday, March 27, 2016, 2:00:00 AM GMT+0100 United Kingdom Time"
- console.log(nextDstTransition.toString());
- </pre>
+/* Output: "Sunday, March 27, 2016, 2:00:00 AM GMT+0100 United Kingdom Time" */
+console.log(nextDstTransition.toString());
+</pre>
 </div>
 </dd>
 </dl>
@@ -2569,9 +2658,10 @@ identified by the TZDate object.
               </div>
 <pre class="webidl prettyprint">TimeDuration(long long length, optional <a href="#TimeDurationUnit">TimeDurationUnit</a>? unit);</pre>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var now = tizen.time.getCurrentDateTime();
- var tomorrow = now.addDuration(new tizen.TimeDuration(1, "DAYS")); // Becomes tomorrow, same time.
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var now = tizen.time.getCurrentDateTime();
+var tomorrow = now.addDuration(new tizen.TimeDuration(1, "DAYS")); /* Becomes tomorrow, same time */
+</pre>
 </div>
 </dl>
 </div>
@@ -2607,15 +2697,15 @@ The default value is "MSECS" (milliseconds unit).
  1.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> 
- // Changing both length and unit of existing TimeDuration objects is possible:
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Changing both length and unit of existing TimeDuration objects is possible */
 
- var now = tizen.time.getCurrentDateTime();
- var threeHours = new tizen.TimeDuration();
- threeHours.length = 3;
- threeHours.unit = "HOURS";
- var later = now.addDuration(threeHours); // later points to a time three hours from now.
- </pre>
+var now = tizen.time.getCurrentDateTime();
+var threeHours = new tizen.TimeDuration();
+threeHours.length = 3;
+threeHours.unit = "HOURS";
+var later = now.addDuration(threeHours); /* later points to a time three hours from now */
+</pre>
 </div>
 </li>
 </ul>
@@ -2672,16 +2762,17 @@ is not compatible with the expected type for that parameter.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Assume that event1 and event2 are tizen.CalendarEvent objects.
- // Computes event1.duration - event2.duration
- var diff = event1.duration.difference(event2.duration);
- if (diff.length &gt; 0)
-   console.log("The event1 is longer than event2.");
- else if (diff.length == 0)
-   console.log("The duration of two events is same.");
- else
-   console.log("The event1 is shorter than the event2.");
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Assume that event1 and event2 are tizen.CalendarEvent objects */
+/* Computes event1.duration - event2.duration */
+var diff = event1.duration.difference(event2.duration);
+if (diff.length &gt; 0)
+&nbsp;&nbsp;&nbsp;console.log("The event1 is longer than event2.");
+else if (diff.length == 0)
+&nbsp;&nbsp;&nbsp;console.log("The duration of two events is same.");
+else
+&nbsp;&nbsp;&nbsp;console.log("The event1 is shorter than the event2.");
+</pre>
 </div>
 </dd>
 <dt class="method" id="TimeDuration::equalsTo">
@@ -2730,10 +2821,11 @@ is not compatible with the expected type for that parameter.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var d1 = new tizen.TimeDuration(60, "MINS"); // 60 minutes
- var d2 = new tizen.TimeDuration(1, "HOURS"); // 1 hour
- var ret = d1.equalsTo(d2); // Returns true
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var d1 = new tizen.TimeDuration(60, "MINS"); /* 60 minutes */
+var d2 = new tizen.TimeDuration(1, "HOURS"); /* 1 hour */
+var ret = d1.equalsTo(d2); /* Returns true */
+</pre>
 </div>
 </dd>
 <dt class="method" id="TimeDuration::lessThan">
@@ -2779,10 +2871,11 @@ This method takes the units into consideration when doing the comparison.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var d1 = new tizen.TimeDuration(1, "HOURS"); // 1 hour
- var d2 = new tizen.TimeDuration(120, "MINS"); // 120 minutes
- var ret = d1.lessThan(d2); // Returns true
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var d1 = new tizen.TimeDuration(1, "HOURS"); /* 1 hour */
+var d2 = new tizen.TimeDuration(120, "MINS"); /* 120 minutes */
+var ret = d1.lessThan(d2); /* Returns true */
+</pre>
 </div>
 </dd>
 <dt class="method" id="TimeDuration::greaterThan">
@@ -2829,10 +2922,11 @@ is not compatible with the expected type for that parameter.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var d1 = new tizen.TimeDuration(120, "MINS"); // 120 minutes
- var d2 = new tizen.TimeDuration(1, "HOURS"); // 1 hour
- var ret = d1.greaterThan(d2); // Returns true
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var d1 = new tizen.TimeDuration(120, "MINS"); /* 120 minutes */
+var d2 = new tizen.TimeDuration(1, "HOURS"); /* 1 hour */
+var ret = d1.greaterThan(d2); /* Returns true */
+</pre>
 </div>
 </dd>
 </dl>
index 60fba17..9fea2fb 100644 (file)
@@ -295,21 +295,24 @@ the specified value.
           </p>
          </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // The following example retrieves all songs from the album "The Joshua Tree".
- var count = 100;
- var offset = 0;
- var albumFilter = new tizen.AttributeFilter("album", "EXACTLY", "The Joshua Tree");
-
- function errorCB(err) {
-     console.log( 'The following error occurred: ' +  err.name);
- }
-
- function findCB(contents) {
-     console.log('The Joshua Tree :' + contents.length);
- }
-
- tizen.content.find(findCB, errorCB, null, albumFilter, null, count, offset);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Following example retrieves all songs from the album "The Joshua Tree" */
+var count = 100;
+var offset = 0;
+var albumFilter = new tizen.AttributeFilter("album", "EXACTLY", "The Joshua Tree");
+
+function errorCB(err)
+{
+&nbsp;&nbsp;&nbsp;console.log('The following error occurred: ' +  err.name);
+}
+
+function findCB(contents)
+{
+&nbsp;&nbsp;&nbsp;console.log('The Joshua Tree:' + contents.length);
+}
+
+tizen.content.find(findCB, errorCB, null, albumFilter, null, count, offset);
+</pre>
 </div>
         
       <div class="constructors">
@@ -398,25 +401,30 @@ Range filters, where only one boundary is set, are available.
           </p>
          </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var count = 100;
- var offset = 0;
- // Use the modifiedDate attribute with a range that starts today and ends in 1 day
- // (meaning that you search for all contents modified today)
- var today = new Date();
- var today_begin = new Date(today.getFullYear(), today.getMonth(),today.getDate());
- var today_end = new Date(today.getFullYear(), today.getMonth(),today.getDate()+1);
- var dateRangeFilter = new tizen.AttributeRangeFilter("modifiedDate", today_begin, today_end);
-
- function errorCB(err) {
-     console.log( 'The following error occurred: ' +  err.name);
- }
-
- function findCB(contents) {
-     console.log('The contents modified today :' + contents.length);
- }
-
- tizen.content.find(findCB, errorCB, null, dateRangeFilter, null, count, offset);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var count = 100;
+var offset = 0;
+/*
+   Use the modifiedDate attribute with a range that starts today and ends in 1 day
+   (meaning that you search for all contents modified today)
+*/
+var today = new Date();
+var today_begin = new Date(today.getFullYear(), today.getMonth(), today.getDate());
+var today_end = new Date(today.getFullYear(), today.getMonth(), today.getDate()+1);
+var dateRangeFilter = new tizen.AttributeRangeFilter("modifiedDate", today_begin, today_end);
+
+function errorCB(err)
+{
+&nbsp;&nbsp;&nbsp;console.log('The following error occurred: ' +  err.name);
+}
+
+function findCB(contents)
+{
+&nbsp;&nbsp;&nbsp;console.log('The contents modified today:' + contents.length);
+}
+
+tizen.content.find(findCB, errorCB, null, dateRangeFilter, null, count, offset);
+</pre>
 </div>
         
       <div class="constructors">
@@ -504,42 +512,48 @@ The intersection - used to filter objects that match all the filters it includes
           </ul>
          </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // The following example retrieves all songs from the album "The Joshua Tree", by artist "U2".
- var count = 100;
- var offset = 0;
- var artistFilter = new tizen.AttributeFilter("artists", "EXACTLY", "U2");
- var albumFilter = new tizen.AttributeFilter("album", "EXACTLY", "The Joshua Tree");
- var filter = new tizen.CompositeFilter("INTERSECTION", [albumFilter, artistFilter]);
-
- function errorCB(err) {
-     console.log( 'The following error occurred: ' +  err.name);
- }
-
- function findCB(contents) {
-     console.log('The Joshua Tree by U2:' + contents.length);
- }
-
- tizen.content.find(findCB, errorCB, null, filter, null, count, offset);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Following example retrieves all songs from the album "The Joshua Tree", by artist "U2" */
+var count = 100;
+var offset = 0;
+var artistFilter = new tizen.AttributeFilter("artists", "EXACTLY", "U2");
+var albumFilter = new tizen.AttributeFilter("album", "EXACTLY", "The Joshua Tree");
+var filter = new tizen.CompositeFilter("INTERSECTION", [albumFilter, artistFilter]);
+
+function errorCB(err)
+{
+&nbsp;&nbsp;&nbsp;console.log('The following error occurred: ' +  err.name);
+}
+
+function findCB(contents)
+{
+&nbsp;&nbsp;&nbsp;console.log('The Joshua Tree by U2:' + contents.length);
+}
+
+tizen.content.find(findCB, errorCB, null, filter, null, count, offset);
+</pre>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // The following example retrieves all songs from the album "Tormato" and all songs by artist "Rush".
- var count = 100;
- var offset = 0;
- var artistFilter = new tizen.AttributeFilter("artists", "EXACTLY", "Rush");
- var albumFilter = new tizen.AttributeFilter("album", "EXACTLY", "Tormato");
- var filter = new tizen.CompositeFilter("UNION", [albumFilter, artistFilter]);
-
- function errorCB(err) {
-     console.log( 'The following error occurred: ' +  err.name);
- }
-
- function findCB(contents) {
-     console.log('Songs found:' + contents.length);
- }
-
- tizen.content.find(findCB, errorCB, null, filter, null, count, offset);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Following example retrieves all songs from the album "Tormato" and all songs by artist "Rush" */
+var count = 100;
+var offset = 0;
+var artistFilter = new tizen.AttributeFilter("artists", "EXACTLY", "Rush");
+var albumFilter = new tizen.AttributeFilter("album", "EXACTLY", "Tormato");
+var filter = new tizen.CompositeFilter("UNION", [albumFilter, artistFilter]);
+
+function errorCB(err)
+{
+&nbsp;&nbsp;&nbsp;console.log('The following error occurred: ' +  err.name);
+}
+
+function findCB(contents)
+{
+&nbsp;&nbsp;&nbsp;console.log('Songs found:' + contents.length);
+}
+
+tizen.content.find(findCB, errorCB, null, filter, null, count, offset);
+</pre>
 </div>
         
       <div class="constructors">
@@ -592,34 +606,40 @@ Note that the sorting result of list type attributes is not determined.
           </p>
          </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // The following example retrieves all songs from the album "The Joshua Tree", by artist "U2", ordered by the track number.
- var count = 100;
- var offset = 0;
- var sortMode = new tizen.SortMode("trackNumber", "ASC");
- var artistFilter = new tizen.AttributeFilter("artists", "EXACTLY", "U2");
- var albumFilter = new tizen.AttributeFilter("album", "EXACTLY", "The Joshua Tree");
- var filter = new tizen.CompositeFilter("INTERSECTION", [albumFilter, artistFilter]);
-
- function errorCB(err) {
-     console.log( 'The following error occurred: ' +  err.name);
- }
-
- function printContent(content, index, contents) {
-     console.log('Track: ' + content.trackNumber + ' Title: ' + content.title + 'Duration: ' + content.duration + 'URL: ' + content.contentURI + 'MIME: ' + content.mimeType);
- }
-
- function findCB(contents) {
-     console.log('The Joshua Tree by U2:');
-     contents.forEach(printContent);
-     // Increase the offset as much as the count and then find content again.
-     if (contents.length == count) {
-         offset += count;
-         tizen.content.find(findCB, errorCB, null, filter, sortMode, count, offset);
-     }
- }
-
- tizen.content.find(findCB, errorCB, null, filter, sortMode, count, offset);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Following example retrieves all songs from the album "The Joshua Tree", by artist "U2", ordered by the track number */
+var count = 100;
+var offset = 0;
+var sortMode = new tizen.SortMode("trackNumber", "ASC");
+var artistFilter = new tizen.AttributeFilter("artists", "EXACTLY", "U2");
+var albumFilter = new tizen.AttributeFilter("album", "EXACTLY", "The Joshua Tree");
+var filter = new tizen.CompositeFilter("INTERSECTION", [albumFilter, artistFilter]);
+
+function errorCB(err)
+{
+&nbsp;&nbsp;&nbsp;console.log('The following error occurred: ' +  err.name);
+}
+
+function printContent(content, index, contents)
+{
+&nbsp;&nbsp;&nbsp;console.log('Track: ' + content.trackNumber + ' Title: ' + content.title + 'Duration: ' + content.duration + 
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'URL: ' + content.contentURI + 'MIME: ' + content.mimeType);
+}
+
+function findCB(contents)
+{
+&nbsp;&nbsp;&nbsp;console.log('The Joshua Tree by U2:');
+&nbsp;&nbsp;&nbsp;contents.forEach(printContent);
+&nbsp;&nbsp;&nbsp;/* Increase the offset as much as the count and then find content again */
+&nbsp;&nbsp;&nbsp;if (contents.length == count)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;offset += count;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tizen.content.find(findCB, errorCB, null, filter, sortMode, count, offset);
+&nbsp;&nbsp;&nbsp;}
+}
+
+tizen.content.find(findCB, errorCB, null, filter, sortMode, count, offset);
+</pre>
 </div>
 <div class="constructors">
 <h4 id="SortMode::constructor">Constructors</h4>
@@ -675,26 +695,31 @@ Latitude and longitude are of the WGS84 datum.
           </p>
          </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">   // This example utilizes methods from Tizen's HAM module to get current latitude and longitude.
-   var myPosition;
-
-   // reads current position from the GPS module.
-   function onChangedCB(info) {
-     var latitude, longitude;
-     latitude = info.gpsInfo[0].latitude;
-     longitude = info.gpsInfo[0].longitude;
-
-     // packs these values in one variable:
-     myPosition = new SimpleCoordinates(latitude, longitude);
-   }
-
-   // starts monitoring GPS info periodically.
-   try {
-     tizen.humanactivitymonitor.start("GPS", onChangedCB, {callbackInterval: 120000, sampleInterval: 60000});
-   } catch (err) {
-     console.log(err.name + ": " + err.message);
-   }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* This example utilizes methods from Tizen's HAM module to get current latitude and longitude */
+var myPosition;
+
+/* Reads current position from the GPS module */
+function onChangedCB(info)
+{
+&nbsp;&nbsp;&nbsp;var latitude, longitude;
+&nbsp;&nbsp;&nbsp;latitude = info.gpsInfo[0].latitude;
+&nbsp;&nbsp;&nbsp;longitude = info.gpsInfo[0].longitude;
+
+&nbsp;&nbsp;&nbsp;/* Packs these values in one variable */
+&nbsp;&nbsp;&nbsp;myPosition = new SimpleCoordinates(latitude, longitude);
+}
+
+/* Starts monitoring GPS info periodically */
+try
+{
+&nbsp;&nbsp;&nbsp;tizen.humanactivitymonitor.start("GPS", onChangedCB, {callbackInterval: 120000, sampleInterval: 60000});
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+}
+</pre>
 </div>
 <div class="constructors">
 <h4 id="SimpleCoordinates::constructor">Constructors</h4>
@@ -1199,14 +1224,15 @@ In case of successful execution of an asynchronous call, <em>SuccessCallback</em
          </div>
 <div class="example">
 <span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
-  function onSuccess() {
-    console.log("Application launched successfully");
-  }
+function onSuccess()
+{
+&nbsp;&nbsp;&nbsp;console.log("Application launched successfully");
+}
 
-  var app = tizen.application.getCurrentApplication();
-  var appid = app.appInfo.id;
+var app = tizen.application.getCurrentApplication();
+var appid = app.appInfo.id;
 
-  tizen.application.launch(appid, onSuccess);
+tizen.application.launch(appid, onSuccess);
 </pre>
 </div>
 <div class="methods">
@@ -1251,19 +1277,21 @@ it silently fails and there is no further action.
          </div>
 <div class="example">
 <span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
-  // Define the error callback:
-  function onError(error) {
-    console.log(error.message);
-  }
+/* Define the error callback */
+function onError(error)
+{
+&nbsp;&nbsp;&nbsp;console.log(error.message);
+}
 
-  function onSuccess() {
-    console.log("Application launched successfully");
-  }
+function onSuccess()
+{
+&nbsp;&nbsp;&nbsp;console.log("Application launched successfully");
+}
 
-  var app = tizen.application.getCurrentApplication();
-  var appid = app.appInfo.id;
+var app = tizen.application.getCurrentApplication();
+var appid = app.appInfo.id;
 
-  tizen.application.launch(appid, onSuccess, onError);
+tizen.application.launch(appid, onSuccess, onError);
 </pre>
 </div>
 <div class="methods">
index 00d2ab2..7ac06cf 100644 (file)
@@ -156,12 +156,14 @@ InvalidValuesError - If any of the input parameters contain an invalid value.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function successCallback() {
-     console.log("The requested user agent string has just been set successfully.");
- }
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function successCallback()
+{
+&nbsp;&nbsp;&nbsp;console.log("The requested user agent string has just been set successfully.");
+}
 
- tizen.websetting.setUserAgentString("the new user agent string to set", successCallback);
- </pre>
+tizen.websetting.setUserAgentString("the new user agent string to set", successCallback);
+</pre>
 </div>
 </dd>
 <dt class="method" id="WebSettingManager::removeAllCookies">
@@ -213,12 +215,14 @@ UnknownError - If any error occurs while deleting the cookies.              </li
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function successCallback() {
-     console.log("The cookies saved for your application have just been removed.");
- }
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function successCallback()
+{
+&nbsp;&nbsp;&nbsp;console.log("The cookies saved for your application have just been removed.");
+}
 
- tizen.websetting.removeAllCookies(successCallback);
- </pre>
+tizen.websetting.removeAllCookies(successCallback);
+</pre>
 </div>
 </dd>
 </dl>
index 09f42b9..c55fb2f 100644 (file)
@@ -428,19 +428,23 @@ The <em>tizen.widgetservice</em> object provides access to the Widget service AP
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> //variable id should contain valid id of the installed widget
- var id = "org.tizen.gallery.widget";
- try {
-   var myWidget = tizen.widgetservice.getWidget(id);
-   console.log("Widget id is " + myWidget.id);
-   console.log("Widget details:");
-   console.log("Main application id: " + myWidget.applicationId);
-   console.log("Package id: " + myWidget.packageId);
-   console.log("Is hidden in the list of widgets: " + myWidget.noDisplay);
- } catch (error) {
-   console.log("Error: " + error.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Variable id should contain valid id of the installed widget */
+var id = "org.tizen.gallery.widget";
+try
+{
+&nbsp;&nbsp;&nbsp;var myWidget = tizen.widgetservice.getWidget(id);
+&nbsp;&nbsp;&nbsp;console.log("Widget id is " + myWidget.id);
+&nbsp;&nbsp;&nbsp;console.log("Widget details:");
+&nbsp;&nbsp;&nbsp;console.log("Main application id: " + myWidget.applicationId);
+&nbsp;&nbsp;&nbsp;console.log("Package id: " + myWidget.packageId);
+&nbsp;&nbsp;&nbsp;console.log("Is hidden in the list of widgets: " + myWidget.noDisplay);
+}
+catch (error)
+{
+&nbsp;&nbsp;&nbsp;console.log("Error: " + error.message);
+}
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre> Widget id is org.tizen.gallery.widget
@@ -515,12 +519,15 @@ NotFoundError - If the device has no widgets or if a widget with the given id do
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> tizen.widgetservice.getWidgets(function (widgets) {
-   console.log("There are " + widgets.length + " available widgets");
- }, function (error) {
-    console.log("Error: " + error.message);
- });
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+tizen.widgetservice.getWidgets(function(widgets)
+{
+&nbsp;&nbsp;&nbsp;console.log("There are " + widgets.length + " available widgets");
+}, function(error)
+{
+&nbsp;&nbsp;&nbsp;console.log("Error: " + error.message);
+});
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre> There are 3 available widgets
@@ -580,15 +587,19 @@ NotFoundError - If the device has no widgets or if a widget with the given id do
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> //variable id should contain valid id of the application or package.
- var id = "org.tizen.gallery";
- try {
-   var widgetId = tizen.widgetservice.getPrimaryWidgetId(id);
-   console.log("Widget id is " + widgetId);
- } catch (error) {
-   console.log("Error: " + error.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Variable id should contain valid id of the application or package */
+var id = "org.tizen.gallery";
+try
+{
+&nbsp;&nbsp;&nbsp;var widgetId = tizen.widgetservice.getPrimaryWidgetId(id);
+&nbsp;&nbsp;&nbsp;console.log("Widget id is " + widgetId);
+}
+catch (error)
+{
+&nbsp;&nbsp;&nbsp;console.log("Error: " + error.message);
+}
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre> Widget id is org.tizen.gallery.widget
@@ -600,7 +611,7 @@ NotFoundError - If the device has no widgets or if a widget with the given id do
 </dt>
 <dd>
 <div class="brief">
- Returns the size coresponding to the given sizeType.
+ Returns the size corresponding to the given sizeType.
             </div>
 <div class="synopsis"><pre class="signature prettyprint"><a href="#WidgetSize">WidgetSize</a> getSize(<a href="#WidgetSizeType">WidgetSizeType</a> sizeType);
              </pre></div>
@@ -629,15 +640,19 @@ NotFoundError - If the device has no widgets or if a widget with the given id do
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> //variable sizeType should contain supported size type
- var sizeType = "4x4";
- try {
-   var widgetSize = tizen.widgetservice.getSize(sizeType);
-   console.log("Widget size width: " + widgetSize.width + ", height: " + widgetSize.height);
- } catch (error) {
-   console.log("Error: " + error.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Variable sizeType should contain supported size type */
+var sizeType = "4x4";
+try
+{
+&nbsp;&nbsp;&nbsp;var widgetSize = tizen.widgetservice.getSize(sizeType);
+&nbsp;&nbsp;&nbsp;console.log("Widget size width: " + widgetSize.width + ", height: " + widgetSize.height);
+}
+catch (error)
+{
+&nbsp;&nbsp;&nbsp;console.log("Error: " + error.message);
+}
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre> Widget size width: 712, height: 712
@@ -775,17 +790,21 @@ Precondition: Widget tag in the config.xml file includes the "nodisplay" attribu
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> //variable id should contain valid id of the installed widget
- var id = "org.tizen.gallery.widget";
-
- try {
-   var myWidget = tizen.widgetservice.getWidget(id);
-   var name = myWidget.getName("en-us");
-   console.log("Widget name is " + name);
- } catch (error) {
-   console.log("Error: " + error.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Variable id should contain valid id of the installed widget */
+var id = "org.tizen.gallery.widget";
+
+try
+{
+&nbsp;&nbsp;&nbsp;var myWidget = tizen.widgetservice.getWidget(id);
+&nbsp;&nbsp;&nbsp;var name = myWidget.getName("en-us");
+&nbsp;&nbsp;&nbsp;console.log("Widget name is " + name);
+}
+catch (error)
+{
+&nbsp;&nbsp;&nbsp;console.log("Error: " + error.message);
+}
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre> Widget name is Gallery
@@ -842,24 +861,30 @@ SecurityError - If the widget does not belong to the package of the web applicat
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> widgetSuccessCb = function(instances) {
-   console.log("Instances array size: " + instances.length);
- }
-
- widgetErrorCb = function(error) {
-   console.log("Error occurred: " + error.name + ": " + error.message);
- }
-
- //variable id should contain valid id of the installed widget
- var id = "org.tizen.gallery.widget";
-
- try {
-   var myWidget = tizen.widgetservice.getWidget(id);
-   myWidget.getInstances(widgetSuccessCb, widgetErrorCb);
- } catch (error) {
-   console.log("Error: " + error.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+widgetSuccessCb = function(instances)
+{
+&nbsp;&nbsp;&nbsp;console.log("Instances array size: " + instances.length);
+}
+
+widgetErrorCb = function(error)
+{
+&nbsp;&nbsp;&nbsp;console.log("Error occurred: " + error.name + ": " + error.message);
+}
+
+/* Variable id should contain valid id of the installed widget */
+var id = "org.tizen.gallery.widget";
+
+try
+{
+&nbsp;&nbsp;&nbsp;var myWidget = tizen.widgetservice.getWidget(id);
+&nbsp;&nbsp;&nbsp;myWidget.getInstances(widgetSuccessCb, widgetErrorCb);
+}
+catch (error)
+{
+&nbsp;&nbsp;&nbsp;console.log("Error: " + error.message);
+}
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre> Instances array size: 3
@@ -905,17 +930,21 @@ SecurityError - If the widget does not belong to the package of the web applicat
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> //variable id should contain valid id of the installed widget
- var id = "org.tizen.gallery.widget";
-
- try {
-   var myWidget = tizen.widgetservice.getWidget(id);
-   var variant = myWidget.getVariant("4x4");
-   console.log("Variant preview image path is " + variant.previewImagePath);
- } catch (error) {
-   console.log("Error: " + error.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Variable id should contain valid id of the installed widget */
+var id = "org.tizen.gallery.widget";
+
+try
+{
+&nbsp;&nbsp;&nbsp;var myWidget = tizen.widgetservice.getWidget(id);
+&nbsp;&nbsp;&nbsp;var variant = myWidget.getVariant("4x4");
+&nbsp;&nbsp;&nbsp;console.log("Variant preview image path is " + variant.previewImagePath);
+}
+catch (error)
+{
+&nbsp;&nbsp;&nbsp;console.log("Error: " + error.message);
+}
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre> Variant preview image path is /usr/share/icons/default/small/preview_gallery_4x4.png
@@ -965,24 +994,30 @@ AbortError - If the operation cannot be finished properly.              </li>
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> widgetSuccessCb = function(variants) {
-   console.log("Variants array size: " + variants.length);
- }
-
- widgetErrorCb = function(error) {
-   console.log("Error occurred: " + error.name + ": " + error.message);
- }
-
- //variable id should contain valid id of the installed widget
- var id = "org.tizen.gallery.widget";
-
- try {
-   var myWidget = tizen.widgetservice.getWidget(id);
-   myWidget.getVariants(widgetSuccessCb, widgetErrorCb);
- } catch (error) {
-   console.log("Error: " + error.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+widgetSuccessCb = function(variants)
+{
+&nbsp;&nbsp;&nbsp;console.log("Variants array size: " + variants.length);
+}
+
+widgetErrorCb = function(error)
+{
+&nbsp;&nbsp;&nbsp;console.log("Error occurred: " + error.name + ": " + error.message);
+}
+
+/* Variable id should contain valid id of the installed widget */
+var id = "org.tizen.gallery.widget";
+
+try
+{
+&nbsp;&nbsp;&nbsp;var myWidget = tizen.widgetservice.getWidget(id);
+&nbsp;&nbsp;&nbsp;myWidget.getVariants(widgetSuccessCb, widgetErrorCb);
+}
+catch (error)
+{
+&nbsp;&nbsp;&nbsp;console.log("Error: " + error.message);
+}
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre> Variants array size: 4
@@ -1028,21 +1063,26 @@ AbortError - If the operation cannot be finished properly.              </li>
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> widgetChangeCb = function(instance, event) {
-   console.log("Instance " + instance.id + " is " + event);
- }
-
- //variable id should contain valid id of the installed widget
- var id = "org.tizen.music-player.widget";
-
- try {
-   var myWidget = tizen.widgetservice.getWidget(id);
-   var watchId = myWidget.addStateChangeListener(widgetChangeCb);
-   console.log("Listener with id " + watchId + " has been added");
- } catch (error) {
-   console.log("Error: " + error.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+widgetChangeCb = function(instance, event)
+{
+&nbsp;&nbsp;&nbsp;console.log("Instance " + instance.id + " is " + event);
+}
+
+/* Variable id should contain valid id of the installed widget */
+var id = "org.tizen.music-player.widget";
+
+try
+{
+&nbsp;&nbsp;&nbsp;var myWidget = tizen.widgetservice.getWidget(id);
+&nbsp;&nbsp;&nbsp;var watchId = myWidget.addStateChangeListener(widgetChangeCb);
+&nbsp;&nbsp;&nbsp;console.log("Listener with id " + watchId + " has been added");
+}
+catch (error)
+{
+&nbsp;&nbsp;&nbsp;console.log("Error: " + error.message);
+}
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre> Listener with id 1 has been added.
@@ -1080,23 +1120,28 @@ AbortError - If the operation cannot be finished properly.              </li>
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> widgetChangeCb = function(instance, event) {
-   console.log("Instance " + instance.id + " is " + event);
-   myWidget.removeStateChangeListener(watchId);
-   console.log("Listener with id " + watchId + " has been removed");
- }
-
- //variable id should contain valid id of the installed widget
- var id = "org.tizen.music-player.widget";
- var watchId;
-
- try {
-   var myWidget = tizen.widgetservice.getWidget(id);
-   watchId = myWidget.addStateChangeListener(widgetChangeCb);
- } catch (error) {
-   console.log("Error: " + error.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+widgetChangeCb = function(instance, event)
+{
+&nbsp;&nbsp;&nbsp;console.log("Instance " + instance.id + " is " + event);
+&nbsp;&nbsp;&nbsp;myWidget.removeStateChangeListener(watchId);
+&nbsp;&nbsp;&nbsp;console.log("Listener with id " + watchId + " has been removed");
+}
+
+/* Variable id should contain valid id of the installed widget */
+var id = "org.tizen.music-player.widget";
+var watchId;
+
+try
+{
+&nbsp;&nbsp;&nbsp;var myWidget = tizen.widgetservice.getWidget(id);
+&nbsp;&nbsp;&nbsp;watchId = myWidget.addStateChangeListener(widgetChangeCb);
+}
+catch (error)
+{
+&nbsp;&nbsp;&nbsp;console.log("Error: " + error.message);
+}
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre> Listener with id 1 has been removed.
@@ -1336,17 +1381,21 @@ Every visual widget element added to the home screen is a single instance of som
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> //variable instance should contain valid WidgetInstance object obtained by getInstances() method.
- var instance;
- var period = 2;
-
- try {
-   instance.changeUpdatePeriod(period);
-   console.log("Update period has been set to " + period + " seconds");
- } catch (error) {
-   console.log("Error: " + error.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Variable instance should contain valid WidgetInstance object obtained by getInstances() method */
+var instance;
+var period = 2;
+
+try
+{
+&nbsp;&nbsp;&nbsp;instance.changeUpdatePeriod(period);
+&nbsp;&nbsp;&nbsp;console.log("Update period has been set to " + period + " seconds");
+}
+catch (error)
+{
+&nbsp;&nbsp;&nbsp;console.log("Error: " + error.message);
+}
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre> Update period has been set to 2 seconds.
@@ -1400,21 +1449,26 @@ This function does not wait for a confirmation that the data was updated.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> //variable instance should contain valid WidgetInstance object obtained by getInstances() method.
- var instance;
-
- var data = {
-  data1 : 'test1',
-  data2 : 'test2'
- };
-
- try {
-   instance.sendContent(data, true);
-   console.log("Data has been successfully sent");
- } catch (error) {
-   console.log("Error: " + error.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Variable instance should contain valid WidgetInstance object obtained by getInstances() method */
+var instance;
+
+var data =
+{
+&nbsp;&nbsp;&nbsp;data1: 'test1',
+&nbsp;&nbsp;&nbsp;data2: 'test2'
+};
+
+try
+{
+&nbsp;&nbsp;&nbsp;instance.sendContent(data, true);
+&nbsp;&nbsp;&nbsp;console.log("Data has been successfully sent");
+}
+catch (error)
+{
+&nbsp;&nbsp;&nbsp;console.log("Error: " + error.message);
+}
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre> Data has been successfully sent
@@ -1466,31 +1520,38 @@ AbortError - If the operation cannot be finished properly.              </li>
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> //variable instance should contain valid WidgetInstance object obtained by getInstances() method.
- var instance;
-
- contentSuccessCb = function(data) {
-  console.log("Data has been obtained successfully");
-  for (var prop in data) {
-    console.log(prop + " : " + data[prop]);
-  }
- }
-
- contentErrorCb = function(error) {
-  console.log("Error occurred: " + error.name + ":" + error.message);
- }
-
- try {
-   instance.getContent(contentSuccessCb, contentErrorCb);
- } catch (error) {
-   console.log("Error: " + error.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Variable instance should contain valid WidgetInstance object obtained by getInstances() method */
+var instance;
+
+contentSuccessCb = function(data)
+{
+&nbsp;&nbsp;&nbsp;console.log("Data has been obtained successfully");
+&nbsp;&nbsp;&nbsp;for (var prop in data)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(prop + ": " + data[prop]);
+&nbsp;&nbsp;&nbsp;}
+}
+
+contentErrorCb = function(error)
+{
+&nbsp;&nbsp;&nbsp;console.log("Error occurred: " + error.name + ":" + error.message);
+}
+
+try
+{
+&nbsp;&nbsp;&nbsp;instance.getContent(contentSuccessCb, contentErrorCb);
+}
+catch (error)
+{
+&nbsp;&nbsp;&nbsp;console.log("Error: " + error.message);
+}
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre> Data has been obtained successfully
- data1 : test1
- data2 : test2
+ data1: test1
+ data2: test2
  </pre>
 </div>
 </dd>
index 1f864ec..e5a15b5 100644 (file)
@@ -283,12 +283,13 @@ For more information about the application control, see <a href="application.htm
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Triggers an alarm on a given date/time
- var alarm = new tizen.AlarmAbsolute(new Date(2014, 10, 4, 8, 0));
- var appControl = new tizen.ApplicationControl("http://tizen.org/appcontrol/operation/view");
- tizen.alarm.add(alarm, tizen.application.getCurrentApplication().appInfo.id, appControl);
- console.log("Alarm added with id: " + alarm.id);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Triggers an alarm on a given date/time */
+var alarm = new tizen.AlarmAbsolute(new Date(2014, 10, 4, 8, 0));
+var appControl = new tizen.ApplicationControl("http://tizen.org/appcontrol/operation/view");
+tizen.alarm.add(alarm, tizen.application.getCurrentApplication().appInfo.id, appControl);
+console.log("Alarm added with id: " + alarm.id);
+</pre>
 </div>
 </dd>
 <dt class="method" id="AlarmManager::remove">
@@ -345,18 +346,23 @@ If an alarm goes off, it will be removed from the storage automatically.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var alarms = tizen.alarm.getAll();
-
- // Removes the first alarm
- if (alarms.length &gt; 0) {
-   try {
-     tizen.alarm.remove(alarms[0].id);
-     console.log("Successfully removed the first alarm.");
-   } catch(error) {
-     console.log("Failed to remove the first alarm.");
-   }
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var alarms = tizen.alarm.getAll();
+
+/* Removes the first alarm */
+if (alarms.length &gt; 0)
+{
+&nbsp;&nbsp;&nbsp;try
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tizen.alarm.remove(alarms[0].id);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Successfully removed the first alarm.");
+&nbsp;&nbsp;&nbsp;} 
+&nbsp;&nbsp;&nbsp;catch (error)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Failed to remove the first alarm.");
+&nbsp;&nbsp;&nbsp;}
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="AlarmManager::removeAll">
@@ -398,9 +404,10 @@ Because each application has its own alarm storage, this method removes alarms o
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> tizen.alarm.removeAll();
- console.log("remove all registered alarms in the storage.");
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+tizen.alarm.removeAll();
+console.log("remove all registered alarms in the storage.");
+</pre>
 </div>
 </dd>
 <dt class="method" id="AlarmManager::get">
@@ -445,18 +452,19 @@ Because each application has its own alarm storage, this method removes alarms o
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Sets an alarm
- var date = new Date();
- date.setHours(date.getHours()+1);
- var abs_alarm = new tizen.AlarmAbsolute(date);
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Sets an alarm */
+var date = new Date();
+date.setHours(date.getHours() + 1);
+var abs_alarm = new tizen.AlarmAbsolute(date);
 
- // Adds an alarm
- tizen.alarm.add(abs_alarm, tizen.application.getCurrentApplication().appInfo.id);
+/* Adds an alarm */
+tizen.alarm.add(abs_alarm, tizen.application.getCurrentApplication().appInfo.id);
 
- // Gets an alarm
- var alarm = tizen.alarm.get(abs_alarm.id);
- console.log("The alarm will trigger at " + alarm.getNextScheduledDate());
- </pre>
+/* Gets an alarm */
+var alarm = tizen.alarm.get(abs_alarm.id);
+console.log("The alarm will trigger at " + alarm.getNextScheduledDate());
+</pre>
 </div>
 </dd>
 <dt class="method" id="AlarmManager::getAll">
@@ -489,9 +497,10 @@ Alarms that have already been triggered are removed automatically from the stora
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var alarms = tizen.alarm.getAll();
- console.log(alarms.length + " alarms present in the storage.");
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var alarms = tizen.alarm.getAll();
+console.log(alarms.length + " alarms present in the storage.");
+</pre>
 </div>
 </dd>
 </dl>
@@ -553,17 +562,18 @@ It is guaranteed that this alarm will be fired after at least <em>delay</em> sec
 If <em>period</em> is provided, it will be adjusted by the operating system, however this value will not be lower than 600 seconds.
           </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Gets the current application ID.
- var appId = tizen.application.getCurrentApplication().appInfo.id;
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Gets the current application ID */
+var appId = tizen.application.getCurrentApplication().appInfo.id;
 
- // Sets an alarm in 3 hours from now
- var alarm1 = new tizen.AlarmRelative(3 * tizen.alarm.PERIOD_HOUR);
- tizen.alarm.add(alarm1, appId);
+/* Sets an alarm in 3 hours from now */
+var alarm1 = new tizen.AlarmRelative(3 * tizen.alarm.PERIOD_HOUR);
+tizen.alarm.add(alarm1, appId);
 
- // Sets an alarm in one hour, recurring after every 10 minutes
- var alarm2 = new tizen.AlarmRelative(tizen.alarm.PERIOD_HOUR, 10 * tizen.alarm.PERIOD_MINUTE);
- tizen.alarm.add(alarm2, appId);
- </pre>
+/* Sets an alarm in one hour, recurring after every 10 minutes */
+var alarm2 = new tizen.AlarmRelative(tizen.alarm.PERIOD_HOUR, 10 * tizen.alarm.PERIOD_MINUTE);
+tizen.alarm.add(alarm2, appId);
+</pre>
 </div>
         
       <div class="constructors">
@@ -635,16 +645,17 @@ If the alarm has expired, this method returns <var>null</var>.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Gets the current application ID.
- var appId = tizen.application.getCurrentApplication().appInfo.id;
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Gets the current application ID */
+var appId = tizen.application.getCurrentApplication().appInfo.id;
 
- // Sets an alarm in 3 hours from now
- var alarm = new tizen.AlarmRelative(3 * tizen.alarm.PERIOD_HOUR);
- tizen.alarm.add(alarm, appId);
+/* Sets an alarm in 3 hours from now */
+var alarm = new tizen.AlarmRelative(3 * tizen.alarm.PERIOD_HOUR);
+tizen.alarm.add(alarm, appId);
 
- var sec = alarm.getRemainingSeconds();
- console.log("remaining time is " + sec);
- </pre>
+var sec = alarm.getRemainingSeconds();
+console.log("remaining time is " + sec);
+</pre>
 </div>
 </dd>
 </dl>
@@ -679,22 +690,23 @@ If a <em>period</em> is provided, the alarm keeps triggering for the given inter
           </p>
          </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Gets the current application ID.
- var appId = tizen.application.getCurrentApplication().appInfo.id;
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Gets the current application ID */
+var appId = tizen.application.getCurrentApplication().appInfo.id;
 
- // Sets an alarm on January 1st 2014 08:00
- var date = new Date(2014, 0, 1, 8, 0);
- var alarm1 = new tizen.AlarmAbsolute(date);
- tizen.alarm.add(alarm1, appId);
+/* Sets an alarm on January 1st 2014 08:00 */
+var date = new Date(2014, 0, 1, 8, 0);
+var alarm1 = new tizen.AlarmAbsolute(date);
+tizen.alarm.add(alarm1, appId);
 
- // Sets an alarm on January 1st 2014 08:00, repeating every 2 days
- var alarm2 = new tizen.AlarmAbsolute(date, 2 * tizen.alarm.PERIOD_DAY);
- tizen.alarm.add(alarm2, appId);
+/* Sets an alarm on January 1st 2014 08:00, repeating every 2 days */
+var alarm2 = new tizen.AlarmAbsolute(date, 2 * tizen.alarm.PERIOD_DAY);
+tizen.alarm.add(alarm2, appId);
 
- // Sets an alarm occurring on every Saturday and Sunday, at 08:00, starting from January 1st 2014
- var alarm3 = new tizen.AlarmAbsolute(date, ["SA", "SU"]);
- tizen.alarm.add(alarm3, appId);
- </pre>
+/* Sets an alarm occurring on every Saturday and Sunday, at 08:00, starting from January 1st 2014 */
+var alarm3 = new tizen.AlarmAbsolute(date, ["SA", "SU"]);
+tizen.alarm.add(alarm3, appId);
+</pre>
 </div>
         
       <div class="constructors">
@@ -791,17 +803,18 @@ If the alarm has expired, this method returns <var>null</var>. The returned date
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Gets the current application ID.
- var appId = tizen.application.getCurrentApplication().appInfo.id;
-
- // Sets an alarm on January 1st 2014 08:00
- var date = new Date(2014, 0, 1, 8, 0);
- var alarm1 = new tizen.AlarmAbsolute(date);
- tizen.alarm.add(alarm1, appId);
-
- var date = alarm1.getNextScheduledDate();
- console.log("next scheduled time is " + date);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Gets the current application ID */
+var appId = tizen.application.getCurrentApplication().appInfo.id;
+
+/* Sets an alarm on January 1st 2014 08:00 */
+var date = new Date(2014, 0, 1, 8, 0);
+var alarm1 = new tizen.AlarmAbsolute(date);
+tizen.alarm.add(alarm1, appId);
+
+var date = alarm1.getNextScheduledDate();
+console.log("next scheduled time is " + date);
+</pre>
 </div>
 </dd>
 </dl>
index 3ed6f2f..b43de5b 100644 (file)
@@ -390,9 +390,10 @@ The <em>tizen.application </em>object allows access to the Application API's fun
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var app = tizen.application.getCurrentApplication();
- console.log("Current application's app id is " + app.appInfo.id);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var app = tizen.application.getCurrentApplication();
+console.log("Current application's app id is " + app.appInfo.id);
+</pre>
 </div>
 </dd>
 <dt class="method" id="ApplicationManager::kill">
@@ -460,23 +461,28 @@ UnknownError - If any other error occurs.              </li>
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function onKillSuccess() {
-     console.log("Application terminated successfully");
- }
-
- function onRunningAppsContext(contexts) {
-    // let's assume that the application "targetApp0.main" has been installed.
-    var targetId = "targetApp0.main";
-
-    for (var i = 0; i &lt; contexts.length; i++) {
-        if (contexts[i].appId == targetId) {
-            tizen.application.kill(contexts[i].id, onKillSuccess);
-        }
-    }
- }
-
- tizen.application.getAppsContext(onRunningAppsContext);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function onKillSuccess()
+{
+&nbsp;&nbsp;&nbsp;console.log("Application terminated successfully");
+}
+
+function onRunningAppsContext(contexts)
+{
+&nbsp;&nbsp;&nbsp;/* Let's assume that the application "targetApp0.main" has been installed */
+&nbsp;&nbsp;&nbsp;var targetId = "targetApp0.main";
+
+&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; contexts.length; i++)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (contexts[i].appId == targetId)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tizen.application.kill(contexts[i].id, onKillSuccess);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;}
+}
+
+tizen.application.getAppsContext(onRunningAppsContext);
+</pre>
 </div>
 </dd>
 <dt class="method" id="ApplicationManager::launch">
@@ -541,13 +547,15 @@ UnknownError - If any other error occurs.              </li>
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function onsuccess() {
-     console.log("The application has launched successfully");
- }
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function onsuccess()
+{
+&nbsp;&nbsp;&nbsp;console.log("The application has launched successfully");
+}
 
- // let's assume that application "targetApp0.main" has been installed
- tizen.application.launch("targetApp0.main", onsuccess);
- </pre>
+/* Let's assume that application "targetApp0.main" has been installed */
+tizen.application.launch("targetApp0.main", onsuccess);
+</pre>
 </div>
 </dd>
 <dt class="method" id="ApplicationManager::launchAppControl">
@@ -641,34 +649,33 @@ UnknownError: If any other error occurs.              </li>
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var appControl = new tizen.ApplicationControl(
-     "http://tizen.org/appcontrol/operation/pick",
-     null,
-     "image/jpeg",
-     null);
-
- var appControlReplyCallback = {
-     // callee sent a reply
-     onsuccess: function(data) {
-         for (var i = 0; i &lt; data.length; i++) {
-             if (data[i].key == "http://tizen.org/appcontrol/data/selected") {
-                 console.log('Selected image is ' + data[i].value[0]);
-             }
-         }
-     },
-     // callee returned failure
-     onfailure: function() {
-         console.log('The launch application control failed');
-     }
- }
-
- tizen.application.launchAppControl(
-     appControl,
-     null,
-     function() {console.log("launch application control succeed"); },
-     function(e) {console.log("launch application control failed. reason: " + e.message); },
-     appControlReplyCallback );
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var appControl = new tizen.ApplicationControl("http://tizen.org/appcontrol/operation/pick",
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;null, "image/jpeg", null);
+
+var appControlReplyCallback = 
+{
+&nbsp;&nbsp;&nbsp;/* Callee sent a reply */
+&nbsp;&nbsp;&nbsp;onsuccess: function(data)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; data.length; i++)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (data[i].key == "http://tizen.org/appcontrol/data/selected")
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('Selected image is ' + data[i].value[0]);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;/* Callee returned failure */
+&nbsp;&nbsp;&nbsp;onfailure: function()
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('The launch application control failed');
+&nbsp;&nbsp;&nbsp;}
+}
+
+tizen.application.launchAppControl(appControl, null,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;function() {console.log("launch application control succeed");},
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;function(e) {console.log("launch application control failed. reason: " + e.message);},
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;appControlReplyCallback);
+</pre>
 </div>
 </dd>
 <dt class="method" id="ApplicationManager::findAppControl">
@@ -723,42 +730,41 @@ UnknownError - If any other error occurs.              </li>
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var appControl = new tizen.ApplicationControl(
-     "http://tizen.org/appcontrol/operation/pick",
-     null,
-     "image/jpeg",
-     null);
-
- function successCB(appInfos, appControl)
- {
-     // appControl is same object with the value passed as first parameter to findAppControl()
-     var appControlReplyCallback = {
-         // callee sent a reply
-         onsuccess: function(data) {
-             for (var i = 0; i &lt; data.length; i++) {
-                 if (data[i].key == "http://tizen.org/appcontrol/data/selected") {
-                     console.log('Selected image is ' + data[i].value[0]);
-                 }
-             }
-         },
-         // callee returned failure
-         onfailure: function() {
-             console.log('The launch application control failed');
-         }
-     }
-
-     var appId = appInfos[0].id; // select first app's id
-
-     tizen.application.launchAppControl(
-         appControl,
-         appId,
-         function() {console.log("launch application control succeed"); },
-        function(e) {console.log("launch application control failed. reason: " + e.message); },
-        appControlReplyCallback );
- }
-
- tizen.application.findAppControl(appControl, successCB);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var appControl = new tizen.ApplicationControl("http://tizen.org/appcontrol/operation/pick",
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;null, "image/jpeg", null);
+
+function successCB(appInfos, appControl)
+{
+&nbsp;&nbsp;&nbsp;/* appControl is same object with the value passed as first parameter to findAppControl() */
+&nbsp;&nbsp;&nbsp;var appControlReplyCallback = 
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Callee sent a reply */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;onsuccess: function(data)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; data.length; i++)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (data[i].key == "http://tizen.org/appcontrol/data/selected")
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('Selected image is ' + data[i].value[0]);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Callee returned failure */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;onfailure: function()
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('The launch application control failed');
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;}
+
+&nbsp;&nbsp;&nbsp;var appId = appInfos[0].id; /* Select first app's id */
+
+&nbsp;&nbsp;&nbsp;tizen.application.launchAppControl(appControl, appId,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;function() {console.log("launch application control succeed");},
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;function(e) {console.log("launch application control failed. reason: " + e.message);},
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;appControlReplyCallback);
+}
+
+tizen.application.findAppControl(appControl, successCB);
+</pre>
 </div>
 </dd>
 <dt class="method" id="ApplicationManager::getAppsContext">
@@ -805,13 +811,15 @@ UnknownError - If an unknown error occurs.              </li>
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function onRunningAppsContext(contexts) {
-     for (var i = 0; i &lt; contexts.length; i++)
-         console.log("ID : " + contexts[i].id);
- }
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function onRunningAppsContext(contexts)
+{
+&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; contexts.length; i++)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("ID: " + contexts[i].id);
+}
 
- tizen.application.getAppsContext(onRunningAppsContext);
- </pre>
+tizen.application.getAppsContext(onRunningAppsContext);
+</pre>
 </div>
 </dd>
 <dt class="method" id="ApplicationManager::getAppContext">
@@ -855,9 +863,10 @@ The list of running applications and their application IDs is obtained with <em>
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var appContext = tizen.application.getAppContext(null);
- console.log("Application context retrieved for app " + appContext.appId);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var appContext = tizen.application.getAppContext(null);
+console.log("Application context retrieved for app " + appContext.appId);
+</pre>
 </div>
 </dd>
 <dt class="method" id="ApplicationManager::getAppsInfo">
@@ -904,13 +913,15 @@ UnknownError - If an unknown error occurs.              </li>
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function onListInstalledApps(applications) {
-     for (var i = 0; i &lt; applications.length; i++)
-         console.log("ID : " + applications[i].id);
- }
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function onListInstalledApps(applications)
+{
+&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; applications.length; i++)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("ID: " + applications[i].id);
+}
 
- tizen.application.getAppsInfo(onListInstalledApps);
- </pre>
+tizen.application.getAppsInfo(onListInstalledApps);
+</pre>
 </div>
 </dd>
 <dt class="method" id="ApplicationManager::getAppInfo">
@@ -958,9 +969,10 @@ The list of installed applications and their application IDs is obtained with <e
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var appInfo = tizen.application.getAppInfo(null);
- console.log("Current application name : " + appInfo.name);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var appInfo = tizen.application.getAppInfo(null);
+console.log("Current application name: " + appInfo.name);
+</pre>
 </div>
 </dd>
 <dt class="method" id="ApplicationManager::getAppCerts">
@@ -1041,13 +1053,15 @@ The certificate types are listed below:
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var appCerts = tizen.application.getAppCerts(null);
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var appCerts = tizen.application.getAppCerts(null);
 
- for (var i = 0; i &lt; appCerts.length; i++) {
-    console.log("#" + i + " type:" + appCerts[i].type);
-    console.log("#" + i + " value:" + appCerts[i].value);
- }
- </pre>
+for (var i = 0; i &lt; appCerts.length; i++)
+{
+&nbsp;&nbsp;&nbsp;console.log("#" + i + " type:" + appCerts[i].type);
+&nbsp;&nbsp;&nbsp;console.log("#" + i + " value:" + appCerts[i].value);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="ApplicationManager::getAppSharedURI">
@@ -1095,9 +1109,10 @@ If the ID is set to <var>null</var> or not set at all, it returns the shared dir
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var sharedDir = tizen.application.getAppSharedURI(null);
- console.log("shared directory : " + sharedDir);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var sharedDir = tizen.application.getAppSharedURI(null);
+console.log("shared directory: " + sharedDir);
+</pre>
 </div>
 </dd>
 <dt class="method" id="ApplicationManager::getAppMetaData">
@@ -1156,10 +1171,10 @@ an empty array is returned
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var metaDataArray = tizen.application.getAppMetaData(null);
- console.log("size of metadata : " + metaDataArray.length);
-
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var metaDataArray = tizen.application.getAppMetaData(null);
+console.log("size of metadata: " + metaDataArray.length);
+</pre>
 </div>
 </dd>
 <dt class="deprecated method" id="ApplicationManager::addAppInfoEventListener">
@@ -1226,19 +1241,24 @@ with the corresponding listener identifier.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var appEventCallback = {
-    oninstalled: function(appInfo) {
-       console.log('The application ' + appInfo.name + ' is installed');
-    },
-    onupdated: function(appInfo) {
-       console.log('The application ' + appInfo.name + ' is updated');
-    },
-    onuninstalled: function(appid) {
-       console.log('The application ' + appid + ' is uninstalled');
-    }
- };
- var watchId = tizen.application.addAppInfoEventListener(appEventCallback);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var appEventCallback = 
+{
+&nbsp;&nbsp;&nbsp;oninstalled: function(appInfo)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('The application ' + appInfo.name + ' is installed');
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;onupdated: function(appInfo)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('The application ' + appInfo.name + ' is updated');
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;onuninstalled: function(appid)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('The application ' + appid + ' is uninstalled');
+&nbsp;&nbsp;&nbsp;}
+};
+var watchId = tizen.application.addAppInfoEventListener(appEventCallback);
+</pre>
 </div>
 </dd>
 <dt class="deprecated method" id="ApplicationManager::removeAppInfoEventListener">
@@ -1281,20 +1301,25 @@ Instead, you can use <a href="./package.html#PackageManager::unsetPackageInfoEve
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var appEventCallback = {
-   oninstalled: function(appInfo) {
-     console.log('The application ' + appInfo.name + ' is installed');
-   },
-   onupdated: function(appInfo) {
-     console.log('The application ' + appInfo.name + ' is updated');
-   },
-   onuninstalled: function(appid) {
-     console.log('The application ' + appid + ' is uninstalled');
-   }
- };
- var watchId = tizen.application.addAppInfoEventListener(appEventCallback);
- tizen.application.removeAppInfoEventListener(watchId);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var appEventCallback = 
+{
+&nbsp;&nbsp;&nbsp;oninstalled: function(appInfo)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('The application ' + appInfo.name + ' is installed');
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;onupdated: function(appInfo)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('The application ' + appInfo.name + ' is updated');
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;onuninstalled: function(appid)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('The application ' + appid + ' is uninstalled');
+&nbsp;&nbsp;&nbsp;}
+};
+var watchId = tizen.application.addAppInfoEventListener(appEventCallback);
+tizen.application.removeAppInfoEventListener(watchId);
+</pre>
 </div>
 </dd>
 </dl>
@@ -1379,10 +1404,11 @@ the basic operations (such as exit or hide) for the current application.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var app = tizen.application.getCurrentApplication();
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var app = tizen.application.getCurrentApplication();
 
- app.exit();
- </pre>
+app.exit();
+</pre>
 </div>
 </dd>
 <dt class="method" id="Application::hide">
@@ -1406,10 +1432,11 @@ the basic operations (such as exit or hide) for the current application.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var app = tizen.application.getCurrentApplication();
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var app = tizen.application.getCurrentApplication();
 
- app.hide();
- </pre>
+app.hide();
+</pre>
 </div>
 </dd>
 <dt class="method" id="Application::getRequestedAppControl">
@@ -1449,12 +1476,14 @@ appropriately when it is launched.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var reqAppControl = tizen.application.getCurrentApplication().getRequestedAppControl();
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var reqAppControl = tizen.application.getCurrentApplication().getRequestedAppControl();
 
- if (reqAppControl) {
-     console.log("Requester AppID : " + reqAppControl.callerAppId);
- }
- </pre>
+if (reqAppControl) 
+{
+&nbsp;&nbsp;&nbsp;console.log("Requester AppID: " + reqAppControl.callerAppId);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="Application::addEventListener">
@@ -1505,28 +1534,35 @@ System events do not require an application identifier to be specified. Therefor
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var app = tizen.application.getCurrentApplication();
-
- // for user events: sender's application ID  and event name must be provided by using a dictionary
- // Let's assume that at least two applications are installed
- function onListInstalledApps(appsInfo) {
-   var appId = null;
-
-   if (appsInfo.length &gt; 0 &amp;&amp; app.appInfo.id != appsInfo[0].id) {
-     appId = appsInfo[0].id;
-   } else if (appsInfo.length &gt; 1) {
-     appId = appsInfo[1].id;
-   }
-
-   if (appId) {
-     var watchId = app.addEventListener({"appId": appId, "name": "custom_user_event"}, function(event, data) {
-       console.log("Data: " + JSON.stringify(data));
-       // do something
-     });
-   }
- }
- tizen.application.getAppsInfo(onListInstalledApps);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var app = tizen.application.getCurrentApplication();
+
+/* For user events: sender's application ID and event name must be provided by using a dictionary */
+/* Let's assume that at least two applications are installed */
+function onListInstalledApps(appsInfo)
+{
+&nbsp;&nbsp;&nbsp;var appId = null;
+
+&nbsp;&nbsp;&nbsp;if (appsInfo.length &gt; 0 &amp;&amp; app.appInfo.id != appsInfo[0].id)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;appId = appsInfo[0].id;
+&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;else if (appsInfo.length &gt; 1)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;appId = appsInfo[1].id;
+&nbsp;&nbsp;&nbsp;}
+
+&nbsp;&nbsp;&nbsp;if (appId)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var watchId = app.addEventListener({"appId": appId, "name": "custom_user_event"}, function(event, data)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Data: " + JSON.stringify(data));
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Do something */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;});
+&nbsp;&nbsp;&nbsp;}
+}
+tizen.application.getAppsInfo(onListInstalledApps);
+</pre>
 </div>
 </dd>
 <dt class="method" id="Application::removeEventListener">
@@ -1559,31 +1595,39 @@ System events do not require an application identifier to be specified. Therefor
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var app = tizen.application.getCurrentApplication();
-
- // for user events: sender's application ID  and event name must be provided by using a dictionary
- // Let's assume that at least two applications are installed
- function onListInstalledApps(appsInfo) {
-   var appId = null;
-   var watchId = null;
-
-   if (appsInfo.length &gt; 0 &amp;&amp; app.appInfo.id != appsInfo[0].id) {
-     appId = appsInfo[0].id;
-   } else if (appsInfo.length &gt; 1) {
-     appId = appsInfo[1].id;
-   }
-
-   if (appId) {
-     watchId = app.addEventListener({"appId": appId, "name": "custom_user_event"}, function(event, data) {
-       if (watchId) {
-         app.removeEventListener(watchId);
-         watchId = null;
-       }
-     });
-   }
- }
- tizen.application.getAppsInfo(onListInstalledApps);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var app = tizen.application.getCurrentApplication();
+
+/* For user events: sender's application ID and event name must be provided by using a dictionary */
+/* Let's assume that at least two applications are installed */
+function onListInstalledApps(appsInfo)
+{
+&nbsp;&nbsp;&nbsp;var appId = null;
+&nbsp;&nbsp;&nbsp;var watchId = null;
+
+&nbsp;&nbsp;&nbsp;if (appsInfo.length &gt; 0 &amp;&amp; app.appInfo.id != appsInfo[0].id)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;appId = appsInfo[0].id;
+&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;else if (appsInfo.length &gt; 1)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;appId = appsInfo[1].id;
+&nbsp;&nbsp;&nbsp;}
+
+&nbsp;&nbsp;&nbsp;if (appId)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;watchId = app.addEventListener({"appId": appId, "name": "custom_user_event"}, function(event, data)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (watchId)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;app.removeEventListener(watchId);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;watchId = null;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;});
+&nbsp;&nbsp;&nbsp;}
+}
+tizen.application.getAppsInfo(onListInstalledApps);
+</pre>
 </div>
 </dd>
 <dt class="method" id="Application::broadcastEvent">
@@ -1630,14 +1674,16 @@ An application can listen to events from other applications. However, it can onl
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var myCustomData = {
-   foo: 'bar'
- };
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var myCustomData = 
+{
+&nbsp;&nbsp;&nbsp;foo: 'bar'
+};
 
- var app = tizen.application.getCurrentApplication();
+var app = tizen.application.getCurrentApplication();
 
- app.broadcastEvent({"name": "custom_user_event"}, myCustomData);
- </pre>
+app.broadcastEvent({"name": "custom_user_event"}, myCustomData);
+</pre>
 </div>
 </dd>
 <dt class="method" id="Application::broadcastTrustedEvent">
@@ -1684,14 +1730,16 @@ An application can listen to events from other applications. However, it can onl
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var myTrustedCustomData = {
-   foo: 'bar'
- };
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var myTrustedCustomData = 
+{
+&nbsp;&nbsp;&nbsp;foo: 'bar'
+};
 
- var app = tizen.application.getCurrentApplication();
+var app = tizen.application.getCurrentApplication();
 
- app.broadcastTrustedEvent({"name": "custom_user_event"}, myTrustedCustomData);
- </pre>
+app.broadcastTrustedEvent({"name": "custom_user_event"}, myTrustedCustomData);
+</pre>
 </div>
 </dd>
 </dl>
@@ -1899,8 +1947,9 @@ between applications through the <em>ApplicationControl </em>interface.
  2.0
           </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var appControlData = new tizen.ApplicationControlData("image", [imagedata1]);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var appControlData = new tizen.ApplicationControlData("image", [imagedata1]);
+</pre>
 </div>
 <div class="constructors">
 <h4 id="ApplicationControlData::constructor">Constructors</h4>
@@ -1963,15 +2012,11 @@ and launches the selected application.
  2.0
           </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var appControl =
-       new tizen.ApplicationControl(
-                  "http://tizen.org/appcontrol/operation/view",
-                  null,
-                  "image/jpeg",
-                  null,
-                  [new tizen.ApplicationControlData("images",
-                                                    [imagedata1, imagedata2])] );
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var appControl = new tizen.ApplicationControl("http://tizen.org/appcontrol/operation/view",
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;null, "image/jpeg", null,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[new tizen.ApplicationControlData("images", [imagedata1, imagedata2])]);
+</pre>
 </div>
 <div class="constructors">
 <h4 id="ApplicationControl::constructor">Constructors</h4>
@@ -2129,17 +2174,20 @@ It contains the information that the calling application passed to <em>launchApp
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var reqAppControl = tizen.application.getCurrentApplication().getRequestedAppControl();
- if (reqAppControl) {
-     console.log("Requester AppID : " + reqAppControl.callerAppId);
-
-     var appControl = reqAppControl.appControl;
-     if (appControl.operation == "http://tizen.org/appcontrol/operation/pick") {
-         var data = new tizen.ApplicationControlData("http://tizen.org/appcontrol/data/selected", ["Image1.jpg"]);
-         reqAppControl.replyResult([data]);
-     }
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var reqAppControl = tizen.application.getCurrentApplication().getRequestedAppControl();
+if (reqAppControl)
+{
+&nbsp;&nbsp;&nbsp;console.log("Requester AppID: " + reqAppControl.callerAppId);
+
+&nbsp;&nbsp;&nbsp;var appControl = reqAppControl.appControl;
+&nbsp;&nbsp;&nbsp;if (appControl.operation == "http://tizen.org/appcontrol/operation/pick")
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var data = new tizen.ApplicationControlData("http://tizen.org/appcontrol/data/selected", ["Image1.jpg"]);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;reqAppControl.replyResult([data]);
+&nbsp;&nbsp;&nbsp;}
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="RequestedApplicationControl::replyFailure">
@@ -2169,16 +2217,19 @@ to perform the requested action.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var reqAppControl = tizen.application.getCurrentApplication().getRequestedAppControl();
- if (reqAppControl) {
-     console.log("Requester AppID : " + reqAppControl.callerAppId);
-
-     var appControl = reqAppControl.appControl;
-     if (appControl.operation == "http://tizen.org/appcontrol/operation/pick") {
-         reqAppControl.replyFailure();
-     }
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var reqAppControl = tizen.application.getCurrentApplication().getRequestedAppControl();
+if (reqAppControl)
+{
+&nbsp;&nbsp;&nbsp;console.log("Requester AppID: " + reqAppControl.callerAppId);
+
+&nbsp;&nbsp;&nbsp;var appControl = reqAppControl.appControl;
+&nbsp;&nbsp;&nbsp;if (appControl.operation == "http://tizen.org/appcontrol/operation/pick")
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;reqAppControl.replyFailure();
+&nbsp;&nbsp;&nbsp;}
+}
+</pre>
 </div>
 </dd>
 </dl>
@@ -2310,13 +2361,15 @@ This callback interface specifies a success method with an array of
         </ul>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function onListInstalledApps(applications) {
-     for (var i = 0; i &lt; applications.length; i++)
-         console.log("ID : " + applications[i].id);
- }
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function onListInstalledApps(applications)
+{
+&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; applications.length; i++)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("ID: " + applications[i].id);
+}
 
- tizen.application.getAppsInfo(onListInstalledApps);
- </pre>
+tizen.application.getAppsInfo(onListInstalledApps);
+</pre>
 </div>
 </dd>
 </dl>
@@ -2370,43 +2423,42 @@ It is used in <em>ApplicationManager.findAppControl()</em>.
         </ul>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var appControl = new tizen.ApplicationControl(
-     "http://tizen.org/appcontrol/operation/pick",
-     null,
-     "image/jpeg",
-     null);
-
- // FindAppControlSuccessCallback instance
- function successCB(appInfos, appControl)
- {
-     // appControl is same object with the value passed as first parameter to findAppControl()
-     var appControlReplyCallback = {
-         // callee sent a reply
-         onsuccess: function(data) {
-             for (var i = 0; i &lt; data.length; i++) {
-                 if (data[i].key == "http://tizen.org/appcontrol/data/selected") {
-                     console.log('Selected image is ' + data[i].value[0]);
-                 }
-             }
-         },
-         // callee returned failure
-         onfailure: function() {
-             console.log('The launch application control failed');
-         }
-     }
-
-     var appId = appInfos[0].id; // select first app's id
-
-     tizen.application.launchAppControl(
-         appControl,
-         appId,
-         function() {console.log("launch application control succeed"); },
-        function(e) {console.log("launch application control failed. reason: " + e.message); },
-        appControlReplyCallback );
- }
-
- tizen.application.findAppControl(appControl, successCB);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var appControl = new tizen.ApplicationControl("http://tizen.org/appcontrol/operation/pick",
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;null, "image/jpeg", null);
+
+/* FindAppControlSuccessCallback instance */
+function successCB(appInfos, appControl)
+{
+&nbsp;&nbsp;&nbsp;/* appControl is same object with the value passed as first parameter to findAppControl() */
+&nbsp;&nbsp;&nbsp;var appControlReplyCallback =
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Callee sent a reply */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;onsuccess: function(data)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; data.length; i++)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (data[i].key == "http://tizen.org/appcontrol/data/selected")
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('Selected image is ' + data[i].value[0]);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Callee returned failure */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;onfailure: function()
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('The launch application control failed');
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;}
+
+&nbsp;&nbsp;&nbsp;var appId = appInfos[0].id; /* Select first app's id */
+
+&nbsp;&nbsp;&nbsp;tizen.application.launchAppControl(appControl, appId,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;function() {console.log("launch application control succeed");},
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;function(e) {console.log("launch application control failed. reason: " + e.message);},
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;appControlReplyCallback);
+}
+
+tizen.application.findAppControl(appControl, successCB);
+</pre>
 </div>
 </dd>
 </dl>
@@ -2485,35 +2537,34 @@ This callback interface specifies two methods:
           </ul>
          </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var appControl = new tizen.ApplicationControl(
-     "http://tizen.org/appcontrol/operation/pick",
-     null,
-     "image/jpeg",
-     null);
-
- // ApplicationControlDataArrayReplyCallback instance
- var appControlReplyCallback = {
-     // callee sent a reply
-     onsuccess: function(data) {
-         for (var i = 0; i &lt; data.length; i++) {
-             if (data[i].key == "http://tizen.org/appcontrol/data/selected") {
-                 console.log('Selected image is ' + data[i].value[0]);
-             }
-         }
-     },
-     // callee returned failure
-     onfailure: function() {
-         console.log('The launch application control failed');
-     }
- }
-
- tizen.application.launchAppControl(
-     appControl,
-     null,
-     function() {console.log("launch application control succeed"); },
-     function(e) {console.log("launch application control failed. reason: " + e.message); },
-     appControlReplyCallback );
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var appControl = new tizen.ApplicationControl("http://tizen.org/appcontrol/operation/pick",
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;null, "image/jpeg", null);
+
+/* ApplicationControlDataArrayReplyCallback instance */
+var appControlReplyCallback =
+{
+&nbsp;&nbsp;&nbsp;/* Callee sent a reply */
+&nbsp;&nbsp;&nbsp;onsuccess: function(data)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; data.length; i++)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (data[i].key == "http://tizen.org/appcontrol/data/selected")
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('Selected image is ' + data[i].value[0]);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;/* Callee returned failure */
+&nbsp;&nbsp;&nbsp;onfailure: function()
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('The launch application control failed');
+&nbsp;&nbsp;&nbsp;}
+}
+
+tizen.application.launchAppControl(appControl, null,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;function() {console.log("launch application control succeed");},
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;function(e) {console.log("launch application control failed. reason: " + e.message);},
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;appControlReplyCallback);
+</pre>
 </div>
 <div class="methods">
 <h4>Methods</h4>
@@ -2582,19 +2633,24 @@ an application is installed, updated, or uninstalled.
           </p>
          </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var appEventCallback = {
-    oninstalled: function(appInfo) {
-       console.log('The application ' + appInfo.name + ' is installed');
-    },
-    onupdated: function(appInfo) {
-       console.log('The application ' + appInfo.name + ' is updated');
-    },
-    onuninstalled: function(appid) {
-       console.log('The application ' + appid + ' is uninstalled');
-    }
- };
- var watchId = tizen.application.addAppInfoEventListener(appEventCallback);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var appEventCallback =
+{
+&nbsp;&nbsp;&nbsp;oninstalled: function(appInfo)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('The application ' + appInfo.name + ' is installed');
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;onupdated: function(appInfo)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('The application ' + appInfo.name + ' is updated');
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;onuninstalled: function(appid)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('The application ' + appid + ' is uninstalled');
+&nbsp;&nbsp;&nbsp;}
+};
+var watchId = tizen.application.addAppInfoEventListener(appEventCallback);
+</pre>
 </div>
 <div class="methods">
 <h4>Methods</h4>
@@ -2732,30 +2788,37 @@ Platform modules will be able to broadcast system events in a future Tizen relea
         </ul>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var app = tizen.application.getCurrentApplication();
-
- // for user events: sender's application ID  and event name must be provided by using a dictionary
- // Let's assume that at least two applications are installed
- function onListInstalledApps(appsInfo) {
-   var appId = null;
-
-   if (appsInfo.length &gt; 0 &amp;&amp; app.appInfo.id != appsInfo[0].id) {
-     appId = appsInfo[0].id;
-   } else if (appsInfo.length &gt; 1) {
-     appId = appsInfo[1].id;
-   }
-
-   var eventCB = function(event, data) {
-     console.log("Data: " + JSON.stringify(data));
-     // do something
-   };
-
-   if (appId) {
-     var watchId = app.addEventListener({"appId": appId, "name": "custom_user_event"}, eventCB);
-   }
- }
- tizen.application.getAppsInfo(onListInstalledApps);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var app = tizen.application.getCurrentApplication();
+
+/* For user events: sender's application ID and event name must be provided by using a dictionary */
+/* Let's assume that at least two applications are installed */
+function onListInstalledApps(appsInfo)
+{
+&nbsp;&nbsp;&nbsp;var appId = null;
+
+&nbsp;&nbsp;&nbsp;if (appsInfo.length &gt; 0 &amp;&amp; app.appInfo.id != appsInfo[0].id)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;appId = appsInfo[0].id;
+&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;else if (appsInfo.length &gt; 1)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;appId = appsInfo[1].id;
+&nbsp;&nbsp;&nbsp;}
+
+&nbsp;&nbsp;&nbsp;var eventCB = function(event, data)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Data: " + JSON.stringify(data));
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Do something */
+&nbsp;&nbsp;&nbsp;};
+
+&nbsp;&nbsp;&nbsp;if (appId)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var watchId = app.addEventListener({"appId": appId, "name": "custom_user_event"}, eventCB);
+&nbsp;&nbsp;&nbsp;}
+}
+tizen.application.getAppsInfo(onListInstalledApps);
+</pre>
 </div>
 </dd>
 </dl>
index cfe118a..6ae7c4e 100644 (file)
@@ -462,16 +462,19 @@ In this mode, <em>getEntries()</em>, <em>getEntryByName()</em>, and <em>extractA
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function successCallback(archive) {
-     console.log("Success, can now read from archive " + archive);
- }
-
- function errorCallback(error) {
-     console.log(error);
- }
-
- tizen.archive.open("downloads/some_archive.zip", "r", successCallback, errorCallback);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function successCallback(archive)
+{
+&nbsp;&nbsp;&nbsp;console.log("Success, can now read from archive " + archive);
+}
+
+function errorCallback(error)
+{
+&nbsp;&nbsp;&nbsp;console.log(error);
+}
+
+tizen.archive.open("downloads/some_archive.zip", "r", successCallback, errorCallback);
+</pre>
 </div>
 </dd>
 <dt class="method" id="ArchiveManager::abort">
@@ -504,13 +507,15 @@ In this mode, <em>getEntries()</em>, <em>getEntryByName()</em>, and <em>extractA
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function openSuccess(archive) {
-     operationId = archive.extractAll("downloads/extracted");
-     tizen.archive.abort(operationId);
- }
-
- tizen.archive.open("downloads/some_archive.zip", "r", openSuccess);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function openSuccess(archive)
+{
+&nbsp;&nbsp;&nbsp;operationId = archive.extractAll("downloads/extracted");
+&nbsp;&nbsp;&nbsp;tizen.archive.abort(operationId);
+}
+
+tizen.archive.open("downloads/some_archive.zip", "r", openSuccess);
+</pre>
 </div>
 </dd>
 </dl>
@@ -729,24 +734,29 @@ If the source file is big then the callback can also be called while the file is
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function errorCallback(error) {
-     console.log(error);
- }
-
- function successCallback() {
-     console.log("done");
- }
-
- function progressCallback(opId, val, name) {
-     console.log("opId: " + opId + " with progress val: " + val);
- }
-
- function createSuccess(archive) {
-     archive.add("downloads/file.txt", successCallback, errorCallback, progressCallback);
- }
-
- tizen.archive.open("downloads/new_archive.zip", "w", createSuccess);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function errorCallback(error)
+{
+&nbsp;&nbsp;&nbsp;console.log(error);
+}
+
+function successCallback()
+{
+&nbsp;&nbsp;&nbsp;console.log("done");
+}
+
+function progressCallback(opId, val, name)
+{
+&nbsp;&nbsp;&nbsp;console.log("opId: " + opId + " with progress val: " + val);
+}
+
+function createSuccess(archive)
+{
+&nbsp;&nbsp;&nbsp;archive.add("downloads/file.txt", successCallback, errorCallback, progressCallback);
+}
+
+tizen.archive.open("downloads/new_archive.zip", "w", createSuccess);
+</pre>
 </div>
 </dd>
 <dt class="method" id="ArchiveFile::extractAll">
@@ -840,24 +850,29 @@ UnknownError: In any other error case              </li>
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function errorCallback(error) {
-     console.log(error);
- }
-
- function successCallback() {
-     console.log("done");
- }
-
- function progressCallback(opId, val, name) {
-     console.log("extracting operation (: " + opId + ") is in progress (" + (val * 100).toFixed(1) + "%)");
- }
-
- function openSuccess(archive) {
-     archive.extractAll("music", successCallback, errorCallback, progressCallback);
- }
-
- tizen.archive.open("downloads/some_archive.zip", "r", openSuccess);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function errorCallback(error)
+{
+&nbsp;&nbsp;&nbsp;console.log(error);
+}
+
+function successCallback()
+{
+&nbsp;&nbsp;&nbsp;console.log("done");
+}
+
+function progressCallback(opId, val, name)
+{
+&nbsp;&nbsp;&nbsp;console.log("extracting operation (: " + opId + ") is in progress (" + (val * 100).toFixed(1) + "%)");
+}
+
+function openSuccess(archive)
+{
+&nbsp;&nbsp;&nbsp;archive.extractAll("music", successCallback, errorCallback, progressCallback);
+}
+
+tizen.archive.open("downloads/some_archive.zip", "r", openSuccess);
+</pre>
 </div>
 </dd>
 <dt class="method" id="ArchiveFile::getEntries">
@@ -926,23 +941,28 @@ UnknownError: In case of any error              </li>
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function errorCallback(error) {
-     console.log(error);
- }
-
- function getEntriesSuccess(entries) {
-     console.log("Entries length: " + entries.length);
-     for (var i=0; i &lt; entries.length; i++) {
-         console.log(entries[i].name);
-     }
- }
-
- function openSuccess(archive) {
-     archive.getEntries(getEntriesSuccess, errorCallback);
- }
-
- tizen.archive.open("downloads/some_archive.zip", "r", openSuccess, errorCallback);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function errorCallback(error)
+{
+&nbsp;&nbsp;&nbsp;console.log(error);
+}
+
+function getEntriesSuccess(entries)
+{
+&nbsp;&nbsp;&nbsp;console.log("Entries length: " + entries.length);
+&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; entries.length; i++)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(entries[i].name);
+&nbsp;&nbsp;&nbsp;}
+}
+
+function openSuccess(archive)
+{
+&nbsp;&nbsp;&nbsp;archive.getEntries(getEntriesSuccess, errorCallback);
+}
+
+tizen.archive.open("downloads/some_archive.zip", "r", openSuccess, errorCallback);
+</pre>
 </div>
 </dd>
 <dt class="method" id="ArchiveFile::getEntryByName">
@@ -1017,20 +1037,24 @@ UnknownError: In case of any other error              </li>
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function errorCallback(error) {
-     console.log(error);
- }
-
- function getEntrySuccess(entry) {
-     console.log("Entry: " + entry.name + " size: " + entry.size);
- }
-
- function openSuccess(archive) {
-     archive.getEntryByName("arch/my_file.txt", getEntrySuccess, errorCallback);
- }
-
- tizen.archive.open("downloads/some_archive.zip", "r", openSuccess);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function errorCallback(error)
+{
+&nbsp;&nbsp;&nbsp;console.log(error);
+}
+
+function getEntrySuccess(entry)
+{
+&nbsp;&nbsp;&nbsp;console.log("Entry: " + entry.name + " size: " + entry.size);
+}
+
+function openSuccess(archive)
+{
+&nbsp;&nbsp;&nbsp;archive.getEntryByName("arch/my_file.txt", getEntrySuccess, errorCallback);
+}
+
+tizen.archive.open("downloads/some_archive.zip", "r", openSuccess);
+</pre>
 </div>
 </dd>
 <dt class="method" id="ArchiveFile::close">
@@ -1234,24 +1258,29 @@ UnknownError: In case of any other error              </li>
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function errorCallback(error) {
-     console.log(error);
- }
-
- function extractSuccessCallback() {
-     console.log("done");
- }
-
- function getEntrySuccess(entry) {
-     entry.extract("downloads/extract", extractSuccessCallback, errorCallback);
- }
-
- function openSuccess(archive) {
-     archive.getEntryByName("my_file.txt", getEntrySuccess, errorCallback);
- }
-
- tizen.archive.open("downloads/some_archive.zip", "r", openSuccess, errorCallback);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function errorCallback(error)
+{
+&nbsp;&nbsp;&nbsp;console.log(error);
+}
+
+function extractSuccessCallback()
+{
+&nbsp;&nbsp;&nbsp;console.log("done");
+}
+
+function getEntrySuccess(entry)
+{
+&nbsp;&nbsp;&nbsp;entry.extract("downloads/extract", extractSuccessCallback, errorCallback);
+}
+
+function openSuccess(archive)
+{
+&nbsp;&nbsp;&nbsp;archive.getEntryByName("my_file.txt", getEntrySuccess, errorCallback);
+}
+
+tizen.archive.open("downloads/some_archive.zip", "r", openSuccess, errorCallback);
+</pre>
 </div>
 </dd>
 </dl>
index 6535eff..d83fa73 100644 (file)
@@ -449,13 +449,15 @@ contain an invalid value.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Assume the content is a Content object as a result of find method.
- // Check the description is editable, and then set a description.
- if (content.editableAttributes.indexOf("description") &gt;= 0) {
-     content.description = "Sample content";
- }
- tizen.content.update(content);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Assume the content is a Content object as a result of find method */
+/* Check the description is editable, and then set a description */
+if (content.editableAttributes.indexOf("description") &gt;= 0)
+{
+&nbsp;&nbsp;&nbsp;content.description = "Sample content";
+}
+tizen.content.update(content);
+</pre>
 </div>
 </dd>
 <dt class="method" id="ContentManager::updateBatch">
@@ -530,23 +532,27 @@ is not compatible with the expected type for that parameter.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // The following example increases rating of an content by 1
-
- function errorCB(err) {
-     console.log( 'The following error occurred: ' +  err.name);
- }
-
- function successCB() {
-     console.log('Attributes set successfully');
- }
-
- // Assume the content is a Content object as a result of find method.
- // Check the rating is editable, and then increase by 1.
- if (content.editableAttributes.indexOf("rating") &gt;= 0) {
-     content.rating++;
- }
- tizen.content.updateBatch([content], successCB, errorCB);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Following example increases rating of a content by 1 */
+
+function errorCB(err)
+{
+&nbsp;&nbsp;&nbsp;console.log('The following error occurred: ' +  err.name);
+}
+
+function successCB()
+{
+&nbsp;&nbsp;&nbsp;console.log('Attributes set successfully');
+}
+
+/* Assume the content is a Content object as a result of find method */
+/* Check the rating is editable, and then increase by 1 */
+if (content.editableAttributes.indexOf("rating") &gt;= 0)
+{
+&nbsp;&nbsp;&nbsp;content.rating++;
+}
+tizen.content.updateBatch([content], successCB, errorCB);
+</pre>
 </div>
 </dd>
 <dt class="method" id="ContentManager::getDirectories">
@@ -597,21 +603,26 @@ is not compatible with the expected type for that parameter.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // The following example retrieves content directories in the storage.
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Following example retrieves content directories in the storage */
 
- function errorCB(err) {
-     console.log( 'The following error occurred: ' +  err.name);
- }
+function errorCB(err)
+{
+&nbsp;&nbsp;&nbsp;console.log('The following error occurred: ' +  err.name);
+}
 
- function printDirectory(directory, index, directories) {
-     console.log('directoryURI: ' + directory.directoryURI + ' Title: ' + directory.title);
- }
- function getDirectoriesCB(directories) {
-     directories.forEach(printDirectory);
- }
+function printDirectory(directory, index, directories)
+{
+&nbsp;&nbsp;&nbsp;console.log('directoryURI: ' + directory.directoryURI + ' Title: ' + directory.title);
+}
 
- tizen.content.getDirectories(getDirectoriesCB, errorCB);
- </pre>
+function getDirectoriesCB(directories)
+{
+&nbsp;&nbsp;&nbsp;directories.forEach(printDirectory);
+}
+
+tizen.content.getDirectories(getDirectoriesCB, errorCB);
+</pre>
 </div>
 </dd>
 <dt class="method" id="ContentManager::find">
@@ -698,35 +709,40 @@ is not compatible with the expected type for that parameter.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // The following example retrieves all songs from the album "The Joshua Tree", by artist "U2", ordered by the name.
- var count = 100;
- var offset = 0;
- var sortMode = new tizen.SortMode("name", "ASC");
- var artistFilter = new tizen.AttributeFilter("artists", "EXACTLY", "U2");
- var albumFilter = new tizen.AttributeFilter("album", "EXACTLY", "The Joshua Tree");
- var filter = new tizen.CompositeFilter("INTERSECTION", [albumFilter, artistFilter]);
-
- function errorCB(err) {
-     console.log( 'The following error occurred: ' +  err.name);
- }
-
- function printContent(content, index, contents) {
-     console.log('Name: ' + content.name + ' Title: ' + content.title + 'URL: ' + content.contentURI + 'MIME: ' + content.mimeType);
- }
-
- function findCB(contents) {
-     console.log('The Joshua Tree by U2:');
-     contents.forEach(printContent);
-     // Increase the offset as much as the count and then find content again.
-     if (contents.length === count) {
-         offset += count;
-         tizen.content.find(findCB, errorCB, null, filter, sortMode, count, offset);
-     }
- }
-
- tizen.content.find(findCB, errorCB, null, filter, sortMode, count, offset);
-
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Following example retrieves all songs from the album "The Joshua Tree", by artist "U2", ordered by the name */
+var count = 100;
+var offset = 0;
+var sortMode = new tizen.SortMode("name", "ASC");
+var artistFilter = new tizen.AttributeFilter("artists", "EXACTLY", "U2");
+var albumFilter = new tizen.AttributeFilter("album", "EXACTLY", "The Joshua Tree");
+var filter = new tizen.CompositeFilter("INTERSECTION", [albumFilter, artistFilter]);
+
+function errorCB(err)
+{
+&nbsp;&nbsp;&nbsp;console.log('The following error occurred: ' +  err.name);
+}
+
+function printContent(content, index, contents)
+{
+&nbsp;&nbsp;&nbsp;console.log('Name: ' + content.name + ' Title: ' + content.title +
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'URL: ' + content.contentURI + 'MIME: ' + content.mimeType);
+}
+
+function findCB(contents)
+{
+&nbsp;&nbsp;&nbsp;console.log('The Joshua Tree by U2:');
+&nbsp;&nbsp;&nbsp;contents.forEach(printContent);
+&nbsp;&nbsp;&nbsp;/* Increase the offset as much as the count and then find content again */
+&nbsp;&nbsp;&nbsp;if (contents.length === count)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;offset += count;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tizen.content.find(findCB, errorCB, null, filter, sortMode, count, offset);
+&nbsp;&nbsp;&nbsp;}
+}
+
+tizen.content.find(findCB, errorCB, null, filter, sortMode, count, offset);
+</pre>
 </div>
 </dd>
 <dt class="method" id="ContentManager::scanFile">
@@ -798,21 +814,24 @@ contain an invalid value (e.g. given <em>contentURI</em> is an empty string).
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // The following example scan 'tizen.jpg' in media directory
-
- function errorCB(err) {
-     console.log( 'The following error occurred: ' +  err.name);
- }
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Following example scans 'tizen.jpg' in media directory */
 
- function successCB(path) {
-     console.log('scanning is completed');
- }
+function errorCB(err)
+{
+&nbsp;&nbsp;&nbsp;console.log('The following error occurred: ' +  err.name);
+}
 
- tizen.filesystem.resolve("images/tizen.jpg", function(imageFile) {
-     tizen.content.scanFile(imageFile.toURI(), successCB, errorCB);
- });
+function successCB(path)
+{
+&nbsp;&nbsp;&nbsp;console.log('scanning is completed');
+}
 
- </pre>
+tizen.filesystem.resolve("images/tizen.jpg", function(imageFile)
+{
+&nbsp;&nbsp;&nbsp;tizen.content.scanFile(imageFile.toURI(), successCB, errorCB);
+});
+</pre>
 </div>
 </dd>
 <dt class="method" id="ContentManager::scanDirectory">
@@ -892,21 +911,24 @@ contain an invalid value (e.g. given <em>contentDirURI</em> is an empty string).
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // The following example scans 'images' directory
-
- function errorCB(err) {
-     console.log( 'The following error occurred: ' +  err.name);
- }
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Following example scans 'images' directory */
 
- function successCB(path) {
-     console.log('scanning is completed');
- }
+function errorCB(err)
+{
+&nbsp;&nbsp;&nbsp;console.log('The following error occurred: ' +  err.name);
+}
 
- tizen.filesystem.resolve("images", function(directory) {
-     tizen.content.scanDirectory(directory.toURI(), true, successCB, errorCB);
- });
+function successCB(path)
+{
+&nbsp;&nbsp;&nbsp;console.log('scanning is completed');
+}
 
- </pre>
+tizen.filesystem.resolve("images", function(directory)
+{
+&nbsp;&nbsp;&nbsp;tizen.content.scanDirectory(directory.toURI(), true, successCB, errorCB);
+});
+</pre>
 </div>
 </dd>
 <dt class="method" id="ContentManager::cancelScanDirectory">
@@ -961,9 +983,9 @@ contain an invalid value (e.g. given <em>contentDirURI</em> is an empty string).
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> tizen.content.cancelScanDirectory(directory.toURI());
-
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+tizen.content.cancelScanDirectory(directory.toURI());
+</pre>
 </div>
 </dd>
 <dt class="method" id="ContentManager::addChangeListener">
@@ -1005,32 +1027,40 @@ contain an invalid value (e.g. given <em>contentDirURI</em> is an empty string).
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var listener = {
-    oncontentadded: function(content) {
-        console.log(content.contentURI + ' content is added');
-    },
-    oncontentupdated: function(content) {
-        console.log(content.contentURI + ' content is updated');
-    },
-    oncontentremoved: function(id) {
-        console.log(id + ' is removed');
-    },
-    oncontentdiradded: function(contentDir) {
-        console.log(contentDir.directoryURI + ' content directory is added');
-    },
-    oncontentdirupdated: function(contentDir) {
-        console.log(contentDir.directoryURI + ' content directory is updated');
-    },
-    oncontentdirremoved: function(id) {
-        console.log(id + ' directory is removed');
-    }
- };
-
- // Adds the listener
- var listenerId = tizen.content.addChangeListener(listener);
-
- console.log('Listener ID: ' + listenerId);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var listener =
+{
+&nbsp;&nbsp;&nbsp;oncontentadded: function(content)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(content.contentURI + ' content is added');
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;oncontentupdated: function(content) 
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(content.contentURI + ' content is updated');
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;oncontentremoved: function(id)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(id + ' is removed');
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;oncontentdiradded: function(contentDir)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(contentDir.directoryURI + ' content directory is added');
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;oncontentdirupdated: function(contentDir)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(contentDir.directoryURI + ' content directory is updated');
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;oncontentdirremoved: function(id)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(id + ' directory is removed');
+&nbsp;&nbsp;&nbsp;}
+};
+
+/* Adds the listener */
+var listenerId = tizen.content.addChangeListener(listener);
+
+console.log('Listener ID: ' + listenerId);
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre> Listener ID: 1
@@ -1068,34 +1098,42 @@ contain an invalid value (e.g. given <em>contentDirURI</em> is an empty string).
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var listener = {
-    oncontentadded: function(content) {
-        console.log(content.contentURI + ' content is added');
-    },
-    oncontentupdated: function(content) {
-        console.log(content.contentURI + ' content is updated');
-    },
-    oncontentremoved: function(id) {
-        console.log(id + ' is removed');
-    },
-    oncontentdiradded: function(contentDir) {
-        console.log(contentDir.directoryURI + ' content directory is added');
-    },
-    oncontentdirupdated: function(contentDir) {
-        console.log(contentDir.directoryURI + ' content directory is updated');
-    },
-    oncontentdirremoved: function(id) {
-        console.log(id + ' directory is removed');
-    }
- };
-
- var listenerId = tizen.content.addChangeListener(listener);
-
- // Do some job here and when the listener is not needed anymore remove it
-
- // Removes the listener
- tizen.content.removeChangeListener(listenerId);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var listener =
+{
+&nbsp;&nbsp;&nbsp;oncontentadded: function(content)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(content.contentURI + ' content is added');
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;oncontentupdated: function(content)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(content.contentURI + ' content is updated');
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;oncontentremoved: function(id)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(id + ' is removed');
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;oncontentdiradded: function(contentDir)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(contentDir.directoryURI + ' content directory is added');
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;oncontentdirupdated: function(contentDir)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(contentDir.directoryURI + ' content directory is updated');
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;oncontentdirremoved: function(id)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(id + ' directory is removed');
+&nbsp;&nbsp;&nbsp;}
+};
+
+var listenerId = tizen.content.addChangeListener(listener);
+
+/* Do some job here and when the listener is not needed anymore remove it */
+
+/* Removes the listener */
+tizen.content.removeChangeListener(listenerId);
+</pre>
 </div>
 </dd>
 <dt class="deprecated method" id="ContentManager::setChangeListener">
@@ -1151,31 +1189,38 @@ developers to add a listener and get notified when content is added, removed or
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var listener= {
-    oncontentadded: function(content) {
-        console.log(content.contentURI + ' content is added');
-    },
-    oncontentupdated: function(content) {
-        console.log(content.contentURI + ' content is updated');
-    },
-    oncontentremoved: function(id) {
-        console.log(id + ' is removed');
-    },
-    oncontentdiradded: function(contentDir) {
-        console.log(contentDir.directoryURI + ' content directory is added');
-    },
-    oncontentdirupdated: function(contentDir) {
-        console.log(contentDir.directoryURI + ' content directory is updated');
-    },
-    oncontentdirremoved: function(id) {
-        console.log(id + ' directory is removed');
-    }
- };
-
- // Registers to be notified when the content changes
- tizen.content.setChangeListener(listener);
-
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var listener =
+{
+&nbsp;&nbsp;&nbsp;oncontentadded: function(content)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(content.contentURI + ' content is added');
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;oncontentupdated: function(content)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(content.contentURI + ' content is updated');
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;oncontentremoved: function(id)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(id + ' is removed');
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;oncontentdiradded: function(contentDir)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(contentDir.directoryURI + ' content directory is added');
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;oncontentdirupdated: function(contentDir)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(contentDir.directoryURI + ' content directory is updated');
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;oncontentdirremoved: function(id)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(id + ' directory is removed');
+&nbsp;&nbsp;&nbsp;}
+};
+
+/* Registers to be notified when the content changes */
+tizen.content.setChangeListener(listener);
+</pre>
 </div>
 </dd>
 <dt class="deprecated method" id="ContentManager::unsetChangeListener">
@@ -1215,9 +1260,9 @@ developers to add a listener and get notified when content is added, removed or
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> tizen.content.unsetChangeListener();
-
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+tizen.content.unsetChangeListener();
+</pre>
 </div>
 </dd>
 <dt class="method" id="ContentManager::getPlaylists">
@@ -1276,24 +1321,28 @@ UnknownError: In case of any error              </li>
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var gPlaylists;
-
- function getPlaylistsFail(err) {
-     console.log("getPlaylists failed: " + err);
- }
-
- function getPlaylistsSuccess(playlists) {
-     var cur, i;
-     gPlaylists = playlists;
-     for(i = 0; i &lt; gPlaylists.length; ++i) {
-         cur = gPlaylists[i];
-         console.log("[" + i + "] name:" + cur.name + " num tracks:" +
-                 cur.numberOfTracks);
-     }
- }
-
- tizen.content.getPlaylists(getPlaylistsSuccess, getPlaylistsFail);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var gPlaylists;
+
+function getPlaylistsFail(err)
+{
+&nbsp;&nbsp;&nbsp;console.log("getPlaylists failed: " + err);
+}
+
+function getPlaylistsSuccess(playlists)
+{
+&nbsp;&nbsp;&nbsp;var cur, i;
+&nbsp;&nbsp;&nbsp;gPlaylists = playlists;
+&nbsp;&nbsp;&nbsp;for (i = 0; i &lt; gPlaylists.length; ++i)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cur = gPlaylists[i];
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("[" + i + "] name:" + cur.name + " num tracks:" +
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cur.numberOfTracks);
+&nbsp;&nbsp;&nbsp;}
+}
+
+tizen.content.getPlaylists(getPlaylistsSuccess, getPlaylistsFail);
+</pre>
 </div>
 </dd>
 <dt class="method" id="ContentManager::createPlaylist">
@@ -1362,50 +1411,58 @@ UnknownError: In case of any other error              </li>
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var gPlaylists;
- var gPlaylist;
-
- function getPlaylistsFail(err) {
-     console.log("getPlaylists failed: " + err.message);
- }
-
- function getPlaylistsSuccess(playlists) {
-     var cur, i;
-     gPlaylists = playlists;
-     for(i = 0; i &lt; gPlaylists.length; ++i) {
-         cur = gPlaylists[i];
-         console.log("[" + i + "] name:" + cur.name + " num tracks:" +
-                 cur.numberOfTracks);
-     }
- }
-
- function findSuccess(contents) {
-     if (contents.length &gt; 0) {
-         gPlaylist.add(contents[0]);
-     }
-
-     tizen.content.getPlaylists(getPlaylistsSuccess, getPlaylistsFail);
- }
-
- function findFail(err) {
-     console.log("find FAIL: " + err.message);
- }
-
- function createSuccess(playlist) {
-     console.log("create SUCCESS");
-
-     gPlaylist = playlist;
-     tizen.content.find(findSuccess, findFail, null,
-             new tizen.AttributeFilter("type", "EXACTLY", "AUDIO"));
- }
-
- function createFail(err) {
-     console.log("create FAIL: " + err.message);
- }
-
- tizen.content.createPlaylist("My new playlist", createSuccess, createFail);
-
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var gPlaylists;
+var gPlaylist;
+
+function getPlaylistsFail(err)
+{
+&nbsp;&nbsp;&nbsp;console.log("getPlaylists failed: " + err.message);
+}
+
+function getPlaylistsSuccess(playlists)
+{
+&nbsp;&nbsp;&nbsp;var cur, i;
+&nbsp;&nbsp;&nbsp;gPlaylists = playlists;
+&nbsp;&nbsp;&nbsp;for (i = 0; i &lt; gPlaylists.length; ++i)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cur = gPlaylists[i];
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("[" + i + "] name:" + cur.name + " num tracks:" +
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cur.numberOfTracks);
+&nbsp;&nbsp;&nbsp;}
+}
+
+function findSuccess(contents)
+{
+&nbsp;&nbsp;&nbsp;if (contents.length &gt; 0)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;gPlaylist.add(contents[0]);
+&nbsp;&nbsp;&nbsp;}
+
+&nbsp;&nbsp;&nbsp;tizen.content.getPlaylists(getPlaylistsSuccess, getPlaylistsFail);
+}
+
+function findFail(err)
+{
+&nbsp;&nbsp;&nbsp;console.log("find FAIL: " + err.message);
+}
+
+function createSuccess(playlist)
+{
+&nbsp;&nbsp;&nbsp;console.log("create SUCCESS");
+
+&nbsp;&nbsp;&nbsp;gPlaylist = playlist;
+&nbsp;&nbsp;&nbsp;tizen.content.find(findSuccess, findFail, null,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;new tizen.AttributeFilter("type", "EXACTLY", "AUDIO"));
+}
+
+function createFail(err)
+{
+&nbsp;&nbsp;&nbsp;console.log("create FAIL: " + err.message);
+}
+
+tizen.content.createPlaylist("My new playlist", createSuccess, createFail);
+</pre>
 </div>
 </dd>
 <dt class="method" id="ContentManager::removePlaylist">
@@ -1468,44 +1525,51 @@ UnknownError: In case of any error              </li>
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var gPlaylists;
-
- function removePlaylistSuccess() {
-     console.log("removePlaylist SUCCESS");
- }
-
- function removePlaylistFail(err) {
-     console.log("removePlaylist FAIL: " + err);
- }
-
- function getPlaylistsFail(err) {
-     console.log("getPlaylists failed: " + err);
- }
-
- function getPlaylistsSuccess(playlists) {
-     var cur, i;
-     gPlaylists = playlists;
-     for(i = 0; i &lt; gPlaylists.length; ++i) {
-         cur = gPlaylists[i];
-         console.log("[" + i + "] name:" + cur.name + " num tracks:" +
-                 cur.numberOfTracks);
-     }
-
-     if(gPlaylists.length &lt; 1) {
-         console.log("Please add at least 1 playlist");
-         return;
-     }
-
-     console.log("will remove playlist at index [0] name:"
-             + gPlaylists[0].name);
-
-     tizen.content.removePlaylist(gPlaylists[0].id, removePlaylistSuccess,
-             removePlaylistFail);
- }
-
- tizen.content.getPlaylists(getPlaylistsSuccess, getPlaylistsFail);
-
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var gPlaylists;
+
+function removePlaylistSuccess()
+{
+&nbsp;&nbsp;&nbsp;console.log("removePlaylist SUCCESS");
+}
+
+function removePlaylistFail(err)
+{
+&nbsp;&nbsp;&nbsp;console.log("removePlaylist FAIL: " + err);
+}
+
+function getPlaylistsFail(err)
+{
+&nbsp;&nbsp;&nbsp;console.log("getPlaylists failed: " + err);
+}
+
+function getPlaylistsSuccess(playlists)
+{
+&nbsp;&nbsp;&nbsp;var cur, i;
+&nbsp;&nbsp;&nbsp;gPlaylists = playlists;
+&nbsp;&nbsp;&nbsp;for (i = 0; i &lt; gPlaylists.length; ++i)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cur = gPlaylists[i];
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("[" + i + "] name:" + cur.name + " num tracks:" +
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cur.numberOfTracks);
+&nbsp;&nbsp;&nbsp;}
+
+&nbsp;&nbsp;&nbsp;if (gPlaylists.length &lt; 1)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Please add at least 1 playlist");
+
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return;
+&nbsp;&nbsp;&nbsp;}
+
+&nbsp;&nbsp;&nbsp;console.log("will remove playlist at index [0] name:"
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;+ gPlaylists[0].name);
+
+&nbsp;&nbsp;&nbsp;tizen.content.removePlaylist(gPlaylists[0].id, removePlaylistSuccess,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;removePlaylistFail);
+}
+
+tizen.content.getPlaylists(getPlaylistsSuccess, getPlaylistsFail);
+</pre>
 </div>
 </dd>
 <dt class="method" id="ContentManager::createThumbnail">
@@ -1570,18 +1634,22 @@ AbortError: In case of any error.              </li>
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function createCB(path) {
-   console.log("The thumbnail path is " + path);
- }
-
- function findCB(contents) {
-   if (contents.length &gt; 0) {
-     tizen.content.createThumbnail(contents[0], createCB);
-   }
- }
-
- tizen.content.find(findCB);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function createCB(path)
+{
+&nbsp;&nbsp;&nbsp;console.log("The thumbnail path is " + path);
+}
+
+function findCB(contents)
+{
+&nbsp;&nbsp;&nbsp;if (contents.length &gt; 0)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tizen.content.createThumbnail(contents[0], createCB);
+&nbsp;&nbsp;&nbsp;}
+}
+
+tizen.content.find(findCB);
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre> The thumbnail path is /home/owner/share/media/.thumb/phone/.jpg-bed1d5f494830f7a52e1217f1e924aff.jpg
@@ -2819,59 +2887,71 @@ UnknownError: In case of any error              </li>
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var gPlaylists, gItems, gCurPlaylist;
-
- function get2Fail(err) {
-     console.log("get items (after remove) failed: " + err);
- }
-
- function get2Success(items) {
-    console.log("Playlist items:");
-    for(var i = 0; i &lt; items.length ; ++i) {
-        console.log("[" + i + "]: name:" + items[i].content.name);
-    }
- }
-
- function getSuccess(items) {
-    gItems = items;
-
-    if(gItems.length &lt; 1) {
-        console.log("Please add at least 1 tracks to playlist!");
-        return;
-    }
-
-    console.log("Original playlist:");
-    for(var i = 0; i &lt; gItems.length ; ++i) {
-        console.log("[" + i + "]: name:" + gItems[i].content.name);
-    }
-
-    console.log("Will remove item at index [0] name:" + gItems[0].content.name);
-    gCurPlaylist.remove(gItems[0]);
-    gCurPlaylist.get(get2Success, get2Fail);
- }
-
- function getFail(err) {
-     console.log("get items failed: " + err);
- }
-
- function getPlaylistsFail(err) {
-     console.log("getPlaylists failed: " + err);
- }
-
- function getPlaylistsSuccess(playlists) {
-     gPlaylists = playlists;
-     if(gPlaylists.length === 0) {
-         console.log("Please create at least 1 playlist!");
-         return;
-     }
-
-     gCurPlaylist = gPlaylists[0];
-     gCurPlaylist.get(getSuccess, getFail);
- }
-
- tizen.content.getPlaylists(getPlaylistsSuccess, getPlaylistsFail);
-
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var gPlaylists, gItems, gCurPlaylist;
+
+function get2Fail(err)
+{
+&nbsp;&nbsp;&nbsp;console.log("get items (after remove) failed: " + err);
+}
+
+function get2Success(items)
+{
+&nbsp;&nbsp;&nbsp;console.log("Playlist items:");
+&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; items.length; ++i)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("[" + i + "]: name:" + items[i].content.name);
+&nbsp;&nbsp;&nbsp;}
+}
+
+function getSuccess(items)
+{
+&nbsp;&nbsp;&nbsp;gItems = items;
+
+&nbsp;&nbsp;&nbsp;if (gItems.length &lt; 1)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Please add at least 1 tracks to playlist!");
+
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return;
+&nbsp;&nbsp;&nbsp;}
+
+&nbsp;&nbsp;&nbsp;console.log("Original playlist:");
+&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; gItems.length; ++i)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("[" + i + "]: name:" + gItems[i].content.name);
+&nbsp;&nbsp;&nbsp;}
+
+&nbsp;&nbsp;&nbsp;console.log("Will remove item at index [0] name:" + gItems[0].content.name);
+&nbsp;&nbsp;&nbsp;gCurPlaylist.remove(gItems[0]);
+&nbsp;&nbsp;&nbsp;gCurPlaylist.get(get2Success, get2Fail);
+}
+
+function getFail(err)
+{
+&nbsp;&nbsp;&nbsp;console.log("get items failed: " + err);
+}
+
+function getPlaylistsFail(err)
+{
+&nbsp;&nbsp;&nbsp;console.log("getPlaylists failed: " + err);
+}
+
+function getPlaylistsSuccess(playlists)
+{
+&nbsp;&nbsp;&nbsp;gPlaylists = playlists;
+&nbsp;&nbsp;&nbsp;if (gPlaylists.length === 0)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Please create at least 1 playlist!");
+
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return;
+&nbsp;&nbsp;&nbsp;}
+
+&nbsp;&nbsp;&nbsp;gCurPlaylist = gPlaylists[0];
+&nbsp;&nbsp;&nbsp;gCurPlaylist.get(getSuccess, getFail);
+}
+
+tizen.content.getPlaylists(getPlaylistsSuccess, getPlaylistsFail);
+</pre>
 </div>
 </dd>
 <dt class="method" id="Playlist::removeBatch">
@@ -2934,69 +3014,82 @@ UnknownError: In case of any other error              </li>
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var gPlaylists, gItems, gCurPlaylist;
-
- function get2Fail(err) {
-     console.log("get items (after remove batch) failed: " + err);
- }
-
- function get2Success(items) {
-    console.log("Playlist after remove batch:");
-    for(var i = 0; i &lt; items.length ; ++i) {
-        console.log("[" + i + "]: name:" + items[i].content.name);
-    }
- }
-
- function removeBatchSuccess() {
-     console.log("removeBatch success");
-     gCurPlaylist.get(get2Success, get2Fail);
- }
-
- function removeBatchFail(err) {
-     console.log("removeBatch failed: " + err);
- }
-
- function getSuccess(items) {
-    gItems = items;
-
-    if(gItems.length &lt; 4) {
-        console.log("Please add at least 4 tracks to playlist!");
-        return;
-    }
-
-    console.log("Original playlist:");
-    for(var i = 0; i &lt; gItems.length ; ++i) {
-        console.log("[" + i + "]: name:" + gItems[i].content.name);
-    }
-
-    console.log("Will remove items at index [0](name:" + gItems[0].content.name
-            + ") and at index [2](name:" + gItems[2].content.name + ")");
-    gCurPlaylist.removeBatch([gItems[2], gItems[0]],
-            removeBatchSuccess, removeBatchFail);
- }
-
- function getFail(err) {
-     console.log("get items failed: " + err);
- }
-
- function getPlaylistsFail(err) {
-     console.log("getPlaylists failed: " + err);
- }
-
- function getPlaylistsSuccess(playlists) {
-     gPlaylists = playlists;
-     if(gPlaylists.length === 0) {
-         console.log("Please create at least 1 playlist!");
-         return;
-     }
-
-     gCurPlaylist = gPlaylists[0];
-     gCurPlaylist.get(getSuccess, getFail);
- }
-
- tizen.content.getPlaylists(getPlaylistsSuccess, getPlaylistsFail);
-
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var gPlaylists, gItems, gCurPlaylist;
+
+function get2Fail(err)
+{
+&nbsp;&nbsp;&nbsp;console.log("get items (after remove batch) failed: " + err);
+}
+
+function get2Success(items)
+{
+&nbsp;&nbsp;&nbsp;console.log("Playlist after remove batch:");
+&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; items.length; ++i)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("[" + i + "]: name:" + items[i].content.name);
+&nbsp;&nbsp;&nbsp;}
+}
+
+function removeBatchSuccess()
+{
+&nbsp;&nbsp;&nbsp;console.log("removeBatch success");
+&nbsp;&nbsp;&nbsp;gCurPlaylist.get(get2Success, get2Fail);
+}
+
+function removeBatchFail(err)
+{
+&nbsp;&nbsp;&nbsp;console.log("removeBatch failed: " + err);
+}
+
+function getSuccess(items)
+{
+&nbsp;&nbsp;&nbsp;gItems = items;
+
+&nbsp;&nbsp;&nbsp;if (gItems.length &lt; 4)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Please add at least 4 tracks to playlist!");
+
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return;
+&nbsp;&nbsp;&nbsp;}
+
+&nbsp;&nbsp;&nbsp;console.log("Original playlist:");
+&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; gItems.length; ++i)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("[" + i + "]: name:" + gItems[i].content.name);
+&nbsp;&nbsp;&nbsp;}
+
+&nbsp;&nbsp;&nbsp;console.log("Will remove items at index [0](name:" + gItems[0].content.name
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;+ ") and at index [2](name:" + gItems[2].content.name + ")");
+&nbsp;&nbsp;&nbsp;gCurPlaylist.removeBatch([gItems[2], gItems[0]], removeBatchSuccess, removeBatchFail);
+}
+
+function getFail(err)
+{
+&nbsp;&nbsp;&nbsp;console.log("get items failed: " + err);
+}
+
+function getPlaylistsFail(err)
+{
+&nbsp;&nbsp;&nbsp;console.log("getPlaylists failed: " + err);
+}
+
+function getPlaylistsSuccess(playlists)
+{
+&nbsp;&nbsp;&nbsp;gPlaylists = playlists;
+&nbsp;&nbsp;&nbsp;if (gPlaylists.length === 0)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Please create at least 1 playlist!");
+
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return;
+&nbsp;&nbsp;&nbsp;}
+
+&nbsp;&nbsp;&nbsp;gCurPlaylist = gPlaylists[0];
+&nbsp;&nbsp;&nbsp;gCurPlaylist.get(getSuccess, getFail);
+}
+
+tizen.content.getPlaylists(getPlaylistsSuccess, getPlaylistsFail);
+</pre>
 </div>
 </dd>
 <dt class="method" id="Playlist::get">
@@ -3065,38 +3158,46 @@ UnknownError: In case of any error              </li>
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var gPlaylists, gItems, gCurPlaylist;
-
- function getSuccess(items) {
-     gItems = items;
-     console.log("Playlist items:");
-     for(var i = 0; i &lt; items.length ; ++i) {
-         console.log("[" + i + "]: name:" + items[i].name);
-     }
- }
-
- function getFail(err) {
-     console.log("get items failed: " + err);
- }
-
- function getPlaylistsFail(err) {
-     console.log("getPlaylists failed: " + err);
- }
-
- function getPlaylistsSuccess(playlists) {
-     gPlaylists = playlists;
-     if(gPlaylists.length === 0) {
-         console.log("Please create at least 1 playlist!");
-         return;
-     }
-
-     gCurPlaylist = gPlaylists[0];
-     // To retrieves all playlist items of 'gCurPlaylist' playlist.
-     gCurPlaylist.get(getSuccess, getFail);
- }
-
- tizen.content.getPlaylists(getPlaylistsSuccess, getPlaylistsFail);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var gPlaylists, gItems, gCurPlaylist;
+
+function getSuccess(items)
+{
+&nbsp;&nbsp;&nbsp;gItems = items;
+&nbsp;&nbsp;&nbsp;console.log("Playlist items:");
+&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; items.length; ++i)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("[" + i + "]: name:" + items[i].name);
+&nbsp;&nbsp;&nbsp;}
+}
+
+function getFail(err)
+{
+&nbsp;&nbsp;&nbsp;console.log("get items failed: " + err);
+}
+
+function getPlaylistsFail(err)
+{
+&nbsp;&nbsp;&nbsp;console.log("getPlaylists failed: " + err);
+}
+
+function getPlaylistsSuccess(playlists)
+{
+&nbsp;&nbsp;&nbsp;gPlaylists = playlists;
+&nbsp;&nbsp;&nbsp;if (gPlaylists.length === 0)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Please create at least 1 playlist!");
+
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return;
+&nbsp;&nbsp;&nbsp;}
+
+&nbsp;&nbsp;&nbsp;gCurPlaylist = gPlaylists[0];
+&nbsp;&nbsp;&nbsp;/* To retrieve all playlist items of 'gCurPlaylist' playlist */
+&nbsp;&nbsp;&nbsp;gCurPlaylist.get(getSuccess, getFail);
+}
+
+tizen.content.getPlaylists(getPlaylistsSuccess, getPlaylistsFail);
+</pre>
 </div>
 </dd>
 <dt class="method" id="Playlist::setOrder">
@@ -3161,74 +3262,89 @@ UnknownError: In case of any other error              </li>
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var gPlaylists, gItems, gCurPlaylist, gExpectedOrder;
-
- function get2Fail(err) {
-     console.log("get items (after set order) failed: " + err);
- }
-
- function get2Success(items) {
-    console.log("Playlist order after setOrder:");
-    for(var i = 0; i &lt; items.length ; ++i) {
-        console.log("[" + i + "]: name:" + items[i].content.name);
-    }
- }
-
- function setOrderSuccess() {
-     console.log("set items order SUCCESS");
-     gCurPlaylist.get(get2Success, get2Fail);
- }
-
- function setOrderFail(err) {
-     console.log("set items order failed: " + err);
- }
-
- function getSuccess(items) {
-    gItems = items;
-
-    if(gItems.length &lt; 2) {
-        console.log("Please add at least 2 tracks to playlist!");
-        return;
-    }
-
-    console.log("Original order:");
-    for(var i = 0; i &lt; gItems.length ; ++i) {
-        console.log("[" + i + "]: name:" + gItems[i].content.name);
-    }
-
-    gExpectedOrder = gItems.slice(0);
-    gExpectedOrder.reverse();
-
-    console.log("New order:");
-    for(var i = 0; i &lt; gExpectedOrder.length ; ++i) {
-        console.log("[" + i + "]: name:" + gExpectedOrder[i].content.name);
-    }
-
-    gCurPlaylist.setOrder(gExpectedOrder, setOrderSuccess, setOrderFail);
- }
-
- function getFail(err) {
-     console.log("get items failed: " + err);
- }
-
- function getPlaylistsFail(err) {
-     console.log("getPlaylists failed: " + err);
- }
-
- function getPlaylistsSuccess(playlists) {
-     gPlaylists = playlists;
-     if(gPlaylists.length === 0) {
-         console.log("Please create at least 1 playlist!");
-         return;
-     }
-
-     gCurPlaylist = gPlaylists[0];
-     gCurPlaylist.get(getSuccess, getFail);
- }
-
- tizen.content.getPlaylists(getPlaylistsSuccess, getPlaylistsFail);
-
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var gPlaylists, gItems, gCurPlaylist, gExpectedOrder;
+
+function get2Fail(err)
+{
+&nbsp;&nbsp;&nbsp;console.log("get items (after set order) failed: " + err);
+}
+
+function get2Success(items)
+{
+&nbsp;&nbsp;&nbsp;console.log("Playlist order after setOrder:");
+&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; items.length; ++i)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("[" + i + "]: name:" + items[i].content.name);
+&nbsp;&nbsp;&nbsp;}
+}
+
+function setOrderSuccess()
+{
+&nbsp;&nbsp;&nbsp;console.log("set items order SUCCESS");
+&nbsp;&nbsp;&nbsp;gCurPlaylist.get(get2Success, get2Fail);
+}
+
+function setOrderFail(err)
+{
+&nbsp;&nbsp;&nbsp;console.log("set items order failed: " + err);
+}
+
+function getSuccess(items)
+{
+&nbsp;&nbsp;&nbsp;gItems = items;
+
+&nbsp;&nbsp;&nbsp;if (gItems.length &lt; 2)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Please add at least 2 tracks to playlist!");
+
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return;
+&nbsp;&nbsp;&nbsp;}
+
+&nbsp;&nbsp;&nbsp;console.log("Original order:");
+&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; gItems.length; ++i)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("[" + i + "]: name:" + gItems[i].content.name);
+&nbsp;&nbsp;&nbsp;}
+
+&nbsp;&nbsp;&nbsp;gExpectedOrder = gItems.slice(0);
+&nbsp;&nbsp;&nbsp;gExpectedOrder.reverse();
+
+&nbsp;&nbsp;&nbsp;console.log("New order:");
+&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; gExpectedOrder.length; ++i)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("[" + i + "]: name:" + gExpectedOrder[i].content.name);
+&nbsp;&nbsp;&nbsp;}
+
+&nbsp;&nbsp;&nbsp;gCurPlaylist.setOrder(gExpectedOrder, setOrderSuccess, setOrderFail);
+}
+
+function getFail(err)
+{
+&nbsp;&nbsp;&nbsp;console.log("get items failed: " + err);
+}
+
+function getPlaylistsFail(err)
+{
+&nbsp;&nbsp;&nbsp;console.log("getPlaylists failed: " + err);
+}
+
+function getPlaylistsSuccess(playlists)
+{
+&nbsp;&nbsp;&nbsp;gPlaylists = playlists;
+&nbsp;&nbsp;&nbsp;if (gPlaylists.length === 0)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Please create at least 1 playlist!");
+
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return;
+&nbsp;&nbsp;&nbsp;}
+
+&nbsp;&nbsp;&nbsp;gCurPlaylist = gPlaylists[0];
+&nbsp;&nbsp;&nbsp;gCurPlaylist.get(getSuccess, getFail);
+}
+
+tizen.content.getPlaylists(getPlaylistsSuccess, getPlaylistsFail);
+</pre>
 </div>
 </dd>
 <dt class="method" id="Playlist::move">
@@ -3306,69 +3422,84 @@ UnknownError: In case of any other error              </li>
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var gPlaylists, gItems, gCurPlaylist;
-
- function get2Fail(err) {
-     console.log("get items (after move item) failed: " + err);
- }
-
- function get2Success(items) {
-    console.log("Playlist order after move:");
-    for(var i = 0; i &lt; items.length ; ++i) {
-        console.log("[" + i + "]: name:" + items[i].content.name);
-    }
- }
-
- function moveSuccess() {
-     console.log("move item SUCCESS");
-     gCurPlaylist.get(get2Success, get2Fail);
- }
-
- function moveFail(err) {
-     console.log("move item failed: " + err);
- }
-
- function getSuccess(items) {
-    gItems = items;
-
-    if(gItems.length &lt; 2) {
-        console.log("Please add at least 2 tracks to playlist!");
-        return;
-    }
-
-    console.log("Original order:");
-    for(var i = 0; i &lt; gItems.length ; ++i) {
-        console.log("[" + i + "]: name:" + gItems[i].content.name);
-    }
-
-    console.log("Will move item at index [1] (name: " +
-            gItems[1].content.name + ") up by one place (to [0])");
-
-    gCurPlaylist.move(gItems[1], -1, moveSuccess, moveFail);
-    gItems.unshift(gItems.splice(1, 1)[0]);
- }
-
- function getFail(err) {
-     console.log("get items failed: " + err);
- }
-
- function getPlaylistsFail(err) {
-     console.log("getPlaylists failed: " + err);
- }
-
- function getPlaylistsSuccess(playlists) {
-     gPlaylists = playlists;
-     if(gPlaylists.length === 0) {
-         console.log("Please create at least 1 playlist!");
-         return;
-     }
-
-     gCurPlaylist = gPlaylists[0];
-     gCurPlaylist.get(getSuccess, getFail);
- }
-
- tizen.content.getPlaylists(getPlaylistsSuccess, getPlaylistsFail);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var gPlaylists, gItems, gCurPlaylist;
+
+function get2Fail(err)
+{
+&nbsp;&nbsp;&nbsp;console.log("get items (after move item) failed: " + err);
+}
+
+function get2Success(items)
+{
+&nbsp;&nbsp;&nbsp;console.log("Playlist order after move:");
+&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; items.length; ++i)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("[" + i + "]: name:" + items[i].content.name);
+&nbsp;&nbsp;&nbsp;}
+}
+
+function moveSuccess()
+{
+&nbsp;&nbsp;&nbsp;console.log("move item SUCCESS");
+&nbsp;&nbsp;&nbsp;gCurPlaylist.get(get2Success, get2Fail);
+}
+
+function moveFail(err)
+{
+&nbsp;&nbsp;&nbsp;console.log("move item failed: " + err);
+}
+
+function getSuccess(items)
+{
+&nbsp;&nbsp;&nbsp;gItems = items;
+
+&nbsp;&nbsp;&nbsp;if (gItems.length &lt; 2)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Please add at least 2 tracks to playlist!");
+
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return;
+&nbsp;&nbsp;&nbsp;}
+
+&nbsp;&nbsp;&nbsp;console.log("Original order:");
+&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; gItems.length; ++i)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("[" + i + "]: name:" + gItems[i].content.name);
+&nbsp;&nbsp;&nbsp;}
+
+&nbsp;&nbsp;&nbsp;console.log("Will move item at index [1] (name: " +
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;gItems[1].content.name + ") up by one place (to [0])");
+
+&nbsp;&nbsp;&nbsp;gCurPlaylist.move(gItems[1], -1, moveSuccess, moveFail);
+&nbsp;&nbsp;&nbsp;gItems.unshift(gItems.splice(1, 1)[0]);
+}
+
+function getFail(err)
+{
+&nbsp;&nbsp;&nbsp;console.log("get items failed: " + err);
+}
+
+function getPlaylistsFail(err)
+{
+&nbsp;&nbsp;&nbsp;console.log("getPlaylists failed: " + err);
+}
+
+function getPlaylistsSuccess(playlists)
+{
+&nbsp;&nbsp;&nbsp;gPlaylists = playlists;
+&nbsp;&nbsp;&nbsp;if (gPlaylists.length === 0)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Please create at least 1 playlist!");
+
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return;
+&nbsp;&nbsp;&nbsp;}
+
+&nbsp;&nbsp;&nbsp;gCurPlaylist = gPlaylists[0];
+&nbsp;&nbsp;&nbsp;gCurPlaylist.get(getSuccess, getFail);
+}
+
+tizen.content.getPlaylists(getPlaylistsSuccess, getPlaylistsFail);
+</pre>
 </div>
 </dd>
 </dl>
index e885b95..5c5ceb6 100644 (file)
@@ -3,7 +3,7 @@
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
 <link rel="stylesheet" type="text/css" href="../tizen.css" media="screen">
-<script type="text/javascript" src="snippet.js"></script><title>Console API</title>
+<script type="text/javascript" src="../snippet.js"></script><title>Console API</title>
 </head>
 <body id="page-content" onload="prettyPrint()">
 <div class="api" id="::Console">
@@ -121,8 +121,7 @@ The text will be logged as a standard message.
         </ul>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> console.log('A is for Alice.');
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">console.log('A is for Alice.');</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>A is for Alice.
@@ -153,8 +152,7 @@ The text will be logged as an error message.
         </ul>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> console.error('B is for Bob.');
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">console.error('B is for Bob.');</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>B is for Bob.
@@ -185,8 +183,7 @@ The text will be logged as a warning message.
         </ul>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> console.warn('C is for Christopher.');
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">console.warn('C is for Christopher.');</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>C is for Christopher.
@@ -217,8 +214,7 @@ The text will be logged as an info message.
         </ul>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> console.info('D is for Dorothy.');
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">console.info('D is for Dorothy.');</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>D is for Dorothy.
@@ -249,8 +245,7 @@ The text will be logged as a debug message.
         </ul>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> console.debug('E is for Eve.');
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">console.debug('E is for Eve.');</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>E is for Eve.
@@ -285,11 +280,12 @@ the message is written to the console.
         </ul>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var felix = 'Felix';
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var felix = 'Felix';
 
- // This assertion checks whether the first letter in name 'Felix' is 'A':
- console.assert(felix.charAt(0) === 'A', felix + ' does not start with A.');
- </pre>
+/* This assertion checks whether the first letter in name 'Felix' is 'A' */
+console.assert(felix.charAt(0) === 'A', felix + ' does not start with A.');
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Felix does not start with A.
@@ -321,9 +317,10 @@ Object view is forced.
         </ul>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var john = {name: "John", surname: "Doe"};
- console.dir(john.name);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var john = {name: "John", surname: "Doe"};
+console.dir(john.name);
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>John
@@ -354,9 +351,10 @@ if possible or the JavaScript Object if it is not.
         </ul>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var john = {name: "John", surname: "Doe"};
- console.dirxml(john.surname);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var john = {name: "John", surname: "Doe"};
+console.dirxml(john.surname);
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Doe
@@ -388,13 +386,15 @@ is displayed in the console. Timer values are accurate to the sub-millisecond.
         </ul>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> console.time("Big array initialization");
- var array = new Array(1000000);
- for (var i = array.length - 1; i &gt;= 0; i -= 1) {
-   array[i] = new Object();
- };
- console.timeEnd("Big array initialization");
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+console.time("Big array initialization");
+var array = new Array(1000000);
+for (var i = array.length - 1; i &gt;= 0; i -= 1)
+{
+&nbsp;&nbsp;&nbsp;array[i] = new Object();
+};
+console.timeEnd("Big array initialization");
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Big array initialization: 461.989ms
@@ -424,13 +424,15 @@ is displayed in the console. Timer values are accurate to the sub-millisecond.
         </ul>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> console.time("Big array initialization");
- var array = new Array(1000000);
- for (var i = array.length - 1; i &gt;= 0; i -= 1) {
-   array[i] = new Object();
- };
- console.timeEnd("Big array initialization");
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+console.time("Big array initialization");
+var array = new Array(1000000);
+for (var i = array.length - 1; i &gt;= 0; i -= 1)
+{
+&nbsp;&nbsp;&nbsp;array[i] = new Object();
+};
+console.timeEnd("Big array initialization");
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Big array initialization: 461.989ms
index 09b58a9..9fda036 100644 (file)
@@ -3,7 +3,7 @@
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
 <link rel="stylesheet" type="text/css" href="../tizen.css" media="screen">
-<script type="text/javascript" src="snippet.js"></script><title>Cordova API</title>
+<script type="text/javascript" src="../snippet.js"></script><title>Cordova API</title>
 </head>
 <body id="page-content" onload="prettyPrint()">
 <div class="api" id="::Cordova">
index d15a2a8..b9a8dc2 100644 (file)
@@ -3,7 +3,7 @@
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
 <link rel="stylesheet" type="text/css" href="../tizen.css" media="screen">
-<script type="text/javascript" src="snippet.js"></script><title>DeviceMotion API</title>
+<script type="text/javascript" src="../snippet.js"></script><title>DeviceMotion API</title>
 </head>
 <body id="page-content" onload="prettyPrint()">
 <div class="api" id="::DeviceMotion">
@@ -133,19 +133,22 @@ Original documentation: <a href="https://cordova.apache.org/docs/en/3.0.0/cordov
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function onSuccess(acceleration) {
-   console.log('Acceleration X: ' + acceleration.x + '\n' +
-               'Acceleration Y: ' + acceleration.y + '\n' +
-               'Acceleration Z: ' + acceleration.z + '\n' +
-               'Timestamp: '      + acceleration.timestamp);
- };
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function onSuccess(acceleration)
+{
+&nbsp;&nbsp;&nbsp;console.log('Acceleration X: ' + acceleration.x + '\n' +
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'Acceleration Y: ' + acceleration.y + '\n' +
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'Acceleration Z: ' + acceleration.z + '\n' +
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'Timestamp: ' + acceleration.timestamp);
+};
 
- function onError() {
-   console.log('onError!');
- };
+function onError()
+{
+&nbsp;&nbsp;&nbsp;console.log('onError!');
+};
 
- navigator.accelerometer.getCurrentAcceleration(onSuccess, onError);
- </pre>
+navigator.accelerometer.getCurrentAcceleration(onSuccess, onError);
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Acceleration X: 0.00
@@ -197,22 +200,25 @@ Timestamp: 1456480118000
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function onSuccess(acceleration) {
-   console.log('Acceleration X: ' + acceleration.x + '\n' +
-               'Acceleration Y: ' + acceleration.y + '\n' +
-               'Acceleration Z: ' + acceleration.z + '\n' +
-               'Timestamp: '      + acceleration.timestamp);
-   console.log('Please wait 3 seconds for the next measurement...');
- };
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function onSuccess(acceleration)
+{
+&nbsp;&nbsp;&nbsp;console.log('Acceleration X: ' + acceleration.x + '\n' +
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'Acceleration Y: ' + acceleration.y + '\n' +
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'Acceleration Z: ' + acceleration.z + '\n' +
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'Timestamp: ' + acceleration.timestamp);
+&nbsp;&nbsp;&nbsp;console.log('Please wait 3 seconds for the next measurement...');
+};
 
- function onError() {
-   console.log('onError!');
- };
+function onError()
+{
+&nbsp;&nbsp;&nbsp;console.log('onError!');
+};
 
- var options = { frequency: 3000 };  // Update every 3 seconds
+var options = {frequency: 3000}; /* Update every 3 seconds */
 
- var watchID = navigator.accelerometer.watchAcceleration(onSuccess, onError, options);
- </pre>
+var watchID = navigator.accelerometer.watchAcceleration(onSuccess, onError, options);
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Acceleration X: 0.00
@@ -259,26 +265,30 @@ Please wait 3 seconds for the next measurement...
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var counter = 0, watchID;
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var counter = 0, watchID;
 
- function onSuccess(acceleration) {
-   console.log('Acceleration X: ' + acceleration.x + '\n' +
-               'Acceleration Y: ' + acceleration.y + '\n' +
-               'Acceleration Z: ' + acceleration.z + '\n' +
-               'Timestamp: '      + acceleration.timestamp);
-   if(3 == ++counter) {
-     navigator.accelerometer.clearWatch(watchID);
-   }
- };
+function onSuccess(acceleration)
+{
+&nbsp;&nbsp;&nbsp;console.log('Acceleration X: ' + acceleration.x + '\n' +
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'Acceleration Y: ' + acceleration.y + '\n' +
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'Acceleration Z: ' + acceleration.z + '\n' +
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'Timestamp: ' + acceleration.timestamp);
+&nbsp;&nbsp;&nbsp;if (3 == ++counter)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;navigator.accelerometer.clearWatch(watchID);
+&nbsp;&nbsp;&nbsp;}
+};
 
- function onError() {
-   console.log('onError!');
- };
+function onError()
+{
+&nbsp;&nbsp;&nbsp;console.log('onError!');
+};
 
- var options = { frequency: 30 };  // Update every 0.03 seconds
+var options = {frequency: 30}; /* Update every 0.03 seconds */
 
- watchID = navigator.accelerometer.watchAcceleration(onSuccess, onError, options);
- </pre>
+watchID = navigator.accelerometer.watchAcceleration(onSuccess, onError, options);
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Acceleration X: 0.00
index e0e8ab1..5cd870c 100644 (file)
@@ -3,7 +3,7 @@
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
 <link rel="stylesheet" type="text/css" href="../tizen.css" media="screen">
-<script type="text/javascript" src="snippet.js"></script><title>Device API</title>
+<script type="text/javascript" src="../snippet.js"></script><title>Device API</title>
 </head>
 <body id="page-content" onload="prettyPrint()">
 <div class="api" id="::Device">
@@ -94,12 +94,14 @@ Original documentation: <a href="https://cordova.apache.org/docs/en/3.0.0/cordov
  Returns the version of Cordova running on the device.
             </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> document.addEventListener('deviceready', onDeviceReady, false);
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+document.addEventListener('deviceready', onDeviceReady, false);
 
- function onDeviceReady() {
-   console.log('Device Cordova: '  + device.cordova);
- }
- </pre>
+function onDeviceReady()
+{
+&nbsp;&nbsp;&nbsp;console.log('Device Cordova: ' + device.cordova);
+}
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Device Cordova: 5.1.1
@@ -112,12 +114,14 @@ Original documentation: <a href="https://cordova.apache.org/docs/en/3.0.0/cordov
  Get the the name of the device's model or product. The value is set by the device manufacturer and may be different across versions of the same product.
             </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> document.addEventListener('deviceready', onDeviceReady, false);
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+document.addEventListener('deviceready', onDeviceReady, false);
 
- function onDeviceReady() {
-   console.log('Device Model: '  + device.model);
- }
- </pre>
+function onDeviceReady()
+{
+&nbsp;&nbsp;&nbsp;console.log('Device Model: ' + device.model);
+}
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Device Model: tm1
@@ -130,12 +134,14 @@ Original documentation: <a href="https://cordova.apache.org/docs/en/3.0.0/cordov
  Get the device's operating system name.
             </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> document.addEventListener('deviceready', onDeviceReady, false);
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+document.addEventListener('deviceready', onDeviceReady, false);
 
- function onDeviceReady() {
-   console.log('Device Platform: '  + device.platform);
- }
- </pre>
+function onDeviceReady()
+{
+&nbsp;&nbsp;&nbsp;console.log('Device Platform: ' + device.platform);
+}
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Device Platform: Tizen
@@ -148,12 +154,14 @@ Original documentation: <a href="https://cordova.apache.org/docs/en/3.0.0/cordov
  Get the device's Universally Unique Identifier (UUID). The details of how a UUID is generated are determined by the device manufacturer and are specific to the device's platform or model.
             </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> document.addEventListener('deviceready', onDeviceReady, false);
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+document.addEventListener('deviceready', onDeviceReady, false);
 
- function onDeviceReady() {
-   console.log('Device UUID: '  + device.uuid);
- }
- </pre>
+function onDeviceReady()
+{
+&nbsp;&nbsp;&nbsp;console.log('Device UUID: ' + device.uuid);
+}
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Device UUID: 2LR1b3MXfEUSFvH04m4e1EXYvQA=
@@ -166,12 +174,14 @@ Original documentation: <a href="https://cordova.apache.org/docs/en/3.0.0/cordov
  Get the operating system version.
             </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> document.addEventListener('deviceready', onDeviceReady, false);
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+document.addEventListener('deviceready', onDeviceReady, false);
 
- function onDeviceReady() {
-   console.log('Device Version: '  + device.version);
- }
- </pre>
+function onDeviceReady()
+{
+&nbsp;&nbsp;&nbsp;console.log('Device Version: ' + device.version);
+}
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Device Version: 3.0
index 0a8e532..5fc7a5a 100644 (file)
@@ -3,7 +3,7 @@
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
 <link rel="stylesheet" type="text/css" href="../tizen.css" media="screen">
-<script type="text/javascript" src="snippet.js"></script><title>Dialogs API</title>
+<script type="text/javascript" src="../snippet.js"></script><title>Dialogs API</title>
 </head>
 <body id="page-content" onload="prettyPrint()">
 <div class="api" id="::Dialogs">
@@ -140,13 +140,15 @@ The <em>navigator.notification</em> object allows access to the Dialogs API.
         </ul>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var alertDismissed = function() {
-    console.log('Alert was dismissed');
- }
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var alertDismissed = function()
+{
+&nbsp;&nbsp;&nbsp;console.log('Alert was dismissed');
+}
 
- navigator.notification.alert('Please click OK button', alertDismissed,
-                              'OK click alert', 'OK');
- </pre>
+navigator.notification.alert('Please click OK button', alertDismissed,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'OK click alert', 'OK');
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Alert was dismissed
@@ -189,13 +191,15 @@ Callback provides index of button pressed (1,2,3 etc.) or 0, if dialog was dismi
         </ul>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var confirmCallback = function(buttonIndex) {
-    console.log('Selected option was ' + buttonIndex);
- }
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var confirmCallback = function(buttonIndex)
+{
+&nbsp;&nbsp;&nbsp;console.log('Selected option was ' + buttonIndex);
+}
 
- navigator.notification.confirm('Choose one option', confirmCallback,
-                              'Options', ['Option1', 'Option2']);
- </pre>
+navigator.notification.confirm('Choose one option', confirmCallback,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'Options', ['Option1', 'Option2']);
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Selected option was 1
@@ -242,16 +246,15 @@ Callback provides <em>PromptData</em> object, which holds all data provided by u
         </ul>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var promptCallback = function(results) {
-    console.log('Hello ' + results.input1 + ', you selected option ' + results.buttonIndex);
- }
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var promptCallback = function(results)
+{
+&nbsp;&nbsp;&nbsp;console.log('Hello ' + results.input1 + ', you selected option ' + results.buttonIndex);
+}
 
- navigator.notification.prompt('Please enter your name',
-                               promptCallback,
-                              'Registration Box',
-                              ['Ok', 'Exit'],
-                              'e.g. Jane Doe');
- </pre>
+navigator.notification.prompt('Please enter your name', promptCallback,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'Registration Box', ['Ok', 'Exit'], 'e.g. Jane Doe');
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Hello Jane Doe, you selected option 1
@@ -281,10 +284,11 @@ Callback provides <em>PromptData</em> object, which holds all data provided by u
         </ul>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var times = 2;
- console.log('Device would beep ' + times + ' times');
- navigator.notification.beep(times);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var times = 2;
+console.log('Device would beep ' + times + ' times');
+navigator.notification.beep(times);
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Device would beep 2 times
index 9fb86e7..ae51d8c 100644 (file)
@@ -3,7 +3,7 @@
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
 <link rel="stylesheet" type="text/css" href="../tizen.css" media="screen">
-<script type="text/javascript" src="snippet.js"></script><title>Events API</title>
+<script type="text/javascript" src="../snippet.js"></script><title>Events API</title>
 </head>
 <body id="page-content" onload="prettyPrint()">
 <div class="api" id="::Events">
@@ -211,12 +211,14 @@ The deviceready event behaves somewhat differently from others. Any event handle
 Original documentation: <a href="https://cordova.apache.org/docs/en/latest/cordova/events/events.deviceready.html">Cordova deviceredy event</a>          </p>
          </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> document.addEventListener('deviceready', onDeviceReady, false);
-
- function onDeviceReady() {
-   // Now safe to use device APIs
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+document.addEventListener('deviceready', onDeviceReady, false);
+
+function onDeviceReady()
+{
+&nbsp;&nbsp;&nbsp;/* Now safe to use device APIs */
+}
+</pre>
 </div>
 </div>
 <div class="interface" id="PauseEventCallback">
@@ -243,16 +245,19 @@ Applications typically should use document.addEventListener() to attach an event
 Original documentation: <a href="https://cordova.apache.org/docs/en/latest/cordova/events/events.pause.html">Cordova pause event</a>          </p>
          </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> document.addEventListener('deviceready', onDeviceReady, false);
-
- function onDeviceReady() {
-   document.addEventListener('pause', onPause, false);
- }
-
- function onPause() {
-   // Handle the pause event
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+document.addEventListener('deviceready', onDeviceReady, false);
+
+function onDeviceReady()
+{
+&nbsp;&nbsp;&nbsp;document.addEventListener('pause', onPause, false);
+}
+
+function onPause()
+{
+&nbsp;&nbsp;&nbsp;/* Handle the pause event */
+}
+</pre>
 </div>
 </div>
 <div class="interface" id="ResumeEventCallback">
@@ -279,16 +284,19 @@ Applications typically should use document.addEventListener() to attach an event
 Original documentation: <a href="https://cordova.apache.org/docs/en/latest/cordova/events/events.resume.html">Cordova resume event</a>          </p>
          </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> document.addEventListener('deviceready', onDeviceReady, false);
-
- function onDeviceReady() {
-   document.addEventListener('resume', onResume, false);
- }
-
- function onResume() {
-   // Handle the resume event
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+document.addEventListener('deviceready', onDeviceReady, false);
+
+function onDeviceReady()
+{
+&nbsp;&nbsp;&nbsp;document.addEventListener('resume', onResume, false);
+}
+
+function onResume()
+{
+&nbsp;&nbsp;&nbsp;/* Handle the resume event */
+}
+</pre>
 </div>
 </div>
 <div class="interface" id="BackButtonEventCallback">
@@ -313,16 +321,19 @@ It is no longer necessary to call any other method to override the back-button b
 Original documentation: <a href="https://cordova.apache.org/docs/en/latest/cordova/events/events.backbutton.html">Cordova backbutton event</a>          </p>
          </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> document.addEventListener('deviceready', onDeviceReady, false);
-
- function onDeviceReady() {
-   document.addEventListener('backbutton', onBackKeyDown, false);
- }
-
- function onBackKeyDown() {
-    // Handle the back button
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+document.addEventListener('deviceready', onDeviceReady, false);
+
+function onDeviceReady()
+{
+&nbsp;&nbsp;&nbsp;document.addEventListener('backbutton', onBackKeyDown, false);
+}
+
+function onBackKeyDown()
+{
+&nbsp;&nbsp;&nbsp;/* Handle the back button */
+}
+</pre>
 </div>
 </div>
 <div class="interface" id="MenuButtonEventCallback">
@@ -349,16 +360,19 @@ Applications typically should use document.addEventListener() to attach an event
 Original documentation: <a href="https://cordova.apache.org/docs/en/latest/cordova/events/events.menubutton.html">Cordova menubutton event</a>          </p>
          </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> document.addEventListener('deviceready', onDeviceReady, false);
-
- function onDeviceReady() {
-   document.addEventListener('menubutton', onMenuKeyDown, false);
- }
-
- function onMenuKeyDown() {
-   // Handle the back button
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+document.addEventListener('deviceready', onDeviceReady, false);
+
+function onDeviceReady()
+{
+&nbsp;&nbsp;&nbsp;document.addEventListener('menubutton', onMenuKeyDown, false);
+}
+
+function onMenuKeyDown()
+{
+&nbsp;&nbsp;&nbsp;/* Handle the back button */
+}
+</pre>
 </div>
 </div>
 <div class="interface" id="SearchButtonEventCallback">
@@ -385,16 +399,19 @@ Applications typically should use document.addEventListener() to attach an event
 Original documentation: <a href="https://cordova.apache.org/docs/en/latest/cordova/events/events.searchbutton.html">Cordova searchbutton event</a>          </p>
          </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> document.addEventListener('deviceready', onDeviceReady, false);
-
- function onDeviceReady() {
-   document.addEventListener('searchbutton', onSearchKeyDown, false);
- }
-
- function onSearchKeyDown() {
-   // Handle the search button
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+document.addEventListener('deviceready', onDeviceReady, false);
+
+function onDeviceReady()
+{
+&nbsp;&nbsp;&nbsp;document.addEventListener('searchbutton', onSearchKeyDown, false);
+}
+
+function onSearchKeyDown()
+{
+&nbsp;&nbsp;&nbsp;/* Handle the search button */
+}
+</pre>
 </div>
 </div>
 <div class="interface" id="StartCallEventCallback">
@@ -421,16 +438,19 @@ Applications typically should use document.addEventListener() to attach an event
 Original documentation: <a href="https://cordova.apache.org/docs/en/latest/cordova/events/events.startcallbutton.html">Cordova startcallbutton event</a>          </p>
          </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> document.addEventListener('deviceready', onDeviceReady, false);
-
- function onDeviceReady() {
-   document.addEventListener('startcallbutton', onStartCallKeyDown, false);
- }
-
- function onStartCallKeyDown() {
-   // Handle the start call button
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+document.addEventListener('deviceready', onDeviceReady, false);
+
+function onDeviceReady()
+{
+&nbsp;&nbsp;&nbsp;document.addEventListener('startcallbutton', onStartCallKeyDown, false);
+}
+
+function onStartCallKeyDown()
+{
+&nbsp;&nbsp;&nbsp;/* Handle the start call button */
+}
+</pre>
 </div>
 </div>
 <div class="interface" id="EndCallButtonEventCallback">
@@ -457,16 +477,19 @@ Applications typically should use document.addEventListener() to attach an event
 Original documentation: <a href="https://cordova.apache.org/docs/en/latest/cordova/events/events.endcallbutton.html">Cordova endcallbutton event</a>          </p>
          </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> document.addEventListener('deviceready', onDeviceReady, false);
-
- function onDeviceReady() {
-   document.addEventListener('endcallbutton', onEndCallKeyDown, false);
- }
-
- function onEndCallKeyDown() {
-   // Handle the end call button
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+document.addEventListener('deviceready', onDeviceReady, false);
+
+function onDeviceReady()
+{
+&nbsp;&nbsp;&nbsp;document.addEventListener('endcallbutton', onEndCallKeyDown, false);
+}
+
+function onEndCallKeyDown()
+{
+&nbsp;&nbsp;&nbsp;/* Handle the end call button */
+}
+</pre>
 </div>
 </div>
 <div class="interface" id="VolumeDownButtonEventCallback">
@@ -493,16 +516,19 @@ Applications typically should use document.addEventListener() to attach an event
 Original documentation: <a href="https://cordova.apache.org/docs/en/latest/cordova/events/events.volumedownbutton.html">Cordova volumedownbutton event</a>          </p>
          </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> document.addEventListener('deviceready', onDeviceReady, false);
-
- function onDeviceReady() {
-   document.addEventListener('volumedownbutton', onVolumeDownKeyDown, false);
- }
-
- function onVolumeDownKeyDown() {
-   // Handle the volume down button
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+document.addEventListener('deviceready', onDeviceReady, false);
+
+function onDeviceReady()
+{
+&nbsp;&nbsp;&nbsp;document.addEventListener('volumedownbutton', onVolumeDownKeyDown, false);
+}
+
+function onVolumeDownKeyDown()
+{
+&nbsp;&nbsp;&nbsp;/* Handle the volume down button */
+}
+</pre>
 </div>
 </div>
 <div class="interface" id="VolumeUpButtonEventCallback">
@@ -529,16 +555,19 @@ Applications typically should use document.addEventListener() to attach an event
 Original documentation: <a href="https://cordova.apache.org/docs/en/latest/cordova/events/events.volumeupbutton.html">Cordova volumeupbutton event</a>          </p>
          </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> document.addEventListener('deviceready', onDeviceReady, false);
-
- function onDeviceReady() {
-   document.addEventListener('volumeupbutton', onVolumeUpKeyDown, false);
- }
-
- function onVolumeUpKeyDown() {
-   // Handle the volume up button
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+document.addEventListener('deviceready', onDeviceReady, false);
+
+function onDeviceReady()
+{
+&nbsp;&nbsp;&nbsp;document.addEventListener('volumeupbutton', onVolumeUpKeyDown, false);
+}
+
+function onVolumeUpKeyDown()
+{
+&nbsp;&nbsp;&nbsp;/* Handle the volume up button */
+}
+</pre>
 </div>
 </div>
 </div>
index eb4bf70..4eabbc4 100644 (file)
@@ -3,7 +3,7 @@
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
 <link rel="stylesheet" type="text/css" href="../tizen.css" media="screen">
-<script type="text/javascript" src="snippet.js"></script><title>File API</title>
+<script type="text/javascript" src="../snippet.js"></script><title>File API</title>
 </head>
 <body id="page-content" onload="prettyPrint()">
 <div class="api" id="::File">
@@ -332,12 +332,14 @@ Original documentation: <a href="https://www.npmjs.com/package/cordova-plugin-fi
  3.0
           </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var eventInit = {
-   loaded: 128,
-   total: 1024
- };
- var event = new ProgressEvent('submit', eventInit);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var eventInit =
+{
+&nbsp;&nbsp;&nbsp;loaded: 128,
+&nbsp;&nbsp;&nbsp;total: 1024
+};
+var event = new ProgressEvent('submit', eventInit);
+</pre>
 </div>
 <div class="constructors">
 <h4 id="ProgressEvent::constructor">Constructors</h4>
@@ -501,8 +503,7 @@ This manager interface exposes the Filesystem base API constants.
  3.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> console.log("The directory where the application is installed " + cordova.file.applicationDirectory);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">console.log("The directory where the application is installed " + cordova.file.applicationDirectory);</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>The directory where the application is installed file:///opt/usr/apps/WfigBlWDyf/res/wgt/
@@ -519,8 +520,7 @@ This manager interface exposes the Filesystem base API constants.
  3.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> console.log("Root directory of the application's sandbox " + cordova.file.applicationStorageDirectory);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">console.log("Root directory of the application's sandbox " + cordova.file.applicationStorageDirectory);</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Root directory of the application's sandbox file:///opt/usr/apps/WfigBlWDyf/
@@ -537,8 +537,7 @@ This manager interface exposes the Filesystem base API constants.
  3.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> console.log("Data directory " + cordova.file.dataDirectory);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">console.log("Data directory " + cordova.file.dataDirectory);</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Data directory file:///opt/usr/apps/WfigBlWDyf/data/
@@ -555,8 +554,7 @@ This manager interface exposes the Filesystem base API constants.
  3.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> console.log("Cache directory " + cordova.file.cacheDirectory);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">console.log("Cache directory " + cordova.file.cacheDirectory);</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Cache directory file:///opt/usr/apps/WfigBlWDyf/tmp/
@@ -573,8 +571,7 @@ This manager interface exposes the Filesystem base API constants.
  3.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> console.log("Space on external storage " + cordova.file.externalApplicationStorageDirectory);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">console.log("Space on external storage " + cordova.file.externalApplicationStorageDirectory);</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Space on external storage null
@@ -591,8 +588,7 @@ This manager interface exposes the Filesystem base API constants.
  3.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> console.log("Data files on external storage " + cordova.file.externalDataDirectory);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">console.log("Data files on external storage " + cordova.file.externalDataDirectory);</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Data files on external storage null
@@ -609,8 +605,7 @@ This manager interface exposes the Filesystem base API constants.
  3.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> console.log("Cache on external storage " + cordova.file.externalCacheDirectory);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">console.log("Cache on external storage " + cordova.file.externalCacheDirectory);</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Cache on external storage null
@@ -627,8 +622,7 @@ This manager interface exposes the Filesystem base API constants.
  3.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> console.log("Root on external storage " + cordova.file.externalRootDirectory);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">console.log("Root on external storage " + cordova.file.externalRootDirectory);</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Root on external storage file:///usr/storage/sdcard/
@@ -645,8 +639,7 @@ This manager interface exposes the Filesystem base API constants.
  3.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> console.log("Temp directory " + cordova.file.tempDirectory);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">console.log("Temp directory " + cordova.file.tempDirectory);</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Temp directory null
@@ -663,8 +656,7 @@ This manager interface exposes the Filesystem base API constants.
  3.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> console.log("Synced data directory " + cordova.file.syncedDataDirectory);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">console.log("Synced data directory " + cordova.file.syncedDataDirectory);</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Synced data directory null
@@ -681,8 +673,7 @@ This manager interface exposes the Filesystem base API constants.
  3.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> console.log("Documents directory " + cordova.file.documentsDirectory);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">console.log("Documents directory " + cordova.file.documentsDirectory);</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Documents directory null
@@ -699,8 +690,7 @@ This manager interface exposes the Filesystem base API constants.
  3.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> console.log("Files globally available to all applications " + cordova.file.sharedDirectory);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">console.log("Files globally available to all applications " + cordova.file.sharedDirectory);</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Files globally available to all applications file:///opt/usr/media/
@@ -743,10 +733,12 @@ The specifics of naming filesystems is unspecified, but a name must be unique ac
  3.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> requestFileSystem(TEMPORARY, 100, function (fileSystem) {
-        console.log('Name of the filesystem: '+fileSystem.name);
- });
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+requestFileSystem(TEMPORARY, 100, function(fileSystem)
+{
+&nbsp;&nbsp;&nbsp;console.log('Name of the filesystem: ' + fileSystem.name);
+});
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Name of the filesystem: temporary
@@ -1007,17 +999,19 @@ The specifics of naming filesystems is unspecified, but a name must be unique ac
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> successCallback = function(fs) {
-     console.log('File system name ' + fs.name);
- };
-
- errorCallback = function(err) {
-     console.log(err.code);
- };
-
- requestFileSystem(TEMPORARY, 1024*1024, successCallback, errorCallback);
-
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+successCallback = function(fs)
+{
+&nbsp;&nbsp;&nbsp;console.log('File system name ' + fs.name);
+};
+
+errorCallback = function(err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.code);
+};
+
+requestFileSystem(TEMPORARY, 1024 * 1024, successCallback, errorCallback);
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>File system name temporary
@@ -1070,18 +1064,20 @@ The specifics of naming filesystems is unspecified, but a name must be unique ac
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> successCallback = function(entry) {
-     console.log('Entry name ' + entry.name);
- };
-
- errorCallback = function(err) {
-     console.log(err.code);
- };
-
- var uri = 'file:///home/owner/content/Documents/example.txt';
- resolveLocalFileSystemURL(uri, successCallback, errorCallback);
-
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+successCallback = function(entry)
+{
+&nbsp;&nbsp;&nbsp;console.log('Entry name ' + entry.name);
+};
+
+errorCallback = function(err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.code);
+};
+
+var uri = 'file:///home/owner/content/Documents/example.txt';
+resolveLocalFileSystemURL(uri, successCallback, errorCallback);
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Entry name example.txt
@@ -1224,12 +1220,15 @@ The specifics of naming filesystems is unspecified, but a name must be unique ac
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">   requestFileSystem(TEMPORARY, 100, function(fs) {
-     fs.root.getMetadata(function (metadata) {
-       console.log("Last modification time: " + metadata.modificationTime);// get metadata successfully
-     });
-   });
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+requestFileSystem(TEMPORARY, 100, function(fs)
+{
+&nbsp;&nbsp;&nbsp;fs.root.getMetadata(function(metadata)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Last modification time: " + metadata.modificationTime); /* Get metadata successfully */
+&nbsp;&nbsp;&nbsp;});
+});
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Last modification time: Fri Jan 02 2015 03:58:08 GMT+0900 (KST)
@@ -1311,16 +1310,21 @@ A move of a directory on top of an existing empty directory must attempt to dele
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">  successCallback = function(entry){console.log('Full path to the moved file: '+entry.fullPath)};
-   requestFileSystem(TEMPORARY, 100, function(fs) {
-     fs.root.getDirectory('testDirectory', {create:true}, function(direntry) {
-       fs.root.getFile("aa.txt", {create:true}, function(fileentry) {
-         console.log('Full path before move: '+fileentry.fullPath);
-         fileentry.moveTo(direntry,'newname.txt',successCallback);
-       });
-     });
-   });
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+successCallback = function(entry) {console.log('Full path to the moved file: ' + entry.fullPath)};
+
+requestFileSystem(TEMPORARY, 100, function(fs)
+{
+&nbsp;&nbsp;&nbsp;fs.root.getDirectory('testDirectory', {create:true}, function(direntry)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;fs.root.getFile("aa.txt", {create:true}, function(fileentry)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('Full path before move: ' + fileentry.fullPath);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;fileentry.moveTo(direntry, 'newname.txt', successCallback);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;});
+&nbsp;&nbsp;&nbsp;});
+});
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Full path before move: /aa.txt
@@ -1404,18 +1408,20 @@ Directory copies are always recursive--that is, they copy all contents of the di
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">   successCallback = function(entry){console.log('Full path to the copied file: '+entry.fullPath);};
-   requestFileSystem(TEMPORARY, 100, function(fs) {
-     fs.root.getDirectory('testDirectory', {create:true},
-       function(direntry) {
-         fs.root.getFile("test.txt", {create:true},
-           function(fileentry) {
-             fileentry.copyTo(direntry,'newname.txt',successCallback);
-           }
-       );
-     });
-   });
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+successCallback = function(entry) {console.log('Full path to the copied file: ' + entry.fullPath);};
+
+requestFileSystem(TEMPORARY, 100, function(fs)
+{
+&nbsp;&nbsp;&nbsp;fs.root.getDirectory('testDirectory', {create:true}, function(direntry)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;fs.root.getFile("test.txt", {create:true}, function(fileentry)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;fileentry.copyTo(direntry, 'newname.txt', successCallback);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;});
+&nbsp;&nbsp;&nbsp;});
+});
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Full path to the copied file: /testDirectory/newname.txt
@@ -1464,12 +1470,15 @@ Directory copies are always recursive--that is, they copy all contents of the di
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">   requestFileSystem(TEMPORARY, 100, function(fs) {
-     fs.root.getParent(function (entry) {
-       console.log("success");
-     });
-   });
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+requestFileSystem(TEMPORARY, 100, function(fs)
+{
+&nbsp;&nbsp;&nbsp;fs.root.getParent(function(entry)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("success");
+&nbsp;&nbsp;&nbsp;});
+});
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>success
@@ -1522,14 +1531,18 @@ Directory copies are always recursive--that is, they copy all contents of the di
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">   requestFileSystem(TEMPORARY, 100, function(fs) {
-     fs.root.getFile('test.txt', {create: true}, function(fileEntry) {
-       fileEntry.remove(function () {
-         console.log("success");
-       });
-     });
-   });
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+requestFileSystem(TEMPORARY, 100, function(fs)
+{
+&nbsp;&nbsp;&nbsp;fs.root.getFile('test.txt', {create: true}, function(fileEntry)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;fileEntry.remove(function()
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("success");
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;});
+&nbsp;&nbsp;&nbsp;});
+});
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>success
@@ -1554,14 +1567,16 @@ Directory copies are always recursive--that is, they copy all contents of the di
  URL that can be used to identify this entry.
               </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">   requestFileSystem(TEMPORARY, 100, function(fs) {
-     fs.root.getDirectory('testDirectory', {create:true},
-       function(entry) {
-         var url = entry.toURL();
-         console.log('URL: '+url);
-     });
-   });
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+requestFileSystem(TEMPORARY, 100, function(fs)
+{
+&nbsp;&nbsp;&nbsp;fs.root.getDirectory('testDirectory', {create:true}, function(entry)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var url = entry.toURL();
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('URL: ' + url);
+&nbsp;&nbsp;&nbsp;});
+});
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>URL: file:///home/owner/apps_rw/WfigBlWDyf/tmp/testDirectory/
@@ -1620,12 +1635,15 @@ Directory copies are always recursive--that is, they copy all contents of the di
  DirectoryReader
               </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">   requestFileSystem(TEMPORARY, 100, function (entry) {
-     entry.root.getDirectory("MyDocument", {create:true}, function(dirEntry) {
-          var directoryReader = dirEntry.createReader();
-      });
-   });
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+requestFileSystem(TEMPORARY, 100, function(entry)
+{
+&nbsp;&nbsp;&nbsp;entry.root.getDirectory("MyDocument", {create:true}, function(dirEntry)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var directoryReader = dirEntry.createReader();
+&nbsp;&nbsp;&nbsp;});
+});
+</pre>
 </div>
 </dd>
 <dt class="method" id="DirectoryEntry::getDirectory">
@@ -1696,12 +1714,15 @@ Otherwise, if no other error occurs, getDirectory must return a DirectoryEntry c
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">   requestFileSystem(TEMPORARY, 100, function(fs) {
-     fs.root.getDirectory("ert",{create:true},function(dir){
-         console.log('Created dir: '+dir.name);
-      })
-   });
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+requestFileSystem(TEMPORARY, 100, function(fs)
+{
+&nbsp;&nbsp;&nbsp;fs.root.getDirectory("ert", {create:true}, function(dir)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('Created dir: ' + dir.name);
+&nbsp;&nbsp;&nbsp;})
+});
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Created dir: ert
@@ -1776,12 +1797,15 @@ Otherwise, if no other error occurs, getFile must return a FileEntry correspondi
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">   requestFileSystem(TEMPORARY, 100, function(fs) {
-     fs.root.getFile("qa.txt",{create:true},function(file){
-           console.log('Created file: '+file.name);
-     });
-   });
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+requestFileSystem(TEMPORARY, 100, function(fs)
+{
+&nbsp;&nbsp;&nbsp;fs.root.getFile("qa.txt", {create:true}, function(file)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('Created file: ' + file.name);
+&nbsp;&nbsp;&nbsp;});
+});
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Created file: qa.txt
@@ -1834,15 +1858,18 @@ Otherwise, if no other error occurs, getFile must return a FileEntry correspondi
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">   requestFileSystem(TEMPORARY, 100, function(fs) {
-     fs.root.getDirectory("testDirectory", {create:true},
-       function(directoryEntry) {
-         directoryEntry.removeRecursively(function() {
-           console.log("success");
-         });
-     });
-   });
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+requestFileSystem(TEMPORARY, 100, function(fs)
+{
+&nbsp;&nbsp;&nbsp;fs.root.getDirectory("testDirectory", {create:true}, function(directoryEntry)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;directoryEntry.removeRecursively(function()
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("success");
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;});
+&nbsp;&nbsp;&nbsp;});
+});
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>success
@@ -1906,13 +1933,16 @@ Otherwise, if no other error occurs, getFile must return a FileEntry correspondi
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">   requestFileSystem(TEMPORARY, 100, function(fs) {
-     var a = fs.root.createReader();
-     a.readEntries(function successCallback(entries) {
-       console.log("success");
-     });
-   });
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+requestFileSystem(TEMPORARY, 100, function(fs)
+{
+&nbsp;&nbsp;&nbsp;var a = fs.root.createReader();
+&nbsp;&nbsp;&nbsp;a.readEntries(function successCallback(entries)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("success");
+&nbsp;&nbsp;&nbsp;});
+});
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>success
@@ -1976,20 +2006,26 @@ Otherwise, if no other error occurs, getFile must return a FileEntry correspondi
         </ul>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">   requestFileSystem(TEMPORARY, 100, function(fs) {
-     fs.root.getFile("logFile.txt", {create: true}, function (f) {
-       f.createWriter(function(fileWriter) {
-         fileWriter.write(new Blob(['hello']));
-         fileWriter.onerror = function(e) {
-           console.log('Write file failed:' + e);
-         };
-         fileWriter.onwriteend = function () {
-           console.log("success");
-         };
-       });
-     });
-   });
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+requestFileSystem(TEMPORARY, 100, function(fs)
+{
+&nbsp;&nbsp;&nbsp;fs.root.getFile("logFile.txt", {create: true}, function(f)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;f.createWriter(function(fileWriter)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;fileWriter.write(new Blob(['hello']));
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;fileWriter.onerror = function(e)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('Write file failed:' + e);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;};
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;fileWriter.onwriteend = function()
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("success");
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;};
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;});
+&nbsp;&nbsp;&nbsp;});
+});
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>success
@@ -2031,14 +2067,18 @@ Otherwise, if no other error occurs, getFile must return a FileEntry correspondi
         </ul>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">   requestFileSystem(TEMPORARY, 100, function(fs) {
-     fs.root.getFile("abcdz.txt", {create: true}, function (f) {
-       f.file(function (file) {
-         console.log("success");
-       });
-     });
-   });
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+requestFileSystem(TEMPORARY, 100, function(fs)
+{
+&nbsp;&nbsp;&nbsp;fs.root.getFile("abcdz.txt", {create: true}, function(f)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;f.file(function(file)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("success");
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;});
+&nbsp;&nbsp;&nbsp;});
+});
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>success
@@ -2090,12 +2130,14 @@ Otherwise, if no other error occurs, getFile must return a FileEntry correspondi
  3.0
           </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var deviceReady, fileReader;
- deviceReady = function() {
-     fileReader = new FileReader();
- };
- document.addEventListener('deviceready', deviceReady, true);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var deviceReady, fileReader;
+deviceReady = function()
+{
+&nbsp;&nbsp;&nbsp;fileReader = new FileReader();
+};
+document.addEventListener('deviceready', deviceReady, true);
+</pre>
 </div>
 <div class="constructors">
 <h4 id="FileReader::constructor">Constructors</h4>
@@ -2236,17 +2278,20 @@ Returns a Blob's data as a DOMString, or byte[], or null, depending on the read
  3.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var blob = new Blob(['abc']);
- var fileReader = new FileReader();
- fileReader.onload = function(){
-     console.log('Loaded');
- };
- fileReader.onabort = function(){
-     console.log('aborted');
- };
- fileReader.readAsDataURL(blob);
- fileReader.abort();
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var blob = new Blob(['abc']);
+var fileReader = new FileReader();
+fileReader.onload = function()
+{
+&nbsp;&nbsp;&nbsp;console.log('Loaded');
+};
+fileReader.onabort = function()
+{
+&nbsp;&nbsp;&nbsp;console.log('aborted');
+};
+fileReader.readAsDataURL(blob);
+fileReader.abort();
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>aborted
@@ -2295,13 +2340,15 @@ Returns a Blob's data as a DOMString, or byte[], or null, depending on the read
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var blob = new Blob(['abc']);
- var fileReader = new FileReader();
- fileReader.onload = function(){
-     console.log('Loaded, result = '+fileReader.result);
- };
-  fileReader.readAsDataURL(blob);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var blob = new Blob(['abc']);
+var fileReader = new FileReader();
+fileReader.onload = function()
+{
+&nbsp;&nbsp;&nbsp;console.log('Loaded, result = ' + fileReader.result);
+};
+fileReader.readAsDataURL(blob);
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Loaded, result = data:;base64,YWJj
@@ -2354,13 +2401,15 @@ Returns a Blob's data as a DOMString, or byte[], or null, depending on the read
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var blob = new Blob(['abc']);
- var fileReader = new FileReader();
- fileReader.onload = function(){
-     console.log('Loaded, result = '+fileReader.result);
- };
- fileReader.readAsText(blob);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var blob = new Blob(['abc']);
+var fileReader = new FileReader();
+fileReader.onload = function()
+{
+&nbsp;&nbsp;&nbsp;console.log('Loaded, result = ' + fileReader.result);
+};
+fileReader.readAsText(blob);
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Loaded, result = abc
@@ -2409,13 +2458,15 @@ Returns a Blob's data as a DOMString, or byte[], or null, depending on the read
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var blob = new Blob(['abc']);
- var fileReader = new FileReader();
- fileReader.onload = function(){
-     console.log('Loaded, result = '+fileReader.result);
- };
- fileReader.readAsBinaryString(blob);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var blob = new Blob(['abc']);
+var fileReader = new FileReader();
+fileReader.onload = function()
+{
+&nbsp;&nbsp;&nbsp;console.log('Loaded, result = ' + fileReader.result);
+};
+fileReader.readAsBinaryString(blob);
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Loaded, result = abc
@@ -2464,14 +2515,16 @@ Returns a Blob's data as a DOMString, or byte[], or null, depending on the read
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var blob = new Blob(['abc']);
- var fileReader = new FileReader();
- fileReader.onload = function(){
-     resultValue = fileReader.result;
-      console.log("Result: "+resultValue.toString()+'<br>'+'ByteLength: '+resultValue.byteLength);
- };
- fileReader.readAsArrayBuffer(blob);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var blob = new Blob(['abc']);
+var fileReader = new FileReader();
+fileReader.onload = function()
+{
+&nbsp;&nbsp;&nbsp;resultValue = fileReader.result;
+&nbsp;&nbsp;&nbsp;console.log("Result: " + resultValue.toString() + '&lt;br&gt;' + 'ByteLength: ' + resultValue.byteLength);
+};
+fileReader.readAsArrayBuffer(blob);
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Result: [object ArrayBuffer]
@@ -2660,24 +2713,29 @@ ByteLength: 3
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> successCallback = function(writer) {
-    writer.onwrite = function(evt) {
-         console.log('write success');
-    };
-    writer.onabort = function(e){
-          console.log('abort');
-    };
-    writer.write('some sample text');
-    writer.abort();
- };
-
- errorCallback = function(err) {
-     console.log(err.code);
- };
-
- // entry is FileEntry object retrieved by getFile() function of DirectoryEntry interface.
- entry.createWriter(successCallback, errorCallback);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+successCallback = function(writer)
+{
+&nbsp;&nbsp;&nbsp;writer.onwrite = function(evt)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('write success');
+&nbsp;&nbsp;&nbsp;};
+&nbsp;&nbsp;&nbsp;writer.onabort = function(e)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('abort');
+&nbsp;&nbsp;&nbsp;};
+&nbsp;&nbsp;&nbsp;writer.write('some sample text');
+&nbsp;&nbsp;&nbsp;writer.abort();
+};
+
+errorCallback = function(err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.code);
+};
+
+/* entry is FileEntry object retrieved by getFile() method of DirectoryEntry interface */
+entry.createWriter(successCallback, errorCallback);
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>abort
@@ -2719,18 +2777,21 @@ If the offset is a negative number the position of the file pointer is rewound.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> successCallback = function(writer) {
-    // fast forwards file pointer to the end of file.
-    writer.seek(writer.length);
- };
-
- errorCallback = function(err) {
-     console.log(err.code);
- };
-
- // entry is FileEntry object retrieved by getFile() function of DirectoryEntry interface.
- entry.createWriter(successCallback, errorCallback);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+successCallback = function(writer)
+{
+&nbsp;&nbsp;&nbsp;/* Fast forwards file pointer to the end of file */
+&nbsp;&nbsp;&nbsp;writer.seek(writer.length);
+};
+
+errorCallback = function(err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.code);
+};
+
+/* entry is FileEntry object retrieved by getFile() method of DirectoryEntry interface */
+entry.createWriter(successCallback, errorCallback);
+</pre>
 </div>
 </dd>
 <dt class="method" id="FileWriter::truncate">
@@ -2771,21 +2832,25 @@ If the offset is a negative number the position of the file pointer is rewound.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> successCallback = function(writer) {
-    writer.onwrite = function(evt) {
-         console.log('truncate success');
-    };
-
-    writer.truncate(10);
- };
-
- errorCallback = function(err) {
-     console.log(err.code);
- };
-
- // entry is FileEntry object retrieved by getFile() function of DirectoryEntry interface.
- entry.createWriter(successCallback, errorCallback);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+successCallback = function(writer)
+{
+&nbsp;&nbsp;&nbsp;writer.onwrite = function(evt)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('truncate success');
+&nbsp;&nbsp;&nbsp;};
+
+&nbsp;&nbsp;&nbsp;writer.truncate(10);
+};
+
+errorCallback = function(err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.code);
+};
+
+/* entry is FileEntry object retrieved by getFile() method of DirectoryEntry interface */
+entry.createWriter(successCallback, errorCallback);
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>truncate success
@@ -2834,21 +2899,25 @@ If the offset is a negative number the position of the file pointer is rewound.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> successCallback = function(writer) {
-    writer.onwrite = function(evt) {
-         console.log('write success');
-    };
-
-    writer.write('some sample text');
- };
-
- errorCallback = function(err) {
-     console.log(err.code);
- };
-
- // entry is FileEntry object retrieved by getFile() function of DirectoryEntry interface.
- entry.createWriter(successCallback, errorCallback);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+successCallback = function(writer)
+{
+&nbsp;&nbsp;&nbsp;writer.onwrite = function(evt)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('write success');
+&nbsp;&nbsp;&nbsp;};
+
+&nbsp;&nbsp;&nbsp;writer.write('some sample text');
+};
+
+errorCallback = function(err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.code);
+};
+
+/* entry is FileEntry object retrieved by getFile() method of DirectoryEntry interface */
+entry.createWriter(successCallback, errorCallback);
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>write success
index 5ee979b..c65e95b 100644 (file)
@@ -3,7 +3,7 @@
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
 <link rel="stylesheet" type="text/css" href="../tizen.css" media="screen">
-<script type="text/javascript" src="snippet.js"></script><title>FileTransfer API</title>
+<script type="text/javascript" src="../snippet.js"></script><title>FileTransfer API</title>
 </head>
 <body id="page-content" onload="prettyPrint()">
 <div class="api" id="::FileTransfer">
@@ -169,34 +169,37 @@ The key / value type of download options values.  Currently only supports header
  3.0
           </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var fileURL; // We assume the variable fileURL contains a valid URL to a text file on the device.
-
- var win = function (r) {
-   console.log('Code = ' + r.responseCode);
-   console.log('Response = ' + r.response);
-   console.log('Sent = ' + r.bytesSent);
- }
-
- var fail = function (error) {
-   alert('An error has occurred: Code = ' + error.code);
-   console.log('upload error source ' + error.source);
-   console.log('upload error target ' + error.target);
- }
-
- var options = new FileUploadOptions();
- options.fileKey = 'file';
- options.fileName = fileURL.substr(fileURL.lastIndexOf('/') + 1);
- options.mimeType = 'text/plain';
-
- var params = {};
- params.value1 = 'test';
- params.value2 = 'param';
-
- options.params = params;
-
- var ft = new FileTransfer();
- ft.upload(fileURL, encodeURI('http://some.server.com/upload.php'), win, fail, options);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var fileURL; /* Assume the variable fileURL contains a valid URL to a text file on the device */
+
+var win = function(r)
+{
+&nbsp;&nbsp;&nbsp;console.log('Code = ' + r.responseCode);
+&nbsp;&nbsp;&nbsp;console.log('Response = ' + r.response);
+&nbsp;&nbsp;&nbsp;console.log('Sent = ' + r.bytesSent);
+}
+
+var fail = function(error)
+{
+&nbsp;&nbsp;&nbsp;alert('An error has occurred: Code = ' + error.code);
+&nbsp;&nbsp;&nbsp;console.log('upload error source ' + error.source);
+&nbsp;&nbsp;&nbsp;console.log('upload error target ' + error.target);
+}
+
+var options = new FileUploadOptions();
+options.fileKey = 'file';
+options.fileName = fileURL.substr(fileURL.lastIndexOf('/') + 1);
+options.mimeType = 'text/plain';
+
+var params = {};
+params.value1 = 'test';
+params.value2 = 'param';
+
+options.params = params;
+
+var ft = new FileTransfer();
+ft.upload(fileURL, encodeURI('http://some.server.com/upload.php'), win, fail, options);
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Code = 200
@@ -209,9 +212,10 @@ Sent = 1024
 <dl>
 <pre class="webidl prettyprint">FileUploadOptions(DOMString fileKey, DOMString fileName, DOMString mimeType, <a href="#FileUploadParams">FileUploadParams</a> params, <a href="#HeaderFields">HeaderFields</a> headers, DOMString httpMethod);</pre>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Creates a FileUploadOptions object.
- var options = new FileUploadOptions('file', 'doc.txt', 'text/plain', null, null, 'POST');
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Creates a FileUploadOptions object */
+var options = new FileUploadOptions('file', 'doc.txt', 'text/plain', null, null, 'POST');
+</pre>
 </div>
 </dl>
 </div>
@@ -502,9 +506,10 @@ Sent = 1024
 <dl>
 <pre class="webidl prettyprint">FileTransfer();</pre>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Creates a FileTransfer object.
- var file_transfer = new FileTransfer();
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Creates a FileTransfer object */
+var file_transfer = new FileTransfer();
+</pre>
 </div>
 </dl>
 </div>
@@ -519,32 +524,36 @@ Sent = 1024
  3.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var fileURL; // should be a valid url eg. cdvfile://localhost/persistent/path/to/file.txt
-
- var win = function(r) {
-   console.log('Success.  File uploaded.');
- }
-
- var fail = function(error) {
-   // error.code == FileTransferError.ABORT_ERR
-   alert('An error has occurred: Code = ' + error.code);
-   console.log('upload error source ' + error.source);
-   console.log('upload error target ' + error.target);
- };
-
- var ft = new FileTransfer();
-
- ft.onprogress = function(event) {
-   console.log('uploaded: ' + event.loaded);
- };
-
- ft.upload(fileURL, encodeURI('http://some.server.com/upload.php'), win, fail);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var fileURL; /* Must be a valid url, such as cdvfile://localhost/persistent/path/to/file.txt */
+
+var win = function(r)
+{
+&nbsp;&nbsp;&nbsp;console.log('Success. File uploaded.');
+}
+
+var fail = function(error)
+{
+&nbsp;&nbsp;&nbsp;/* error.code == FileTransferError.ABORT_ERR */
+&nbsp;&nbsp;&nbsp;alert('An error has occurred: Code = ' + error.code);
+&nbsp;&nbsp;&nbsp;console.log('upload error source ' + error.source);
+&nbsp;&nbsp;&nbsp;console.log('upload error target ' + error.target);
+};
+
+var ft = new FileTransfer();
+
+ft.onprogress = function(event)
+{
+&nbsp;&nbsp;&nbsp;console.log('uploaded: ' + event.loaded);
+};
+
+ft.upload(fileURL, encodeURI('http://some.server.com/upload.php'), win, fail);
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>uploaded: 512
 uploaded: 1024
-Success.  File uploaded.
+Success. File uploaded.
 </pre>
 </div>
 </li></ul>
@@ -607,23 +616,26 @@ Success.  File uploaded.
         </ul>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var fileURL; // should be a valid url eg. cdvfile://localhost/persistent/path/to/file.txt
-
- var win = function (r) {
-   console.log('Code = ' + r.responseCode);
-   console.log('Response = ' + r.response);
-   console.log('Sent = ' + r.bytesSent);
- }
-
- var fail = function (error) {
-   alert('An error has occurred: Code = ' + error.code);
-   console.log('upload error source ' + error.source);
-   console.log('upload error target ' + error.target);
- }
-
- var ft = new FileTransfer();
- ft.upload(fileURL, encodeURI('http://some.server.com/upload.php'), win, fail);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var fileURL; /* Must be a valid url, such as cdvfile://localhost/persistent/path/to/file.txt */
+
+var win = function(r)
+{
+&nbsp;&nbsp;&nbsp;console.log('Code = ' + r.responseCode);
+&nbsp;&nbsp;&nbsp;console.log('Response = ' + r.response);
+&nbsp;&nbsp;&nbsp;console.log('Sent = ' + r.bytesSent);
+}
+
+var fail = function(error)
+{
+&nbsp;&nbsp;&nbsp;alert('An error has occurred: Code = ' + error.code);
+&nbsp;&nbsp;&nbsp;console.log('upload error source ' + error.source);
+&nbsp;&nbsp;&nbsp;console.log('upload error target ' + error.target);
+}
+
+var ft = new FileTransfer();
+ft.upload(fileURL, encodeURI('http://some.server.com/upload.php'), win, fail);
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Code = 200
@@ -687,30 +699,28 @@ Sent = 1024
         </ul>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var fileURL; // should be a valid url eg. cdvfile://localhost/persistent/path/to/file.txt
-
- var fileTransfer = new FileTransfer();
- var uri = encodeURI('http://some.server.com/download.php');
-
- fileTransfer.download(
-   uri,
-   fileURL,
-   function(entry) {
-     console.log('download complete: ' + entry.toURL());
-   },
-   function(error) {
-     console.log('download error source ' + error.source);
-     console.log('download error target ' + error.target);
-     console.log('upload error code' + error.code);
-   },
-   false,
-   {
-     headers: {
-       'Authorization': 'Basic dGVzdHVzZXJuYW1lOnRlc3RwYXNzd29yZA=='
-     }
-   }
- );
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var fileURL; /* Must be a valid url, such as cdvfile://localhost/persistent/path/to/file.txt */
+
+var fileTransfer = new FileTransfer();
+var uri = encodeURI('http://some.server.com/download.php');
+
+fileTransfer.download(uri, fileURL, function(entry)
+{
+&nbsp;&nbsp;&nbsp;console.log('download complete: ' + entry.toURL());
+}, function(error)
+{
+&nbsp;&nbsp;&nbsp;console.log('download error source ' + error.source);
+&nbsp;&nbsp;&nbsp;console.log('download error target ' + error.target);
+&nbsp;&nbsp;&nbsp;console.log('upload error code' + error.code);
+}, false,
+{
+&nbsp;&nbsp;&nbsp;headers:
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'Authorization': 'Basic dGVzdHVzZXJuYW1lOnRlc3RwYXNzd29yZA=='
+&nbsp;&nbsp;&nbsp;}
+});
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>download complete: file:///home/owner/apps_rw/Gk6hf8hjk/tmp/file.txt
@@ -739,26 +749,29 @@ Sent = 1024
  http://tizen.org/privilege/internet
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var fileURL; // should be a valid url eg. cdvfile://localhost/persistent/path/to/file.txt
-
- var win = function(r) {
-   console.log('Should not be called.');
- }
-
- var fail = function(error) {
-   // error.code == FileTransferError.ABORT_ERR
-   alert('An error has occurred: Code = ' + error.code);
-   console.log('upload error source ' + error.source);
-   console.log('upload error target ' + error.target);
- };
-
- var ft = new FileTransfer();
- ft.upload(fileURL, encodeURI('http://some.server.com/upload.php'), win, fail);
- ft.abort();
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var fileURL; /* Must be a valid url, such as cdvfile://localhost/persistent/path/to/file.txt */
+
+var win = function(r)
+{
+&nbsp;&nbsp;&nbsp;console.log('Should not be called.');
+}
+
+var fail = function(error)
+{
+&nbsp;&nbsp;&nbsp;/* error.code == FileTransferError.ABORT_ERR */
+&nbsp;&nbsp;&nbsp;alert('An error has occurred: Code = ' + error.code);
+&nbsp;&nbsp;&nbsp;console.log('upload error source ' + error.source);
+&nbsp;&nbsp;&nbsp;console.log('upload error target ' + error.target);
+};
+
+var ft = new FileTransfer();
+ft.upload(fileURL, encodeURI('http://some.server.com/upload.php'), win, fail);
+ft.abort();
+</pre>
 </div>
 <div class="output">
-<span class="title"><p>Output example:</p></span><pre>An error has occured: Code = 4
+<span class="title"><p>Output example:</p></span><pre>An error has occurred: Code = 4
 upload error source file:///home/owner/apps_rw/Gk6hf8hjk/tmp/file.txt
 upload error target http://some.server.com/file.txt
 </pre>
index 98aed77..afad5a6 100644 (file)
@@ -3,7 +3,7 @@
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
 <link rel="stylesheet" type="text/css" href="../tizen.css" media="screen">
-<script type="text/javascript" src="snippet.js"></script><title>Globalization API</title>
+<script type="text/javascript" src="../snippet.js"></script><title>Globalization API</title>
 </head>
 <body id="page-content" onload="prettyPrint()">
 <div class="api" id="::Globalization">
@@ -263,15 +263,20 @@ during this method's execution.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // When the browser is set to the en-US language,
- // this should output the text
- // similar to the results that follow.
-
- navigator.globalization.getPreferredLanguage(
-   function (language) { console.log('Language: ' + language.value); },
-   function () { console.log('Error getting language.'); }
- );
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/*
+   When the browser is set to the en-US language,
+   this outputs the text
+   similar to the results that follow
+*/
+navigator.globalization.getPreferredLanguage(function(language)
+{
+&nbsp;&nbsp;&nbsp;console.log('Language: ' + language.value);
+}, function()
+{
+&nbsp;&nbsp;&nbsp;console.log('Error getting language.');
+});
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Language: en-US
@@ -323,15 +328,20 @@ occuring while getting a locale name.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // When the browser is set to the en-US language,
- // this should output the text
- // similar to the results that follow.
-
- navigator.globalization.getLocaleName(
-   function (locale) { console.log('Locale: ' + locale.value); },
-   function () { console.log('Error getting locale.'); }
- );
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/*
+   When the browser is set to the en-US language,
+   this outputs the text
+   similar to the results that follow
+*/
+navigator.globalization.getLocaleName(function(locale)
+{
+&nbsp;&nbsp;&nbsp;console.log('Locale: ' + locale.value);
+}, function()
+{
+&nbsp;&nbsp;&nbsp;console.log('Error getting locale.');
+});
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Locale: en-US
@@ -387,17 +397,20 @@ passed as a parameter to the successCallback.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // When the browser is set to the en-US language,
- // this should output text similar to the results that follow.
- // This example uses the default conversion options.
-
- navigator.globalization.dateToString(
-   new Date(),
-   function (date) { console.log('Date: ' + date.value); },
-   function () { console.log('Error getting dateString.'); },
-   { formatLength: 'short', selector: 'date and time' }
- );
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/*
+   When the browser is set to the en-US language,
+   this outputs the text similar to the results that follow
+   This example uses the default conversion options
+*/
+navigator.globalization.dateToString(new Date(), function(date)
+{
+&nbsp;&nbsp;&nbsp;console.log('Date: ' + date.value);
+}, function()
+{
+&nbsp;&nbsp;&nbsp;console.log('Error getting dateString.');
+}, {formatLength: 'short', selector: 'date and time'});
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Date: 9/25/2012 4:21PM
@@ -450,24 +463,25 @@ for example 'USD'.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // When the browser is set to the en-US locale and the selected
- // currency is United States Dollars, this example outputs
- // text similar to the results that follow.
-
- navigator.globalization.getCurrencyPattern(
-   'USD',
-   function (pattern) {
-     console.log('pattern: '  + pattern.pattern);
-     console.log('code: ' + pattern.code);
-     console.log('fraction: ' + pattern.fraction);
-     console.log('rounding: ' + pattern.rounding);
-     console.log('decimal: '  + pattern.decimal);
-     console.log('grouping: ' + pattern.grouping);
-   },
-   function () { console.log('Error getting pattern.'); }
- );
-
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/*
+   When the browser is set to the en-US language,
+   and the selected currency is United States Dollars,
+   this outputs the text similar to the results that follow
+*/
+navigator.globalization.getCurrencyPattern('USD', function(pattern)
+{
+&nbsp;&nbsp;&nbsp;console.log('pattern: '  + pattern.pattern);
+&nbsp;&nbsp;&nbsp;console.log('code: ' + pattern.code);
+&nbsp;&nbsp;&nbsp;console.log('fraction: ' + pattern.fraction);
+&nbsp;&nbsp;&nbsp;console.log('rounding: ' + pattern.rounding);
+&nbsp;&nbsp;&nbsp;console.log('decimal: '  + pattern.decimal);
+&nbsp;&nbsp;&nbsp;console.log('grouping: ' + pattern.grouping);
+}, function()
+{
+&nbsp;&nbsp;&nbsp;console.log('Error getting pattern.');
+});
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>pattern: $#,##0.##;($#,##0.##)
@@ -527,20 +541,23 @@ The default value is <var>{type: 'wide', item: 'months'}</var>                </
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // When the browser is set to the en_US locale,
- // this example logs the names of months, as per locale settings,
- // with text similar to the results that follow.
-
- navigator.globalization.getDateNames(
-   function (names) {
-     for (var i = 0; i &lt; names.value.length; i++) {
-       console.log('month: ' + names.value[i]);
-     }
-   },
-   function () { console.log('Error getting names.'); },
-   { type: 'wide', item: 'months' }
- );
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/*
+   When the browser is set to the en-US language,
+   this example logs the names of months, as per locale settings
+   with text similar to the results that follow
+*/
+navigator.globalization.getDateNames(function(names)
+{
+&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; names.value.length; i++)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('month: ' + names.value[i]);
+&nbsp;&nbsp;&nbsp;}
+}, function()
+{
+&nbsp;&nbsp;&nbsp;console.log('Error getting names.');
+}, {type: 'wide', item: 'months'});
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>month: January
@@ -604,20 +621,25 @@ The default value is <var>{formatLength: 'short', selector: 'date and time'}</va
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // This example displays the locale date pattern.
- // When the browser is set to the en_US locale,
- // the text displayed is similar to the results that follow.
-
- function checkDatePattern () {
-   navigator.globalization.getDatePattern(
-     function (date) { console.log('Date pattern: ' + date.pattern); },
-     function () { console.log('Error getting pattern'); },
-     { formatLength: 'short', selector: 'date and time' }
-   );
- }
-
- checkDatePattern();
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/*
+   This example displays the locale date pattern
+   When the browser is set to the en-US locale,
+   this outputs the text similar to the results that follow
+*/
+function checkDatePattern()
+{
+&nbsp;&nbsp;&nbsp;navigator.globalization.getDatePattern(function(date)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('Date pattern: ' + date.pattern);
+&nbsp;&nbsp;&nbsp;}, function()
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('Error getting pattern');
+&nbsp;&nbsp;&nbsp;}, {formatLength: 'short', selector: 'date and time'});
+}
+
+checkDatePattern();
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Date pattern: M/d/yyyy h:mm a
@@ -667,14 +689,19 @@ the first day of a week.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // When the browser is set to the en_US locale,
- // this outputs the text similar to "day: 1".
-
- navigator.globalization.getFirstDayOfWeek(
-   function (day) { console.log('day: ' + day.value); },
-   function () { console.log('Error getting first day of week.'); }
- );
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/*
+   When the browser is set to the en_US locale,
+   this outputs the text similar to "day: 1"
+*/
+navigator.globalization.getFirstDayOfWeek(function(day)
+{
+&nbsp;&nbsp;&nbsp;console.log('day: ' + day.value);
+}, function()
+{
+&nbsp;&nbsp;&nbsp;console.log('Error getting first day of week.');
+});
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>day: 1
@@ -729,26 +756,26 @@ the pattern will be returned.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // When the browser is set to the en_US locale,
- // this example outputs the text
- // similar to the results that follow.
-
- navigator.globalization.getNumberPattern(
-   function (pattern) {
-     console.log('pattern: '  + pattern.pattern);
-     console.log('symbol: '   + pattern.symbol);
-     console.log('fraction: ' + pattern.fraction);
-     console.log('rounding: ' + pattern.rounding);
-     console.log('positive: ' + pattern.positive);
-     console.log('negative: ' + pattern.negative);
-     console.log('decimal: '  + pattern.decimal);
-     console.log('grouping: ' + pattern.grouping);
-   },
-   function() { console.log('An error occurred.'); },
-   { type: 'decimal' }
- );
-
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/*
+   When the browser is set to the en_US locale,
+   this outputs the text similar to the results that follow
+*/
+navigator.globalization.getNumberPattern(function(pattern)
+{
+&nbsp;&nbsp;&nbsp;console.log('pattern: ' + pattern.pattern);
+&nbsp;&nbsp;&nbsp;console.log('symbol: ' + pattern.symbol);
+&nbsp;&nbsp;&nbsp;console.log('fraction: ' + pattern.fraction);
+&nbsp;&nbsp;&nbsp;console.log('rounding: ' + pattern.rounding);
+&nbsp;&nbsp;&nbsp;console.log('positive: ' + pattern.positive);
+&nbsp;&nbsp;&nbsp;console.log('negative: ' + pattern.negative);
+&nbsp;&nbsp;&nbsp;console.log('decimal: ' + pattern.decimal);
+&nbsp;&nbsp;&nbsp;console.log('grouping: ' + pattern.grouping);
+}, function()
+{
+&nbsp;&nbsp;&nbsp;console.log('An error occurred.');
+}, {type: 'decimal'});
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>pattern: #,##0.###
@@ -811,16 +838,19 @@ errors occuring during this method's execution.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // During the summer, and if the browser
- // is set to a DST-enabled timezone,
- // this should log text similar to "dst: true":
-
- navigator.globalization.isDayLightSavingsTime(
-   new Date(),
-   function (date) { console.log('dst: ' + date.dst); },
-   function () { console.log('Error getting the DST state.'); }
- );
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/*
+   During the summer, and if the browser is set to a DST-enabled timezone,
+   this logs text similar to "dst: true"
+*/
+navigator.globalization.isDayLightSavingsTime(new Date(), function(date)
+{
+&nbsp;&nbsp;&nbsp;console.log('dst: ' + date.dst);
+}, function()
+{
+&nbsp;&nbsp;&nbsp;console.log('Error getting the DST state.');
+});
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>dst: true
@@ -884,37 +914,43 @@ The default value of this parameter is <var>{type: 'decimal'}</var>.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // When the browser is set to the en_US locale,
- // this code displays the results that follow.
-
- navigator.globalization.numberToString(
-    3.1415926,
-    function (number) { console.log('decimal number: ' + number.value); },
-    function () { console.log('Error getting number.'); },
-    { type: 'decimal' }
- );
-
- navigator.globalization.numberToString(
-    1000003,
-    function (number) { console.log('big decimal number: ' + number.value); },
-    function () { console.log('Error getting number.'); },
-    { type: 'decimal' }
- );
-
- navigator.globalization.numberToString(
-    0.3183099,
-    function (number) { console.log('percentile: ' + number.value); },
-    function () { console.log('Error getting number.'); },
-    { type: 'percent' }
- );
-
- navigator.globalization.numberToString(
-    1099.95,
-    function (number) { console.log('currency: ' + number.value); },
-    function () { console.log('Error getting number'); },
-    { type: 'currency' }
- );
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/*
+   When the browser is set to the en_US locale,
+   this code displays the results that follow
+*/
+navigator.globalization.numberToString(3.1415926, function(number)
+{
+&nbsp;&nbsp;&nbsp;console.log('decimal number: ' + number.value);
+}, function()
+{
+&nbsp;&nbsp;&nbsp;console.log('Error getting number.');
+}, {type: 'decimal'});
+
+navigator.globalization.numberToString(1000003, function(number)
+{
+&nbsp;&nbsp;&nbsp;console.log('big decimal number: ' + number.value);
+}, function()
+{
+&nbsp;&nbsp;&nbsp;console.log('Error getting number.');
+}, {type: 'decimal'});
+
+navigator.globalization.numberToString(0.3183099, function(number)
+{
+&nbsp;&nbsp;&nbsp;console.log('percentile: ' + number.value);
+}, function()
+{
+&nbsp;&nbsp;&nbsp;console.log('Error getting number.');
+}, {type: 'percent'});
+
+navigator.globalization.numberToString(1099.95, function(number)
+{
+&nbsp;&nbsp;&nbsp;console.log('currency: ' + number.value);
+}, function()
+{
+&nbsp;&nbsp;&nbsp;console.log('Error getting number');
+}, {type: 'currency'});
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>decimal number: 3.142
@@ -973,22 +1009,23 @@ The default value is <var>{formatLength: 'short', selector: 'date and time'}</va
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // when the browser is set to the en_US locale,
- // this example outputs text similar to the results that follow.
- // Note that the month integer is one less than the string,
- // as the month integer represents an array index.
-
- navigator.globalization.stringToDate(
-     '9/25/2012',
-     function (date) {
-       console.log('month: '  + date.month +
-                   ', day: '  + date.day   +
-                   ', year: ' + date.year)
-     },
-     function () { console.log('Error getting date.'); },
-     { selector: 'date' }
- );
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/*
+   When the browser is set to the en_US locale,
+   this example outputs text similar to the results that follow
+   Note that the month integer is one less than the string,
+   as the month integer represents an array index
+*/
+navigator.globalization.stringToDate('9/25/2012', function(date)
+{
+&nbsp;&nbsp;&nbsp;console.log('month: ' + date.month +
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;', day: ' + date.day +
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;', year: ' + date.year)
+}, function()
+{
+&nbsp;&nbsp;&nbsp;console.log('Error getting date.');
+}, {selector: 'date'});
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>month: 8, day: 25, year: 2012
@@ -1047,16 +1084,19 @@ The default value is <var>{type: 'decimal'}</var>                </li>
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // When the browser is set to the en_US locale,
- // this should display the text similar to the results that follow.
-
- navigator.globalization.stringToNumber(
-     '1234.56',
-     function (number) { console.log('number: ' + number.value); },
-     function () { console.log('Error getting number.'); },
-     { type: 'decimal' }
- );
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/*
+   When the browser is set to the en_US locale,
+   this displays the text similar to the results that follow
+*/
+navigator.globalization.stringToNumber('1234.56', function(number)
+{
+&nbsp;&nbsp;&nbsp;console.log('number: ' + number.value);
+}, function()
+{
+&nbsp;&nbsp;&nbsp;console.log('Error getting number.');
+}, {type: 'decimal'});
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>number: 1234.56
index 68dabe1..e62cde0 100644 (file)
@@ -3,7 +3,7 @@
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
 <link rel="stylesheet" type="text/css" href="../tizen.css" media="screen">
-<script type="text/javascript" src="snippet.js"></script><title>Media API</title>
+<script type="text/javascript" src="../snippet.js"></script><title>Media API</title>
 </head>
 <body id="page-content" onload="prettyPrint()">
 <div class="api" id="::Media">
@@ -125,8 +125,8 @@ Original documentation: <a href="https://www.npmjs.com/package/cordova-plugin-me
        void stop();
    };</pre>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var myMedia = new Media(src, successCallback, errorCallback, statusCallback);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var myMedia = new Media(src, successCallback, errorCallback, statusCallback);</pre>
 </div>
 <div class="constructors">
 <h4 id="Media::constructor">Constructors</h4>
@@ -247,28 +247,32 @@ Original documentation: <a href="https://www.npmjs.com/package/cordova-plugin-me
         </ul>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> successCallback = function() {
-    console.log('Audio file has been played back.');
- }
-
- errorCallback = function(err) {
-    console.log('Error occurred ' + err.message);
- }
-
- positionSuccessCallback = function(position) {
-    console.log('Current position is ' + position);
- }
-
- var src = 'file:///home/app/content/Documents/play.mp3';
- var myMedia = new Media(src, successCallback, errorCallback);
-
- myMedia.play();
-
- setTimeout(function() {
-     myMedia.getCurrentPosition(positionSuccessCallback);
- }, 2000);
-
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+successCallback = function()
+{
+&nbsp;&nbsp;&nbsp;console.log('Audio file has been played back.');
+}
+
+errorCallback = function(err)
+{
+&nbsp;&nbsp;&nbsp;console.log('Error occurred ' + err.message);
+}
+
+positionSuccessCallback = function(position)
+{
+&nbsp;&nbsp;&nbsp;console.log('Current position is ' + position);
+}
+
+var src = 'file:///home/app/content/Documents/play.mp3';
+var myMedia = new Media(src, successCallback, errorCallback);
+
+myMedia.play();
+
+setTimeout(function()
+{
+&nbsp;&nbsp;&nbsp;myMedia.getCurrentPosition(positionSuccessCallback);
+}, 2000);
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Audio file has been played back.
@@ -290,20 +294,23 @@ Current position is 2.000
  3.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> successCallback = function() {
-   console.log('Audio file has been played back.);
- }
-
- errorCallback = function(err) {
-    console.log('Error occurred ' + err.message);
- }
-
- var src = 'file:///home/app/content/Documents/play.mp3';
- var myMedia = new Media(src, successCallback, errorCallback);
-
- var duration = myMedia.getDuration();
- console.log('Audio duration is ' + duration);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+successCallback = function()
+{
+&nbsp;&nbsp;&nbsp;console.log('Audio file has been played back.');
+}
+
+errorCallback = function(err)
+{
+&nbsp;&nbsp;&nbsp;console.log('Error occurred ' + err.message);
+}
+
+var src = 'file:///home/app/content/Documents/play.mp3';
+var myMedia = new Media(src, successCallback, errorCallback);
+
+var duration = myMedia.getDuration();
+console.log('Audio duration is ' + duration);
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Audio duration is 281.035
@@ -324,31 +331,36 @@ Current position is 2.000
  3.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> successCallback = function() {
-   console.log('Audio file has been played back.');
- }
-
- errorCallback = function(err) {
-    console.log('Error occurred ' + err.message);
- }
-
- statusCallback = function(status) {
-    if (status == Media.MEDIA_PAUSED) {
-        console.log('Audio file has been paused');
-    }
- }
-
- var src = 'file:///home/app/content/Documents/play.mp3';
- var myMedia = new Media(src, successCallback, errorCallback, statusCallback);
-
- myMedia.play();
-
- //Pause after 2 seconds
- setTimeout(function() {
-     myMedia.pause();
- }, 2000);
-
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+successCallback = function()
+{
+&nbsp;&nbsp;&nbsp;console.log('Audio file has been played back.');
+}
+
+errorCallback = function(err)
+{
+&nbsp;&nbsp;&nbsp;console.log('Error occurred ' + err.message);
+}
+
+statusCallback = function(status)
+{
+&nbsp;&nbsp;&nbsp;if (status == Media.MEDIA_PAUSED)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('Audio file has been paused');
+&nbsp;&nbsp;&nbsp;}
+}
+
+var src = 'file:///home/app/content/Documents/play.mp3';
+var myMedia = new Media(src, successCallback, errorCallback, statusCallback);
+
+myMedia.play();
+
+/* Pause after 2 seconds */
+setTimeout(function()
+{
+&nbsp;&nbsp;&nbsp;myMedia.pause();
+}, 2000);
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Audio file has been paused.
@@ -369,19 +381,22 @@ Current position is 2.000
  3.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> successCallback = function() {
-    console.log('Audio file has been played back.');
- }
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+successCallback = function()
+{
+&nbsp;&nbsp;&nbsp;console.log('Audio file has been played back.');
+}
 
- errorCallback = function(err) {
-    console.log('Error occurred ' + err.message);
- }
+errorCallback = function(err)
+{
+&nbsp;&nbsp;&nbsp;console.log('Error occurred ' + err.message);
+}
 
- var src = 'file:///home/app/content/Documents/play.mp3';
- var myMedia = new Media(src, successCallback, errorCallback);
+var src = 'file:///home/app/content/Documents/play.mp3';
+var myMedia = new Media(src, successCallback, errorCallback);
 
- myMedia.play();
- </pre>
+myMedia.play();
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Audio file has been played back.
@@ -403,21 +418,24 @@ Applications should call the release function for any Media resource that is no
  3.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> successCallback = function() {
-    console.log('Audio file has been stopped or released.');
- }
-
- errorCallback = function(err) {
-    console.log('An error occurred: ' + err.message);
- }
-
- var src = 'file://home/app/content/Documents/play.mp3';
- var myMedia = new Media(src, successCallback, errorCallback);
-
- myMedia.play();
- myMedia.stop();
- myMedia.release();
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+successCallback = function()
+{
+&nbsp;&nbsp;&nbsp;console.log('Audio file has been stopped or released.');
+}
+
+errorCallback = function(err)
+{
+&nbsp;&nbsp;&nbsp;console.log('An error occurred: ' + err.message);
+}
+
+var src = 'file://home/app/content/Documents/play.mp3';
+var myMedia = new Media(src, successCallback, errorCallback);
+
+myMedia.play();
+myMedia.stop();
+myMedia.release();
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Audio file has been stopped or released.
@@ -448,24 +466,28 @@ Audio file has been stopped or released.
         </ul>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> successCallback = function() {
-    console.log('Audio file has been played back.');
- }
-
- errorCallback = function(err) {
-    console.log('An error occurred: ' + err.message);
- }
-
- var src = 'file://home/app/content/Documents/play.mp3';
- var myMedia = new Media(src, successCallback, errorCallback);
-
- myMedia.play();
-
- //SeekTo to 10 seconds after 5 seconds
- setTimeout(function() {
-     myMedia.seekTo(10000);
-     console.log('Playback position has been set to 10 seconds.');
- }, 5000);
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+successCallback = function()
+{
+&nbsp;&nbsp;&nbsp;console.log('Audio file has been played back.');
+}
+
+errorCallback = function(err)
+{
+&nbsp;&nbsp;&nbsp;console.log('An error occurred: ' + err.message);
+}
+
+var src = 'file://home/app/content/Documents/play.mp3';
+var myMedia = new Media(src, successCallback, errorCallback);
+
+myMedia.play();
+
+/* SeekTo to 10 seconds after 5 seconds */
+setTimeout(function()
+{
+&nbsp;&nbsp;&nbsp;myMedia.seekTo(10000);
+&nbsp;&nbsp;&nbsp;console.log('Playback position has been set to 10 seconds.');
+}, 5000);
  </pre>
 </div>
 <div class="output">
@@ -505,31 +527,36 @@ Audio file has been played back.
         </ul>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> successCallback = function() {
-    console.log('Audio file has been played back.');
- }
-
- errorCallback = function(err) {
-    console.log('Error occurred ' + err.message);
- }
-
- var src = 'file://home/app/content/Documents/play.mp3';
- var myMedia = new Media(src, successCallback, errorCallback);
-
- myMedia.play();
-
- // Mute volume after 2 seconds
- setTimeout(function() {
-     myMedia.setVolume(0.0);
-     console.log('Playback volume has been muted.');
- }, 2000);
-
- // Set volume to 1.0 after 5 seconds
- setTimeout(function() {
-    myMedia.setVolume(1.0);
-    console.log('Playback volume has been set to 1.0.');
- }, 5000);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+successCallback = function()
+{
+&nbsp;&nbsp;&nbsp;console.log('Audio file has been played back.');
+}
+
+errorCallback = function(err)
+{
+&nbsp;&nbsp;&nbsp;console.log('Error occurred ' + err.message);
+}
+
+var src = 'file://home/app/content/Documents/play.mp3';
+var myMedia = new Media(src, successCallback, errorCallback);
+
+myMedia.play();
+
+/* Mute volume after 2 seconds */
+setTimeout(function()
+{
+&nbsp;&nbsp;&nbsp;myMedia.setVolume(0.0);
+&nbsp;&nbsp;&nbsp;console.log('Playback volume has been muted.');
+}, 2000);
+
+/* Set volume to 1.0 after 5 seconds */
+setTimeout(function()
+{
+&nbsp;&nbsp;&nbsp;myMedia.setVolume(1.0);
+&nbsp;&nbsp;&nbsp;console.log('Playback volume has been set to 1.0.');
+}, 5000);
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Playback volume has been muted.
@@ -560,19 +587,22 @@ Audio file has been played back.
  http://tizen.org/privilege/mediacapture
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> successCallback = function() {
-    console.log('Started recording an audio file.');
- }
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+successCallback = function()
+{
+&nbsp;&nbsp;&nbsp;console.log('Started recording an audio file.');
+}
 
- errorCallback = function(err) {
-    console.log('Error occurred ' + err.message);
- }
+errorCallback = function(err)
+{
+&nbsp;&nbsp;&nbsp;console.log('Error occurred ' + err.message);
+}
 
- var src = 'recordAudio.mp3';
- var myRecMedia = new Media(src, successCallback, errorCallback);
+var src = 'recordAudio.mp3';
+var myRecMedia = new Media(src, successCallback, errorCallback);
 
- myRecMedia.startRecord();
- </pre>
+myRecMedia.startRecord();
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Started recording an audio file.
@@ -601,25 +631,29 @@ Audio file has been played back.
  http://tizen.org/privilege/mediacapture
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> successCallback = function() {
-    console.log('Started recording an audio file.');
- }
-
- errorCallback = function(err) {
-    console.log('Error occurred ' + err.message);
- }
-
- var src = 'recordAudio.mp3';
- var myRecMedia = new Media(src, successCallback, errorCallback);
-
- myRecMedia.startRecord();
-
- // Stop recording after 10 seconds
- setTimeout(function() {
-     myRecMedia.stopRecord();
-     console.log('Stopped recording an audio file.');
- }, 10000);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+successCallback = function()
+{
+&nbsp;&nbsp;&nbsp;console.log('Started recording an audio file.');
+}
+
+errorCallback = function(err)
+{
+&nbsp;&nbsp;&nbsp;console.log('Error occurred ' + err.message);
+}
+
+var src = 'recordAudio.mp3';
+var myRecMedia = new Media(src, successCallback, errorCallback);
+
+myRecMedia.startRecord();
+
+/* Stop recording after 10 seconds */
+setTimeout(function()
+{
+&nbsp;&nbsp;&nbsp;myRecMedia.stopRecord();
+&nbsp;&nbsp;&nbsp;console.log('Stopped recording an audio file.');
+}, 10000);
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Started recording an audio file.
@@ -641,24 +675,28 @@ Stopped recording an audio file.
  3.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> successCallback = function() {
-    console.log('Audio file has been stopped.');
- }
-
- errorCallback = function(err) {
-    console.log('Error occurred ' + err.message);
- }
-
- var src = 'file://home/app/content/Documents/play.mp3';
- var myMedia = new Media(src, successCallback, errorCallback);
-
- myMedia.play();
-
- // Stop after 10 seconds
- setTimeout(function() {
-     myMedia.stop();
- }, 10000);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+successCallback = function()
+{
+&nbsp;&nbsp;&nbsp;console.log('Audio file has been stopped.');
+}
+
+errorCallback = function(err)
+{
+&nbsp;&nbsp;&nbsp;console.log('Error occurred ' + err.message);
+}
+
+var src = 'file://home/app/content/Documents/play.mp3';
+var myMedia = new Media(src, successCallback, errorCallback);
+
+myMedia.play();
+
+/* Stop after 10 seconds */
+setTimeout(function()
+{
+&nbsp;&nbsp;&nbsp;myMedia.stop();
+}, 10000);
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Audio playback has been stopped.
index 5f64956..2cb1438 100644 (file)
@@ -3,7 +3,7 @@
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
 <link rel="stylesheet" type="text/css" href="../tizen.css" media="screen">
-<script type="text/javascript" src="snippet.js"></script><title>NetworkInformation API</title>
+<script type="text/javascript" src="../snippet.js"></script><title>NetworkInformation API</title>
 </head>
 <body id="page-content" onload="prettyPrint()">
 <div class="api" id="::NetworkInformation">
@@ -112,23 +112,25 @@ The <em>navigator.connection</em> object allows access to the NetworkInformation
  http://tizen.org/privilege/telephony
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function checkConnection() {
-   var networkState = navigator.connection.type;
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function checkConnection()
+{
+&nbsp;&nbsp;&nbsp;var networkState = navigator.connection.type;
 
-   var states = {};
-   states[Connection.UNKNOWN]  = 'Unknown connection';
-   states[Connection.ETHERNET] = 'Ethernet connection';
-   states[Connection.WIFI]     = 'WiFi connection';
-   states[Connection.CELL_2G]  = 'Cell 2G connection';
-   states[Connection.CELL_3G]  = 'Cell 3G connection';
-   states[Connection.CELL_4G]  = 'Cell 4G connection';
-   states[Connection.CELL]     = 'Cell generic connection';
-   states[Connection.NONE]     = 'No network connection';
-   alert('Connection type: ' + states[networkState]);
- }
+&nbsp;&nbsp;&nbsp;var states = {};
+&nbsp;&nbsp;&nbsp;states[Connection.UNKNOWN] = 'Unknown connection';
+&nbsp;&nbsp;&nbsp;states[Connection.ETHERNET] = 'Ethernet connection';
+&nbsp;&nbsp;&nbsp;states[Connection.WIFI] = 'WiFi connection';
+&nbsp;&nbsp;&nbsp;states[Connection.CELL_2G] = 'Cell 2G connection';
+&nbsp;&nbsp;&nbsp;states[Connection.CELL_3G] = 'Cell 3G connection';
+&nbsp;&nbsp;&nbsp;states[Connection.CELL_4G] = 'Cell 4G connection';
+&nbsp;&nbsp;&nbsp;states[Connection.CELL] = 'Cell generic connection';
+&nbsp;&nbsp;&nbsp;states[Connection.NONE] = 'No network connection';
+&nbsp;&nbsp;&nbsp;alert('Connection type: ' + states[networkState]);
+}
 
- checkConnection();
- </pre>
+checkConnection();
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Connection type: Cell 3G connection
@@ -165,8 +167,7 @@ The <em>navigator.connection</em> object allows access to the NetworkInformation
  3.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> console.log(Connection.UNKNOWN);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">console.log(Connection.UNKNOWN);</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>unknown
@@ -183,8 +184,7 @@ The <em>navigator.connection</em> object allows access to the NetworkInformation
  3.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> console.log(Connection.ETHERNET);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">console.log(Connection.ETHERNET);</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>ethernet
@@ -201,8 +201,7 @@ The <em>navigator.connection</em> object allows access to the NetworkInformation
  3.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> console.log(Connection.WIFI);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">console.log(Connection.WIFI);</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>wifi
@@ -219,8 +218,7 @@ The <em>navigator.connection</em> object allows access to the NetworkInformation
  3.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> console.log(Connection.CELL_2G);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">console.log(Connection.CELL_2G);</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>2g
@@ -237,8 +235,7 @@ The <em>navigator.connection</em> object allows access to the NetworkInformation
  3.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> console.log(Connection.CELL_3G);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">console.log(Connection.CELL_3G);</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>3g
@@ -255,8 +252,7 @@ The <em>navigator.connection</em> object allows access to the NetworkInformation
  3.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> console.log(Connection.CELL_4G);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">console.log(Connection.CELL_4G);</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>4g
@@ -273,8 +269,7 @@ The <em>navigator.connection</em> object allows access to the NetworkInformation
  3.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> console.log(Connection.CELL);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">console.log(Connection.CELL);</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>cellular
@@ -291,8 +286,7 @@ The <em>navigator.connection</em> object allows access to the NetworkInformation
  3.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> console.log(Connection.NONE);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">console.log(Connection.NONE);</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>none
@@ -326,16 +320,19 @@ Applications typically should use document.addEventListener() to attach an event
 Original documentation: <a href="https://www.npmjs.com/package/cordova-plugin-network-information#online">Cordova online event</a>          </p>
          </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> document.addEventListener('deviceready', onDeviceReady, false);
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+document.addEventListener('deviceready', onDeviceReady, false);
 
- function onDeviceReady() {
-   document.addEventListener('online', onOnline, false);
- }
+function onDeviceReady()
+{
+&nbsp;&nbsp;&nbsp;document.addEventListener('online', onOnline, false);
+}
 
- function onOnline() {
-   // Handle the online event
- }
- </pre>
+function onOnline()
+{
+&nbsp;&nbsp;&nbsp;/* Handle the online event */
+}
+</pre>
 </div>
 </div>
 <div class="interface" id="OfflineEventCallback">
@@ -362,16 +359,19 @@ Applications typically should use document.addEventListener() to attach an event
 Original documentation: <a href="https://www.npmjs.com/package/cordova-plugin-network-information#offline">Cordova offline event</a>          </p>
          </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> document.addEventListener('deviceready', onDeviceReady, false);
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+document.addEventListener('deviceready', onDeviceReady, false);
 
- function onDeviceReady() {
-   document.addEventListener('offline', onOffline, false);
- }
+function onDeviceReady()
+{
+&nbsp;&nbsp;&nbsp;document.addEventListener('offline', onOffline, false);
+}
 
- function onOffline() {
-   // Handle the offline event
- }
- </pre>
+function onOffline()
+{
+&nbsp;&nbsp;&nbsp;/* Handle the offline event */
+}
+</pre>
 </div>
 </div>
 </div>
index b352277..db24537 100644 (file)
@@ -231,25 +231,34 @@ DataControl API.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> //The data provider, a native application, should be pre-installed and launched.
- //The same provider ID should be defined for the use of this API between a native application(provider) and a web application(consumer).
- //In this example, the DictionaryDataControlProvider native sample application is used as a data control provider.
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* 
+   The data provider, a native application, should be pre-installed and launched
+   The same provider ID should be defined for the use of this API between a native application(provider) and a web application(consumer)
+   In this example, the DictionaryDataControlProvider native sample application is used as a data control provider
+*/
 
- //Gets SQL type DataControlConsumerObject
- try {
-     var globalSQLConsumer = tizen.datacontrol.getDataControlConsumer(
-     "http://tizen.org/datacontrol/provider/DictionaryDataControlProvider", "Dictionary", "SQL");
- } catch (err) {
-     console.log (err.name +": " + err.message);
- }
- // Gets MAP type DataControlConsumerObject
- try {
-      globalMappedConsumer = tizen.datacontrol.getDataControlConsumer(
-      "http://tizen.org/datacontrol/provider/DictionaryDataControlProvider", "Dictionary", "MAP");
- } catch (err) {
-      console.log (err.name +": " + err.message);
- }
- </pre>
+/* Gets SQL type DataControlConsumerObject */
+try
+{
+&nbsp;&nbsp;&nbsp;var globalSQLConsumer = tizen.datacontrol.getDataControlConsumer(
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"http://tizen.org/datacontrol/provider/DictionaryDataControlProvider", "Dictionary", "SQL");
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name +": " + err.message);
+}
+/* Gets MAP type DataControlConsumerObject */
+try
+{
+&nbsp;&nbsp;&nbsp;globalMappedConsumer = tizen.datacontrol.getDataControlConsumer(
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"http://tizen.org/datacontrol/provider/DictionaryDataControlProvider", "Dictionary", "MAP");
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name +": " + err.message);
+}
+</pre>
 </div>
 </dd>
 </dl>
@@ -401,29 +410,34 @@ The string consists of one or more components, separated by a slash('/').
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function successcb(id, insertRowId)
- {
-     console.log("ok : reqid " + id);
- }
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function successcb(id, insertRowId)
+{
+&nbsp;&nbsp;&nbsp;console.log("ok: reqid " + id);
+}
 
- function errorcb(id, error)
- {
-     console.log("error id : " + id + ", error msg : " + error.message);
- }
+function errorcb(id, error)
+{
+&nbsp;&nbsp;&nbsp;console.log("error id: " + id + ", error msg: " + error.message);
+}
 
- try {
-     var rowData = {
-         columns : ["WORD", "WORD_DESC"] ,
-         values  : ["'tizen1'", "'tizen2'"]
-     };
-     // Defines globalReqId before
-     // Increases globalReqId for uniqueness
-     globalReqId++;
-     globalSQLConsumer.insert(globalReqId, rowData, successcb, errorcb);
- } catch (err) {
-     console.log (err.name +": " + err.message);
- }
- </pre>
+try
+{
+&nbsp;&nbsp;&nbsp;var rowData =
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;columns: ["WORD", "WORD_DESC"] ,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;values: ["'tizen1'", "'tizen2'"]
+&nbsp;&nbsp;&nbsp;};
+&nbsp;&nbsp;&nbsp;/* Defines globalReqId before */
+&nbsp;&nbsp;&nbsp;/* Increases globalReqId for uniqueness */
+&nbsp;&nbsp;&nbsp;globalReqId++;
+&nbsp;&nbsp;&nbsp;globalSQLConsumer.insert(globalReqId, rowData, successcb, errorcb);
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="SQLDataControlConsumer::update">
@@ -494,29 +508,34 @@ The string consists of one or more components, separated by a slash('/').
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function successcb(id)
- {
-     console.log("ok : reqid " + id);
- }
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function successcb(id)
+{
+&nbsp;&nbsp;&nbsp;console.log("ok: reqid " + id);
+}
 
- function errorcb(id, error)
- {
-     console.log("error id : " + id + ", error msg : " + error.message);
- }
+function errorcb(id, error)
+{
+&nbsp;&nbsp;&nbsp;console.log("error id: " + id + ", error msg: " + error.message);
+}
 
- try {
-     var rowData = {
-         columns : ["WORD", "WORD_DESC"] ,
-         values  : ["'tizen1'", "'Web apps platform!'"]
-     };
-     // Defines globalReqId before
-     // Increases globalReqId for uniqueness
-     globalReqId++;
-     globalSQLConsumer.update(globalReqId, rowData, "WORD='tizen1'", successcb, errorcb);
- } catch (err) {
-     console.log (err.name +": " + err.message);
- }
- </pre>
+try
+{
+&nbsp;&nbsp;&nbsp;var rowData =
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;columns: ["WORD", "WORD_DESC"] ,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;values: ["'tizen1'", "'Web apps platform!'"]
+&nbsp;&nbsp;&nbsp;};
+&nbsp;&nbsp;&nbsp;/* Defines globalReqId before */
+&nbsp;&nbsp;&nbsp;/* Increases globalReqId for uniqueness */
+&nbsp;&nbsp;&nbsp;globalReqId++;
+&nbsp;&nbsp;&nbsp;globalSQLConsumer.update(globalReqId, rowData, "WORD='tizen1'", successcb, errorcb);
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="SQLDataControlConsumer::remove">
@@ -583,25 +602,29 @@ The string consists of one or more components, separated by a slash('/').
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function successcb(id)
- {
-     console.log("ok : reqid " + id);
- }
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function successcb(id)
+{
+&nbsp;&nbsp;&nbsp;console.log("ok: reqid " + id);
+}
 
- function errorcb(id, error)
- {
-     console.log("error id : " + id + ", error msg : " + error.message);
- }
+function errorcb(id, error)
+{
+&nbsp;&nbsp;&nbsp;console.log("error id: " + id + ", error msg: " + error.message);
+}
 
- try {
-     // Defines globalReqId before
-     // Increases globalReqId for uniqueness
-     globalReqId++;
-     globalSQLConsumer.remove(globalReqId, "WORD='tizen1'", successcb, errorcb);
- } catch (err) {
-     console.log (err.name +": " + err.message);
- }
- </pre>
+try
+{
+&nbsp;&nbsp;&nbsp;/* Defines globalReqId before */
+&nbsp;&nbsp;&nbsp;/* Increases globalReqId for uniqueness */
+&nbsp;&nbsp;&nbsp;globalReqId++;
+&nbsp;&nbsp;&nbsp;globalSQLConsumer.remove(globalReqId, "WORD='tizen1'", successcb, errorcb);
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="SQLDataControlConsumer::select">
@@ -692,46 +715,49 @@ If either of the <em>page</em> or <em>maxNumberPerPage</em> parameters are set t
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function getValueSuccessCB(result, id)
- {
-     console.log("getValueSuccessCB result.length: " + result.length);
-     var length = result.length;
-     for (var i = 0; i &lt; length; i++)
-     {
-         var rowData = "| ";
-         var j = 0;
-         for (j = 0; j &lt; result[i].columns.length; j++)
-         {
-             rowData += "column: " + result[i].columns[j] + ", value: " + result[i].values[j] + " | ";
-         }
-         console.log(rowData);
-     }
- }
- function errorcb(id, error)
- {
-     console.log("error id : " + id + ", error msg : " + error.message);
- }
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function getValueSuccessCB(result, id)
+{
+&nbsp;&nbsp;&nbsp;console.log("getValueSuccessCB result.length: " + result.length);
+&nbsp;&nbsp;&nbsp;var length = result.length;
+&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; length; i++)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var rowData = "| ";
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var j = 0;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;for (j = 0; j &lt; result[i].columns.length; j++)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;rowData += "column: " + result[i].columns[j] + ", value: " + result[i].values[j] + " | ";
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(rowData);
+&nbsp;&nbsp;&nbsp;}
+}
+function errorcb(id, error)
+{
+&nbsp;&nbsp;&nbsp;console.log("error id: " + id + ", error msg: " + error.message);
+}
 
- try {
-     // globalSQLConsumer and globalReqId should be defined before.
-     // Increases globalReqId for uniqueness
-     globalReqId++;
-     var columns = ["WORD", "WORD_DESC" ];
-     var whereClause = "1";
-     console.log("----- Calling for ascending order -----");
-     globalSQLConsumer.select(globalReqId, columns, whereClause, getValueSuccessCB, errorcb,
-             null, null, "WORD_DESC ASC");
-     setTimeout( function() {
-         console.log("----- Calling descending order -----");
-         globalSQLConsumer.select(globalReqId, columns, whereClause, getValueSuccessCB, errorcb,
-             null, null, "WORD_DESC DESC");
-     }, 1000);
- }
- catch (err) {
-     console.log (err.name +": " + err.message);
- }
-
- </pre>
+try
+{
+&nbsp;&nbsp;&nbsp;/* globalSQLConsumer and globalReqId should be defined before */
+&nbsp;&nbsp;&nbsp;/* Increases globalReqId for uniqueness */
+&nbsp;&nbsp;&nbsp;globalReqId++;
+&nbsp;&nbsp;&nbsp;var columns = ["WORD", "WORD_DESC"];
+&nbsp;&nbsp;&nbsp;var whereClause = "1";
+&nbsp;&nbsp;&nbsp;console.log("----- Calling for ascending order -----");
+&nbsp;&nbsp;&nbsp;globalSQLConsumer.select(globalReqId, columns, whereClause, getValueSuccessCB, errorcb,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;null, null, "WORD_DESC ASC");
+&nbsp;&nbsp;&nbsp;setTimeout(function()
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("----- Calling descending order -----");
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;globalSQLConsumer.select(globalReqId, columns, whereClause, getValueSuccessCB, errorcb,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;null, null, "WORD_DESC DESC");
+&nbsp;&nbsp;&nbsp;}, 1000);
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+}
+</pre>
 </div>
 </dd>
 </dl>
@@ -835,25 +861,29 @@ If either of the <em>page</em> or <em>maxNumberPerPage</em> parameters are set t
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function successcb(id)
- {
-     console.log("ok : reqid " + id);
- }
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function successcb(id)
+{
+&nbsp;&nbsp;&nbsp;console.log("ok: reqid " + id);
+}
 
- function errorcb(id, error)
- {
-     console.log("error id : " + id + ", error msg : " + error.message);
- }
+function errorcb(id, error)
+{
+&nbsp;&nbsp;&nbsp;console.log("error id: " + id + ", error msg: " + error.message);
+}
 
- try {
-     // Defines globalReqId before
-     // Increases globalReqId for uniqueness
-     globalReqId++;
-     globalMappedConsumer.addValue(globalReqId, "tizen", "Foo", successcb, errorcb);
- } catch (err) {
-     console.log (err.name +": " + err.message);
- }
- </pre>
+try
+{
+&nbsp;&nbsp;&nbsp;/* Defines globalReqId before */
+&nbsp;&nbsp;&nbsp;/* Increases globalReqId for uniqueness */
+&nbsp;&nbsp;&nbsp;globalReqId++;
+&nbsp;&nbsp;&nbsp;globalMappedConsumer.addValue(globalReqId, "tizen", "Foo", successcb, errorcb);
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="MappedDataControlConsumer::removeValue">
@@ -927,25 +957,29 @@ If either of the <em>page</em> or <em>maxNumberPerPage</em> parameters are set t
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function successcb(id)
- {
-     console.log("ok : reqid " + id);
- }
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function successcb(id)
+{
+&nbsp;&nbsp;&nbsp;console.log("ok: reqid " + id);
+}
 
- function errorcb(id, error)
- {
-     console.log("error id : " + id + ", error msg : " + error.message);
- }
+function errorcb(id, error)
+{
+&nbsp;&nbsp;&nbsp;console.log("error id: " + id + ", error msg: " + error.message);
+}
 
- try {
-     // Defines globalReqId before
-     // Increases globalReqId for uniqueness
-     globalReqId++;
-     globalMappedConsumer.removeValue(globalReqId, "tizen", "Foo", successcb, errorcb);
- } catch (err) {
-     console.log (err.name +": " + err.message);
- }
- </pre>
+try
+{
+&nbsp;&nbsp;&nbsp;/* Defines globalReqId before */
+&nbsp;&nbsp;&nbsp;/* Increases globalReqId for uniqueness */
+&nbsp;&nbsp;&nbsp;globalReqId++;
+&nbsp;&nbsp;&nbsp;globalMappedConsumer.removeValue(globalReqId, "tizen", "Foo", successcb, errorcb);
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="MappedDataControlConsumer::getValue">
@@ -1015,25 +1049,29 @@ If either of the <em>page</em> or <em>maxNumberPerPage</em> parameters are set t
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function getValueSuccessCB(result, id)
- {
-     console.log(result.length + ":" + result[0]);
- }
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function getValueSuccessCB(result, id)
+{
+&nbsp;&nbsp;&nbsp;console.log(result.length + ":" + result[0]);
+}
 
- function errorcb(id, error)
- {
-     console.log("error id : " + id + ", error msg : " + error.message);
- }
+function errorcb(id, error)
+{
+&nbsp;&nbsp;&nbsp;console.log("error id: " + id + ", error msg: " + error.message);
+}
 
- try {
-     // Defines globalReqId before
-     // Increases globalReqId for uniqueness
-     globalReqId++;
-     globalMappedConsumer.getValue(globalReqId, "tizen", getValueSuccessCB, errorcb);
- } catch (err) {
-     console.log (err.name +": " + err.message);
- }
- </pre>
+try
+{
+&nbsp;&nbsp;&nbsp;/* Defines globalReqId before */
+&nbsp;&nbsp;&nbsp;/* Increases globalReqId for uniqueness */
+&nbsp;&nbsp;&nbsp;globalReqId++;
+&nbsp;&nbsp;&nbsp;globalMappedConsumer.getValue(globalReqId, "tizen", getValueSuccessCB, errorcb);
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="MappedDataControlConsumer::updateValue">
@@ -1111,25 +1149,29 @@ If either of the <em>page</em> or <em>maxNumberPerPage</em> parameters are set t
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function successcb(id)
- {
-     console.log("ok : reqid " + id);
- }
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function successcb(id)
+{
+&nbsp;&nbsp;&nbsp;console.log("ok: reqid " + id);
+}
 
- function errorcb(id, error)
- {
-     console.log("error id : " + id + ", error msg : " + error.message);
- }
+function errorcb(id, error)
+{
+&nbsp;&nbsp;&nbsp;console.log("error id: " + id + ", error msg: " + error.message);
+}
 
- try {
-     // Defines globalReqId before
-     // Increases globalReqId for uniqueness
-     globalReqId++;
-     globalMappedConsumer.updateValue(globalReqId, "tizen", "Foo", "Bar", successcb, errorcb);
- } catch (err) {
-     console.log (err.name +": " + err.message);
- }
- </pre>
+try
+{
+&nbsp;&nbsp;&nbsp;/* Defines globalReqId before */
+&nbsp;&nbsp;&nbsp;/* Increases globalReqId for uniqueness */
+&nbsp;&nbsp;&nbsp;globalReqId++;
+&nbsp;&nbsp;&nbsp;globalMappedConsumer.updateValue(globalReqId, "tizen", "Foo", "Bar", successcb, errorcb);
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+}
+</pre>
 </div>
 </dd>
 </dl>
index 3f18286..5ddacc0 100644 (file)
@@ -287,11 +287,12 @@ The default value is an empty object.
  2.1
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var req = new tizen.DownloadRequest("http://download.tizen.org/tools/README.txt");
- req.httpHeader["Pragma"] = "no-cache";
- req.httpHeader["Cookie"] = "version=1; Skin=new";
- req.httpHeader["X-Agent"] = "Tizen Sample App";
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var req = new tizen.DownloadRequest("http://download.tizen.org/tools/README.txt");
+req.httpHeader["Pragma"] = "no-cache";
+req.httpHeader["Cookie"] = "version=1; Skin=new";
+req.httpHeader["X-Agent"] = "Tizen Sample App";
+</pre>
 </div>
 </li>
 </ul>
@@ -392,47 +393,59 @@ If the network is not available for downloading, the return value is -1 since Ti
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Check if Download API is supported not on a device.
- var download_api_capability = tizen.systeminfo.getCapability("http://tizen.org/feature/download");
- if (download_api_capability === false) {
-     console.log("Download API is not supported on this device.");
-     return;
- }
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Check whether Download API is supported on a device */
+var download_api_capability = tizen.systeminfo.getCapability("http://tizen.org/feature/download");
+if (download_api_capability === false)
+{
+&nbsp;&nbsp;&nbsp;console.log("Download API is not supported on this device.");
 
- var listener = {
-   onprogress: function(id, receivedSize, totalSize) {
-     console.log('Received with id: ' + id + ', ' + receivedSize + '/' + totalSize);
-   },
-   onpaused: function(id) {
-     console.log('Paused with id: ' + id);
-   },
-   oncanceled: function(id) {
-     console.log('Canceled with id: ' + id);
-   },
-   oncompleted: function(id, fullPath) {
-     console.log('Completed with id: ' + id + ', full path: ' + fullPath);
-   },
-   onfailed: function(id, error) {
-     console.log('Failed with id: ' + id + ', error name: ' + error.name);
-   }
- };
+&nbsp;&nbsp;&nbsp;return;
+}
 
- // Starts downloading the file from the Web with the corresponding callbacks.
- var downloadRequest = new tizen.DownloadRequest("http://download.tizen.org/tools/README.txt", "documents");
- var downloadId = tizen.download.start(downloadRequest, listener);
+var listener =
+{
+&nbsp;&nbsp;&nbsp;onprogress: function(id, receivedSize, totalSize)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('Received with id: ' + id + ', ' + receivedSize + '/' + totalSize);
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;onpaused: function(id)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('Paused with id: ' + id);
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;oncanceled: function(id)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('Canceled with id: ' + id);
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;oncompleted: function(id, fullPath)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('Completed with id: ' + id + ', full path: ' + fullPath);
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;onfailed: function(id, error)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('Failed with id: ' + id + ', error name: ' + error.name);
+&nbsp;&nbsp;&nbsp;}
+};
 
- // If you want to download a large file through Wi-Fi,
- var wifi_capability = tizen.systeminfo.getCapability("http://tizen.org/feature/network.wifi");
- var wifiDownloadRequest = new tizen.DownloadRequest("http://download.tizen.org/tools/archive/14.02.2/Ubuntu_12.04/qemu_1.6.0rc3.orig.tar.gz", "downloads", null, "WIFI");
+/* Starts downloading the file from the Web with the corresponding callbacks */
+var downloadRequest = new tizen.DownloadRequest("http://download.tizen.org/tools/README.txt", "documents");
+var downloadId = tizen.download.start(downloadRequest, listener);
 
- if (wifi_capability === true) {
-     var downlodId_wifi = tizen.download.start(wifiDownloadRequest, listener);
- } else {
-     // If you call tizen.download.start(), NotSupportedError will be thrown.
-     console.log("This device doesn't support Download API through Wi-Fi.");
- }
+/* If you want to download a large file through Wi-Fi */
+var wifi_capability = tizen.systeminfo.getCapability("http://tizen.org/feature/network.wifi");
+var wifiDownloadRequest = new tizen.DownloadRequest(
+&nbsp;&nbsp;&nbsp;"http://download.tizen.org/tools/archive/14.02.2/Ubuntu_12.04/qemu_1.6.0rc3.orig.tar.gz", "downloads", null, "WIFI");
 
- </pre>
+if (wifi_capability === true)
+{
+&nbsp;&nbsp;&nbsp;var downlodId_wifi = tizen.download.start(wifiDownloadRequest, listener);
+}
+else
+{
+&nbsp;&nbsp;&nbsp;/* If you call tizen.download.start(), NotSupportedError will be thrown */
+&nbsp;&nbsp;&nbsp;console.log("This device doesn't support Download API through Wi-Fi.");
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="DownloadManager::cancel">
@@ -476,9 +489,10 @@ If the network is not available for downloading, the return value is -1 since Ti
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Cancels the ongoing download operation with the specified ID.
- tizen.download.cancel(downloadId);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Cancels the ongoing download operation with the specified ID */
+tizen.download.cancel(downloadId);
+</pre>
 </div>
 </dd>
 <dt class="method" id="DownloadManager::pause">
@@ -523,9 +537,10 @@ The paused download operation can be resumed later by the <em>resume()</em> meth
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Pauses the ongoing download operation with the specified ID.
- tizen.download.pause(downloadId);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Pauses the ongoing download operation with the specified ID */
+tizen.download.pause(downloadId);
+</pre>
 </div>
 </dd>
 <dt class="method" id="DownloadManager::resume">
@@ -569,9 +584,10 @@ The paused download operation can be resumed later by the <em>resume()</em> meth
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Resumes the paused download operation with the specified ID.
- tizen.download.resume(downloadId);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Resumes the paused download operation with the specified ID */
+tizen.download.resume(downloadId);
+</pre>
 </div>
 </dd>
 <dt class="method" id="DownloadManager::getState">
@@ -619,9 +635,10 @@ The paused download operation can be resumed later by the <em>resume()</em> meth
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Gets the state of the download operation with the given ID.
- var state = tizen.download.getState(downloadId);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Gets the state of the download operation with the given ID */
+var state = tizen.download.getState(downloadId);
+</pre>
 </div>
 </dd>
 <dt class="method" id="DownloadManager::getDownloadRequest">
@@ -672,9 +689,10 @@ parameters contain an invalid value.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Gets the download request information with the given ID.
- var downloadRequest = tizen.download.getDownloadRequest(downloadId);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Gets the download request information with the given ID */
+var downloadRequest = tizen.download.getDownloadRequest(downloadId);
+</pre>
 </div>
 </dd>
 <dt class="method" id="DownloadManager::getMIMEType">
@@ -729,9 +747,10 @@ parameters contain an invalid value.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Get the MIME type of the download operation with the given ID.
- var MIMEtype = tizen.download.getMIMEType(downloadId);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Get the MIME type of the download operation with the given ID */
+var MIMEtype = tizen.download.getMIMEType(downloadId);
+</pre>
 </div>
 </dd>
 <dt class="method" id="DownloadManager::setListener">
@@ -783,31 +802,38 @@ parameters contain an invalid value.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var listener = {
-   onprogress: function(id, receivedSize, totalSize) {
-     console.log('Received with id: ' + id + ', ' + receivedSize + '/' + totalSize);
-   },
-   onpaused: function(id) {
-     console.log('Paused with id: ' + id);
-   },
-   oncanceled: function(id) {
-     console.log('Canceled with id: ' + id);
-   },
-   oncompleted: function(id, fileName) {
-     console.log('Completed with id: ' + id + ', file name: ' + fileName);
-   },
-   onfailed: function(id, error) {
-     console.log('Failed with id: ' + id + ', error name: ' + error.name);
-   }
- };
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var listener =
+{
+&nbsp;&nbsp;&nbsp;onprogress: function(id, receivedSize, totalSize)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('Received with id: ' + id + ', ' + receivedSize + '/' + totalSize);
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;onpaused: function(id)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('Paused with id: ' + id);
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;oncanceled: function(id)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('Canceled with id: ' + id);
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;oncompleted: function(id, fileName)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('Completed with id: ' + id + ', file name: ' + fileName);
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;onfailed: function(id, error)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('Failed with id: ' + id + ', error name: ' + error.name);
+&nbsp;&nbsp;&nbsp;}
+};
 
- // Start downloading the html file on the web with the corresponding callbacks.
- var downloadRequest = new tizen.DownloadRequest("http://download.tizen.org/tools/README.txt", "documents");
- downloadId = tizen.download.start(downloadRequest);
+/* Start downloading the html file on the web with the corresponding callbacks */
+var downloadRequest = new tizen.DownloadRequest("http://download.tizen.org/tools/README.txt", "documents");
+downloadId = tizen.download.start(downloadRequest);
 
- // Add the listener.
- tizen.download.setListener(downloadId, listener);
- </pre>
+/* Add the listener */
+tizen.download.setListener(downloadId, listener);
+</pre>
 </div>
 </dd>
 </dl>
index a3ce8ba..29ade94 100644 (file)
@@ -253,27 +253,33 @@ UnknownError: In any other error case              </li>
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> //Preconditions: please provide images/tizen.jpg file with present Exif data
-
- // Defines success callback
- function onSuccess(exifInfo) {
-     console.log("success to get Exif information object");
- }
-
- // Defines error callback
- function onError(error) {
-     console.log("error occurred: " + error.name);
- }
-
- function resolveSuccess(file) {
-     tizen.exif.getExifInfo(file.toURI(), onSuccess, onError);
- }
-
- function resolveFail(error) {
-    console.log("error occurred: " + error.name);
- }
- tizen.filesystem.resolve("images/tizen.jpg", resolveSuccess, resolveFail);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Preconditions: provide images/tizen.jpg file with present Exif data */
+
+/* Defines success callback */
+function onSuccess(exifInfo)
+{
+&nbsp;&nbsp;&nbsp;console.log("success to get Exif information object");
+}
+
+/* Defines error callback */
+function onError(error)
+{
+&nbsp;&nbsp;&nbsp;console.log("error occurred: " + error.name);
+}
+
+function resolveSuccess(file)
+{
+&nbsp;&nbsp;&nbsp;tizen.exif.getExifInfo(file.toURI(), onSuccess, onError);
+}
+
+function resolveFail(error)
+{
+&nbsp;&nbsp;&nbsp;console.log("error occurred: " + error.name);
+}
+
+tizen.filesystem.resolve("images/tizen.jpg", resolveSuccess, resolveFail);
+</pre>
 </div>
 </dd>
 <dt class="method" id="ExifManager::saveExifInfo">
@@ -327,41 +333,47 @@ UnknownError: In any other error case              </li>
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> //Preconditions: please provide images/tizen.jpg file with present Exif data
-
- // Defines success callback
- function onSaveSuccess() {
-     console.log("success to save Exif information");
- }
-
- // Defines error callback
- function onSaveError(error) {
-     console.log("error occur" + error.name);
- }
-
- // Defines success callback
- function onSuccess(exifInfo) {
-     console.log("success to get Exif information object");
-     exifInfo.orientation = "ROTATE_90";
-     tizen.exif.saveExifInfo(exifInfo, onSaveSuccess, onSaveError);
- }
-
- // Defines error callback
- function onError(error) {
-     console.log("error occur" + error.name);
- }
-
- function resolveSuccess(file) {
-     tizen.exif.getExifInfo(file.toURI(), onSuccess, onError);
- }
-
- function resolveFail(error) {
-    console.log("error occurred: " + error.name);
- }
-
- tizen.filesystem.resolve("images/tizen.jpg", resolveSuccess, resolveFail);
-
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Preconditions: provide images/tizen.jpg file with present Exif data */
+
+/* Defines success callback */
+function onSaveSuccess()
+{
+&nbsp;&nbsp;&nbsp;console.log("success to save Exif information");
+}
+
+/* Defines error callback */
+function onSaveError(error)
+{
+&nbsp;&nbsp;&nbsp;console.log("error occur" + error.name);
+}
+
+/* Defines success callback */
+function onSuccess(exifInfo)
+{
+&nbsp;&nbsp;&nbsp;console.log("success to get Exif information object");
+&nbsp;&nbsp;&nbsp;exifInfo.orientation = "ROTATE_90";
+&nbsp;&nbsp;&nbsp;tizen.exif.saveExifInfo(exifInfo, onSaveSuccess, onSaveError);
+}
+
+/* Defines error callback */
+function onError(error)
+{
+&nbsp;&nbsp;&nbsp;console.log("error occur" + error.name);
+}
+
+function resolveSuccess(file)
+{
+&nbsp;&nbsp;&nbsp;tizen.exif.getExifInfo(file.toURI(), onSuccess, onError);
+}
+
+function resolveFail(error)
+{
+&nbsp;&nbsp;&nbsp;console.log("error occurred: " + error.name);
+}
+
+tizen.filesystem.resolve("images/tizen.jpg", resolveSuccess, resolveFail);
+</pre>
 </div>
 </dd>
 <dt class="method" id="ExifManager::getThumbnail">
@@ -422,33 +434,39 @@ UnknownError: In any other error case              </li>
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> //Preconditions: please provide images/tizen.jpg file with present Exif data
-
- // Defines success callback
- function onSuccess(thumbData) {
-     console.log("got thumbnail data of JPEG file");
-     if (thumbData) {
-         var img = new Image();
-         img.src = thumbData;
-         document.body.appendChild(img);
-     }
- }
-
- // Defines error callback
- function onError(error) {
-     console.log("error occur" + error.name);
- }
-
- function resolveSuccess(file) {
-     tizen.exif.getThumbnail(file.toURI(), onSuccess, onError);
- }
-
- function resolveFail(error) {
-    console.log("error occurred: " + error.name);
- }
-
- tizen.filesystem.resolve("images/tizen.jpg", resolveSuccess, resolveFail);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Preconditions: provide images/tizen.jpg file with present Exif data */
+
+/* Defines success callback */
+function onSuccess(thumbData)
+{
+&nbsp;&nbsp;&nbsp;console.log("got thumbnail data of JPEG file");
+&nbsp;&nbsp;&nbsp;if (thumbData)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var img = new Image();
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;img.src = thumbData;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;document.body.appendChild(img);
+&nbsp;&nbsp;&nbsp;}
+}
+
+/* Defines error callback */
+function onError(error)
+{
+&nbsp;&nbsp;&nbsp;console.log("error occur" + error.name);
+}
+
+function resolveSuccess(file)
+{
+&nbsp;&nbsp;&nbsp;tizen.exif.getThumbnail(file.toURI(), onSuccess, onError);
+}
+
+function resolveFail(error)
+{
+&nbsp;&nbsp;&nbsp;console.log("error occurred: " + error.name);
+}
+
+tizen.filesystem.resolve("images/tizen.jpg", resolveSuccess, resolveFail);
+</pre>
 </div>
 </dd>
 </dl>
index ef65112..d95e484 100644 (file)
@@ -368,41 +368,44 @@ as determining root and default locations, resolving a given location into a fil
           </p>
          </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var documentsDir;
- function onsuccess(files) {
-   for (var i = 0; i &lt; files.length; i++) {
-     console.log("File Name is " + files[i].name); // displays file name
-   }
-
-   var testFile = documentsDir.createFile("test.txt");
-
-   if (testFile != null) {
-     testFile.openStream(
-       "w",
-       function(fs) {
-         fs.write("HelloWorld");
-         fs.close();
-       }, function(e) {
-         console.log("Error " + e.message);
-       }, "UTF-8"
-     );
-   }
- }
-
- function onerror(error) {
-   console.log("The error " + error.message + " occurred when listing the files in the selected folder");
- }
-
- tizen.filesystem.resolve(
-   'documents',
-   function(dir) {
-     documentsDir = dir;
-     dir.listFiles(onsuccess, onerror);
-   }, function(e) {
-     console.log("Error" + e.message);
-   }, "rw"
- );
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var documentsDir;
+function onsuccess(files)
+{
+&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; files.length; i++)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("File Name is " + files[i].name); /* Displays file name */
+&nbsp;&nbsp;&nbsp;}
+
+&nbsp;&nbsp;&nbsp;var testFile = documentsDir.createFile("test.txt");
+
+&nbsp;&nbsp;&nbsp;if (testFile != null)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;testFile.openStream("w", function(fs)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;fs.write("HelloWorld");
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;fs.close();
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}, function(e)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Error " + e.message);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}, "UTF-8");
+&nbsp;&nbsp;&nbsp;}
+}
+
+function onerror(error)
+{
+&nbsp;&nbsp;&nbsp;console.log("The error " + error.message + " occurred when listing the files in the selected folder");
+}
+
+tizen.filesystem.resolve('documents', function(dir)
+{
+&nbsp;&nbsp;&nbsp;documentsDir = dir;
+&nbsp;&nbsp;&nbsp;dir.listFiles(onsuccess, onerror);
+}, function(e)
+{
+&nbsp;&nbsp;&nbsp;console.log("Error" + e.message);
+}, "rw");
+</pre>
 </div>
 <div class="attributes">
 <h4>Attributes</h4>
@@ -416,8 +419,9 @@ as determining root and default locations, resolving a given location into a fil
  1.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> console.log("The maximum path length is " + tizen.filesystem.maxPathLength);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+console.log("The maximum path length is " + tizen.filesystem.maxPathLength);
+</pre>
 </div>
 </li></ul>
 </div>
@@ -532,15 +536,15 @@ UnknownError - If any other error occurs.              </li>
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> tizen.filesystem.resolve(
-   'images',
-   function(dir) {
-     console.log("Mount point Name is " +  dir.path);
-   }, function(e) {
-     console.log("Error: " + e.message);
-   }, "r"
- );
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+tizen.filesystem.resolve('images', function(dir)
+{
+&nbsp;&nbsp;&nbsp;console.log("Mount point Name is " +  dir.path);
+}, function(e)
+{
+&nbsp;&nbsp;&nbsp;console.log("Error: " + e.message);
+}, "r");
+</pre>
 </div>
 </dd>
 <dt class="method" id="FileSystemManager::getStorage">
@@ -610,16 +614,19 @@ UnknownError - If any other error occurs.               </li>
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function onStorage(storage) {
-     // Do something
- }
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function onStorage(storage)
+{
+&nbsp;&nbsp;&nbsp;/* Do something */
+}
 
- function onStorageError(e) {
- console.log("Storage not found!" + e.message);
- }
+function onStorageError(e)
+{
+&nbsp;&nbsp;&nbsp;console.log("Storage not found!" + e.message);
+}
 
- tizen.filesystem.getStorage("music", onStorage, onStorageError);
- </pre>
+tizen.filesystem.getStorage("music", onStorage, onStorageError);
+</pre>
 </div>
 </dd>
 <dt class="method" id="FileSystemManager::listStorages">
@@ -685,17 +692,20 @@ UnknownError - If any other error occurs.              </li>
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function alertForCorruptedRemovableDrives(storages) {
-     for (var i = 0; i &lt; storages.length; i++) {
-         if (storages[i].type != "EXTERNAL")
-             continue;
-         if (storages[i].state == "UNMOUNTABLE")
-             console.log("External drive " + storages[i].label + " is corrupted.");
-     }
- }
-
- tizen.filesystem.listStorages(alertForCorruptedRemovableDrives);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function alertForCorruptedRemovableDrives(storages)
+{
+&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; storages.length; i++)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (storages[i].type != "EXTERNAL")
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;continue;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (storages[i].state == "UNMOUNTABLE")
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("External drive " + storages[i].label + " is corrupted.");
+&nbsp;&nbsp;&nbsp;}
+}
+
+tizen.filesystem.listStorages(alertForCorruptedRemovableDrives);
+</pre>
 </div>
 </dd>
 <dt class="method" id="FileSystemManager::addStorageStateChangeListener">
@@ -763,14 +773,16 @@ The watch operation must continue until the removeStorageStateChangeListener() m
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var watchID;
- function onStorageStateChanged(storage) {
-     if (storage.state == "MOUNTED")
-         console.log("Storage " + storage.label + " was added!");
- }
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var watchID;
+function onStorageStateChanged(storage)
+{
+&nbsp;&nbsp;&nbsp;if (storage.state == "MOUNTED")
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Storage " + storage.label + " was added!");
+}
 
- watchID = tizen.filesystem.addStorageStateChangeListener(onStorageStateChanged);
- </pre>
+watchID = tizen.filesystem.addStorageStateChangeListener(onStorageStateChanged);
+</pre>
 </div>
 </dd>
 <dt class="method" id="FileSystemManager::removeStorageStateChangeListener">
@@ -822,16 +834,17 @@ Otherwise, the method call has no effect.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var watchID;
- function onStorageStateChanged(storage) {
-     if (storage.state == "MOUNTED")
-         console.log("Storage " + storage.label + " was added!");
-     tizen.filesystem.removeStorageStateChangeListener(watchID);
- }
-
- watchID = tizen.filesystem.addStorageStateChangeListener(onStorageStateChanged);
-
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var watchID;
+function onStorageStateChanged(storage)
+{
+&nbsp;&nbsp;&nbsp;if (storage.state == "MOUNTED")
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Storage " + storage.label + " was added!");
+&nbsp;&nbsp;&nbsp;tizen.filesystem.removeStorageStateChangeListener(watchID);
+}
+
+watchID = tizen.filesystem.addStorageStateChangeListener(onStorageStateChanged);
+</pre>
 </div>
 </dd>
 </dl>
@@ -995,21 +1008,25 @@ files and directories rooted as the file handle location.
           </p>
          </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function onsuccess(files) {
-   for (var i = 0; i &lt; files.length; i++) {
-     // alerts each name of dir's contents
-     console.log(files[i].name);
-   }
- }
-
- function onerror(error) {
-   console.log("The error " + error.message +
-               " occurred when listing the files in the selected folder");
- }
-
- // list directory contents
- dir.listFiles(onsuccess, onerror);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function onsuccess(files)
+{
+&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; files.length; i++)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Alerts each name of dir's contents */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(files[i].name);
+&nbsp;&nbsp;&nbsp;}
+}
+
+function onerror(error)
+{
+&nbsp;&nbsp;&nbsp;console.log("The error " + error.message +
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" occurred when listing the files in the selected folder");
+}
+
+/* List directory contents */
+dir.listFiles(onsuccess, onerror);
+</pre>
 </div>
 <div class="attributes">
 <h4>Attributes</h4>
@@ -1029,23 +1046,29 @@ This attribute is set to<var>null</var> if there is no parent directory. This al
  1.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // list directory contents
- dir.listFiles(onsuccess, onerror);
-
- function onsuccess(files) {
-   for (var i = 0; i &lt; files.length; i++) {
-     // prints the file parent, should contain the
-     // same value for all the files in the loop
-     console.log("All the files should have the same parent " +
-                 files[i].parent);
-   }
- }
-
- function onerror(error) {
-   console.log("The error " + error.message +
-               " occurred when listing the files in the selected folder");
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* List directory contents */
+dir.listFiles(onsuccess, onerror);
+
+function onsuccess(files)
+{
+&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; files.length; i++)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* 
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;   Prints the file parent, must contain the
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;   same value for all the files in the loop
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("All the files should have the same parent " +
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;files[i].parent);
+&nbsp;&nbsp;&nbsp;}
+}
+
+function onerror(error)
+{
+&nbsp;&nbsp;&nbsp;console.log("The error " + error.message +
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" occurred when listing the files in the selected folder");
+}
+</pre>
 </div>
 </li>
 <li class="attribute" id="File::readOnly">
@@ -1072,22 +1095,26 @@ This attribute represents the actual state of a file or directory in the filesys
  1.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // lists directory contents
- dir.listFiles(onsuccess, onerror);
-
- function onsuccess(files) {
-   for (var i = 0; i &lt; files.length; i++) {
-     if (files[i].readOnly)
-       console.log("Cannot write to file " + files[i].name);
-     else
-       console.log("Can write to file " + files[i].name);
-   }
- }
-
- function onerror(error) {
-   console.log("The error " + error.message + " occurred when listing the files in the selected folder");
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Lists directory contents */
+dir.listFiles(onsuccess, onerror);
+
+function onsuccess(files)
+{
+&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; files.length; i++)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (files[i].readOnly)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Cannot write to file " + files[i].name);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;else
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Can write to file " + files[i].name);
+&nbsp;&nbsp;&nbsp;}
+}
+
+function onerror(error)
+{
+&nbsp;&nbsp;&nbsp;console.log("The error " + error.message + " occurred when listing the files in the selected folder");
+}
+</pre>
 </div>
 </li>
 <li class="attribute" id="File::isFile">
@@ -1177,8 +1204,7 @@ timestamp changes when a file is moved.
  1.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> console.log(file.modified); // displays the modification timestamp
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">console.log(file.modified); /* Displays the modification timestamp */</pre>
 </div>
 </li>
 <li class="attribute" id="File::path">
@@ -1212,8 +1238,7 @@ For example, if the root is music, then the path is music. If the root is docume
  1.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> console.log(file.path); // should be 'music/' if the file is music/foo.mp3
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">console.log(file.path); /* Must be 'music/' if the file is music/foo.mp3 */</pre>
 </div>
 </li>
 <li class="attribute" id="File::name">
@@ -1242,9 +1267,10 @@ For the special case of the root itself, the <em>name </em> is an empty string.
  1.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // should be foo.mp3 if the file path is music/foo.mp3
- console.log(file.name);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Must be foo.mp3 if the file path is music/foo.mp3 */
+console.log(file.name);
+</pre>
 </div>
 </li>
 <li class="attribute" id="File::fullPath">
@@ -1275,9 +1301,10 @@ The <em>fullPath </em>is always equal to path + name.
  1.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">  // should be music/track1.mp3 if the file is music/track1.mp3
- console.log(file.fullPath);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Must be music/track1.mp3 if the file is music/track1.mp3 */
+console.log(file.fullPath);
+</pre>
 </div>
 </li>
 <li class="attribute" id="File::fileSize">
@@ -1295,9 +1322,10 @@ If an attempt to read this attribute for a directory is made, <var>undefined</va
  1.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // displays the file size
- console.log(file.fileSize);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Displays the file size */
+console.log(file.fileSize);
+</pre>
 </div>
 </li>
 <li class="attribute" id="File::length">
@@ -1315,9 +1343,10 @@ If an attempt to read this attribute for a file is made, <var>undefined</var> is
  1.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // '3' if the directory contains two files and one sub-directory
- console.log(file.length);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* '3' if the directory contains two files and one sub-directory */
+console.log(file.length);
+</pre>
 </div>
 </li>
 </ul>
@@ -1376,12 +1405,14 @@ These URIs must not be accessible to other widgets, apart from the one invoking
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> tizen.filesystem.resolve('music/ramones/RockawayBeach.mp3', function(file) {
-   var audio = new Audio(file.toURI());
-   audio.play();
-   console.log(file.toURI());
- });
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+tizen.filesystem.resolve('music/ramones/RockawayBeach.mp3', function(file)
+{
+&nbsp;&nbsp;&nbsp;var audio = new Audio(file.toURI());
+&nbsp;&nbsp;&nbsp;audio.play();
+&nbsp;&nbsp;&nbsp;console.log(file.toURI());
+});
+</pre>
 </div>
 </dd>
 <dt class="method" id="File::listFiles">
@@ -1457,23 +1488,25 @@ UnknownError - If any other error occurs.              </li>
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function onsuccess(files) {
-   console.log("There are " + files.length  + " in the selected folder");
- }
-
- function onerror(error) {
-   console.log("The error " + error.message + " occurred when listing the files in the selected folder");
- }
-
- tizen.filesystem.resolve(
-     "documents",
-     function(dir) {
-       dir.listFiles(onsuccess, onerror);
-     }, function(e) {
-       console.log("Error " + e.message);
-     }, "r"
- );
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function onsuccess(files)
+{
+&nbsp;&nbsp;&nbsp;console.log("There are " + files.length  + " in the selected folder");
+}
+
+function onerror(error)
+{
+&nbsp;&nbsp;&nbsp;console.log("The error " + error.message + " occurred when listing the files in the selected folder");
+}
+
+tizen.filesystem.resolve("documents", function(dir)
+{
+&nbsp;&nbsp;&nbsp;dir.listFiles(onsuccess, onerror);
+}, function(e)
+{
+&nbsp;&nbsp;&nbsp;console.log("Error " + e.message);
+}, "r");
+</pre>
 </div>
 </dd>
 <dt class="method" id="File::openStream">
@@ -1546,39 +1579,43 @@ UnknownError - If any other error occurs.              </li>
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var documentsDir;
- function onsuccess(files) {
-   for (var i = 0; i &lt; files.length; i++) {
-     console.log("File Name is " + files[i].name); // displays file name
-   }
-
-   var testFile = documentsDir.createFile("test.txt");
-   if (testFile != null) {
-     testFile.openStream(
-         "w",
-         function(fs) {
-           fs.write("HelloWorld");
-           fs.close();
-         }, function(e) {
-           console.log("Error " + e.message);
-         }, "UTF-8"
-     );
-   }
- }
-
- function onerror(error) {
-   console.log("The error " + error.message + " occurred when listing the files in the selected folder");
- }
-
- tizen.filesystem.resolve(
-     'documents',
-     function(dir) {
-       documentsDir = dir; dir.listFiles(onsuccess,onerror);
-     }, function(e) {
-       console.log("Error" + e.message);
-     }, "rw"
- );
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var documentsDir;
+function onsuccess(files)
+{
+&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; files.length; i++)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("File Name is " + files[i].name); /* Displays file name */
+&nbsp;&nbsp;&nbsp;}
+
+&nbsp;&nbsp;&nbsp;var testFile = documentsDir.createFile("test.txt");
+&nbsp;&nbsp;&nbsp;if (testFile != null)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;testFile.openStream("w", function(fs)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;fs.write("HelloWorld");
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;fs.close();
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}, function(e)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Error " + e.message);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}, "UTF-8");
+&nbsp;&nbsp;&nbsp;}
+}
+
+function onerror(error)
+{
+&nbsp;&nbsp;&nbsp;console.log("The error " + error.message + " occurred when listing the files in the selected folder");
+}
+
+tizen.filesystem.resolve('documents', function(dir)
+{
+&nbsp;&nbsp;&nbsp;documentsDir = dir;
+&nbsp;&nbsp;&nbsp;dir.listFiles(onsuccess, onerror);
+}, function(e)
+{
+&nbsp;&nbsp;&nbsp;console.log("Error" + e.message);
+}, "rw");
+</pre>
 </div>
 </dd>
 <dt class="method" id="File::readAsText">
@@ -1648,35 +1685,40 @@ UnknownError - If any other error occurs.              </li>
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function onsuccess(files) {
-   for (var i = 0; i &lt; files.length; i++) {
-     console.log("File Name is " + files[i].name); // displays file name
-     if (files[i].isDirectory == false)
-       files[i].readAsText(
-           function(str) {
-             console.log("The file content " + str);
-           }, function(e) {
-             console.log("Error " + e.message);
-           }, "UTF-8"
-       );
-   }
- }
-
- function onerror(error) {
-   console.log("The error " + error.message + " occurred when listing the files in the selected folder");
- }
-
- var documentsDir;
- tizen.filesystem.resolve(
-     'documents',
-     function(dir) {
-       documentsDir = dir;
-       dir.listFiles(onsuccess,onerror);
-     }, function(e) {
-       console.log("Error" + e.message);
-     }, "rw"
- );
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function onsuccess(files)
+{
+&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; files.length; i++)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("File Name is " + files[i].name); /* Displays file name */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (files[i].isDirectory == false)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;files[i].readAsText(function(str)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("The file content " + str);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}, function(e)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Error " + e.message);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}, "UTF-8");
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;}
+}
+
+function onerror(error)
+{
+&nbsp;&nbsp;&nbsp;console.log("The error " + error.message + " occurred when listing the files in the selected folder");
+}
+
+var documentsDir;
+tizen.filesystem.resolve('documents', function(dir)
+{
+&nbsp;&nbsp;&nbsp;documentsDir = dir;
+&nbsp;&nbsp;&nbsp;dir.listFiles(onsuccess, onerror);
+}, function(e)
+{
+&nbsp;&nbsp;&nbsp;console.log("Error" + e.message);
+}, "rw");
+</pre>
 </div>
 </dd>
 <dt class="method" id="File::copyTo">
@@ -1763,33 +1805,36 @@ UnknownError - If any other error occurs.              </li>
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var documentsDir;
- function onsuccess(files) {
-   for (var i = 0; i &lt; files.length; i++) {
-     if (files[i].isDirectory == false) {
-       documentsDir.copyTo(files[i].fullPath,
-                           "images/backup/" + files[i].name,
-                           false,
-                           function() {console.log("file copied");});
-     }
-   }
- }
-
- function onerror(error) {
-   console.log("The error " + error.message +
-               " occurred when listing the files in the selected folder");
- }
-
- tizen.filesystem.resolve(
-     'documents',
-     function(dir) {
-       documentsDir = dir;
-       dir.listFiles(onsuccess, onerror);
-     }, function(e) {
-       console.log("Error" + e.message);
-     }, "rw"
- );
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var documentsDir;
+function onsuccess(files)
+{
+&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; files.length; i++)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (files[i].isDirectory == false)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;documentsDir.copyTo(files[i].fullPath,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"images/backup/" + files[i].name, false,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;function() {console.log("file copied");});
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;}
+}
+
+function onerror(error)
+{
+&nbsp;&nbsp;&nbsp;console.log("The error " + error.message +
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" occurred when listing the files in the selected folder");
+}
+
+tizen.filesystem.resolve('documents', function(dir)
+{
+&nbsp;&nbsp;&nbsp;documentsDir = dir;
+&nbsp;&nbsp;&nbsp;dir.listFiles(onsuccess, onerror);
+}, function(e)
+{
+&nbsp;&nbsp;&nbsp;console.log("Error" + e.message);
+}, "rw");
+</pre>
 </div>
 </dd>
 <dt class="method" id="File::moveTo">
@@ -1876,33 +1921,36 @@ UnknownError - If any other error occurs.              </li>
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var documentsDir;
- function onsuccess(files) {
-   for (var i = 0; i &lt; files.length; i++) {
-     if (files[i].isDirectory == false) {
-       documentsDir.moveTo(files[i].fullPath,
-                           "images/newFolder/" + files[i].name,
-                           false,
-                           function() {console.log("file moved");});
-     }
-   }
- }
-
- function onerror(error) {
-   console.log("The error " + error.message +
-               " occurred during listing the files in the selected folder");
- }
-
- tizen.filesystem.resolve(
-     'documents',
-     function(dir) {
-       documentsDir = dir;
-       dir.listFiles(onsuccess, onerror);
-     }, function(e) {
-       console.log("Error" + e.message);
-     }, "rw"
- );
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var documentsDir;
+function onsuccess(files)
+{
+&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; files.length; i++)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (files[i].isDirectory == false)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;documentsDir.moveTo(files[i].fullPath,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"images/newFolder/" + files[i].name, false,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;function() {console.log("file moved");});
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;}
+}
+
+function onerror(error)
+{
+&nbsp;&nbsp;&nbsp;console.log("The error " + error.message +
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" occurred during listing the files in the selected folder");
+}
+
+tizen.filesystem.resolve('documents', function(dir)
+{
+&nbsp;&nbsp;&nbsp;documentsDir = dir;
+&nbsp;&nbsp;&nbsp;dir.listFiles(onsuccess, onerror);
+}, function(e)
+{
+&nbsp;&nbsp;&nbsp;console.log("Error" + e.message);
+}, "rw");
+</pre>
 </div>
 </dd>
 <dt class="method" id="File::createDirectory">
@@ -1979,10 +2027,11 @@ The new <em>File </em>object has "rw" access rights, as it inherits this from th
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var dir; //Directory object obtained from filesystem API
- var newDir = dir.createDirectory("newDir");
- var anotherNewDir = dir.createDirectory("newDir1/subNewDir1");
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var dir; /* Directory object obtained from filesystem API */
+var newDir = dir.createDirectory("newDir");
+var anotherNewDir = dir.createDirectory("newDir1/subNewDir1");
+</pre>
 </div>
 </dd>
 <dt class="method" id="File::createFile">
@@ -2054,8 +2103,7 @@ called.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var newFile = dir.createFile("newFilePath");
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">var newFile = dir.createFile("newFilePath");</pre>
 </div>
 </dd>
 <dt class="method" id="File::resolve">
@@ -2126,15 +2174,20 @@ The new <em>File </em>object inherits its access rights from the <em>File </em>o
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var file;
- // Resolves helloWorld.doc file that is located in the
- // documents root location
- tizen.filesystem.resolve(
-   'documents',
-   function(dir) { file = dir.resolve("helloWorld.doc");},
-   function(e) { console.log("Error" + e.message);},
-   "rw");
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var file;
+/*
+   Resolves helloWorld.doc file that is located in the
+   documents root location
+*/
+tizen.filesystem.resolve('documents', function(dir)
+{
+&nbsp;&nbsp;&nbsp;file = dir.resolve("helloWorld.doc");
+}, function(e)
+{
+&nbsp;&nbsp;&nbsp;console.log("Error" + e.message);
+}, "rw");
+</pre>
 </div>
 </dd>
 <dt class="method" id="File::deleteDirectory">
@@ -2217,36 +2270,39 @@ all data in all subdirectories and so needs to be used with caution.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var documentsDir;
- function onsuccess(files) {
-   for (var i = 0; i &lt; files.length; i++) {
-     if (files[i].isDirectory) {
-       documentsDir.deleteDirectory(
-           files[i].fullPath,
-           false,
-           function() {
-             console.log("Directory Deleted");
-           }, function(e) {
-             console.log("Error" + e.message);
-           });
-     }
-   }
- }
-
- function onerror(error) {
-   console.log("The error " + error.message + " occurred when listing the files in the selected folder");
- }
-
- tizen.filesystem.resolve(
-     'documents',
-     function(dir) {
-       documentsDir = dir;
-       dir.listFiles(onsuccess,onerror);
-     }, function(e) {
-       console.log("Error" + e.message);
-     }, "rw"
- );
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var documentsDir;
+function onsuccess(files)
+{
+&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; files.length; i++)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (files[i].isDirectory)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;documentsDir.deleteDirectory(files[i].fullPath, false, function()
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Directory Deleted");
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}, function(e)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Error" + e.message);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;});
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;}
+}
+
+function onerror(error)
+{
+&nbsp;&nbsp;&nbsp;console.log("The error " + error.message + " occurred when listing the files in the selected folder");
+}
+
+tizen.filesystem.resolve('documents', function(dir)
+{
+&nbsp;&nbsp;&nbsp;documentsDir = dir;
+&nbsp;&nbsp;&nbsp;dir.listFiles(onsuccess, onerror);
+}, function(e)
+{
+&nbsp;&nbsp;&nbsp;console.log("Error" + e.message);
+}, "rw");
+</pre>
 </div>
 </dd>
 <dt class="method" id="File::deleteFile">
@@ -2318,35 +2374,39 @@ UnknownError - If any other error occurs.              </li>
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function onsuccess(files) {
-   for (var i = 0; i &lt; files.length; i++) {
-     if (!files[i].isDirectory) {
-       documentsDir.deleteFile(
-           files[i].fullPath,
-           function() {
-             console.log("File Deleted");
-           }, function(e) {
-             console.log("Error" + e.message);
-           });
-     }
-   }
- }
-
- function onerror(error) {
-   console.log("The error " + error.message + " occurred when listing the files in the selected folder");
- }
-
- var documentsDir;
- tizen.filesystem.resolve(
-   'documents',
-   function(dir) {
-     documentsDir = dir;
-     dir.listFiles(onsuccess,onerror);
-   }, function(e) {
-     console.log("Error" + e.message);
-   }, "rw"
- );
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function onsuccess(files)
+{
+&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; files.length; i++)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (!files[i].isDirectory)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;documentsDir.deleteFile(files[i].fullPath, function()
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("File Deleted");
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}, function(e)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Error" + e.message);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;});
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;}
+}
+
+function onerror(error)
+{
+&nbsp;&nbsp;&nbsp;console.log("The error " + error.message + " occurred when listing the files in the selected folder");
+}
+
+var documentsDir;
+tizen.filesystem.resolve('documents', function(dir)
+{
+&nbsp;&nbsp;&nbsp;documentsDir = dir;
+&nbsp;&nbsp;&nbsp;dir.listFiles(onsuccess,onerror);
+}, function(e)
+{
+&nbsp;&nbsp;&nbsp;console.log("Error" + e.message);
+}, "rw");
+</pre>
 </div>
 </dd>
 </dl>
@@ -2537,10 +2597,12 @@ If set to <var>false</var>, this attribute indicates that the file pointer is no
  1.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> if (stream.eof) {
-   // file has been read completely
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+if (stream.eof)
+{
+&nbsp;&nbsp;&nbsp;/* File has been read completely */
+}
+</pre>
 </div>
 </li>
 <li class="attribute" id="FileStream::position">
@@ -2557,11 +2619,14 @@ The stream position is an offset of bytes from the start of the file stream. Whe
  1.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> console.log(stream.position); // displays current stream position
- // alters current stream position to the begin of the file,
- // like seek() in C
- stream.position = 0;
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+console.log(stream.position); /* Displays current stream position */
+/*
+   Alters current stream position to the begin of the file,
+   like seek() in C
+*/
+stream.position = 0;
+</pre>
 </div>
 </li>
 <li class="attribute" id="FileStream::bytesAvailable">
@@ -2583,8 +2648,8 @@ It corresponds to the number of bytes available after the file pointer denoted b
  1.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> console.log(stream.bytesAvailable); // displays the available bytes to be read
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+console.log(stream.bytesAvailable); /* Displays the available bytes to be read */</pre>
 </div>
 </li>
 </ul>
@@ -2620,8 +2685,9 @@ Note that pending writes might not succeed.
       http://tizen.org/privilege/filesystem.read
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> stream.close(); // closes this stream, no subsequent access to stream allowed
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+stream.close(); /* Closes this stream, no subsequent access to stream allowed */
+</pre>
 </div>
 </dd>
 <dt class="method" id="FileStream::read">
@@ -2678,9 +2744,10 @@ The resulting string length might be shorter than <em>charCount </em>if EOF is <
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var text = stream.read(file.fileSize);
- stream.close();
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var text = stream.read(file.fileSize);
+stream.close();
+</pre>
 </div>
 </dd>
 <dt class="method" id="FileStream::readBytes">
@@ -2736,12 +2803,14 @@ The resulting string length might be shorter than <em>charCount </em>if EOF is <
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // reads up to 256 bytes from the stream
- var raw = stream.readBytes(256);
- for (var i = 0; i &lt; raw.length; i++) {
-   // raw[i] contains the i-th byte of the current data chunk
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Reads up to 256 bytes from the stream */
+var raw = stream.readBytes(256);
+for (var i = 0; i &lt; raw.length; i++)
+{
+&nbsp;&nbsp;&nbsp;/* raw[i] contains the i-th byte of the current data chunk */
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="FileStream::readBase64">
@@ -2797,9 +2866,10 @@ The resulting string length might be shorter than <em>charCount </em>if EOF is <
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // reads up to 256 bytes from the stream
- var base64 = stream.readBase64(256);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Reads up to 256 bytes from the stream */
+var base64 = stream.readBase64(256);
+</pre>
 </div>
 </dd>
 <dt class="method" id="FileStream::write">
@@ -2848,9 +2918,10 @@ The resulting string length might be shorter than <em>charCount </em>if EOF is <
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var text = "Hello world";
- stream.write(text);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var text = "Hello world";
+stream.write(text);
+</pre>
 </div>
 </dd>
 <dt class="method" id="FileStream::writeBytes">
@@ -2900,10 +2971,11 @@ is not compatible with the expected type for that parameter.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var bytes = in.readBytes(256);
- // writes the bytes read from in to out
- out.writeBytes(bytes);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var bytes = in.readBytes(256);
+/* Writes the bytes read from in to out */
+out.writeBytes(bytes);
+</pre>
 </div>
 </dd>
 <dt class="method" id="FileStream::writeBase64">
@@ -2953,10 +3025,11 @@ is not compatible with the expected type for that parameter.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var base64 = in.readBase64(256);
- // writes the base64 data read from in to out
- out.writeBase64(base64);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var base64 = in.readBase64(256);
+/* Writes the base64 data read from in to out */
+out.writeBase64(base64);
+</pre>
 </div>
 </dd>
 </dl>
index ed19888..67322fd 100644 (file)
@@ -219,14 +219,16 @@ Warning: http://tizen.org/privilege/keymanager (public level privilege) MUST NOT
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var data_name = "data1", raw_data = "my data";
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var data_name = "data1", raw_data = "my data";
 
- function onSave() {
-     console.log("Successfully saved data");
- }
+function onSave()
+{
+&nbsp;&nbsp;&nbsp;console.log("Successfully saved data");
+}
 
- tizen.keymanager.saveData(data_name, raw_data, null, onSave);
- </pre>
+tizen.keymanager.saveData(data_name, raw_data, null, onSave);
+</pre>
 </div>
 </dd>
 <dt class="method" id="KeyManager::removeData">
@@ -280,31 +282,36 @@ Warning: http://tizen.org/privilege/keymanager (public level privilege) MUST NOT
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var data_name = "data1", raw_data = "my data";
-
- function onSave() {
-
-     // do something
-
-     // Dictionary does not require package ID because the
-     // application which is calling removeData() saved "data1"
-     tizen.keymanager.removeData({
-         "name": data_name
-     });
- }
-
- tizen.keymanager.saveData(data_name, raw_data, null, onSave);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var data_name = "data1", raw_data = "my data";
+
+function onSave()
+{
+&nbsp;&nbsp;&nbsp;/* Do something */
+
+&nbsp;&nbsp;&nbsp;/*
+&nbsp;&nbsp;&nbsp;   Dictionary does not require package ID because the
+&nbsp;&nbsp;&nbsp;   application which is calling removeData() saved "data1"
+&nbsp;&nbsp;&nbsp;*/
+&nbsp;&nbsp;&nbsp;tizen.keymanager.removeData({"name": data_name});
+}
+
+tizen.keymanager.saveData(data_name, raw_data, null, onSave);
+</pre>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var aliases = tizen.keymanager.getDataAliasList();
-
- if (aliases.length != 0) {
-     // Assuming the application calling removeData() has permission
-     // to remove aliases[0]
-     var app_data = tizen.keymanager.removeData(aliases[0]);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var aliases = tizen.keymanager.getDataAliasList();
+
+if (aliases.length != 0)
+{
+&nbsp;&nbsp;&nbsp;/*
+&nbsp;&nbsp;&nbsp;   Assuming the application calling removeData() has permission
+&nbsp;&nbsp;&nbsp;   to remove aliases[0]
+&nbsp;&nbsp;&nbsp;*/
+&nbsp;&nbsp;&nbsp;var app_data = tizen.keymanager.removeData(aliases[0]);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="KeyManager::getData">
@@ -369,30 +376,36 @@ Warning: http://tizen.org/privilege/keymanager (public level privilege) MUST NOT
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var data_name = "data1", raw_data = "my data";
-
- function onSave() {
-     // Dictionary does not require package ID because the
-     // application which is calling getData() saved "data1"
-     var app_data = tizen.keymanager.getData({
-         "name": data_name
-     });
-     console.log("App data: " + app_data + " was retrieved");
- }
-
- tizen.keymanager.saveData(data_name, raw_data, null, onSave);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var data_name = "data1", raw_data = "my data";
+
+function onSave()
+{
+&nbsp;&nbsp;&nbsp;/*
+&nbsp;&nbsp;&nbsp;   Dictionary does not require package ID because the
+&nbsp;&nbsp;&nbsp;   application which is calling getData() saved "data1"
+&nbsp;&nbsp;&nbsp;*/
+&nbsp;&nbsp;&nbsp;var app_data = tizen.keymanager.getData({"name": data_name});
+&nbsp;&nbsp;&nbsp;console.log("App data: " + app_data + " was retrieved");
+}
+
+tizen.keymanager.saveData(data_name, raw_data, null, onSave);
+</pre>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var aliases = tizen.keymanager.getDataAliasList();
-
- if (aliases.length != 0) {
-     // Assuming the application calling getData() has permission to read
-     // aliases[0]
-     var app_data = tizen.keymanager.getData(aliases[0]);
-     console.log("App data: " + app_data + " was retrieved");
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var aliases = tizen.keymanager.getDataAliasList();
+
+if (aliases.length != 0)
+{
+&nbsp;&nbsp;&nbsp;/*
+&nbsp;&nbsp;&nbsp;   Assuming the application calling getData() has permission to read
+&nbsp;&nbsp;&nbsp;   aliases[0]
+&nbsp;&nbsp;&nbsp;*/
+&nbsp;&nbsp;&nbsp;var app_data = tizen.keymanager.getData(aliases[0]);
+&nbsp;&nbsp;&nbsp;console.log("App data: " + app_data + " was retrieved");
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="KeyManager::getDataAliasList">
@@ -425,14 +438,16 @@ Warning: http://tizen.org/privilege/keymanager (public level privilege) MUST NOT
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var aliases = tizen.keymanager.getDataAliasList();
-
- console.log("aliases: ");
- for (var i = 0; i &lt; aliases.length; i++) {
-     console.log("Package ID: " + aliases[i].packageId + ", Name: "
-             + aliases[i].name);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var aliases = tizen.keymanager.getDataAliasList();
+
+console.log("aliases: ");
+for (var i = 0; i &lt; aliases.length; i++)
+{
+&nbsp;&nbsp;&nbsp;console.log("Package ID: " + aliases[i].packageId + ", Name: "
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;+ aliases[i].name);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="KeyManager::setPermission">
@@ -500,41 +515,53 @@ Warning: http://tizen.org/privilege/keymanager (public level privilege) MUST NOT
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var data_name = "data1", raw_data = "my data";
-
- function onPermissionSet() {
-     console.log("Successfully set permssion");
- }
-
- function onSave() {
-     // Dictionary does not require package ID because an
-     // application can only set permission for data which it saved
-     tizen.keymanager.setPermission({
-         "name": data_name
-     }, "9PdoiICQ4c", "READ_REMOVE", onPermissionSet);
- }
-
- tizen.keymanager.saveData(data_name, raw_data, null, onSave);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var data_name = "data1", raw_data = "my data";
+
+function onPermissionSet()
+{
+&nbsp;&nbsp;&nbsp;console.log("Successfully set permission");
+}
+
+function onSave()
+{
+&nbsp;&nbsp;&nbsp;/*
+&nbsp;&nbsp;&nbsp;   Dictionary does not require package ID because an
+&nbsp;&nbsp;&nbsp;   application can only set permission for data which it saved
+&nbsp;&nbsp;&nbsp;*/
+&nbsp;&nbsp;&nbsp;tizen.keymanager.setPermission({"name": data_name}, "9PdoiICQ4c", "READ_REMOVE",
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;onPermissionSet);
+}
+
+tizen.keymanager.saveData(data_name, raw_data, null, onSave);
+</pre>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var aliases = tizen.keymanager.getDataAliasList();
-
- function onPermissionSet() {
-     console.log("Successfully set permssion");
- }
-
- if (aliases.length != 0) {
-     // Check that the application calling setPermission() saved aliases[0] into
-     // the KeyManager
-     if (aliases[0].packageId === tizen.package.getPackageInfo().id) {
-         tizen.keymanager.setPermission(aliases[0], "9PdoiICQ4c", "READ_REMOVE",
-                 onPermissionSet);
-     } else {
-         console.log("This application did not save aliases[0] into the KeyManager");
-     }
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var aliases = tizen.keymanager.getDataAliasList();
+
+function onPermissionSet()
+{
+&nbsp;&nbsp;&nbsp;console.log("Successfully set permssion");
+}
+
+if (aliases.length != 0)
+{
+&nbsp;&nbsp;&nbsp;/*
+&nbsp;&nbsp;&nbsp;   Check that the application calling setPermission() saved aliases[0] into
+&nbsp;&nbsp;&nbsp;   the KeyManager
+&nbsp;&nbsp;&nbsp;*/
+&nbsp;&nbsp;&nbsp;if (aliases[0].packageId === tizen.package.getPackageInfo().id)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tizen.keymanager.setPermission(aliases[0], "9PdoiICQ4c", "READ_REMOVE",
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;onPermissionSet);
+&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;else
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("This application did not save aliases[0] into the KeyManager");
+&nbsp;&nbsp;&nbsp;}
+}
+</pre>
 </div>
 </dd>
 </dl>
index 794587f..62d0df7 100644 (file)
@@ -239,9 +239,10 @@ The <em>tizen.messageport</em> object allows access to the functionality of the
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Requests the LocalMessagePort instance with the specified message port name
- var localMsgPort = tizen.messageport.requestLocalMessagePort('MessagePortA');
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Requests the LocalMessagePort instance with the specified message port name */
+var localMsgPort = tizen.messageport.requestLocalMessagePort('MessagePortA');
+</pre>
 </div>
 </dd>
 <dt class="method" id="MessagePortManager::requestTrustedLocalMessagePort">
@@ -291,9 +292,10 @@ Trusted local message port can communicate with applications that are signed wit
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Requests the LocalMessagePort instance with the specified message port name
- var localMsgPort = tizen.messageport.requestTrustedLocalMessagePort('MessagePortB');
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Requests the LocalMessagePort instance with the specified message port name */
+var localMsgPort = tizen.messageport.requestTrustedLocalMessagePort('MessagePortB');
+</pre>
 </div>
 </dd>
 <dt class="method" id="MessagePortManager::requestRemoteMessagePort">
@@ -344,9 +346,10 @@ If the message port name and application ID are the same, the platform returns t
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Requests the RemoteMessagePort instance with the specified message port name
- var remoteMsgPort = tizen.messageport.requestRemoteMessagePort('6xaeuflskd.App1', 'MessagePortA');
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Requests the RemoteMessagePort instance with the specified message port name */
+var remoteMsgPort = tizen.messageport.requestRemoteMessagePort('6xaeuflskd.App1', 'MessagePortA');
+</pre>
 </div>
 </dd>
 <dt class="method" id="MessagePortManager::requestTrustedRemoteMessagePort">
@@ -401,9 +404,10 @@ Trusted remote message port can communicate with applications that are signed wi
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Requests the RemoteMessagePort instance with the specified message port name.
- var remoteMsgPort = tizen.messageport.requestTrustedRemoteMessagePort('6xauflskd.App1', 'MessagePortB');
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Requests the RemoteMessagePort instance with the specified message port name */
+var remoteMsgPort = tizen.messageport.requestTrustedRemoteMessagePort('6xauflskd.App1', 'MessagePortB');
+</pre>
 </div>
 </dd>
 </dl>
@@ -498,13 +502,15 @@ Trusted remote message port can communicate with applications that are signed wi
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function onreceived(data, remoteMsgPort) {
-   console.log('Received data to \'' + remoteMsgPort.messagePortName + '\'');
- }
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function onreceived(data, remoteMsgPort)
+{
+&nbsp;&nbsp;&nbsp;console.log('Received data to \'' + remoteMsgPort.messagePortName + '\'');
+}
 
- var localMsgPort = tizen.messageport.requestLocalMessagePort('MessagePortA');
- var watchId = localMsgPort.addMessagePortListener(onreceived);
- </pre>
+var localMsgPort = tizen.messageport.requestLocalMessagePort('MessagePortA');
+var watchId = localMsgPort.addMessagePortListener(onreceived);
+</pre>
 </div>
 </dd>
 <dt class="method" id="LocalMessagePort::removeMessagePortListener">
@@ -548,11 +554,13 @@ Trusted remote message port can communicate with applications that are signed wi
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var localMsgPort = tizen.messageport.requestLocalMessagePort('MessagePortA');
- var watchId = localMsgPort.addMessagePortListener(onreceived);
- // Communication routines of your app...
- localMsgPort.removeMessagePortListener(watchId);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var localMsgPort = tizen.messageport.requestLocalMessagePort('MessagePortA');
+var watchId = localMsgPort.addMessagePortListener(onreceived);
+/* Communication routines of your app */
+
+localMsgPort.removeMessagePortListener(watchId);
+</pre>
 </div>
 </dd>
 </dl>
@@ -666,30 +674,34 @@ array must not be duplicated or empty.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Sends string message
- var localMsgPort = tizen.messageport.requestLocalMessagePort('MessagePortA');
- var remoteMsgPort = tizen.messageport.requestRemoteMessagePort('6xaeuflskd.App1', 'MessagePortB');
- localMsgPort.addMessagePortListener(function(items, remoteport) {
-   // ...
-   if(remoteport !== null) {
-     remoteport.sendMessage([{key:'RESULT', value:'OK'}]);
-   }
- });
- // stream - FileStream object
- var bytePockets = [], byteCount = 0, i = 0;
- while(byteCount  stream.bytesAvailable - 256) {
-   bytePockets[i] = stream.readBytes(256);
-   byteCount+=256;
-   i++;
- }
- bytePockets[i] = stream.readBytes(stream.bytesAvailable - byteCount);
-
- var messagePortPockets = [{key: "key1", value: "val1"},
-                        {key: "key2", value: ["val2", "val3", "val4"]},
-                        {key: "key3", value: bytePockets[0]},
-                        {key: "key4", value: bytePockets}];
- remoteMsgPort.sendMessage(messagePortPockets, localMsgPort);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Sends string message */
+var localMsgPort = tizen.messageport.requestLocalMessagePort('MessagePortA');
+var remoteMsgPort = tizen.messageport.requestRemoteMessagePort('6xaeuflskd.App1', 'MessagePortB');
+localMsgPort.addMessagePortListener(function(items, remoteport)
+{
+&nbsp;&nbsp;&nbsp;/* ... */
+&nbsp;&nbsp;&nbsp;if (remoteport !== null)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;remoteport.sendMessage([{key:'RESULT', value:'OK'}]);
+&nbsp;&nbsp;&nbsp;}
+});
+/* stream - FileStream object */
+var bytePockets = [], byteCount = 0, i = 0;
+while (byteCount &lt; stream.bytesAvailable - 256)
+{
+&nbsp;&nbsp;&nbsp;bytePockets[i] = stream.readBytes(256);
+&nbsp;&nbsp;&nbsp;byteCount+=256;
+&nbsp;&nbsp;&nbsp;i++;
+}
+bytePockets[i] = stream.readBytes(stream.bytesAvailable - byteCount);
+
+var messagePortPockets = [{key: "key1", value: "val1"},
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{key: "key2", value: ["val2", "val3", "val4"]},
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{key: "key3", value: bytePockets[0]},
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{key: "key4", value: bytePockets}];
+remoteMsgPort.sendMessage(messagePortPockets, localMsgPort);
+</pre>
 </div>
 </dd>
 </dl>
@@ -765,14 +777,16 @@ array must not be duplicated or empty.
         </ul>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // MessagePortCallback instance
- function onreceived(data, remoteMsgPort) {
-   console.log('Received data to \'' + remoteMsgPort.messagePortName + '\'');
- }
-
- var localMsgPort = tizen.messageport.requestLocalMessagePort('MessagePortA');
- var watchId = localMsgPort.addMessagePortListener(onreceived);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* MessagePortCallback instance */
+function onreceived(data, remoteMsgPort)
+{
+&nbsp;&nbsp;&nbsp;console.log('Received data to \'' + remoteMsgPort.messagePortName + '\'');
+}
+
+var localMsgPort = tizen.messageport.requestLocalMessagePort('MessagePortA');
+var watchId = localMsgPort.addMessagePortListener(onreceived);
+</pre>
 </div>
 </dd>
 </dl>
index 17b4866..3f9434b 100644 (file)
@@ -232,31 +232,34 @@ UnknownError - If it is not allowed to install the package by the platform or an
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var onInstallation = {
-      onprogress: function(packageId, percentage) {
-         console.log("On installation(" + packageId + ") : progress(" + percentage + ")");
-      },
-      oncomplete: function(packageId) {
-         console.log("Installation(" + packageId + ") Complete");
-      }
- }
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var onInstallation =
+{
+&nbsp;&nbsp;&nbsp;onprogress: function(packageId, percentage)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("On installation(" + packageId + "): progress(" + percentage + ")");
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;oncomplete: function(packageId)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Installation(" + packageId + ") Complete");
+&nbsp;&nbsp;&nbsp;}
+}
 
- var onError = function (err) {
-      console.log("Error occurred on installation : " + err.name);
- }
+var onError = function(err)
+{
+&nbsp;&nbsp;&nbsp;console.log("Error occurred on installation: " + err.name);
+}
 
- // Let's assume that the "test.wgt" file exists in the downloads directory
- tizen.filesystem.resolve("downloads/test.wgt",
-     function (file) {
-         console.log("file URI : " + file.toURI());
-         tizen.package.install(file.toURI(), onInstallation, onError);
-     },
-     function (err) {
-         console.log("Error occurred on resolve : " + err.name);
-     },
-     "r");
-
- </pre>
+/* Let's assume that the "test.wgt" file exists in the downloads directory */
+tizen.filesystem.resolve("downloads/test.wgt", function(file)
+{
+&nbsp;&nbsp;&nbsp;console.log("file URI: " + file.toURI());
+&nbsp;&nbsp;&nbsp;tizen.package.install(file.toURI(), onInstallation, onError);
+}, function(err)
+{
+&nbsp;&nbsp;&nbsp;console.log("Error occurred on resolve: " + err.name);
+}, "r");
+</pre>
 </div>
 </dd>
 <dt class="method" id="PackageManager::uninstall">
@@ -327,22 +330,27 @@ UnknownError - If it is not allowed to uninstall the package from the platform o
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var onUninstallation = {
-      onprogress: function(packageId, percentage) {
-         console.log("On Uninstallation(" + packageId + ") : progress(" + percentage + ")");
-      },
-      oncomplete: function(packageId) {
-         console.log("Uninstallation(" + packageId + ") Complete");
-      }
- };
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var onUninstallation =
+{
+&nbsp;&nbsp;&nbsp;onprogress: function(packageId, percentage)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("On Uninstallation(" + packageId + "): progress(" + percentage + ")");
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;oncomplete: function(packageId)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Uninstallation(" + packageId + ") Complete");
+&nbsp;&nbsp;&nbsp;}
+};
 
- var onError = function (err) {
-      console.log("Error occurred on installation : " + err.name);
- };
+var onError = function(err)
+{
+&nbsp;&nbsp;&nbsp;console.log("Error occurred on installation: " + err.name);
+};
 
- // Let's assume that the package ID to uninstall is "testapp001"
- tizen.package.uninstall("testapp001", onUninstallation, onError);
- </pre>
+/* Let's assume that the package ID to uninstall is "testapp001" */
+tizen.package.uninstall("testapp001", onUninstallation, onError);
+</pre>
 </div>
 </dd>
 <dt class="method" id="PackageManager::getPackagesInfo">
@@ -404,16 +412,20 @@ UnknownError - If any other platform error occurs.              </li>
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function onListInstalledPackages(packages) {
-     for (var i = 0; i &lt; packages.length; i++) {
-         console.log("Package id["+i+"] : " +packages[i].id);
-     }
- }
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function onListInstalledPackages(packages)
+{
+&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; packages.length; i++)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Package id[" + i + "]: " + packages[i].id);
+&nbsp;&nbsp;&nbsp;}
+}
 
- tizen.package.getPackagesInfo(
-     onListInstalledPackages,
-     function (err) {console.log("Can't obtain packages list" + err.name);});
- </pre>
+tizen.package.getPackagesInfo(onListInstalledPackages, function(err)
+{
+&nbsp;&nbsp;&nbsp;console.log("Can't obtain packages list" + err.name);
+});
+</pre>
 </div>
 </dd>
 <dt class="method" id="PackageManager::getPackageInfo">
@@ -475,10 +487,11 @@ The list of installed packages and their package IDs is obtained using <em>getPa
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var packageInfo = tizen.package.getPackageInfo(null);
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var packageInfo = tizen.package.getPackageInfo(null);
 
- console.log("Current Package ID : " + packageInfo.id);
- </pre>
+console.log("Current Package ID: " + packageInfo.id);
+</pre>
 </div>
 </dd>
 <dt class="method" id="PackageManager::setPackageInfoEventListener">
@@ -535,20 +548,25 @@ The callback lasts until the <em>unsetPackageInfoEventListener()</em> method is
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var packageEventCallback = {
-    oninstalled: function(packageInfo) {
-       console.log('The package ' + packageInfo.name + ' is installed');
-    },
-    onupdated: function(packageInfo) {
-       console.log('The package ' + packageInfo.name + ' is updated');
-    },
-    onuninstalled: function(packageId) {
-       console.log('The package ' + packageId + ' is uninstalled');
-    }
- };
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var packageEventCallback =
+{
+&nbsp;&nbsp;&nbsp;oninstalled: function(packageInfo)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('The package ' + packageInfo.name + ' is installed');
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;onupdated: function(packageInfo)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('The package ' + packageInfo.name + ' is updated');
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;onuninstalled: function(packageId)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('The package ' + packageId + ' is uninstalled');
+&nbsp;&nbsp;&nbsp;}
+};
 
- tizen.package.setPackageInfoEventListener(packageEventCallback);
- </pre>
+tizen.package.setPackageInfoEventListener(packageEventCallback);
+</pre>
 </div>
 </dd>
 <dt class="method" id="PackageManager::unsetPackageInfoEventListener">
@@ -585,8 +603,9 @@ The callback lasts until the <em>unsetPackageInfoEventListener()</em> method is
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> tizen.package.unsetPackageInfoEventListener();
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+tizen.package.unsetPackageInfoEventListener();
+</pre>
 </div>
 </dd>
 </dl>
index c051247..6ee4b08 100644 (file)
@@ -666,9 +666,10 @@ and for subscribing notifications of system information changes.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // To get total amount of system memory
- console.log("The total memory size is " + tizen.systeminfo.getTotalMemory() + " bytes.");
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* To get total amount of system memory */
+console.log("The total memory size is " + tizen.systeminfo.getTotalMemory() + " bytes.");
+</pre>
 </div>
 </dd>
 <dt class="method" id="SystemInfo::getAvailableMemory">
@@ -692,9 +693,10 @@ and for subscribing notifications of system information changes.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // To get total amount of system memory
- console.log("The available memory size is " + tizen.systeminfo.getAvailableMemory() + " bytes.");
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* To get total amount of system memory */
+console.log("The available memory size is " + tizen.systeminfo.getAvailableMemory() + " bytes.");
+</pre>
 </div>
 </dd>
 <dt class="deprecated method" id="SystemInfo::getCapabilities">
@@ -726,12 +728,14 @@ The function must synchronously acquire the capabilities of the device.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var deviceCapabilities;
- deviceCapabilities = tizen.systeminfo.getCapabilities();
- if (deviceCapabilities.bluetooth) {
-     console.log("Bluetooth is supported");
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var deviceCapabilities;
+deviceCapabilities = tizen.systeminfo.getCapabilities();
+if (deviceCapabilities.bluetooth)
+{
+&nbsp;&nbsp;&nbsp;console.log("Bluetooth is supported");
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="SystemInfo::getCapability">
@@ -774,14 +778,18 @@ The additional keys for the custom device capability are specified by OEM's and
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> try {
-     // Checks if a device supports bluetooth API or not
-     var bluetooth = tizen.systeminfo.getCapability("http://tizen.org/feature/network.bluetooth");
-     console.log(" Bluetooth = " + bluetooth);
- } catch (error) {
-     console.log("Error name: " + error.name + ", message: " + error.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+try
+{
+&nbsp;&nbsp;&nbsp;/* Checks if a device supports bluetooth API */
+&nbsp;&nbsp;&nbsp;var bluetooth = tizen.systeminfo.getCapability("http://tizen.org/feature/network.bluetooth");
+&nbsp;&nbsp;&nbsp;console.log(" Bluetooth = " + bluetooth);
+}
+catch (error)
+{
+&nbsp;&nbsp;&nbsp;console.log("Error name: " + error.name + ", message: " + error.message);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="SystemInfo::getCount">
@@ -823,13 +831,17 @@ That is the length of array retrieved by the getPropertyValueArray() method for
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var count = tizen.systeminfo.getCount("SIM");
- if (count === 0) {
-     console.log("There is no available SIM card.");
- } else {
-     console.log("There is(are) " + count + " SIM card(s) available.");
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var count = tizen.systeminfo.getCount("SIM");
+if (count === 0)
+{
+&nbsp;&nbsp;&nbsp;console.log("There is no available SIM card.");
+}
+else
+{
+&nbsp;&nbsp;&nbsp;console.log("There is(are) " + count + " SIM card(s) available.");
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="SystemInfo::getPropertyValue">
@@ -903,36 +915,45 @@ NotSupportedError - If the given <var>property</var> is not supported. (since Ti
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function onSuccessCallback(cpu) {
-     console.log("The cpu load is " + cpu.load);
- }
-
- function onErrorCallback(error) {
-     console.log("An error occurred " + error.message);
- }
-
- tizen.systeminfo.getPropertyValue("CPU", onSuccessCallback, onErrorCallback);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function onSuccessCallback(cpu)
+{
+&nbsp;&nbsp;&nbsp;console.log("The cpu load is " + cpu.load);
+}
+
+function onErrorCallback(error)
+{
+&nbsp;&nbsp;&nbsp;console.log("An error occurred " + error.message);
+}
+
+tizen.systeminfo.getPropertyValue("CPU", onSuccessCallback, onErrorCallback);
+</pre>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function onSuccessCallback(cellular) {
-     console.log("The status of the cellular network is " + cellular.status);
- }
-
- function onErrorCallback(error) {
-     console.log("An error occurred " + error.message);
-     // if telephony_capability is false but getPropertyValue("CELLULAR_NETWORK, ..) is called, NotSupportedError would be passed.
- }
-
- var telephony_capability = tizen.systeminfo.getCapability("http://tizen.org/feature/network.telephony");
-
- if (telephony_capability === true) {
-     // onSuccessCallback will be invoked.
-     tizen.systeminfo.getPropertyValue("CELLULAR_NETWORK", onSuccessCallback, onErrorCallback);
- } else {
-     console.log("Telephony feature is not supported. Cellular network related information cannot be retrieved.");
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function onSuccessCallback(cellular)
+{
+&nbsp;&nbsp;&nbsp;console.log("The status of the cellular network is " + cellular.status);
+}
+
+function onErrorCallback(error)
+{
+&nbsp;&nbsp;&nbsp;console.log("An error occurred " + error.message);
+&nbsp;&nbsp;&nbsp;/* If telephony_capability is false but getPropertyValue("CELLULAR_NETWORK, ..) is called, NotSupportedError is passed */
+}
+
+var telephony_capability = tizen.systeminfo.getCapability("http://tizen.org/feature/network.telephony");
+
+if (telephony_capability === true)
+{
+&nbsp;&nbsp;&nbsp;/* onSuccessCallback will be invoked */
+&nbsp;&nbsp;&nbsp;tizen.systeminfo.getPropertyValue("CELLULAR_NETWORK", onSuccessCallback, onErrorCallback);
+}
+else
+{
+&nbsp;&nbsp;&nbsp;console.log("Telephony feature is not supported. Cellular network related information cannot be retrieved.");
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="SystemInfo::getPropertyValueArray">
@@ -1002,26 +1023,35 @@ NotSupportedError - If the given <var>property</var> is not supported.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function successCB(property) {
-     console.log("The SIM's current state is " + property.state);
- }
-
- function successArrayCB(properties) {
-     console.log("The number of the returned system properties is " + properties.length);
-     for (var i = 0; i &lt; properties.length; i++) {
-         console.log("[" + i + "] SIM's state is " + properties[i].state);
-     }
- }
-
- var count = tizen.systeminfo.getCount("SIM");
- if (count === 0) {
-     console.log("This device does not provide SIM card.");
- } else if (count &gt; 1) {
-     tizen.systeminfo.getPropertyValueArray("SIM", successArrayCB);
- } else {
-     tizen.systeminfo.getPropertyValue("SIM", successCB);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function successCB(property)
+{
+&nbsp;&nbsp;&nbsp;console.log("The SIM's current state is " + property.state);
+}
+
+function successArrayCB(properties)
+{
+&nbsp;&nbsp;&nbsp;console.log("The number of the returned system properties is " + properties.length);
+&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; properties.length; i++)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("[" + i + "] SIM's state is " + properties[i].state);
+&nbsp;&nbsp;&nbsp;}
+}
+
+var count = tizen.systeminfo.getCount("SIM");
+if (count === 0)
+{
+&nbsp;&nbsp;&nbsp;console.log("This device does not provide SIM card.");
+}
+else if (count &gt; 1)
+{
+&nbsp;&nbsp;&nbsp;tizen.systeminfo.getPropertyValueArray("SIM", successArrayCB);
+}
+else
+{
+&nbsp;&nbsp;&nbsp;tizen.systeminfo.getPropertyValue("SIM", successCB);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="SystemInfo::addPropertyValueChangeListener">
@@ -1120,12 +1150,14 @@ NotSupportedError - If the given <var>property</var> is not supported. (since Ti
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function onSuccessCallback(cpu) {
-     console.log("The cpu load : " + cpu.load);
- }
-
- tizen.systeminfo.addPropertyValueChangeListener("CPU", onSuccessCallback, {lowThreshold : 0.2});
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function onSuccessCallback(cpu)
+{
+&nbsp;&nbsp;&nbsp;console.log("The cpu load: " + cpu.load);
+}
+
+tizen.systeminfo.addPropertyValueChangeListener("CPU", onSuccessCallback, {lowThreshold: 0.2});
+</pre>
 </div>
 </dd>
 <dt class="method" id="SystemInfo::addPropertyValueArrayChangeListener">
@@ -1253,16 +1285,20 @@ parameters contain an invalid value.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var id = null;
- function onSuccessCallback(cpu) {
-    console.log("New value for CPU load is " + cpu.load);
-    if (id != null) { // After receiving the first notification, we clear it
-        tizen.systeminfo.removePropertyValueChangeListener(id);
-    }
- }
-
- id = tizen.systeminfo.addPropertyValueChangeListener("CPU", onSuccessCallback);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var id = null;
+function onSuccessCallback(cpu)
+{
+&nbsp;&nbsp;&nbsp;console.log("New value for CPU load is " + cpu.load);
+&nbsp;&nbsp;&nbsp;if (id != null)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* After receiving the first notification, clear it */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tizen.systeminfo.removePropertyValueChangeListener(id);
+&nbsp;&nbsp;&nbsp;}
+}
+
+id = tizen.systeminfo.addPropertyValueChangeListener("CPU", onSuccessCallback);
+</pre>
 </div>
 </dd>
 </dl>
@@ -3839,15 +3875,15 @@ If the source is "HDMI 2", the <em>number</em> is 2.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> tizen.systeminfo.getPropertyValue("CAMERA_FLASH",
-    function (flash) {
-        console.log("Flash brightness is set to: " + (flash.brightness * 100).toFixed(0) + "%");
-    },
-    function (error) {
-        console.log("Error, name: " + error.name + ", message: " + error.message);
-    }
- );
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+tizen.systeminfo.getPropertyValue("CAMERA_FLASH", function(flash)
+{
+&nbsp;&nbsp;&nbsp;console.log("Flash brightness is set to: " + (flash.brightness * 100).toFixed(0) + "%");
+}, function(error)
+{
+&nbsp;&nbsp;&nbsp;console.log("Error, name: " + error.name + ", message: " + error.message);
+});
+</pre>
 </div>
 </li>
 <li class="attribute" id="SystemInfoCameraFlash::camera">
@@ -3958,19 +3994,22 @@ If the specified brightness value is not supported by the device, the brightness
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> tizen.systeminfo.getPropertyValue("CAMERA_FLASH",
-    function (flash) {
-        try {
-            flash.setBrightness(1);
-        } catch (error) {
-            console.log("Setting flash brightness failed: " + error.message);
-        }
-    },
-    function (error) {
-        console.log("Error, name: " + error.name + ", message: " + error.message);
-    }
- );
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+tizen.systeminfo.getPropertyValue("CAMERA_FLASH", function(flash)
+{
+&nbsp;&nbsp;&nbsp;try
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;flash.setBrightness(1);
+&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;catch (error)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Setting flash brightness failed: " + error.message);
+&nbsp;&nbsp;&nbsp;}
+}, function(error)
+{
+&nbsp;&nbsp;&nbsp;console.log("Error, name: " + error.name + ", message: " + error.message);
+});
+</pre>
 </div>
 </dd>
 </dl>
index e1b30cc..2a00539 100644 (file)
@@ -286,9 +286,10 @@ Get timezones using getLocalTimezone() and getAvailableTimezones().            <
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var current_dt = tizen.time.getCurrentDateTime();
- console.log("current date/time is " + current_dt.toLocaleString());
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var current_dt = tizen.time.getCurrentDateTime();
+console.log("current date/time is " + current_dt.toLocaleString());
+</pre>
 </div>
 </dd>
 <dt class="method" id="TimeUtil::getLocalTimezone">
@@ -316,8 +317,9 @@ Get timezones using getLocalTimezone() and getAvailableTimezones().            <
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> console.log("The local time zone is " + tizen.time.getLocalTimezone());
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+console.log("The local time zone is " + tizen.time.getLocalTimezone());
+</pre>
 </div>
 </dd>
 <dt class="method" id="TimeUtil::getAvailableTimezones">
@@ -352,9 +354,10 @@ with the most general descriptor first and the most specific one last. For examp
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var tzids = tizen.time.getAvailableTimezones();
- console.log("The device supports " + tzids.length + " time zones.");
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var tzids = tizen.time.getAvailableTimezones();
+console.log("The device supports " + tzids.length + " time zones.");
+</pre>
 </div>
 </dd>
 <dt class="method" id="TimeUtil::getDateFormat">
@@ -499,12 +502,14 @@ parameters contain an invalid value.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var current_dt = tizen.time.getCurrentDateTime();
- var is_leap = tizen.time.isLeapYear(current_dt.getFullYear());
- if (is_leap) {
-   console.log("This year is a leap year.");
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var current_dt = tizen.time.getCurrentDateTime();
+var is_leap = tizen.time.isLeapYear(current_dt.getFullYear());
+if (is_leap)
+{
+&nbsp;&nbsp;&nbsp;console.log("This year is a leap year.");
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="TimeUtil::setDateTimeChangeListener">
@@ -546,19 +551,22 @@ Listener set with <em>setTimezoneChangeListener()</em> method is called when dev
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var changedCallback = function() {
-     try {
-         var current_dt = tizen.time.getCurrentDateTime();
-         console.log("current date/time is " + current_dt.toLocaleString());
-
-     } catch (err) {
-         console.log (err.name + ": " + err.message);
-     }
- };
-
- tizen.time.setDateTimeChangeListener(changedCallback);
-
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var changedCallback = function()
+{
+&nbsp;&nbsp;&nbsp;try
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var current_dt = tizen.time.getCurrentDateTime();
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("current date/time is " + current_dt.toLocaleString());
+&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;catch (err)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+&nbsp;&nbsp;&nbsp;}
+};
+
+tizen.time.setDateTimeChangeListener(changedCallback);
+</pre>
 </div>
 </dd>
 <dt class="method" id="TimeUtil::unsetDateTimeChangeListener">
@@ -582,19 +590,23 @@ Listener set with <em>setTimezoneChangeListener()</em> method is called when dev
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var changedCallback = function() {
-     try {
-         var current_dt = tizen.time.getCurrentDateTime();
-         console.log("current date/time is " + current_dt.toLocaleString());
-         tizen.time.unsetDateTimeChangeListener();
-     } catch (err) {
-         console.log (err.name + ": " + err.message);
-     }
- };
-
- tizen.time.setDateTimeChangeListener(changedCallback);
-
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var changedCallback = function()
+{
+&nbsp;&nbsp;&nbsp;try
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var current_dt = tizen.time.getCurrentDateTime();
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("current date/time is " + current_dt.toLocaleString());
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tizen.time.unsetDateTimeChangeListener();
+&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;catch (err)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+&nbsp;&nbsp;&nbsp;}
+};
+
+tizen.time.setDateTimeChangeListener(changedCallback);
+</pre>
 </div>
 </dd>
 <dt class="method" id="TimeUtil::setTimezoneChangeListener">
@@ -638,19 +650,23 @@ is not compatible with the expected type for that parameter.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var changedCallback = function() {
-     try {
-         // The new time zone can be retrieved through tizen.time.getLocalTimezone()
-         var zone = tizen.time.getLocalTimezone();
-         console.log("current time zone is " + zone);
-     } catch (err) {
-         console.log (err.name + ": " + err.message);
-     }
- };
-
- tizen.time.setTimezoneChangeListener(changedCallback);
-
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var changedCallback = function()
+{
+&nbsp;&nbsp;&nbsp;try
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* New time zone can be retrieved through tizen.time.getLocalTimezone() */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var zone = tizen.time.getLocalTimezone();
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("current time zone is " + zone);
+&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;catch (err)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+&nbsp;&nbsp;&nbsp;}
+};
+
+tizen.time.setTimezoneChangeListener(changedCallback);
+</pre>
 </div>
 </dd>
 <dt class="method" id="TimeUtil::unsetTimezoneChangeListener">
@@ -674,18 +690,23 @@ is not compatible with the expected type for that parameter.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var changedCallback = function() {
-     try {
-         var zone = tizen.time.getLocalTimezone();
-         console.log("current time zone is " + zone);
-         tizen.time.unsetTimezoneChangeListener();
-     } catch (err) {
-         console.log (err.name + ": " + err.message);
-     }
- };
-
- tizen.time.setTimezoneChangeListener(changedCallback);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var changedCallback = function()
+{
+&nbsp;&nbsp;&nbsp;try
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var zone = tizen.time.getLocalTimezone();
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("current time zone is " + zone);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tizen.time.unsetTimezoneChangeListener();
+&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;catch (err)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+&nbsp;&nbsp;&nbsp;}
+};
+
+tizen.time.setTimezoneChangeListener(changedCallback);
+</pre>
 </div>
 </dd>
 </dl>
@@ -1882,9 +1903,10 @@ is not compatible with the expected type for that parameter.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var now = tizen.time.getCurrentDateTime();
- var in_one_week = now.addDuration(new tizen.TimeDuration(7, "DAYS"));
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var now = tizen.time.getCurrentDateTime();
+var in_one_week = now.addDuration(new tizen.TimeDuration(7, "DAYS"));
+</pre>
 </div>
 </dd>
 <dt class="method" id="TZDate::toLocaleDateString">
@@ -2060,11 +2082,12 @@ savings if it is in the timezone. For example, if time zone is GMT+8, it will re
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var offset = tizen.time.getCurrentDateTime().secondsFromUTC();
- var myDate = new Date();
- var exp_offset = myDate.getTimezoneOffset()*60;
- //offset is equals to exp_offset.
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var offset = tizen.time.getCurrentDateTime().secondsFromUTC();
+var myDate = new Date();
+var exp_offset = myDate.getTimezoneOffset() * 60;
+/* offset is equal to exp_offset */
+</pre>
 </div>
 </dd>
 <dt class="method" id="TZDate::isDST">
@@ -2176,9 +2199,10 @@ identified by the TZDate object.
  1.0
           </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var now = tizen.time.getCurrentDateTime();
- var tomorrow = now.addDuration(new tizen.TimeDuration(1, "DAYS")); // Becomes tomorrow, same time.
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var now = tizen.time.getCurrentDateTime();
+var tomorrow = now.addDuration(new tizen.TimeDuration(1, "DAYS")); /* Becomes tomorrow, same time */
+</pre>
 </div>
 <div class="constructors">
 <h4 id="TimeDuration::constructor">Constructors</h4>
@@ -2270,16 +2294,17 @@ is not compatible with the expected type for that parameter.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Assume that event1 and event2 are tizen.CalendarEvent objects.
- // Computes event1.duration - event2.duration
- var diff = event1.duration.difference(event2.duration);
- if (diff.length &gt; 0)
-   console.log("The event1 is longer than event2.");
- else if (diff.length == 0)
-   console.log("The duration of two events is same.");
- else
-   console.log("The event1 is shorter than the event2.");
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Assume that event1 and event2 are tizen.CalendarEvent objects */
+/* Computes event1.duration - event2.duration */
+var diff = event1.duration.difference(event2.duration);
+if (diff.length &gt; 0)
+&nbsp;&nbsp;&nbsp;console.log("The event1 is longer than event2.");
+else if (diff.length == 0)
+&nbsp;&nbsp;&nbsp;console.log("The duration of two events is same.");
+else
+&nbsp;&nbsp;&nbsp;console.log("The event1 is shorter than the event2.");
+</pre>
 </div>
 </dd>
 <dt class="method" id="TimeDuration::equalsTo">
@@ -2328,10 +2353,11 @@ is not compatible with the expected type for that parameter.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var d1 = new tizen.TimeDuration(60, "MINS"); // 60 minutes
- var d2 = new tizen.TimeDuration(1, "HOURS"); // 1 hour
- var ret = d1.equalsTo(d2); // Returns true
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var d1 = new tizen.TimeDuration(60, "MINS"); /* 60 minutes */
+var d2 = new tizen.TimeDuration(1, "HOURS"); /* 1 hour */
+var ret = d1.equalsTo(d2); /* Returns true */
+</pre>
 </div>
 </dd>
 <dt class="method" id="TimeDuration::lessThan">
@@ -2377,10 +2403,11 @@ This method takes the units into consideration when doing the comparison.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var d1 = new tizen.TimeDuration(1, "HOURS"); // 1 hour
- var d2 = new tizen.TimeDuration(120, "MINS"); // 120 minutes
- var ret = d1.lessThan(d2); // Returns true
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var d1 = new tizen.TimeDuration(1, "HOURS"); /* 1 hour */
+var d2 = new tizen.TimeDuration(120, "MINS"); /* 120 minutes */
+var ret = d1.lessThan(d2); /* Returns true */
+</pre>
 </div>
 </dd>
 <dt class="method" id="TimeDuration::greaterThan">
@@ -2427,10 +2454,11 @@ is not compatible with the expected type for that parameter.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var d1 = new tizen.TimeDuration(120, "MINS"); // 120 minutes
- var d2 = new tizen.TimeDuration(1, "HOURS"); // 1 hour
- var ret = d1.greaterThan(d2); // Returns true
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var d1 = new tizen.TimeDuration(120, "MINS"); /* 120 minutes */
+var d2 = new tizen.TimeDuration(1, "HOURS"); /* 1 hour */
+var ret = d1.greaterThan(d2); /* Returns true */
+</pre>
 </div>
 </dd>
 </dl>
index ce0facc..a3993a8 100644 (file)
@@ -297,21 +297,24 @@ the specified value.
           </p>
          </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // The following example retrieves all songs from the album "The Joshua Tree".
- var count = 100;
- var offset = 0;
- var albumFilter = new tizen.AttributeFilter("album", "EXACTLY", "The Joshua Tree");
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Following example retrieves all songs from the album "The Joshua Tree" */
+var count = 100;
+var offset = 0;
+var albumFilter = new tizen.AttributeFilter("album", "EXACTLY", "The Joshua Tree");
 
- function errorCB(err) {
-     console.log( 'The following error occurred: ' +  err.name);
- }
+function errorCB(err)
+{
+&nbsp;&nbsp;&nbsp;console.log('The following error occurred: ' +  err.name);
+}
 
- function findCB(contents) {
-     console.log('The Joshua Tree :' + contents.length);
- }
+function findCB(contents)
+{
+&nbsp;&nbsp;&nbsp;console.log('The Joshua Tree:' + contents.length);
+}
 
- tizen.content.find(findCB, errorCB, null, albumFilter, null, count, offset);
- </pre>
+tizen.content.find(findCB, errorCB, null, albumFilter, null, count, offset);
+</pre>
 </div>
         
       <div class="constructors">
@@ -400,25 +403,30 @@ Range filters, where only one boundary is set, are available.
           </p>
          </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var count = 100;
- var offset = 0;
- // Use the modifiedDate attribute with a range that starts today and ends in 1 day
- // (meaning that you search for all contents modified today)
- var today = new Date();
- var today_begin = new Date(today.getFullYear(), today.getMonth(),today.getDate());
- var today_end = new Date(today.getFullYear(), today.getMonth(),today.getDate()+1);
- var dateRangeFilter = new tizen.AttributeRangeFilter("modifiedDate", today_begin, today_end);
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var count = 100;
+var offset = 0;
+/*
+   Use the modifiedDate attribute with a range that starts today and ends in 1 day
+   (meaning that you search for all contents modified today)
+*/
+var today = new Date();
+var today_begin = new Date(today.getFullYear(), today.getMonth(), today.getDate());
+var today_end = new Date(today.getFullYear(), today.getMonth(), today.getDate()+1);
+var dateRangeFilter = new tizen.AttributeRangeFilter("modifiedDate", today_begin, today_end);
 
- function errorCB(err) {
-     console.log( 'The following error occurred: ' +  err.name);
- }
+function errorCB(err)
+{
+&nbsp;&nbsp;&nbsp;console.log('The following error occurred: ' +  err.name);
+}
 
- function findCB(contents) {
-     console.log('The contents modified today :' + contents.length);
- }
+function findCB(contents)
+{
+&nbsp;&nbsp;&nbsp;console.log('The contents modified today:' + contents.length);
+}
 
- tizen.content.find(findCB, errorCB, null, dateRangeFilter, null, count, offset);
- </pre>
+tizen.content.find(findCB, errorCB, null, dateRangeFilter, null, count, offset);
+</pre>
 </div>
         
       <div class="constructors">
@@ -506,23 +514,26 @@ The intersection - used to filter objects that match all the filters it includes
           </ul>
          </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // The following example retrieves all songs from the album "The Joshua Tree", by artist "U2".
- var count = 100;
- var offset = 0;
- var artistFilter = new tizen.AttributeFilter("artists", "EXACTLY", "U2");
- var albumFilter = new tizen.AttributeFilter("album", "EXACTLY", "The Joshua Tree");
- var filter = new tizen.CompositeFilter("INTERSECTION", [albumFilter, artistFilter]);
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Following example retrieves all songs from the album "The Joshua Tree", by artist "U2" */
+var count = 100;
+var offset = 0;
+var artistFilter = new tizen.AttributeFilter("artists", "EXACTLY", "U2");
+var albumFilter = new tizen.AttributeFilter("album", "EXACTLY", "The Joshua Tree");
+var filter = new tizen.CompositeFilter("INTERSECTION", [albumFilter, artistFilter]);
 
- function errorCB(err) {
-     console.log( 'The following error occurred: ' +  err.name);
- }
+function errorCB(err)
+{
+&nbsp;&nbsp;&nbsp;console.log('The following error occurred: ' +  err.name);
+}
 
- function findCB(contents) {
-     console.log('The Joshua Tree by U2:' + contents.length);
- }
+function findCB(contents)
+{
+&nbsp;&nbsp;&nbsp;console.log('The Joshua Tree by U2:' + contents.length);
+}
 
- tizen.content.find(findCB, errorCB, null, filter, null, count, offset);
- </pre>
+tizen.content.find(findCB, errorCB, null, filter, null, count, offset);
+</pre>
 </div>
         
       <div class="constructors">
@@ -575,34 +586,40 @@ Note that the sorting result of list type attributes is not determined.
           </p>
          </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // The following example retrieves all songs from the album "The Joshua Tree", by artist "U2", ordered by the track number.
- var count = 100;
- var offset = 0;
- var sortMode = new tizen.SortMode("trackNumber", "ASC");
- var artistFilter = new tizen.AttributeFilter("artists", "EXACTLY", "U2");
- var albumFilter = new tizen.AttributeFilter("album", "EXACTLY", "The Joshua Tree");
- var filter = new tizen.CompositeFilter("INTERSECTION", [albumFilter, artistFilter]);
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Following example retrieves all songs from the album "The Joshua Tree", by artist "U2", ordered by the track number */
+var count = 100;
+var offset = 0;
+var sortMode = new tizen.SortMode("trackNumber", "ASC");
+var artistFilter = new tizen.AttributeFilter("artists", "EXACTLY", "U2");
+var albumFilter = new tizen.AttributeFilter("album", "EXACTLY", "The Joshua Tree");
+var filter = new tizen.CompositeFilter("INTERSECTION", [albumFilter, artistFilter]);
 
- function errorCB(err) {
-     console.log( 'The following error occurred: ' +  err.name);
- }
+function errorCB(err)
+{
+&nbsp;&nbsp;&nbsp;console.log('The following error occurred: ' +  err.name);
+}
 
- function printContent(content, index, contents) {
-     console.log('Track: ' + content.trackNumber + ' Title: ' + content.title + 'Duration: ' + content.duration + 'URL: ' + content.contentURI + 'MIME: ' + content.mimeType);
- }
+function printContent(content, index, contents)
+{
+&nbsp;&nbsp;&nbsp;console.log('Track: ' + content.trackNumber + ' Title: ' + content.title + 'Duration: ' + content.duration + 
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'URL: ' + content.contentURI + 'MIME: ' + content.mimeType);
+}
 
- function findCB(contents) {
-     console.log('The Joshua Tree by U2:');
-     contents.forEach(printContent);
-     // Increase the offset as much as the count and then find content again.
-     if (contents.length == count) {
-         offset += count;
-         tizen.content.find(findCB, errorCB, null, filter, sortMode, count, offset);
-     }
- }
+function findCB(contents)
+{
+&nbsp;&nbsp;&nbsp;console.log('The Joshua Tree by U2:');
+&nbsp;&nbsp;&nbsp;contents.forEach(printContent);
+&nbsp;&nbsp;&nbsp;/* Increase the offset as much as the count and then find content again */
+&nbsp;&nbsp;&nbsp;if (contents.length == count)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;offset += count;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tizen.content.find(findCB, errorCB, null, filter, sortMode, count, offset);
+&nbsp;&nbsp;&nbsp;}
+}
 
- tizen.content.find(findCB, errorCB, null, filter, sortMode, count, offset);
- </pre>
+tizen.content.find(findCB, errorCB, null, filter, sortMode, count, offset);
+</pre>
 </div>
 <div class="constructors">
 <h4 id="SortMode::constructor">Constructors</h4>
@@ -1163,11 +1180,13 @@ In case of successful execution of an asynchronous call, <em>SuccessCallback</em
           </p>
          </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">     function onSuccess() {
-         console.log("Application launched successfully");
-     }
-     tizen.application.launch('0pnxz8hbsr.MyFiles', onSuccess);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function onSuccess()
+{
+&nbsp;&nbsp;&nbsp;console.log("Application launched successfully");
+}
+tizen.application.launch('0pnxz8hbsr.MyFiles', onSuccess);
+</pre>
 </div>
 <div class="methods">
 <h4>Methods</h4>
@@ -1210,16 +1229,20 @@ it silently fails and there is no further action.
           </p>
          </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">  // Define the error callback.
-  function onerror(error) {
-    console.log(error.message);
-  }
-  function onsuccess() {
-      console.log("The application has launched successfully");
-  }
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Define the error callback */
+function onerror(error)
+{
+&nbsp;&nbsp;&nbsp;console.log(error.message);
+}
 
-  tizen.application.launch("targetApp0.main", onsuccess, onerror);
- </pre>
+function onsuccess()
+{
+&nbsp;&nbsp;&nbsp;console.log("The application has launched successfully");
+}
+
+tizen.application.launch("targetApp0.main", onsuccess, onerror);
+</pre>
 </div>
 <div class="methods">
 <h4>Methods</h4>
index 92573f4..686a72b 100644 (file)
@@ -279,14 +279,16 @@ are used, then mute is disabled.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Turn on the silent mode
- tizen.tvaudiocontrol.setMute(true);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Turn on the silent mode */
+tizen.tvaudiocontrol.setMute(true);
+</pre>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Turn off the silent mode
- tizen.tvaudiocontrol.setMute(false);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Turn off the silent mode */
+tizen.tvaudiocontrol.setMute(false);
+</pre>
 </div>
 </dd>
 <dt class="method" id="AudioControlManager::isMute">
@@ -327,33 +329,41 @@ are used, then mute is disabled.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Mute to turn off the sound
- tizen.tvaudiocontrol.setMute(true);
-
- // Check if it is mute or not
- if (tizen.tvaudiocontrol.isMute()) {
-     console.log("At this moment, the sound output of this device is turned off.");
- } else {
-     alert("It's not possible!");
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Mute to turn off the sound */
+tizen.tvaudiocontrol.setMute(true);
+
+/* Check if it is mute */
+if (tizen.tvaudiocontrol.isMute())
+{
+&nbsp;&nbsp;&nbsp;console.log("At this moment, the sound output of this device is turned off.");
+}
+else
+{
+&nbsp;&nbsp;&nbsp;alert("It's not possible!");
+}
+</pre>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Checks if increasing the volume makes the silent mode turned off.
-
- // Mute to turn off the sound
- tizen.tvaudiocontrol.setMute(true);
-
- // By increasing the volume level, the mute state is changed to be off.
- tizen.tvaudiocontrol.setVolumeUp();
-
- // Check if it is mute or not
- if (tizen.tvaudiocontrol.isMute()) {
-     alert("It's not possible! (API bug)");
- } else {
-     console.log("setVolumeUp() turns off the silent mode.");
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Checks if increasing the volume makes the silent mode turned off */
+
+/* Mute to turn off the sound */
+tizen.tvaudiocontrol.setMute(true);
+
+/* By increasing the volume level, the mute state is changed to be off */
+tizen.tvaudiocontrol.setVolumeUp();
+
+/* Check if it is mute */
+if (tizen.tvaudiocontrol.isMute())
+{
+&nbsp;&nbsp;&nbsp;alert("It's not possible! (API bug)");
+}
+else
+{
+&nbsp;&nbsp;&nbsp;console.log("setVolumeUp() turns off the silent mode.");
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="AudioControlManager::setVolume">
@@ -407,17 +417,22 @@ The value of <em>volume</em> is allowed from 0 to 100. If an invalid value is pa
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Sets the volume
- tizen.tvaudiocontrol.setVolume(10);
-
- try {
-     tizen.tvaudiocontrol.setVolume(-1);
- } catch (e) {
-     if (e.name === "InvalidValuesError") {
-         alert("The passed value value should be in the range of 0 to 100.");
-     }
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Sets the volume */
+tizen.tvaudiocontrol.setVolume(10);
+
+try
+{
+&nbsp;&nbsp;&nbsp;tizen.tvaudiocontrol.setVolume(-1);
+}
+catch (e)
+{
+&nbsp;&nbsp;&nbsp;if (e.name === "InvalidValuesError")
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;alert("The passed value value should be in the range of 0 to 100.");
+&nbsp;&nbsp;&nbsp;}
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="AudioControlManager::setVolumeUp">
@@ -457,21 +472,24 @@ then execution of this functions will disable it.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Sets the volume
- tizen.tvaudiocontrol.setVolume(99);
-
- tizen.tvaudiocontrol.setVolumeUp();
- // Check if the current volume is 100 or not.
- if (tizen.tvaudiocontrol.getVolume() === 100) {
-     alert("setVolumeUp() is successfully called.");
-  }
-
- tizen.tvaudiocontrol.setVolumeUp();
- // Check if the volume level has been changed or not at the maximum volume level.
- if (tizen.tvaudiocontrol.getVolume() === 100) {
-     alert("setVolumeUp() is successfully called.");
-  }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Sets the volume */
+tizen.tvaudiocontrol.setVolume(99);
+
+tizen.tvaudiocontrol.setVolumeUp();
+/* Check if the current volume is 100 */
+if (tizen.tvaudiocontrol.getVolume() === 100)
+{
+&nbsp;&nbsp;&nbsp;alert("setVolumeUp() is successfully called.");
+}
+
+tizen.tvaudiocontrol.setVolumeUp();
+/* Check if the volume level has been changed at the maximum volume level */
+if (tizen.tvaudiocontrol.getVolume() === 100)
+{
+&nbsp;&nbsp;&nbsp;alert("setVolumeUp() is successfully called.");
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="AudioControlManager::setVolumeDown">
@@ -515,21 +533,24 @@ then execution of this functions will disable it.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Sets the volume
- tizen.tvaudiocontrol.setVolume(1);
-
- tizen.tvaudiocontrol.setVolumeDown();
- // Check if the current volume is 0 or not.
- if (tizen.tvaudiocontrol.getVolume() === 0) {
-     alert("setVolumeDown() is successfully called.");
-  }
-
- tizen.tvaudiocontrol.setVolumeDown();
- // Check if the volume level has been changed or not at the minimum volume level.
- if (tizen.tvaudiocontrol.getVolume() === 0) {
-     alert("setVolumeDown() is successfully called.");
-  }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Sets the volume */
+tizen.tvaudiocontrol.setVolume(1);
+
+tizen.tvaudiocontrol.setVolumeDown();
+/* Check if the current volume is 0 */
+if (tizen.tvaudiocontrol.getVolume() === 0)
+{
+&nbsp;&nbsp;&nbsp;alert("setVolumeDown() is successfully called.");
+}
+
+tizen.tvaudiocontrol.setVolumeDown();
+/* Check if the volume level has been changed at the minimum volume level */
+if (tizen.tvaudiocontrol.getVolume() === 0)
+{
+&nbsp;&nbsp;&nbsp;alert("setVolumeDown() is successfully called.");
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="AudioControlManager::getVolume">
@@ -621,22 +642,27 @@ Note that this method overwrites the previously registered listener.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var expectedVolumeLevel = 50;
-
- function onVolumeChanged(volume) {
-     if (volume === expectedVolumeLevel) {
-          console.log("Succeeded! The volume level has been changed to "+ volume+". ");
-     } else {
-          alert("Failed. The volume level has been changed to "+ volume+" . We expect 50.");
-     }
- }
-
- tizen.tvaudiocontrol.setVolume(0);
-
- tizen.tvaudiocontrol.setVolumeChangeListener(onVolumeChanged);
-
- tizen.tvaudiocontrol.setVolume(expectedVolumeLevel);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var expectedVolumeLevel = 50;
+
+function onVolumeChanged(volume)
+{
+&nbsp;&nbsp;&nbsp;if (volume === expectedVolumeLevel)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Succeeded! The volume level has been changed to " + volume + ". ");
+&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;else
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;alert("Failed. The volume level has been changed to " + volume + ". We expect 50.");
+&nbsp;&nbsp;&nbsp;}
+}
+
+tizen.tvaudiocontrol.setVolume(0);
+
+tizen.tvaudiocontrol.setVolumeChangeListener(onVolumeChanged);
+
+tizen.tvaudiocontrol.setVolume(expectedVolumeLevel);
+</pre>
 </div>
 </dd>
 <dt class="method" id="AudioControlManager::unsetVolumeChangeListener">
@@ -673,19 +699,21 @@ Note that this method overwrites the previously registered listener.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var expectedVolumeLevel = 50;
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var expectedVolumeLevel = 50;
 
- function onVolumeChanged(volume) {
-     alert("This function must not be called.");
- }
+function onVolumeChanged(volume)
+{
+&nbsp;&nbsp;&nbsp;alert("This function must not be called.");
+}
 
- tizen.tvaudiocontrol.setVolume(0);
+tizen.tvaudiocontrol.setVolume(0);
 
- tizen.tvaudiocontrol.setVolumeChangeListener(onVolumeChanged);
- tizen.tvaudiocontrol.unsetVolumeChangeListener();
+tizen.tvaudiocontrol.setVolumeChangeListener(onVolumeChanged);
+tizen.tvaudiocontrol.unsetVolumeChangeListener();
 
- tizen.tvaudiocontrol.setVolume(expectedVolumeLevel);
- </pre>
+tizen.tvaudiocontrol.setVolume(expectedVolumeLevel);
+</pre>
 </div>
 </dd>
 <dt class="method" id="AudioControlManager::getOutputMode">
index a2afd66..a54965e 100644 (file)
@@ -396,39 +396,53 @@ The <em>ErrorCallback</em> will be launched in the following situations:
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var tuneCB = {
-    onsuccess: function() {
-        console.log("Tune() is successfully done. And there is a signal.");
-    }
-    onnosignal: function() {
-        console.log("Tune() is successfully done. But there is no signal.");
-    }
- };
-
- function channelCB(channels) {
-     console.log("getting channels is successful. " + channels.length + " channels are retreived.");
-     if (channels.length === 0 ) {
-         console.log("There is no found channel.");
-         return;
-     }
-     try {
-         tizen.tvchannel.tune({major: channels[0].major}, tuneCB);
-     } catch(error) {
-         console.log("Error name = "+ error.name + ", Error message = " + error.message);
-     }
- }
-
- function errorCB(error) {
-     console.log("Error name = "+ error.name + ", Error message = " + error.message);
- }
-
- try {
-     // requests to get information about 10 channels.
-     tizen.tvchannel.getChannelList(channelCB, errorCB, "ALL", 0, 10);
- } catch (error) {
-     console.log("Error name = "+ error.name + ", Error message = " + error.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var tuneCB =
+{
+&nbsp;&nbsp;&nbsp;onsuccess: function()
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Tune() is successfully done. And there is a signal.");
+&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;onnosignal: function()
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Tune() is successfully done. But there is no signal.");
+&nbsp;&nbsp;&nbsp;}
+};
+
+function channelCB(channels)
+{
+&nbsp;&nbsp;&nbsp;console.log("getting channels is successful. " + channels.length + " channels are retrieved.");
+&nbsp;&nbsp;&nbsp;if (channels.length === 0)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("There is no found channel.");
+
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return;
+&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;try
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tizen.tvchannel.tune({major: channels[0].major}, tuneCB);
+&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;catch (error)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Error name = " + error.name + ", Error message = " + error.message);
+&nbsp;&nbsp;&nbsp;}
+}
+
+function errorCB(error)
+{
+&nbsp;&nbsp;&nbsp;console.log("Error name = " + error.name + ", Error message = " + error.message);
+}
+
+try
+{
+&nbsp;&nbsp;&nbsp;/* Requests to get information about 10 channels */
+&nbsp;&nbsp;&nbsp;tizen.tvchannel.getChannelList(channelCB, errorCB, "ALL", 0, 10);
+}
+catch (error)
+{
+&nbsp;&nbsp;&nbsp;console.log("Error name = " + error.name + ", Error message = " + error.message);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="ChannelManager::tuneUp">
@@ -503,21 +517,28 @@ The <em>ErrorCallback</em> will be launched in the following situations:
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var tuneCB = {
-    onsuccess: function() {
-        console.log("tuneUp() is successfully done. And there is a signal.");
-    }
-    onnosignal: function() {
-        console.log("tuneUp() is successfully done. But there is no signal.");
-    }
- };
-
- try {
-     tizen.tvchannel.tuneUp(tuneCB, null, "ALL");
- } catch (error) {
-     console.log("Error name = "+ error.name + ", Error message = " + error.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var tuneCB =
+{
+&nbsp;&nbsp;&nbsp;onsuccess: function()
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("tuneUp() is successfully done. And there is a signal.");
+&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;onnosignal: function()
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("tuneUp() is successfully done. But there is no signal.");
+&nbsp;&nbsp;&nbsp;}
+};
+
+try
+{
+&nbsp;&nbsp;&nbsp;tizen.tvchannel.tuneUp(tuneCB, null, "ALL");
+}
+catch (error)
+{
+&nbsp;&nbsp;&nbsp;console.log("Error name = " + error.name + ", Error message = " + error.message);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="ChannelManager::tuneDown">
@@ -592,22 +613,29 @@ The <em>ErrorCallback</em> will be launched in the following situations:
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var tuneCB = {
-    onsuccess: function() {
-        console.log("tuneDown() is successfully done. And there is a signal.");
-    }
-    onnosignal: function() {
-        console.log("tuneDown() is successfully done. But there is no signal.");
-    }
- };
-
- try {
-     // change the channel down according to 'ALL' navigation mode.
-     tizen.tvchannel.tuneDown(tuneCB);
- } catch (error) {
-     console.log("Error name = "+ error.name + ", Error message = " + error.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var tuneCB =
+{
+&nbsp;&nbsp;&nbsp;onsuccess: function()
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("tuneDown() is successfully done. And there is a signal.");
+&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;onnosignal: function()
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("tuneDown() is successfully done. But there is no signal.");
+&nbsp;&nbsp;&nbsp;}
+};
+
+try
+{
+&nbsp;&nbsp;&nbsp;/* Change the channel down according to 'ALL' navigation mode */
+&nbsp;&nbsp;&nbsp;tizen.tvchannel.tuneDown(tuneCB);
+}
+catch (error)
+{
+&nbsp;&nbsp;&nbsp;console.log("Error name = " + error.name + ", Error message = " + error.message);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="ChannelManager::findChannel">
@@ -677,24 +705,30 @@ The <em>ErrorCallback</em> will be launched in the following situations:
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function successCB(channels) {
-     console.log("findChannel() is successfully done. Totally " + channels.length + " channels are found.");
-     for (var i = 0; i &lt; channels.length; i++) {
-         console.log("----- Channel [" + i + "] -----");
-         console.log("Major channel = " + channels[i].major);
-         console.log("Minor channel = " + channels[i].minor);
-         console.log("Channel Name = " + channels[i].channelName);
-         console.log("Program Number = " + channels[i].programNumber);
-         // you can get other attributes provided in ChannelInfo
-     }
- }
-
- try {
-     tizen.tvchannel.findChannel(9, 0, successCB);
- } catch (error) {
-     console.log("Error name = "+ error.name + ", Error message = " + error.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function successCB(channels)
+{
+&nbsp;&nbsp;&nbsp;console.log("findChannel() is successfully done. Totally " + channels.length + " channels are found.");
+&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; channels.length; i++)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("----- Channel [" + i + "] -----");
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Major channel = " + channels[i].major);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Minor channel = " + channels[i].minor);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Channel Name = " + channels[i].channelName);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Program Number = " + channels[i].programNumber);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* You can get other attributes provided in ChannelInfo */
+&nbsp;&nbsp;&nbsp;}
+}
+
+try
+{
+&nbsp;&nbsp;&nbsp;tizen.tvchannel.findChannel(9, 0, successCB);
+}
+catch (error)
+{
+&nbsp;&nbsp;&nbsp;console.log("Error name = " + error.name + ", Error message = " + error.message);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="ChannelManager::getChannelList">
@@ -785,46 +819,58 @@ The <em>ErrorCallback</em> will be launched in the following situations:
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function successCB(channels) {
-     console.log("getChannelList() is successfully done. Totally " + channels.length + " channels are retrieved.");
-     for (var i = 0; i &lt; channels.length; i++) {
-         console.log("----- Channel [" + i + "] -----");
-         console.log("Major channel = " + channels[i].major);
-         console.log("Minor channel = " + channels[i].minor);
-         console.log("Channel Name = " + channels[i].channelName);
-         console.log("Program Number = " + channels[i].programNumber);
-         // you can get other attributes provided in ChannelInfo
-     }
- }
-
- try {
-     // gets 10 channel information among all channels
-     tizen.tvchannel.getChannelList(successCB, null, "ALL", 0, 10);
- } catch (error) {
-     console.log("Error name = "+ error.name + ", Error message = " + error.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function successCB(channels)
+{
+&nbsp;&nbsp;&nbsp;console.log("getChannelList() is successfully done. Totally " + channels.length + " channels are retrieved.");
+&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; channels.length; i++)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("----- Channel [" + i + "] -----");
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Major channel = " + channels[i].major);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Minor channel = " + channels[i].minor);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Channel Name = " + channels[i].channelName);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Program Number = " + channels[i].programNumber);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* You can get other attributes provided in ChannelInfo */
+&nbsp;&nbsp;&nbsp;}
+}
+
+try
+{
+&nbsp;&nbsp;&nbsp;/* Gets 10 channel information among all channels */
+&nbsp;&nbsp;&nbsp;tizen.tvchannel.getChannelList(successCB, null, "ALL", 0, 10);
+}
+catch (error)
+{
+&nbsp;&nbsp;&nbsp;console.log("Error name = " + error.name + ", Error message = " + error.message);
+}
+</pre>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function successCB(channels) {
-     console.log("getChannelList() is successfully done. Totally " + channels.length + " channels are retrieved.");
-     for (var i = 0; i &lt; channels.length; i++) {
-         console.log("----- Channel [" + i + "] -----");
-         console.log("Major channel = " + channels[i].major);
-         console.log("Minor channel = " + channels[i].minor);
-         console.log("Channel Name = " + channels[i].channelName);
-         console.log("Program Number = " + channels[i].programNumber);
-         // you can get other attributes provided in ChannelInfo
-     }
- }
-
- try {
-     // gets one digital channel.
-     tizen.tvchannel.getChannelList(successCB, null, "DIGITAL", 0, 1);
- } catch (error) {
-     console.log("Error name = "+ error.name + ", Error message = " + error.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function successCB(channels)
+{
+&nbsp;&nbsp;&nbsp;console.log("getChannelList() is successfully done. Totally " + channels.length + " channels are retrieved.");
+&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; channels.length; i++)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("----- Channel [" + i + "] -----");
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Major channel = " + channels[i].major);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Minor channel = " + channels[i].minor);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Channel Name = " + channels[i].channelName);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Program Number = " + channels[i].programNumber);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* You can get other attributes provided in ChannelInfo */
+&nbsp;&nbsp;&nbsp;}
+}
+
+try
+{
+&nbsp;&nbsp;&nbsp;/* Gets one digital channel */
+&nbsp;&nbsp;&nbsp;tizen.tvchannel.getChannelList(successCB, null, "DIGITAL", 0, 1);
+}
+catch (error)
+{
+&nbsp;&nbsp;&nbsp;console.log("Error name = " + error.name + ", Error message = " + error.message);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="ChannelManager::getCurrentChannel">
@@ -877,14 +923,18 @@ The <em>ErrorCallback</em> will be launched in the following situations:
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> try {
-     var channel = tizen.tvchannel.getCurrentChannel();
-     console.log("The current channel name is "  + channel.channelName);
-     console.log("The current channel's major number is "  + channel.major);
- } catch (error) {
-     console.log("Error name = "+ error.name + ", Error message = " + error.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+try
+{
+&nbsp;&nbsp;&nbsp;var channel = tizen.tvchannel.getCurrentChannel();
+&nbsp;&nbsp;&nbsp;console.log("The current channel name is " + channel.channelName);
+&nbsp;&nbsp;&nbsp;console.log("The current channel's major number is " + channel.major);
+}
+catch (error)
+{
+&nbsp;&nbsp;&nbsp;console.log("Error name = " + error.name + ", Error message = " + error.message);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="ChannelManager::getProgramList">
@@ -962,24 +1012,30 @@ The <em>ErrorCallback</em> will be launched in the following situations:
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function programListCB(programInfos) {
-     console.log("getting all available programs is successfully retrieved.");
-     for (var i = 0; i &lt; programInfos.length; i++) {
-         console.log("--------------- Program " + i + " ---------------");
-         console.log("title = " + programInfos[i].title);
-         console.log("duration = " + programInfos[i].duration);
-         // you can get other attributes in the retrieved ProgramInfo objects.
-     }
- }
-
- try {
-     var channel = tizen.tvchannel.getCurrentChannel();
-     // Get all available program information
-     tizen.tvchannel.getProgramList(channel, tizen.time.getCurrentDateTime(), programListCB);
- } catch (error) {
-     console.log(error.name);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function programListCB(programInfos)
+{
+&nbsp;&nbsp;&nbsp;console.log("getting all available programs is successfully retrieved.");
+&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; programInfos.length; i++)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("--------------- Program " + i + " ---------------");
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("title = " + programInfos[i].title);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("duration = " + programInfos[i].duration);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* You can get other attributes in the retrieved ProgramInfo objects */
+&nbsp;&nbsp;&nbsp;}
+}
+
+try
+{
+&nbsp;&nbsp;&nbsp;var channel = tizen.tvchannel.getCurrentChannel();
+&nbsp;&nbsp;&nbsp;/* Get all available program information */
+&nbsp;&nbsp;&nbsp;tizen.tvchannel.getProgramList(channel, tizen.time.getCurrentDateTime(), programListCB);
+}
+catch (error)
+{
+&nbsp;&nbsp;&nbsp;console.log(error.name);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="ChannelManager::getCurrentProgram">
@@ -1037,13 +1093,17 @@ If there is no TV program data grabbed from broadcaster, it will return <var>nul
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> try {
-     var program = tizen.tvchannel.getCurrentProgram();
-     console.log("The current program is titled "  + program.title);
- } catch (error) {
-     console.log("Error name = "+ error.name + ", Error message = " + error.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+try
+{
+&nbsp;&nbsp;&nbsp;var program = tizen.tvchannel.getCurrentProgram();
+&nbsp;&nbsp;&nbsp;console.log("The current program is titled " + program.title);
+}
+catch (error)
+{
+&nbsp;&nbsp;&nbsp;console.log("Error name = " + error.name + ", Error message = " + error.message);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="ChannelManager::addChannelChangeListener">
@@ -1103,16 +1163,22 @@ If there is no TV program data grabbed from broadcaster, it will return <var>nul
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function channelChangeCB(channelInfo, type) {
-     console.log("Switched to the new channel (major = " + channelInfo.major + ", minor = " + channelInfo.minor + ", channel name = " + channelInfo.channelName);
- }
-
- try {
-     var channelListenerID = tizen.tvchannel.addChannelChangeListener(channelChangeCB);
- } catch (error) {
-     console.log("Error name = "+ error.name + ", Error message = " + error.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function channelChangeCB(channelInfo, type)
+{
+&nbsp;&nbsp;&nbsp;console.log("Switched to the new channel (major = " + channelInfo.major + ", minor = " + channelInfo.minor +
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;", channel name = " + channelInfo.channelName);
+}
+
+try
+{
+&nbsp;&nbsp;&nbsp;var channelListenerID = tizen.tvchannel.addChannelChangeListener(channelChangeCB);
+}
+catch (error)
+{
+&nbsp;&nbsp;&nbsp;console.log("Error name = " + error.name + ", Error message = " + error.message);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="ChannelManager::removeChannelChangeListener">
@@ -1214,16 +1280,21 @@ If there is no TV program data grabbed from broadcaster, it will return <var>nul
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function signalStateChangeCB(state) {
-     console.log("Signal state changed to: " + state);
- }
-
- try {
-     var signalStateChangeListenerID = tizen.tvchannel.addSignalStateChangeListener(signalStateChangeCB);
- } catch (error) {
-     console.log("Error name = "+ error.name + ", Error message = " + error.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function signalStateChangeCB(state)
+{
+&nbsp;&nbsp;&nbsp;console.log("Signal state changed to: " + state);
+}
+
+try
+{
+&nbsp;&nbsp;&nbsp;var signalStateChangeListenerID = tizen.tvchannel.addSignalStateChangeListener(signalStateChangeCB);
+}
+catch (error)
+{
+&nbsp;&nbsp;&nbsp;console.log("Error name = " + error.name + ", Error message = " + error.message);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="ChannelManager::removeSignalStateChangeListener">
@@ -1312,15 +1383,20 @@ The returned array will contain at least one <a href="#FavoriteList">FavoriteLis
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> try {
-     var favorites = tizen.tvchannel.getFavorites();
-     for (var i = 0; i &lt; favorites.length; ++i) {
-         console.log("Favorite id: " + favorites[i].id);
-     }
- } catch (error) {
-     console.log("Error name = "+ error.name + ", Error message = " + error.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+try
+{
+&nbsp;&nbsp;&nbsp;var favorites = tizen.tvchannel.getFavorites();
+&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; favorites.length; ++i)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Favorite id: " + favorites[i].id);
+&nbsp;&nbsp;&nbsp;}
+}
+catch (error)
+{
+&nbsp;&nbsp;&nbsp;console.log("Error name = " + error.name + ", Error message = " + error.message);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="ChannelManager::getBroadcastStandard">
@@ -1369,9 +1445,10 @@ The returned array will contain at least one <a href="#FavoriteList">FavoriteLis
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var res = tizen.tvchannel.getBroadcastStandard();
- console.log("Video standard: " + res);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var res = tizen.tvchannel.getBroadcastStandard();
+console.log("Video standard: " + res);
+</pre>
 </div>
 </dd>
 </dl>
@@ -2110,18 +2187,24 @@ The <em>ErrorCallback</em> will be launched in the following situations:
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> try {
-     var favorites = tizen.tvchannel.getFavorites();
-     var channel = tizen.tvchannel.getCurrentChannel();
-     favorites[0].addChannel(channel, function() {
-         console.log("Channel added");
-     }, function(error) {
-         console.log("Error callback: name = "+ error.name + ", Error message = " + error.message);
-     });
- } catch (error) {
-     console.log("Error name = "+ error.name + ", Error message = " + error.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+try
+{
+&nbsp;&nbsp;&nbsp;var favorites = tizen.tvchannel.getFavorites();
+&nbsp;&nbsp;&nbsp;var channel = tizen.tvchannel.getCurrentChannel();
+&nbsp;&nbsp;&nbsp;favorites[0].addChannel(channel, function()
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Channel added");
+&nbsp;&nbsp;&nbsp;}, function(error)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Error callback: name = " + error.name + ", Error message = " + error.message);
+&nbsp;&nbsp;&nbsp;});
+}
+catch (error)
+{
+&nbsp;&nbsp;&nbsp;console.log("Error name = " + error.name + ", Error message = " + error.message);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="FavoriteList::removeChannel">
@@ -2190,18 +2273,24 @@ The <em>ErrorCallback</em> will be launched in the following situations:
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> try {
-     var favorites = tizen.tvchannel.getFavorites();
-     var channel = tizen.tvchannel.getCurrentChannel();
-     favorites[0].removeChannel(channel, function() {
-         console.log("Channel removed");
-     }, function(error) {
-         console.log("Error callback: name = "+ error.name + ", Error message = " + error.message);
-     });
- } catch (error) {
-     console.log("Error name = "+ error.name + ", Error message = " + error.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+try
+{
+&nbsp;&nbsp;&nbsp;var favorites = tizen.tvchannel.getFavorites();
+&nbsp;&nbsp;&nbsp;var channel = tizen.tvchannel.getCurrentChannel();
+&nbsp;&nbsp;&nbsp;favorites[0].removeChannel(channel, function()
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Channel removed");
+&nbsp;&nbsp;&nbsp;}, function(error)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Error callback: name = " + error.name + ", Error message = " + error.message);
+&nbsp;&nbsp;&nbsp;});
+}
+catch (error)
+{
+&nbsp;&nbsp;&nbsp;console.log("Error name = " + error.name + ", Error message = " + error.message);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="FavoriteList::getChannels">
@@ -2276,26 +2365,32 @@ The <em>ErrorCallback</em> will be launched in the following situations:
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function successCB(channels) {
-     console.log("Totally " + channels.length + " channels are retrieved.");
-     for (var i = 0; i &lt; channels.length; i++) {
-         console.log("----- Channel [" + i + "] -----");
-         console.log("Major channel = " + channels[i].major);
-         console.log("Minor channel = " + channels[i].minor);
-         console.log("Channel Name = " + channels[i].channelName);
-         console.log("Program Number = " + channels[i].programNumber);
-         // you can get other attributes provided in ChannelInfo
-     }
- }
-
- try {
-     var favorites = tizen.tvchannel.getFavorites();
-     // gets channel information for 10 channels
-     favorites[0].getChannels(successCB, null, 0, 10);
- } catch (error) {
-     console.log("Error name = "+ error.name + ", Error message = " + error.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function successCB(channels)
+{
+&nbsp;&nbsp;&nbsp;console.log("Totally " + channels.length + " channels are retrieved.");
+&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; channels.length; i++)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("----- Channel [" + i + "] -----");
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Major channel = " + channels[i].major);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Minor channel = " + channels[i].minor);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Channel Name = " + channels[i].channelName);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Program Number = " + channels[i].programNumber);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* You can get other attributes provided in ChannelInfo */
+&nbsp;&nbsp;&nbsp;}
+}
+
+try
+{
+&nbsp;&nbsp;&nbsp;var favorites = tizen.tvchannel.getFavorites();
+&nbsp;&nbsp;&nbsp;/* Gets channel information for 10 channels */
+&nbsp;&nbsp;&nbsp;favorites[0].getChannels(successCB, null, 0, 10);
+}
+catch (error)
+{
+&nbsp;&nbsp;&nbsp;console.log("Error name = " + error.name + ", Error message = " + error.message);
+}
+</pre>
 </div>
 </dd>
 </dl>
index 2871a07..b573351 100644 (file)
@@ -275,13 +275,17 @@ For example, Display Control API provides whether your device supports 3D.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> try {
-      var current3Dmode = tizen.tvdisplaycontrol.get3DEffectMode()
-      console.log("The current 3D mode is " + current3Dmode + ".");
- } catch (error) {
-     console.log(error.name);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+try
+{
+&nbsp;&nbsp;&nbsp;var current3Dmode = tizen.tvdisplaycontrol.get3DEffectMode()
+&nbsp;&nbsp;&nbsp;console.log("The current 3D mode is " + current3Dmode + ".");
+}
+catch (error)
+{
+&nbsp;&nbsp;&nbsp;console.log(error.name);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="DisplayControlManager::is3DModeEnabled">
@@ -325,18 +329,27 @@ For example, Display Control API provides whether your device supports 3D.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> try {
-     if (tizen.tvdisplaycontrol.is3DModeEnabled() === "NOT_SUPPORTED") {
-         console.log("The current device does not support 3D mode.");
-     } else if (tizen.tvdisplaycontrol.is3DModeEnabled() === "READY") {
-         console.log("The current device supports 3D mode and can display 3D contents. Maybe it is a 3D TV device or is connected with 3D display device.");
-     } else {
-         console.log("The current device supports 3D mode but cannot display 3D contents. It may be a 3D Blu-ray player device which is not connected with 3D display device.");
-     }
- } catch (error) {
-     console.log(error.name);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+try
+{
+&nbsp;&nbsp;&nbsp;if (tizen.tvdisplaycontrol.is3DModeEnabled() === "NOT_SUPPORTED")
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("The current device does not support 3D mode.");
+&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;else if (tizen.tvdisplaycontrol.is3DModeEnabled() === "READY")
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("The current device supports 3D mode and can display 3D contents. Maybe it is a 3D TV device or is connected with 3D display device.");
+&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;else
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("The current device supports 3D mode but cannot display 3D contents. It may be a 3D Blu-ray player device which is not connected with 3D display device.");
+&nbsp;&nbsp;&nbsp;}
+}
+catch (error)
+{
+&nbsp;&nbsp;&nbsp;console.log(error.name);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="DisplayControlManager::getSupported3DEffectModeList">
@@ -389,22 +402,30 @@ For example, Display Control API provides whether your device supports 3D.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function successCB(effects) {
-     for( var i = 0; i &lt; effects.length; ++i ) {
-         console.log(effects[i] +" : this mode is supported on a device.");
-     }
- }
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function successCB(effects)
+{
+&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; effects.length; ++i)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(effects[i] + ": this mode is supported on a device.");
+&nbsp;&nbsp;&nbsp;}
+}
 
- function errorCB(error) {
-     console.log("An error occurs when getSupported3DEffectModeList() is invoked. Error(name: " + error.name +" , message: "+ error.message +")");
- }
+function errorCB(error)
+{
+&nbsp;&nbsp;&nbsp;console.log("An error occurs when getSupported3DEffectModeList() is invoked. Error(name: " 
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;+ error.name + " , message: " + error.message + ")");
+}
 
- try {
-     tizen.tvdisplaycontrol.getSupported3DEffectModeList(successCB, errorCB);
- } catch (error) {
-     console.log(error.name);
- }
- </pre>
+try
+{
+&nbsp;&nbsp;&nbsp;tizen.tvdisplaycontrol.getSupported3DEffectModeList(successCB, errorCB);
+}
+catch (error)
+{
+&nbsp;&nbsp;&nbsp;console.log(error.name);
+}
+</pre>
 </div>
 </dd>
 </dl>
index 167f1c0..b9a0ebd 100644 (file)
@@ -419,8 +419,9 @@ There is a tizen.tvinfo object that allows accessing the functionality of the TV
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> console.log("Caption menu turned on: " + (tizen.tvinfo.getCaptionValue("CAPTION_ONOFF_KEY") === "CAPTION_ON"));
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+console.log("Caption menu turned on: " + (tizen.tvinfo.getCaptionValue("CAPTION_ONOFF_KEY") === "CAPTION_ON"));
+</pre>
 </div>
 </dd>
 <dt class="method" id="TVInfoManager::addCaptionValueChangeListener">
@@ -469,10 +470,12 @@ There is a tizen.tvinfo object that allows accessing the functionality of the TV
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var id = tizen.tvinfo.addCaptionValueChangeListener("CAPTION_ONOFF_KEY", function(value) {
-     console.log("Caption menu state changed: " + value);
- });
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var id = tizen.tvinfo.addCaptionValueChangeListener("CAPTION_ONOFF_KEY", function(value)
+{
+&nbsp;&nbsp;&nbsp;console.log("Caption menu state changed: " + value);
+});
+</pre>
 </div>
 </dd>
 <dt class="method" id="TVInfoManager::removeCaptionValueChangeListener">
@@ -505,9 +508,10 @@ There is a tizen.tvinfo object that allows accessing the functionality of the TV
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var id = tizen.tvinfo.addCaptionValueChangeListener("CAPTION_ONOFF_KEY", function() {});
- tizen.tvinfo.removeCaptionValueChangeListener(id);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var id = tizen.tvinfo.addCaptionValueChangeListener("CAPTION_ONOFF_KEY", function() {});
+tizen.tvinfo.removeCaptionValueChangeListener(id);
+</pre>
 </div>
 </dd>
 </dl>
index 70e464b..32a159e 100644 (file)
@@ -249,22 +249,26 @@ Mandatory keys will not be retrieved by this method.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var i, keyCode = {}, supportedKeys;
- supportedKeys = tizen.tvinputdevice.getSupportedKeys();
- for (i = 0; i &lt; supportedKeys.length; i++) {
-     keyCode[supportedKeys[i].name] = supportedKeys[i].code;
- }
- if(keyCode.hasOwnProperty("ChannelUp")) {
-     tizen.tvinputdevice.registerKey("ChannelUp");
- }
- window.addEventListener("keydown", function(keyEvent) {
-     // identify the key by the numeric code from the keyEvent
-     if(keyEvent.keyCode === keyCode.ChannelUp) {
-         console.log("The CHANNEL UP was pressed");
-     }
- });
-
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var i, keyCode = {}, supportedKeys;
+supportedKeys = tizen.tvinputdevice.getSupportedKeys();
+for (i = 0; i &lt; supportedKeys.length; i++)
+{
+&nbsp;&nbsp;&nbsp;keyCode[supportedKeys[i].name] = supportedKeys[i].code;
+}
+if (keyCode.hasOwnProperty("ChannelUp"))
+{
+&nbsp;&nbsp;&nbsp;tizen.tvinputdevice.registerKey("ChannelUp");
+}
+window.addEventListener("keydown", function(keyEvent)
+{
+&nbsp;&nbsp;&nbsp;/* Identify the key by the numeric code from the keyEvent */
+&nbsp;&nbsp;&nbsp;if (keyEvent.keyCode === keyCode.ChannelUp)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("The CHANNEL UP was pressed");
+&nbsp;&nbsp;&nbsp;}
+});
+</pre>
 </div>
 </dd>
 <dt class="method" id="TVInputDeviceManager::getKey">
@@ -371,15 +375,20 @@ An application cannot register the mandatory keys (ArrowLeft, ArrowRight, ArrowU
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var keys = ["VolumeUp", "VolumeDown"], i;
- for (i = 0; i &lt; keys.length; i++) {
-     try {
-         tizen.tvinputdevice.registerKey(keys[i]);
-     } catch(error) {
-         console.log("failed to register " + keys[i] + ": " + error);
-     }
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var keys = ["VolumeUp", "VolumeDown"], i;
+for (i = 0; i &lt; keys.length; i++)
+{
+&nbsp;&nbsp;&nbsp;try
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tizen.tvinputdevice.registerKey(keys[i]);
+&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;catch (error)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("failed to register " + keys[i] + ": " + error);
+&nbsp;&nbsp;&nbsp;}
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="TVInputDeviceManager::unregisterKey">
@@ -428,8 +437,9 @@ An application cannot register the mandatory keys (ArrowLeft, ArrowRight, ArrowU
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> tizen.tvinputdevice.unregisterKey("VolumeDown");
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+tizen.tvinputdevice.unregisterKey("VolumeDown");
+</pre>
 </div>
 </dd>
 <dt class="method" id="TVInputDeviceManager::registerKeyBatch">
@@ -506,17 +516,20 @@ UnknownError: In case of any other error.              </li>
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function errorCB(err) {
-     console.log( 'The following error occurred: ' +  err.name);
- }
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function errorCB(err)
+{
+&nbsp;&nbsp;&nbsp;console.log('The following error occurred: ' +  err.name);
+}
 
- function successCB() {
-     console.log('Registered successfully');
- }
+function successCB()
+{
+&nbsp;&nbsp;&nbsp;console.log('Registered successfully');
+}
 
- var keys = ["VolumeUp", "VolumeDown"];
- tizen.tvinputdevice.registerKeyBatch(keys, successCB, errorCB);
- </pre>
+var keys = ["VolumeUp", "VolumeDown"];
+tizen.tvinputdevice.registerKeyBatch(keys, successCB, errorCB);
+</pre>
 </div>
 </dd>
 <dt class="method" id="TVInputDeviceManager::unregisterKeyBatch">
@@ -587,16 +600,20 @@ UnknownError: In case of any other error.              </li>
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function errorCB(err) {
-     console.log( 'The following error occurred: ' +  err.name);
- }
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function errorCB(err)
+{
+&nbsp;&nbsp;&nbsp;console.log('The following error occurred: ' +  err.name);
+}
+
+function successCB()
+{
+&nbsp;&nbsp;&nbsp;console.log('Unregistered successfully');
+}
 
- function successCB() {
-     console.log('Unregistered successfully');
- }
- var keys = ["VolumeUp", "VolumeDown"];
- tizen.tvinputdevice.unregisterKeyBatch(keys, successCB, errorCB);
- </pre>
+var keys = ["VolumeUp", "VolumeDown"];
+tizen.tvinputdevice.unregisterKeyBatch(keys, successCB, errorCB);
+</pre>
 </div>
 </dd>
 </dl>
index f71a9e8..f528280 100644 (file)
@@ -339,18 +339,24 @@ functionality of the TV Window API.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function successCB(availableWindows) {
-    for (var i = 0; i &lt; availableWindows.length; i++) {
-        console.log("Window ["+ i + "] = " + availableWindows[i]);
-    }
- }
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function successCB(availableWindows)
+{
+&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; availableWindows.length; i++)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Window [" + i + "] = " + availableWindows[i]);
+&nbsp;&nbsp;&nbsp;}
+}
 
- try {
-     tizen.tvwindow.getAvailableWindows(successCB);
- } catch (error) {
-     console.log("Error name = "+ error.name + ", Error message = " + error.message);
- }
- </pre>
+try
+{
+&nbsp;&nbsp;&nbsp;tizen.tvwindow.getAvailableWindows(successCB);
+}
+catch (error)
+{
+&nbsp;&nbsp;&nbsp;console.log("Error name = " + error.name + ", Error message = " + error.message);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="TVWindowManager::setSource">
@@ -410,39 +416,49 @@ functionality of the TV Window API.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var connectedVideoSources;
- function successCB(source, type) {
-     console.log("setSource() is successfully done. source name = " + source.name + ", source port number = " + source.number);
- }
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var connectedVideoSources;
+function successCB(source, type)
+{
+&nbsp;&nbsp;&nbsp;console.log("setSource() is successfully done. source name = " + source.name + ", source port number = " + source.number);
+}
 
- function errorCB(error) {
-     console.log("setSource() is failed. Error name = "+ error.name + ", Error message = " + error.message);
- }
+function errorCB(error)
+{
+&nbsp;&nbsp;&nbsp;console.log("setSource() is failed. Error name = " + error.name + ", Error message = " + error.message);
+}
 
- function systemInfoSuccessCB(videoSource) {
-     connectedVideoSources = videoSource.connected;
-     for (var i = 0; i &lt; connectedVideoSources.length; i++) {
-         console.log("--------------- Source " + i + " ---------------");
-         console.log("type = " + connectedVideoSources[i].type);
-         console.log("number = " + connectedVideoSources[i].number);
-         if (connectedVideoSources[i].type === "HDMI") {
-             // set HDMI as input source of the TV window
-             tizen.tvwindow.setSource(connectedVideoSources[i], successCB, errorCB);
-             break;
-         }
-     }
- }
+function systemInfoSuccessCB(videoSource)
+{
+&nbsp;&nbsp;&nbsp;connectedVideoSources = videoSource.connected;
+&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; connectedVideoSources.length; i++)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("--------------- Source " + i + " ---------------");
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("type = " + connectedVideoSources[i].type);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("number = " + connectedVideoSources[i].number);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (connectedVideoSources[i].type === "HDMI")
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Set HDMI as input source of the TV window */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tizen.tvwindow.setSource(connectedVideoSources[i], successCB, errorCB);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;break;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;}
+}
 
- function systemInfoErrorCB(error) {
-     console.log("getPropertyValue(VIDEOSOURCE) is failed. Error name = "+ error.name + ", Error message = " + error.message);
- }
+function systemInfoErrorCB(error)
+{
+&nbsp;&nbsp;&nbsp;console.log("getPropertyValue(VIDEOSOURCE) is failed. Error name = " + error.name + ", Error message = " + error.message);
+}
 
- try {
-     tizen.systeminfo.getPropertyValue("VIDEOSOURCE", systemInfoSuccessCB, systemInfoErrorCB);
- } catch (error) {
-     console.log("Error name = "+ error.name + ", Error message = " + error.message);
- }
- </pre>
+try
+{
+&nbsp;&nbsp;&nbsp;tizen.systeminfo.getPropertyValue("VIDEOSOURCE", systemInfoSuccessCB, systemInfoErrorCB);
+}
+catch (error)
+{
+&nbsp;&nbsp;&nbsp;console.log("Error name = " + error.name + ", Error message = " + error.message);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="TVWindowManager::getSource">
@@ -494,14 +510,18 @@ functionality of the TV Window API.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> try {
-     var source = tizen.tvwindow.getSource();
-     console.log("type = " + source.type);
-     console.log("number = " + source.number);
- } catch (error) {
-     console.log("Error name = "+ error.name + ", Error message = " + error.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+try
+{
+&nbsp;&nbsp;&nbsp;var source = tizen.tvwindow.getSource();
+&nbsp;&nbsp;&nbsp;console.log("type = " + source.type);
+&nbsp;&nbsp;&nbsp;console.log("number = " + source.number);
+}
+catch (error)
+{
+&nbsp;&nbsp;&nbsp;console.log("Error name = " + error.name + ", Error message = " + error.message);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="TVWindowManager::show">
@@ -598,44 +618,59 @@ The <em>errorCallback</em> is invoked with these error types:
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function successCB(windowRect, type) {
-     // You will get exactly what you put as rectangle argument of show() through windowRect.
-     // expected result : ["0", "0px", "50%", "540px"]
-     console.log("Rectangle : [" + windowRect[0] + ", " + windowRect[1] + ", " + windowRect[2] + ", " + windowRect[3] + "]");
- }
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function successCB(windowRect, type)
+{
+&nbsp;&nbsp;&nbsp;/* You will get exactly what you put as rectangle argument of show() through windowRect */
+&nbsp;&nbsp;&nbsp;/* Expected result: ["0", "0px", "50%", "540px"] */
+&nbsp;&nbsp;&nbsp;console.log("Rectangle: [" + windowRect[0] + ", " + windowRect[1] + ", " + windowRect[2] + ", " + windowRect[3] + "]");
+}
 
- try {
-     tizen.tvwindow.show(successCB, null, ["0", "0px", "50%", "540px"], "MAIN");
- } catch(error) {
-     console.log("error: " + error.name);
- }
- </pre>
+try
+{
+&nbsp;&nbsp;&nbsp;tizen.tvwindow.show(successCB, null, ["0", "0px", "50%", "540px"], "MAIN");
+}
+catch (error)
+{
+&nbsp;&nbsp;&nbsp;console.log("error: " + error.name);
+}
+</pre>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function successCB(windowRect, type) {
-     // expected result : ["0", "0", "50%", "50%"]
-     console.log("Rectangle : [" + windowRect[0] + ", " + windowRect[1] + ", " + windowRect[2] + ", " + windowRect[3] + "]");
- }
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function successCB(windowRect, type)
+{
+&nbsp;&nbsp;&nbsp;/* Expected result: ["0", "0", "50%", "50%"] */
+&nbsp;&nbsp;&nbsp;console.log("Rectangle: [" + windowRect[0] + ", " + windowRect[1] + ", " + windowRect[2] + ", " + windowRect[3] + "]");
+}
 
- try {
-     tizen.tvwindow.show(successCB, null, ["0", "0", "50%", "50%"], "MAIN");
- } catch(error) {
-     console.log("error: " + error.name);
- }
- </pre>
+try
+{
+&nbsp;&nbsp;&nbsp;tizen.tvwindow.show(successCB, null, ["0", "0", "50%", "50%"], "MAIN");
+}
+catch (error)
+{
+&nbsp;&nbsp;&nbsp;console.log("error: " + error.name);
+}
+</pre>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function successCB(windowRect, type) {
-     // expected result : ["10.5%", "10%", "900", "500px"]
-     console.log("Rectangle : [" + windowRect[0] + ", " + windowRect[1] + ", " + windowRect[2] + ", " + windowRect[3] + "]");
- }
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function successCB(windowRect, type)
+{
+&nbsp;&nbsp;&nbsp;/* Expected result: ["10.5%", "10%", "900", "500px"] */
+&nbsp;&nbsp;&nbsp;console.log("Rectangle: [" + windowRect[0] + ", " + windowRect[1] + ", " + windowRect[2] + ", " + windowRect[3] + "]");
+}
 
- try {
-     tizen.tvwindow.show(successCB, null, ["10.5%", "10%", "900", "500px"]);
- } catch(error) {
-     console.log("error: " + error.name);
- }
- </pre>
+try
+{
+&nbsp;&nbsp;&nbsp;tizen.tvwindow.show(successCB, null, ["10.5%", "10%", "900", "500px"]);
+}
+catch (error)
+{
+&nbsp;&nbsp;&nbsp;console.log("error: " + error.name);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="TVWindowManager::hide">
@@ -761,25 +796,31 @@ If you omit <b>unit</b>, the pixel(<var>"px"</var>) unit will be used as a defau
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function rectangleCB(windowRect, type) {
-     // You call getRect() without specifying a unit, it expresses the area information with pixel unit.
-     // expected result : ["0px", "0px", "960px", "540px"] if the screen resolution of a device is 1920 x 1080.
-     console.log("Rectangle : [" + windowRect[0] + ", " + windowRect[1] + ", " + windowRect[2] + ", " + windowRect[3] + "]");
- }
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function rectangleCB(windowRect, type)
+{
+&nbsp;&nbsp;&nbsp;/* You call getRect() without specifying a unit, it expresses the area information with pixel unit */
+&nbsp;&nbsp;&nbsp;/* Expected result: ["0px", "0px", "960px", "540px"] if the screen resolution of a device is 1920 x 1080 */
+&nbsp;&nbsp;&nbsp;console.log("Rectangle: [" + windowRect[0] + ", " + windowRect[1] + ", " + windowRect[2] + ", " + windowRect[3] + "]");
+}
 
- function successCB(windowRect, type) {
-     // You will get exactly what you put as rectangle argument through windowRect.
-     // expected result : ["0", "0", "50%", "50%"]
-     console.log("Rectangle : [" + windowRect[0] + ", " + windowRect[1] + ", " + windowRect[2] + ", " + windowRect[3] + "]");
-     tizen.tvwindow.getRect(rectangleCB);
- }
+function successCB(windowRect, type)
+{
+&nbsp;&nbsp;&nbsp;/* You will get exactly what you put as rectangle argument through windowRect */
+&nbsp;&nbsp;&nbsp;/* Expected result: ["0", "0", "50%", "50%"] */
+&nbsp;&nbsp;&nbsp;console.log("Rectangle: [" + windowRect[0] + ", " + windowRect[1] + ", " + windowRect[2] + ", " + windowRect[3] + "]");
+&nbsp;&nbsp;&nbsp;tizen.tvwindow.getRect(rectangleCB);
+}
 
- try {
-     tizen.tvwindow.show(successCB, null, ["0", "0", "50%", "50%"]);
- } catch(error) {
-     console.log("error: " + error.name);
- }
- </pre>
+try
+{
+&nbsp;&nbsp;&nbsp;tizen.tvwindow.show(successCB, null, ["0", "0", "50%", "50%"]);
+}
+catch (error)
+{
+&nbsp;&nbsp;&nbsp;console.log("error: " + error.name);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="TVWindowManager::getVideoResolution">
@@ -831,13 +872,15 @@ If you omit <b>unit</b>, the pixel(<var>"px"</var>) unit will be used as a defau
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var res = tizen.tvwindow.getVideoResolution();
- console.log("Video resolution: " + res.width + "x" + res.height + " pixels");
- console.log("Frequency: " + res.frequency +"Hz");
- if (res.aspectRatio === "ASPECT_RATIO_16x9") {
-     console.log("Widescreen on");
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var res = tizen.tvwindow.getVideoResolution();
+console.log("Video resolution: " + res.width + "x" + res.height + " pixels");
+console.log("Frequency: " + res.frequency +"Hz");
+if (res.aspectRatio === "ASPECT_RATIO_16x9")
+{
+&nbsp;&nbsp;&nbsp;console.log("Widescreen on");
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="TVWindowManager::addVideoResolutionChangeListener">
@@ -893,20 +936,26 @@ If you omit <b>unit</b>, the pixel(<var>"px"</var>) unit will be used as a defau
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function change(res, type) {
-     console.log("Switched to new resolution: " + res.width + "x" + res.height);
-     console.log("New frequency: " + res.frequency);
-     if (res.aspectRatio === "ASPECT_RATIO_16x9") {
-         console.log("Widescreen is now turned on");
-     }
- }
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function change(res, type)
+{
+&nbsp;&nbsp;&nbsp;console.log("Switched to new resolution: " + res.width + "x" + res.height);
+&nbsp;&nbsp;&nbsp;console.log("New frequency: " + res.frequency);
+&nbsp;&nbsp;&nbsp;if (res.aspectRatio === "ASPECT_RATIO_16x9")
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Widescreen is now turned on");
+&nbsp;&nbsp;&nbsp;}
+}
 
- try {
-     var watch = tizen.tvwindow.addVideoResolutionChangeListener(change);
- } catch (error) {
-     console.log("Error name = "+ error.name + ", Error message = " + error.message);
- }
- </pre>
+try
+{
+&nbsp;&nbsp;&nbsp;var watch = tizen.tvwindow.addVideoResolutionChangeListener(change);
+}
+catch (error)
+{
+&nbsp;&nbsp;&nbsp;console.log("Error name = " + error.name + ", Error message = " + error.message);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="TVWindowManager::removeVideoResolutionChangeListener">
index ea47d19..d419426 100644 (file)
@@ -157,12 +157,14 @@ InvalidValuesError - If any of the input parameters contain an invalid value.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function successCallback() {
-     console.log("The requested user agent string has just been set successfully.");
- }
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function successCallback()
+{
+&nbsp;&nbsp;&nbsp;console.log("The requested user agent string has just been set successfully.");
+}
 
- tizen.websetting.setUserAgentString("the new user agent string to set", successCallback);
- </pre>
+tizen.websetting.setUserAgentString("the new user agent string to set", successCallback);
+</pre>
 </div>
 </dd>
 <dt class="method" id="WebSettingManager::removeAllCookies">
@@ -214,12 +216,14 @@ UnknownError - If any error occurs while deleting the cookies.              </li
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function successCallback() {
-     console.log("The cookies saved for your application have just been removed.");
- }
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function successCallback()
+{
+&nbsp;&nbsp;&nbsp;console.log("The cookies saved for your application have just been removed.");
+}
 
- tizen.websetting.removeAllCookies(successCallback);
- </pre>
+tizen.websetting.removeAllCookies(successCallback);
+</pre>
 </div>
 </dd>
 </dl>
index 098e345..f5b9d10 100644 (file)
@@ -278,12 +278,13 @@ For more information about the application control, see <a href="application.htm
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Triggers an alarm on a given date/time
- var alarm = new tizen.AlarmAbsolute(new Date(2014, 10, 4, 8, 0));
- var appControl = new tizen.ApplicationControl("http://tizen.org/appcontrol/operation/view");
- tizen.alarm.add(alarm, tizen.application.getCurrentApplication().appInfo.id, appControl);
- console.log("Alarm added with id: " + alarm.id);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Triggers an alarm on a given date/time */
+var alarm = new tizen.AlarmAbsolute(new Date(2014, 10, 4, 8, 0));
+var appControl = new tizen.ApplicationControl("http://tizen.org/appcontrol/operation/view");
+tizen.alarm.add(alarm, tizen.application.getCurrentApplication().appInfo.id, appControl);
+console.log("Alarm added with id: " + alarm.id);
+</pre>
 </div>
 </dd>
 <dt class="method" id="AlarmManager::remove">
@@ -340,18 +341,23 @@ If an alarm goes off, it will be removed from the storage automatically.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var alarms = tizen.alarm.getAll();
-
- // Removes the first alarm
- if (alarms.length &gt; 0) {
-   try {
-     tizen.alarm.remove(alarms[0].id);
-     console.log("Successfully removed the first alarm.");
-   } catch(error) {
-     console.log("Failed to remove the first alarm.");
-   }
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var alarms = tizen.alarm.getAll();
+
+/* Removes the first alarm */
+if (alarms.length &gt; 0)
+{
+&nbsp;&nbsp;&nbsp;try
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tizen.alarm.remove(alarms[0].id);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Successfully removed the first alarm.");
+&nbsp;&nbsp;&nbsp;} 
+&nbsp;&nbsp;&nbsp;catch (error)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Failed to remove the first alarm.");
+&nbsp;&nbsp;&nbsp;}
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="AlarmManager::removeAll">
@@ -393,9 +399,10 @@ Because each application has its own alarm storage, this method removes alarms o
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> tizen.alarm.removeAll();
- console.log("remove all registered alarms in the storage.");
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+tizen.alarm.removeAll();
+console.log("remove all registered alarms in the storage.");
+</pre>
 </div>
 </dd>
 <dt class="method" id="AlarmManager::get">
@@ -440,18 +447,19 @@ Because each application has its own alarm storage, this method removes alarms o
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Sets an alarm
- var date = new Date();
- date.setHours(date.getHours()+1);
- var abs_alarm = new tizen.AlarmAbsolute(date);
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Sets an alarm */
+var date = new Date();
+date.setHours(date.getHours() + 1);
+var abs_alarm = new tizen.AlarmAbsolute(date);
 
- // Adds an alarm
- tizen.alarm.add(abs_alarm, tizen.application.getCurrentApplication().appInfo.id);
+/* Adds an alarm */
+tizen.alarm.add(abs_alarm, tizen.application.getCurrentApplication().appInfo.id);
 
- // Gets an alarm
- var alarm = tizen.alarm.get(abs_alarm.id);
- console.log("The alarm will trigger at " + alarm.getNextScheduledDate());
- </pre>
+/* Gets an alarm */
+var alarm = tizen.alarm.get(abs_alarm.id);
+console.log("The alarm will trigger at " + alarm.getNextScheduledDate());
+</pre>
 </div>
 </dd>
 <dt class="method" id="AlarmManager::getAll">
@@ -484,9 +492,10 @@ Alarms that have already been triggered are removed automatically from the stora
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var alarms = tizen.alarm.getAll();
- console.log(alarms.length + " alarms present in the storage.");
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var alarms = tizen.alarm.getAll();
+console.log(alarms.length + " alarms present in the storage.");
+</pre>
 </div>
 </dd>
 </dl>
@@ -548,17 +557,18 @@ It is guaranteed that this alarm will be fired after at least <em>delay</em> sec
 If <em>period</em> is provided, it will be adjusted by the operating system, however this value will not be lower than 600 seconds.
           </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Gets the current application ID.
- var appId = tizen.application.getCurrentApplication().appInfo.id;
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Gets the current application ID */
+var appId = tizen.application.getCurrentApplication().appInfo.id;
 
- // Sets an alarm in 3 hours from now
- var alarm1 = new tizen.AlarmRelative(3 * tizen.alarm.PERIOD_HOUR);
- tizen.alarm.add(alarm1, appId);
+/* Sets an alarm in 3 hours from now */
+var alarm1 = new tizen.AlarmRelative(3 * tizen.alarm.PERIOD_HOUR);
+tizen.alarm.add(alarm1, appId);
 
- // Sets an alarm in one hour, recurring after every 10 minutes
- var alarm2 = new tizen.AlarmRelative(tizen.alarm.PERIOD_HOUR, 10 * tizen.alarm.PERIOD_MINUTE);
- tizen.alarm.add(alarm2, appId);
- </pre>
+/* Sets an alarm in one hour, recurring after every 10 minutes */
+var alarm2 = new tizen.AlarmRelative(tizen.alarm.PERIOD_HOUR, 10 * tizen.alarm.PERIOD_MINUTE);
+tizen.alarm.add(alarm2, appId);
+</pre>
 </div>
         
       <div class="constructors">
@@ -630,16 +640,17 @@ If the alarm has expired, this method returns <var>null</var>.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Gets the current application ID.
- var appId = tizen.application.getCurrentApplication().appInfo.id;
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Gets the current application ID */
+var appId = tizen.application.getCurrentApplication().appInfo.id;
 
- // Sets an alarm in 3 hours from now
- var alarm = new tizen.AlarmRelative(3 * tizen.alarm.PERIOD_HOUR);
- tizen.alarm.add(alarm, appId);
+/* Sets an alarm in 3 hours from now */
+var alarm = new tizen.AlarmRelative(3 * tizen.alarm.PERIOD_HOUR);
+tizen.alarm.add(alarm, appId);
 
- var sec = alarm.getRemainingSeconds();
- console.log("remaining time is " + sec);
- </pre>
+var sec = alarm.getRemainingSeconds();
+console.log("remaining time is " + sec);
+</pre>
 </div>
 </dd>
 </dl>
@@ -674,22 +685,23 @@ If a <em>period</em> is provided, the alarm keeps triggering for the given inter
           </p>
          </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Gets the current application ID.
- var appId = tizen.application.getCurrentApplication().appInfo.id;
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Gets the current application ID */
+var appId = tizen.application.getCurrentApplication().appInfo.id;
 
- // Sets an alarm on January 1st 2014 08:00
- var date = new Date(2014, 0, 1, 8, 0);
- var alarm1 = new tizen.AlarmAbsolute(date);
- tizen.alarm.add(alarm1, appId);
+/* Sets an alarm on January 1st 2014 08:00 */
+var date = new Date(2014, 0, 1, 8, 0);
+var alarm1 = new tizen.AlarmAbsolute(date);
+tizen.alarm.add(alarm1, appId);
 
- // Sets an alarm on January 1st 2014 08:00, repeating every 2 days
- var alarm2 = new tizen.AlarmAbsolute(date, 2 * tizen.alarm.PERIOD_DAY);
- tizen.alarm.add(alarm2, appId);
+/* Sets an alarm on January 1st 2014 08:00, repeating every 2 days */
+var alarm2 = new tizen.AlarmAbsolute(date, 2 * tizen.alarm.PERIOD_DAY);
+tizen.alarm.add(alarm2, appId);
 
- // Sets an alarm occurring on every Saturday and Sunday, at 08:00, starting from January 1st 2014
- var alarm3 = new tizen.AlarmAbsolute(date, ["SA", "SU"]);
- tizen.alarm.add(alarm3, appId);
- </pre>
+/* Sets an alarm occurring on every Saturday and Sunday, at 08:00, starting from January 1st 2014 */
+var alarm3 = new tizen.AlarmAbsolute(date, ["SA", "SU"]);
+tizen.alarm.add(alarm3, appId);
+</pre>
 </div>
         
       <div class="constructors">
@@ -786,17 +798,18 @@ If the alarm has expired, this method returns <var>null</var>. The returned date
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Gets the current application ID.
- var appId = tizen.application.getCurrentApplication().appInfo.id;
-
- // Sets an alarm on January 1st 2014 08:00
- var date = new Date(2014, 0, 1, 8, 0);
- var alarm1 = new tizen.AlarmAbsolute(date);
- tizen.alarm.add(alarm1, appId);
-
- var date = alarm1.getNextScheduledDate();
- console.log("next scheduled time is " + date);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Gets the current application ID */
+var appId = tizen.application.getCurrentApplication().appInfo.id;
+
+/* Sets an alarm on January 1st 2014 08:00 */
+var date = new Date(2014, 0, 1, 8, 0);
+var alarm1 = new tizen.AlarmAbsolute(date);
+tizen.alarm.add(alarm1, appId);
+
+var date = alarm1.getNextScheduledDate();
+console.log("next scheduled time is " + date);
+</pre>
 </div>
 </dd>
 </dl>
index d3be44c..2bcbace 100644 (file)
@@ -391,9 +391,10 @@ The <em>tizen.application </em>object allows access to the Application API's fun
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var app = tizen.application.getCurrentApplication();
- console.log("Current application's app id is " + app.appInfo.id);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var app = tizen.application.getCurrentApplication();
+console.log("Current application's app id is " + app.appInfo.id);
+</pre>
 </div>
 </dd>
 <dt class="method" id="ApplicationManager::kill">
@@ -461,23 +462,28 @@ UnknownError - If any other error occurs.              </li>
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function onKillSuccess() {
-     console.log("Application terminated successfully");
- }
-
- function onRunningAppsContext(contexts) {
-    // let's assume that the application "targetApp0.main" has been installed.
-    var targetId = "targetApp0.main";
-
-    for (var i = 0; i &lt; contexts.length; i++) {
-        if (contexts[i].appId == targetId) {
-            tizen.application.kill(contexts[i].id, onKillSuccess);
-        }
-    }
- }
-
- tizen.application.getAppsContext(onRunningAppsContext);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function onKillSuccess()
+{
+&nbsp;&nbsp;&nbsp;console.log("Application terminated successfully");
+}
+
+function onRunningAppsContext(contexts)
+{
+&nbsp;&nbsp;&nbsp;/* Let's assume that the application "targetApp0.main" has been installed */
+&nbsp;&nbsp;&nbsp;var targetId = "targetApp0.main";
+
+&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; contexts.length; i++)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (contexts[i].appId == targetId)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tizen.application.kill(contexts[i].id, onKillSuccess);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;}
+}
+
+tizen.application.getAppsContext(onRunningAppsContext);
+</pre>
 </div>
 </dd>
 <dt class="method" id="ApplicationManager::launch">
@@ -542,13 +548,15 @@ UnknownError - If any other error occurs.              </li>
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function onsuccess() {
-     console.log("The application has launched successfully");
- }
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function onsuccess()
+{
+&nbsp;&nbsp;&nbsp;console.log("The application has launched successfully");
+}
 
- // let's assume that application "targetApp0.main" has been installed
- tizen.application.launch("targetApp0.main", onsuccess);
- </pre>
+/* Let's assume that application "targetApp0.main" has been installed */
+tizen.application.launch("targetApp0.main", onsuccess);
+</pre>
 </div>
 </dd>
 <dt class="method" id="ApplicationManager::launchAppControl">
@@ -642,34 +650,33 @@ UnknownError: If any other error occurs.              </li>
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var appControl = new tizen.ApplicationControl(
-     "http://tizen.org/appcontrol/operation/pick",
-     null,
-     "image/jpeg",
-     null);
-
- var appControlReplyCallback = {
-     // callee sent a reply
-     onsuccess: function(data) {
-         for (var i = 0; i &lt; data.length; i++) {
-             if (data[i].key == "http://tizen.org/appcontrol/data/selected") {
-                 console.log('Selected image is ' + data[i].value[0]);
-             }
-         }
-     },
-     // callee returned failure
-     onfailure: function() {
-         console.log('The launch application control failed');
-     }
- }
-
- tizen.application.launchAppControl(
-     appControl,
-     null,
-     function() {console.log("launch application control succeed"); },
-     function(e) {console.log("launch application control failed. reason: " + e.message); },
-     appControlReplyCallback );
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var appControl = new tizen.ApplicationControl("http://tizen.org/appcontrol/operation/pick",
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;null, "image/jpeg", null);
+
+var appControlReplyCallback = 
+{
+&nbsp;&nbsp;&nbsp;/* Callee sent a reply */
+&nbsp;&nbsp;&nbsp;onsuccess: function(data)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; data.length; i++)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (data[i].key == "http://tizen.org/appcontrol/data/selected")
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('Selected image is ' + data[i].value[0]);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;/* Callee returned failure */
+&nbsp;&nbsp;&nbsp;onfailure: function()
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('The launch application control failed');
+&nbsp;&nbsp;&nbsp;}
+}
+
+tizen.application.launchAppControl(appControl, null,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;function() {console.log("launch application control succeed");},
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;function(e) {console.log("launch application control failed. reason: " + e.message);},
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;appControlReplyCallback);
+</pre>
 </div>
 </dd>
 <dt class="method" id="ApplicationManager::findAppControl">
@@ -724,42 +731,41 @@ UnknownError - If any other error occurs.              </li>
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var appControl = new tizen.ApplicationControl(
-     "http://tizen.org/appcontrol/operation/pick",
-     null,
-     "image/jpeg",
-     null);
-
- function successCB(appInfos, appControl)
- {
-     // appControl is same object with the value passed as first parameter to findAppControl()
-     var appControlReplyCallback = {
-         // callee sent a reply
-         onsuccess: function(data) {
-             for (var i = 0; i &lt; data.length; i++) {
-                 if (data[i].key == "http://tizen.org/appcontrol/data/selected") {
-                     console.log('Selected image is ' + data[i].value[0]);
-                 }
-             }
-         },
-         // callee returned failure
-         onfailure: function() {
-             console.log('The launch application control failed');
-         }
-     }
-
-     var appId = appInfos[0].id; // select first app's id
-
-     tizen.application.launchAppControl(
-         appControl,
-         appId,
-         function() {console.log("launch application control succeed"); },
-        function(e) {console.log("launch application control failed. reason: " + e.message); },
-        appControlReplyCallback );
- }
-
- tizen.application.findAppControl(appControl, successCB);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var appControl = new tizen.ApplicationControl("http://tizen.org/appcontrol/operation/pick",
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;null, "image/jpeg", null);
+
+function successCB(appInfos, appControl)
+{
+&nbsp;&nbsp;&nbsp;/* appControl is same object with the value passed as first parameter to findAppControl() */
+&nbsp;&nbsp;&nbsp;var appControlReplyCallback = 
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Callee sent a reply */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;onsuccess: function(data)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; data.length; i++)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (data[i].key == "http://tizen.org/appcontrol/data/selected")
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('Selected image is ' + data[i].value[0]);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Callee returned failure */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;onfailure: function()
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('The launch application control failed');
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;}
+
+&nbsp;&nbsp;&nbsp;var appId = appInfos[0].id; /* Select first app's id */
+
+&nbsp;&nbsp;&nbsp;tizen.application.launchAppControl(appControl, appId,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;function() {console.log("launch application control succeed");},
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;function(e) {console.log("launch application control failed. reason: " + e.message);},
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;appControlReplyCallback);
+}
+
+tizen.application.findAppControl(appControl, successCB);
+</pre>
 </div>
 </dd>
 <dt class="method" id="ApplicationManager::getAppsContext">
@@ -806,13 +812,15 @@ UnknownError - If an unknown error occurs.              </li>
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function onRunningAppsContext(contexts) {
-     for (var i = 0; i &lt; contexts.length; i++)
-         console.log("ID : " + contexts[i].id);
- }
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function onRunningAppsContext(contexts)
+{
+&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; contexts.length; i++)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("ID: " + contexts[i].id);
+}
 
- tizen.application.getAppsContext(onRunningAppsContext);
- </pre>
+tizen.application.getAppsContext(onRunningAppsContext);
+</pre>
 </div>
 </dd>
 <dt class="method" id="ApplicationManager::getAppContext">
@@ -856,9 +864,10 @@ The list of running applications and their application IDs is obtained with <em>
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var appContext = tizen.application.getAppContext(null);
- console.log("Application context retrieved for app " + appContext.appId);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var appContext = tizen.application.getAppContext(null);
+console.log("Application context retrieved for app " + appContext.appId);
+</pre>
 </div>
 </dd>
 <dt class="method" id="ApplicationManager::getAppsInfo">
@@ -905,13 +914,15 @@ UnknownError - If an unknown error occurs.              </li>
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function onListInstalledApps(applications) {
-     for (var i = 0; i &lt; applications.length; i++)
-         console.log("ID : " + applications[i].id);
- }
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function onListInstalledApps(applications)
+{
+&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; applications.length; i++)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("ID: " + applications[i].id);
+}
 
- tizen.application.getAppsInfo(onListInstalledApps);
- </pre>
+tizen.application.getAppsInfo(onListInstalledApps);
+</pre>
 </div>
 </dd>
 <dt class="method" id="ApplicationManager::getAppInfo">
@@ -959,9 +970,10 @@ The list of installed applications and their application IDs is obtained with <e
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var appInfo = tizen.application.getAppInfo(null);
- console.log("Current application name : " + appInfo.name);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var appInfo = tizen.application.getAppInfo(null);
+console.log("Current application name: " + appInfo.name);
+</pre>
 </div>
 </dd>
 <dt class="method" id="ApplicationManager::getAppCerts">
@@ -1042,13 +1054,15 @@ The certificate types are listed below:
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var appCerts = tizen.application.getAppCerts(null);
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var appCerts = tizen.application.getAppCerts(null);
 
- for (var i = 0; i &lt; appCerts.length; i++) {
-    console.log("#" + i + " type:" + appCerts[i].type);
-    console.log("#" + i + " value:" + appCerts[i].value);
- }
- </pre>
+for (var i = 0; i &lt; appCerts.length; i++)
+{
+&nbsp;&nbsp;&nbsp;console.log("#" + i + " type:" + appCerts[i].type);
+&nbsp;&nbsp;&nbsp;console.log("#" + i + " value:" + appCerts[i].value);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="ApplicationManager::getAppSharedURI">
@@ -1096,9 +1110,10 @@ If the ID is set to <var>null</var> or not set at all, it returns the shared dir
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var sharedDir = tizen.application.getAppSharedURI(null);
- console.log("shared directory : " + sharedDir);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var sharedDir = tizen.application.getAppSharedURI(null);
+console.log("shared directory: " + sharedDir);
+</pre>
 </div>
 </dd>
 <dt class="method" id="ApplicationManager::getAppMetaData">
@@ -1157,10 +1172,10 @@ an empty array is returned
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var metaDataArray = tizen.application.getAppMetaData(null);
- console.log("size of metadata : " + metaDataArray.length);
-
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var metaDataArray = tizen.application.getAppMetaData(null);
+console.log("size of metadata: " + metaDataArray.length);
+</pre>
 </div>
 </dd>
 <dt class="deprecated method" id="ApplicationManager::addAppInfoEventListener">
@@ -1226,19 +1241,24 @@ with the corresponding listener identifier.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var appEventCallback = {
-    oninstalled: function(appInfo) {
-       console.log('The application ' + appInfo.name + ' is installed');
-    },
-    onupdated: function(appInfo) {
-       console.log('The application ' + appInfo.name + ' is updated');
-    },
-    onuninstalled: function(appid) {
-       console.log('The application ' + appid + ' is uninstalled');
-    }
- };
- var watchId = tizen.application.addAppInfoEventListener(appEventCallback);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var appEventCallback = 
+{
+&nbsp;&nbsp;&nbsp;oninstalled: function(appInfo)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('The application ' + appInfo.name + ' is installed');
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;onupdated: function(appInfo)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('The application ' + appInfo.name + ' is updated');
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;onuninstalled: function(appid)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('The application ' + appid + ' is uninstalled');
+&nbsp;&nbsp;&nbsp;}
+};
+var watchId = tizen.application.addAppInfoEventListener(appEventCallback);
+</pre>
 </div>
 </dd>
 <dt class="deprecated method" id="ApplicationManager::removeAppInfoEventListener">
@@ -1280,20 +1300,25 @@ applications on a device.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var appEventCallback = {
-   oninstalled: function(appInfo) {
-     console.log('The application ' + appInfo.name + ' is installed');
-   },
-   onupdated: function(appInfo) {
-     console.log('The application ' + appInfo.name + ' is updated');
-   },
-   onuninstalled: function(appid) {
-     console.log('The application ' + appid + ' is uninstalled');
-   }
- };
- var watchId = tizen.application.addAppInfoEventListener(appEventCallback);
- tizen.application.removeAppInfoEventListener(watchId);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var appEventCallback = 
+{
+&nbsp;&nbsp;&nbsp;oninstalled: function(appInfo)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('The application ' + appInfo.name + ' is installed');
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;onupdated: function(appInfo)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('The application ' + appInfo.name + ' is updated');
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;onuninstalled: function(appid)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('The application ' + appid + ' is uninstalled');
+&nbsp;&nbsp;&nbsp;}
+};
+var watchId = tizen.application.addAppInfoEventListener(appEventCallback);
+tizen.application.removeAppInfoEventListener(watchId);
+</pre>
 </div>
 </dd>
 </dl>
@@ -1378,10 +1403,11 @@ the basic operations (such as exit or hide) for the current application.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var app = tizen.application.getCurrentApplication();
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var app = tizen.application.getCurrentApplication();
 
- app.exit();
- </pre>
+app.exit();
+</pre>
 </div>
 </dd>
 <dt class="method" id="Application::hide">
@@ -1405,10 +1431,11 @@ the basic operations (such as exit or hide) for the current application.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var app = tizen.application.getCurrentApplication();
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var app = tizen.application.getCurrentApplication();
 
- app.hide();
- </pre>
+app.hide();
+</pre>
 </div>
 </dd>
 <dt class="method" id="Application::getRequestedAppControl">
@@ -1448,12 +1475,14 @@ appropriately when it is launched.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var reqAppControl = tizen.application.getCurrentApplication().getRequestedAppControl();
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var reqAppControl = tizen.application.getCurrentApplication().getRequestedAppControl();
 
- if (reqAppControl) {
-     console.log("Requester AppID : " + reqAppControl.callerAppId);
- }
- </pre>
+if (reqAppControl) 
+{
+&nbsp;&nbsp;&nbsp;console.log("Requester AppID: " + reqAppControl.callerAppId);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="Application::addEventListener">
@@ -1504,28 +1533,35 @@ System events do not require an application identifier to be specified. Therefor
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var app = tizen.application.getCurrentApplication();
-
- // for user events: sender's application ID  and event name must be provided by using a dictionary
- // Let's assume that at least two applications are installed
- function onListInstalledApps(appsInfo) {
-   var appId = null;
-
-   if (appsInfo.length &gt; 0 &amp;&amp; app.appInfo.id != appsInfo[0].id) {
-     appId = appsInfo[0].id;
-   } else if (appsInfo.length &gt; 1) {
-     appId = appsInfo[1].id;
-   }
-
-   if (appId) {
-     var watchId = app.addEventListener({"appId": appId, "name": "custom_user_event"}, function(event, data) {
-       console.log("Data: " + JSON.stringify(data));
-       // do something
-     });
-   }
- }
- tizen.application.getAppsInfo(onListInstalledApps);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var app = tizen.application.getCurrentApplication();
+
+/* For user events: sender's application ID and event name must be provided by using a dictionary */
+/* Let's assume that at least two applications are installed */
+function onListInstalledApps(appsInfo)
+{
+&nbsp;&nbsp;&nbsp;var appId = null;
+
+&nbsp;&nbsp;&nbsp;if (appsInfo.length &gt; 0 &amp;&amp; app.appInfo.id != appsInfo[0].id)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;appId = appsInfo[0].id;
+&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;else if (appsInfo.length &gt; 1)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;appId = appsInfo[1].id;
+&nbsp;&nbsp;&nbsp;}
+
+&nbsp;&nbsp;&nbsp;if (appId)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var watchId = app.addEventListener({"appId": appId, "name": "custom_user_event"}, function(event, data)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Data: " + JSON.stringify(data));
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Do something */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;});
+&nbsp;&nbsp;&nbsp;}
+}
+tizen.application.getAppsInfo(onListInstalledApps);
+</pre>
 </div>
 </dd>
 <dt class="method" id="Application::removeEventListener">
@@ -1558,31 +1594,39 @@ System events do not require an application identifier to be specified. Therefor
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var app = tizen.application.getCurrentApplication();
-
- // for user events: sender's application ID  and event name must be provided by using a dictionary
- // Let's assume that at least two applications are installed
- function onListInstalledApps(appsInfo) {
-   var appId = null;
-   var watchId = null;
-
-   if (appsInfo.length &gt; 0 &amp;&amp; app.appInfo.id != appsInfo[0].id) {
-     appId = appsInfo[0].id;
-   } else if (appsInfo.length &gt; 1) {
-     appId = appsInfo[1].id;
-   }
-
-   if (appId) {
-     watchId = app.addEventListener({"appId": appId, "name": "custom_user_event"}, function(event, data) {
-       if (watchId) {
-         app.removeEventListener(watchId);
-         watchId = null;
-       }
-     });
-   }
- }
- tizen.application.getAppsInfo(onListInstalledApps);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var app = tizen.application.getCurrentApplication();
+
+/* For user events: sender's application ID and event name must be provided by using a dictionary */
+/* Let's assume that at least two applications are installed */
+function onListInstalledApps(appsInfo)
+{
+&nbsp;&nbsp;&nbsp;var appId = null;
+&nbsp;&nbsp;&nbsp;var watchId = null;
+
+&nbsp;&nbsp;&nbsp;if (appsInfo.length &gt; 0 &amp;&amp; app.appInfo.id != appsInfo[0].id)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;appId = appsInfo[0].id;
+&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;else if (appsInfo.length &gt; 1)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;appId = appsInfo[1].id;
+&nbsp;&nbsp;&nbsp;}
+
+&nbsp;&nbsp;&nbsp;if (appId)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;watchId = app.addEventListener({"appId": appId, "name": "custom_user_event"}, function(event, data)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (watchId)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;app.removeEventListener(watchId);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;watchId = null;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;});
+&nbsp;&nbsp;&nbsp;}
+}
+tizen.application.getAppsInfo(onListInstalledApps);
+</pre>
 </div>
 </dd>
 <dt class="method" id="Application::broadcastEvent">
@@ -1600,7 +1644,7 @@ System events do not require an application identifier to be specified. Therefor
             </p>
 <div class="description">
             <p>
-An application can listen to events from other applications. However, it can only broadcast it's own events. Therefore, the <var>appId</var> attribute of the <a href="#EventInfo">EventInfo</a> dictionary must be the identifier of the application which calls this method.
+An application can listen to events from other applications. However, it can only broadcast its own events. Therefore, the <var>appId</var> attribute of the <a href="#EventInfo">EventInfo</a> dictionary must be the identifier of the application which calls this method.
             </p>
            </div>
 <div class="parameters">
@@ -1629,14 +1673,16 @@ An application can listen to events from other applications. However, it can onl
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var myCustomData = {
-   foo: 'bar'
- };
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var myCustomData = 
+{
+&nbsp;&nbsp;&nbsp;foo: 'bar'
+};
 
- var app = tizen.application.getCurrentApplication();
+var app = tizen.application.getCurrentApplication();
 
- app.broadcastEvent({"name": "custom_user_event"}, myCustomData);
- </pre>
+app.broadcastEvent({"name": "custom_user_event"}, myCustomData);
+</pre>
 </div>
 </dd>
 <dt class="method" id="Application::broadcastTrustedEvent">
@@ -1654,7 +1700,7 @@ An application can listen to events from other applications. However, it can onl
             </p>
 <div class="description">
             <p>
-An application can listen to events from other applications. However, it can only broadcast it's own events. Therefore, the <var>appId</var> attribute of the <a href="#EventInfo">EventInfo</a> dictionary must be the identifier of the application which calls this method.
+An application can listen to events from other applications. However, it can only broadcast its own events. Therefore, the <var>appId</var> attribute of the <a href="#EventInfo">EventInfo</a> dictionary must be the identifier of the application which calls this method.
             </p>
            </div>
 <div class="parameters">
@@ -1683,14 +1729,16 @@ An application can listen to events from other applications. However, it can onl
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var myTrustedCustomData = {
-   foo: 'bar'
- };
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var myTrustedCustomData = 
+{
+&nbsp;&nbsp;&nbsp;foo: 'bar'
+};
 
- var app = tizen.application.getCurrentApplication();
+var app = tizen.application.getCurrentApplication();
 
- app.broadcastTrustedEvent({"name": "custom_user_event"}, myTrustedCustomData);
- </pre>
+app.broadcastTrustedEvent({"name": "custom_user_event"}, myTrustedCustomData);
+</pre>
 </div>
 </dd>
 </dl>
@@ -1898,8 +1946,9 @@ between applications through the <em>ApplicationControl </em>interface.
  2.0
           </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var appControlData = new tizen.ApplicationControlData("image", [imagedata1]);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var appControlData = new tizen.ApplicationControlData("image", [imagedata1]);
+</pre>
 </div>
 <div class="constructors">
 <h4 id="ApplicationControlData::constructor">Constructors</h4>
@@ -1962,15 +2011,11 @@ and launches the selected application.
  2.0
           </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var appControl =
-       new tizen.ApplicationControl(
-                  "http://tizen.org/appcontrol/operation/view",
-                  null,
-                  "image/jpeg",
-                  null,
-                  [new tizen.ApplicationControlData("images",
-                                                    [imagedata1, imagedata2])] );
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var appControl = new tizen.ApplicationControl("http://tizen.org/appcontrol/operation/view",
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;null, "image/jpeg", null,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[new tizen.ApplicationControlData("images", [imagedata1, imagedata2])]);
+</pre>
 </div>
 <div class="constructors">
 <h4 id="ApplicationControl::constructor">Constructors</h4>
@@ -2128,17 +2173,20 @@ It contains the information that the calling application passed to <em>launchApp
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var reqAppControl = tizen.application.getCurrentApplication().getRequestedAppControl();
- if (reqAppControl) {
-     console.log("Requester AppID : " + reqAppControl.callerAppId);
-
-     var appControl = reqAppControl.appControl;
-     if (appControl.operation == "http://tizen.org/appcontrol/operation/pick") {
-         var data = new tizen.ApplicationControlData("http://tizen.org/appcontrol/data/selected", ["Image1.jpg"]);
-         reqAppControl.replyResult([data]);
-     }
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var reqAppControl = tizen.application.getCurrentApplication().getRequestedAppControl();
+if (reqAppControl)
+{
+&nbsp;&nbsp;&nbsp;console.log("Requester AppID: " + reqAppControl.callerAppId);
+
+&nbsp;&nbsp;&nbsp;var appControl = reqAppControl.appControl;
+&nbsp;&nbsp;&nbsp;if (appControl.operation == "http://tizen.org/appcontrol/operation/pick")
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var data = new tizen.ApplicationControlData("http://tizen.org/appcontrol/data/selected", ["Image1.jpg"]);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;reqAppControl.replyResult([data]);
+&nbsp;&nbsp;&nbsp;}
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="RequestedApplicationControl::replyFailure">
@@ -2168,16 +2216,19 @@ to perform the requested action.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var reqAppControl = tizen.application.getCurrentApplication().getRequestedAppControl();
- if (reqAppControl) {
-     console.log("Requester AppID : " + reqAppControl.callerAppId);
-
-     var appControl = reqAppControl.appControl;
-     if (appControl.operation == "http://tizen.org/appcontrol/operation/pick") {
-         reqAppControl.replyFailure();
-     }
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var reqAppControl = tizen.application.getCurrentApplication().getRequestedAppControl();
+if (reqAppControl)
+{
+&nbsp;&nbsp;&nbsp;console.log("Requester AppID: " + reqAppControl.callerAppId);
+
+&nbsp;&nbsp;&nbsp;var appControl = reqAppControl.appControl;
+&nbsp;&nbsp;&nbsp;if (appControl.operation == "http://tizen.org/appcontrol/operation/pick")
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;reqAppControl.replyFailure();
+&nbsp;&nbsp;&nbsp;}
+}
+</pre>
 </div>
 </dd>
 </dl>
@@ -2309,13 +2360,15 @@ This callback interface specifies a success method with an array of
         </ul>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function onListInstalledApps(applications) {
-     for (var i = 0; i &lt; applications.length; i++)
-         console.log("ID : " + applications[i].id);
- }
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function onListInstalledApps(applications)
+{
+&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; applications.length; i++)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("ID: " + applications[i].id);
+}
 
- tizen.application.getAppsInfo(onListInstalledApps);
- </pre>
+tizen.application.getAppsInfo(onListInstalledApps);
+</pre>
 </div>
 </dd>
 </dl>
@@ -2369,43 +2422,42 @@ It is used in <em>ApplicationManager.findAppControl()</em>.
         </ul>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var appControl = new tizen.ApplicationControl(
-     "http://tizen.org/appcontrol/operation/pick",
-     null,
-     "image/jpeg",
-     null);
-
- // FindAppControlSuccessCallback instance
- function successCB(appInfos, appControl)
- {
-     // appControl is same object with the value passed as first parameter to findAppControl()
-     var appControlReplyCallback = {
-         // callee sent a reply
-         onsuccess: function(data) {
-             for (var i = 0; i &lt; data.length; i++) {
-                 if (data[i].key == "http://tizen.org/appcontrol/data/selected") {
-                     console.log('Selected image is ' + data[i].value[0]);
-                 }
-             }
-         },
-         // callee returned failure
-         onfailure: function() {
-             console.log('The launch application control failed');
-         }
-     }
-
-     var appId = appInfos[0].id; // select first app's id
-
-     tizen.application.launchAppControl(
-         appControl,
-         appId,
-         function() {console.log("launch application control succeed"); },
-        function(e) {console.log("launch application control failed. reason: " + e.message); },
-        appControlReplyCallback );
- }
-
- tizen.application.findAppControl(appControl, successCB);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var appControl = new tizen.ApplicationControl("http://tizen.org/appcontrol/operation/pick",
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;null, "image/jpeg", null);
+
+/* FindAppControlSuccessCallback instance */
+function successCB(appInfos, appControl)
+{
+&nbsp;&nbsp;&nbsp;/* appControl is same object with the value passed as first parameter to findAppControl() */
+&nbsp;&nbsp;&nbsp;var appControlReplyCallback =
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Callee sent a reply */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;onsuccess: function(data)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; data.length; i++)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (data[i].key == "http://tizen.org/appcontrol/data/selected")
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('Selected image is ' + data[i].value[0]);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Callee returned failure */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;onfailure: function()
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('The launch application control failed');
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;}
+
+&nbsp;&nbsp;&nbsp;var appId = appInfos[0].id; /* Select first app's id */
+
+&nbsp;&nbsp;&nbsp;tizen.application.launchAppControl(appControl, appId,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;function() {console.log("launch application control succeed");},
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;function(e) {console.log("launch application control failed. reason: " + e.message);},
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;appControlReplyCallback);
+}
+
+tizen.application.findAppControl(appControl, successCB);
+</pre>
 </div>
 </dd>
 </dl>
@@ -2484,35 +2536,34 @@ This callback interface specifies two methods:
           </ul>
          </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var appControl = new tizen.ApplicationControl(
-     "http://tizen.org/appcontrol/operation/pick",
-     null,
-     "image/jpeg",
-     null);
-
- // ApplicationControlDataArrayReplyCallback instance
- var appControlReplyCallback = {
-     // callee sent a reply
-     onsuccess: function(data) {
-         for (var i = 0; i &lt; data.length; i++) {
-             if (data[i].key == "http://tizen.org/appcontrol/data/selected") {
-                 console.log('Selected image is ' + data[i].value[0]);
-             }
-         }
-     },
-     // callee returned failure
-     onfailure: function() {
-         console.log('The launch application control failed');
-     }
- }
-
- tizen.application.launchAppControl(
-     appControl,
-     null,
-     function() {console.log("launch application control succeed"); },
-     function(e) {console.log("launch application control failed. reason: " + e.message); },
-     appControlReplyCallback );
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var appControl = new tizen.ApplicationControl("http://tizen.org/appcontrol/operation/pick",
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;null, "image/jpeg", null);
+
+/* ApplicationControlDataArrayReplyCallback instance */
+var appControlReplyCallback =
+{
+&nbsp;&nbsp;&nbsp;/* Callee sent a reply */
+&nbsp;&nbsp;&nbsp;onsuccess: function(data)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; data.length; i++)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (data[i].key == "http://tizen.org/appcontrol/data/selected")
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('Selected image is ' + data[i].value[0]);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;/* Callee returned failure */
+&nbsp;&nbsp;&nbsp;onfailure: function()
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('The launch application control failed');
+&nbsp;&nbsp;&nbsp;}
+}
+
+tizen.application.launchAppControl(appControl, null,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;function() {console.log("launch application control succeed");},
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;function(e) {console.log("launch application control failed. reason: " + e.message);},
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;appControlReplyCallback);
+</pre>
 </div>
 <div class="methods">
 <h4>Methods</h4>
@@ -2581,19 +2632,24 @@ an application is installed, updated, or uninstalled.
           </p>
          </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var appEventCallback = {
-    oninstalled: function(appInfo) {
-       console.log('The application ' + appInfo.name + ' is installed');
-    },
-    onupdated: function(appInfo) {
-       console.log('The application ' + appInfo.name + ' is updated');
-    },
-    onuninstalled: function(appid) {
-       console.log('The application ' + appid + ' is uninstalled');
-    }
- };
- var watchId = tizen.application.addAppInfoEventListener(appEventCallback);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var appEventCallback =
+{
+&nbsp;&nbsp;&nbsp;oninstalled: function(appInfo)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('The application ' + appInfo.name + ' is installed');
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;onupdated: function(appInfo)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('The application ' + appInfo.name + ' is updated');
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;onuninstalled: function(appid)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('The application ' + appid + ' is uninstalled');
+&nbsp;&nbsp;&nbsp;}
+};
+var watchId = tizen.application.addAppInfoEventListener(appEventCallback);
+</pre>
 </div>
 <div class="methods">
 <h4>Methods</h4>
@@ -2731,30 +2787,37 @@ Platform modules will be able to broadcast system events in a future Tizen relea
         </ul>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var app = tizen.application.getCurrentApplication();
-
- // for user events: sender's application ID  and event name must be provided by using a dictionary
- // Let's assume that at least two applications are installed
- function onListInstalledApps(appsInfo) {
-   var appId = null;
-
-   if (appsInfo.length &gt; 0 &amp;&amp; app.appInfo.id != appsInfo[0].id) {
-     appId = appsInfo[0].id;
-   } else if (appsInfo.length &gt; 1) {
-     appId = appsInfo[1].id;
-   }
-
-   var eventCB = function(event, data) {
-     console.log("Data: " + JSON.stringify(data));
-     // do something
-   };
-
-   if (appId) {
-     var watchId = app.addEventListener({"appId": appId, "name": "custom_user_event"}, eventCB);
-   }
- }
- tizen.application.getAppsInfo(onListInstalledApps);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var app = tizen.application.getCurrentApplication();
+
+/* For user events: sender's application ID and event name must be provided by using a dictionary */
+/* Let's assume that at least two applications are installed */
+function onListInstalledApps(appsInfo)
+{
+&nbsp;&nbsp;&nbsp;var appId = null;
+
+&nbsp;&nbsp;&nbsp;if (appsInfo.length &gt; 0 &amp;&amp; app.appInfo.id != appsInfo[0].id)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;appId = appsInfo[0].id;
+&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;else if (appsInfo.length &gt; 1)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;appId = appsInfo[1].id;
+&nbsp;&nbsp;&nbsp;}
+
+&nbsp;&nbsp;&nbsp;var eventCB = function(event, data)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Data: " + JSON.stringify(data));
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Do something */
+&nbsp;&nbsp;&nbsp;};
+
+&nbsp;&nbsp;&nbsp;if (appId)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var watchId = app.addEventListener({"appId": appId, "name": "custom_user_event"}, eventCB);
+&nbsp;&nbsp;&nbsp;}
+}
+tizen.application.getAppsInfo(onListInstalledApps);
+</pre>
 </div>
 </dd>
 </dl>
@@ -2789,7 +2852,7 @@ System events do not require an application identifier to be specified. If one i
             </div>
 <div class="description">
             <p>
-An application can listen to events from other applications. However, it can only broadcast it's own events. Therefore, when broadcasting an event, this dictionary member must be the identifier of the application which is broadcasting the event.
+An application can listen to events from other applications. However, it can only broadcast its own events. Therefore, when broadcasting an event, this dictionary member must be the identifier of the application which is broadcasting the event.
             </p>
             <p>
 System events do not require an application identifier to be specified. If one is specified, the event will be interpreted as an user event.
index 9fceb3b..12dc1d7 100755 (executable)
@@ -457,16 +457,19 @@ In this mode, <em>getEntries()</em>, <em>getEntryByName()</em>, and <em>extractA
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function successCallback(archive) {
-     console.log("Success, can now read from archive " + archive);
- }
-
- function errorCallback(error) {
-     console.log(error);
- }
-
- tizen.archive.open("downloads/some_archive.zip", "r", successCallback, errorCallback);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function successCallback(archive)
+{
+&nbsp;&nbsp;&nbsp;console.log("Success, can now read from archive " + archive);
+}
+
+function errorCallback(error)
+{
+&nbsp;&nbsp;&nbsp;console.log(error);
+}
+
+tizen.archive.open("downloads/some_archive.zip", "r", successCallback, errorCallback);
+</pre>
 </div>
 </dd>
 <dt class="method" id="ArchiveManager::abort">
@@ -499,13 +502,15 @@ In this mode, <em>getEntries()</em>, <em>getEntryByName()</em>, and <em>extractA
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function openSuccess(archive) {
-     operationId = archive.extractAll("downloads/extracted");
-     tizen.archive.abort(operationId);
- }
-
- tizen.archive.open("downloads/some_archive.zip", "r", openSuccess);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function openSuccess(archive)
+{
+&nbsp;&nbsp;&nbsp;operationId = archive.extractAll("downloads/extracted");
+&nbsp;&nbsp;&nbsp;tizen.archive.abort(operationId);
+}
+
+tizen.archive.open("downloads/some_archive.zip", "r", openSuccess);
+</pre>
 </div>
 </dd>
 </dl>
@@ -724,24 +729,29 @@ If the source file is big then the callback can also be called while the file is
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function errorCallback(error) {
-     console.log(error);
- }
-
- function successCallback() {
-     console.log("done");
- }
-
- function progressCallback(opId, val, name) {
-     console.log("opId: " + opId + " with progress val: " + val);
- }
-
- function createSuccess(archive) {
-     archive.add("downloads/file.txt", successCallback, errorCallback, progressCallback);
- }
-
- tizen.archive.open("downloads/new_archive.zip", "w", createSuccess);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function errorCallback(error)
+{
+&nbsp;&nbsp;&nbsp;console.log(error);
+}
+
+function successCallback()
+{
+&nbsp;&nbsp;&nbsp;console.log("done");
+}
+
+function progressCallback(opId, val, name)
+{
+&nbsp;&nbsp;&nbsp;console.log("opId: " + opId + " with progress val: " + val);
+}
+
+function createSuccess(archive)
+{
+&nbsp;&nbsp;&nbsp;archive.add("downloads/file.txt", successCallback, errorCallback, progressCallback);
+}
+
+tizen.archive.open("downloads/new_archive.zip", "w", createSuccess);
+</pre>
 </div>
 </dd>
 <dt class="method" id="ArchiveFile::extractAll">
@@ -835,24 +845,29 @@ UnknownError: In any other error case              </li>
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function errorCallback(error) {
-     console.log(error);
- }
-
- function successCallback() {
-     console.log("done");
- }
-
- function progressCallback(opId, val, name) {
-     console.log("extracting operation (: " + opId + ") is in progress (" + (val * 100).toFixed(1) + "%)");
- }
-
- function openSuccess(archive) {
-     archive.extractAll("music", successCallback, errorCallback, progressCallback);
- }
-
- tizen.archive.open("downloads/some_archive.zip", "r", openSuccess);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function errorCallback(error)
+{
+&nbsp;&nbsp;&nbsp;console.log(error);
+}
+
+function successCallback()
+{
+&nbsp;&nbsp;&nbsp;console.log("done");
+}
+
+function progressCallback(opId, val, name)
+{
+&nbsp;&nbsp;&nbsp;console.log("extracting operation (: " + opId + ") is in progress (" + (val * 100).toFixed(1) + "%)");
+}
+
+function openSuccess(archive)
+{
+&nbsp;&nbsp;&nbsp;archive.extractAll("music", successCallback, errorCallback, progressCallback);
+}
+
+tizen.archive.open("downloads/some_archive.zip", "r", openSuccess);
+</pre>
 </div>
 </dd>
 <dt class="method" id="ArchiveFile::getEntries">
@@ -921,23 +936,28 @@ UnknownError: In case of any error              </li>
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function errorCallback(error) {
-     console.log(error);
- }
-
- function getEntriesSuccess(entries) {
-     console.log("Entries length: " + entries.length);
-     for (var i=0; i &lt; entries.length; i++) {
-         console.log(entries[i].name);
-     }
- }
-
- function openSuccess(archive) {
-     archive.getEntries(getEntriesSuccess, errorCallback);
- }
-
- tizen.archive.open("downloads/some_archive.zip", "r", openSuccess, errorCallback);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function errorCallback(error)
+{
+&nbsp;&nbsp;&nbsp;console.log(error);
+}
+
+function getEntriesSuccess(entries)
+{
+&nbsp;&nbsp;&nbsp;console.log("Entries length: " + entries.length);
+&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; entries.length; i++)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(entries[i].name);
+&nbsp;&nbsp;&nbsp;}
+}
+
+function openSuccess(archive)
+{
+&nbsp;&nbsp;&nbsp;archive.getEntries(getEntriesSuccess, errorCallback);
+}
+
+tizen.archive.open("downloads/some_archive.zip", "r", openSuccess, errorCallback);
+</pre>
 </div>
 </dd>
 <dt class="method" id="ArchiveFile::getEntryByName">
@@ -1012,20 +1032,24 @@ UnknownError: In case of any other error              </li>
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function errorCallback(error) {
-     console.log(error);
- }
-
- function getEntrySuccess(entry) {
-     console.log("Entry: " + entry.name + " size: " + entry.size);
- }
-
- function openSuccess(archive) {
-     archive.getEntryByName("arch/my_file.txt", getEntrySuccess, errorCallback);
- }
-
- tizen.archive.open("downloads/some_archive.zip", "r", openSuccess);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function errorCallback(error)
+{
+&nbsp;&nbsp;&nbsp;console.log(error);
+}
+
+function getEntrySuccess(entry)
+{
+&nbsp;&nbsp;&nbsp;console.log("Entry: " + entry.name + " size: " + entry.size);
+}
+
+function openSuccess(archive)
+{
+&nbsp;&nbsp;&nbsp;archive.getEntryByName("arch/my_file.txt", getEntrySuccess, errorCallback);
+}
+
+tizen.archive.open("downloads/some_archive.zip", "r", openSuccess);
+</pre>
 </div>
 </dd>
 <dt class="method" id="ArchiveFile::close">
@@ -1229,24 +1253,29 @@ UnknownError: In case of any other error              </li>
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function errorCallback(error) {
-     console.log(error);
- }
-
- function extractSuccessCallback() {
-     console.log("done");
- }
-
- function getEntrySuccess(entry) {
-     entry.extract("downloads/extract", extractSuccessCallback, errorCallback);
- }
-
- function openSuccess(archive) {
-     archive.getEntryByName("my_file.txt", getEntrySuccess, errorCallback);
- }
-
- tizen.archive.open("downloads/some_archive.zip", "r", openSuccess, errorCallback);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function errorCallback(error)
+{
+&nbsp;&nbsp;&nbsp;console.log(error);
+}
+
+function extractSuccessCallback()
+{
+&nbsp;&nbsp;&nbsp;console.log("done");
+}
+
+function getEntrySuccess(entry)
+{
+&nbsp;&nbsp;&nbsp;entry.extract("downloads/extract", extractSuccessCallback, errorCallback);
+}
+
+function openSuccess(archive)
+{
+&nbsp;&nbsp;&nbsp;archive.getEntryByName("my_file.txt", getEntrySuccess, errorCallback);
+}
+
+tizen.archive.open("downloads/some_archive.zip", "r", openSuccess, errorCallback);
+</pre>
 </div>
 </dd>
 </dl>
index edb896d..7b3cece 100644 (file)
@@ -169,12 +169,16 @@ There is a tizen.badge object that allows accessing the functionality of the Bad
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> try {
-     tizen.badge.setBadgeCount("AVbg1ZHu6l.BadgeSample", 3);
- } catch(e) {
-     console.log("Error Exception, error name : " + e.name + ", error message : " + e.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+try
+{
+&nbsp;&nbsp;&nbsp;tizen.badge.setBadgeCount("AVbg1ZHu6l.BadgeSample", 3);
+}
+catch (e)
+{
+&nbsp;&nbsp;&nbsp;console.log("Error Exception, error name: " + e.name + ", error message: " + e.message);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="BadgeManager::getBadgeCount">
@@ -227,12 +231,16 @@ There is a tizen.badge object that allows accessing the functionality of the Bad
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> try {
-     var count = tizen.badge.getBadgeCount("AVbg1ZHu6l.BadgeSample");
- } catch(e) {
-     console.log("Error Exception, error name : " + e.name + ", error message : " + e.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+try
+{
+&nbsp;&nbsp;&nbsp;var count = tizen.badge.getBadgeCount("AVbg1ZHu6l.BadgeSample");
+}
+catch (e)
+{
+&nbsp;&nbsp;&nbsp;console.log("Error Exception, error name: " + e.name + ", error message: " + e.message);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="BadgeManager::addChangeListener">
@@ -288,13 +296,15 @@ There is a tizen.badge object that allows accessing the functionality of the Bad
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">  function watcher(appId, count) {
-      console.log(appId + ' badge number were updated : ' + count);
-  }
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function watcher(appId, count)
+{
+&nbsp;&nbsp;&nbsp;console.log(appId + ' badge number were updated: ' + count);
+}
 
-  // Registers to be notified when the badge number changes
-  tizen.badge.addChangeListener(["AVbg1ZHu6l.BadgeSample", "BDb5tZJe47.TestSample"], watcher);
- </pre>
+/* Registers to be notified when the badge number changes */
+tizen.badge.addChangeListener(["AVbg1ZHu6l.BadgeSample", "BDb5tZJe47.TestSample"], watcher);
+</pre>
 </div>
 </dd>
 <dt class="method" id="BadgeManager::removeChangeListener">
@@ -343,17 +353,19 @@ There is a tizen.badge object that allows accessing the functionality of the Bad
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">  // Receives badge number changes
-  function watcher(appId, count) {
-      console.log(appId + ' badge number were updated : ' + count);
-  }
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Receives badge number changes */
+function watcher(appId, count)
+{
+&nbsp;&nbsp;&nbsp;console.log(appId + ' badge number were updated: ' + count);
+}
 
-  // Registers to be notified when the badge number changes
-  tizen.badge.addChangeListener(["AVbg1ZHu6l.BadgeSample", "BDb5tZJe47.TestSample"], watcher);
+/* Registers to be notified when the badge number changes */
+tizen.badge.addChangeListener(["AVbg1ZHu6l.BadgeSample", "BDb5tZJe47.TestSample"], watcher);
 
-  // Cancels the watch operation
-  tizen.badge.removeChangeListener(["AVbg1ZHu6l.BadgeSample", "BDb5tZJe47.TestSample"]);
- </pre>
+/* Cancels the watch operation */
+tizen.badge.removeChangeListener(["AVbg1ZHu6l.BadgeSample", "BDb5tZJe47.TestSample"]);
+</pre>
 </div>
 </dd>
 </dl>
index 89072bb..8aad102 100644 (file)
@@ -546,9 +546,10 @@ The <em>tizen.bluetooth</em> object allows access to the Bluetooth API.
 <dl>
 <pre class="webidl prettyprint">BluetoothLEServiceData(DOMString uuid, DOMString data);</pre>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Creates a serviceData.
- var service = new tizen.BluetoothLEServiceData("c500-11e5", "0x1811");
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Creates a serviceData */
+var service = new tizen.BluetoothLEServiceData("c500-11e5", "0x1811");
+</pre>
 </div>
 </dl>
 </div>
@@ -564,10 +565,11 @@ The <em>tizen.bluetooth</em> object allows access to the Bluetooth API.
  2.3.1
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Creates a serviceData.
- var service = new tizen.BluetoothLEServiceData("c500-11e5", "0x1811");
- service.uuid = "f236-41a4";
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Creates a serviceData */
+var service = new tizen.BluetoothLEServiceData("c500-11e5", "0x1811");
+service.uuid = "f236-41a4";
+</pre>
 </div>
 </li>
 <li class="attribute" id="BluetoothLEServiceData::data">
@@ -579,10 +581,11 @@ The <em>tizen.bluetooth</em> object allows access to the Bluetooth API.
  2.3.1
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Creates a serviceData.
- var service = new tizen.BluetoothLEServiceData("c500-11e5", "0x1811");
- service.data = "0x1815";
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Creates a serviceData */
+var service = new tizen.BluetoothLEServiceData("c500-11e5", "0x1811");
+service.data = "0x1815";
+</pre>
 </div>
 </li>
 </ul>
@@ -607,9 +610,10 @@ The <em>tizen.bluetooth</em> object allows access to the Bluetooth API.
 <dl>
 <pre class="webidl prettyprint">BluetoothLEManufacturerData(DOMString id, DOMString data);</pre>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Creates a manufacturerData.
- var manufacture = new tizen.BluetoothLEManufacturerData("127", "0x0057");
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Creates a manufacturerData */
+var manufacture = new tizen.BluetoothLEManufacturerData("127", "0x0057");
+</pre>
 </div>
 </dl>
 </div>
@@ -625,10 +629,11 @@ The <em>tizen.bluetooth</em> object allows access to the Bluetooth API.
  2.3.1
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Creates a manufacturerData.
- var manufacture = new tizen.BluetoothLEManufacturerData("127", "0x0057");
- manufacturer.id = "129";
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Creates a manufacturerData */
+var manufacture = new tizen.BluetoothLEManufacturerData("127", "0x0057");
+manufacturer.id = "129";
+</pre>
 </div>
 </li>
 <li class="attribute" id="BluetoothLEManufacturerData::data">
@@ -640,10 +645,11 @@ The <em>tizen.bluetooth</em> object allows access to the Bluetooth API.
  2.3.1
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Creates a manufacturerData.
- var manufacture = new tizen.BluetoothLEManufacturerData("127", "0x0057");
- manufacturer.data = "0x0059"
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Creates a manufacturerData */
+var manufacture = new tizen.BluetoothLEManufacturerData("127", "0x0057");
+manufacturer.data = "0x0059"
+</pre>
 </div>
 </li>
 </ul>
@@ -673,9 +679,13 @@ This dictionary is used as an input parameter of the BluetoothLEAdvertiseData co
           </p>
          </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var advertData = { includeName : false, uuids: ["f236-41a4"], solicitationuuids: ["5857-4d3f"],
-                    appearance: 192, includeTxPowerLevel: false  }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var advertData = 
+{
+&nbsp;&nbsp;&nbsp;includeName: false, uuids: ["f236-41a4"], solicitationuuids: ["5857-4d3f"],
+&nbsp;&nbsp;&nbsp;appearance: 192, includeTxPowerLevel: false
+}
+</pre>
 </div>
 </div>
 <div class="interface" id="BluetoothLEAdvertiseData">
@@ -704,10 +714,14 @@ This represents the data to be advertised as well as the scan response data for
           </p>
          </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var advertData = { includeName : false, uuids: ["f236-41a4"], solicitationuuids: ["5857-4d3f"],
-                    appearance: 192, includeTxPowerLevel: false }
- var advertise = new tizen.BluetoothLEAdvertiseData(advertData);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var advertData =
+{
+&nbsp;&nbsp;&nbsp;includeName: false, uuids: ["f236-41a4"], solicitationuuids: ["5857-4d3f"],
+&nbsp;&nbsp;&nbsp;appearance: 192, includeTxPowerLevel: false
+}
+var advertise = new tizen.BluetoothLEAdvertiseData(advertData);
+</pre>
 </div>
 <div class="constructors">
 <h4 id="BluetoothLEAdvertiseData::constructor">Constructors</h4>
@@ -726,9 +740,10 @@ If attribute is set to null, The default value is set to a false.
  2.3.1
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var advertise = new tizen.BluetoothLEAdvertiseData();
- advertise.includeName = true;
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var advertise = new tizen.BluetoothLEAdvertiseData();
+advertise.includeName = true;
+</pre>
 </div>
 </li>
 <li class="attribute" id="BluetoothLEAdvertiseData::uuids">
@@ -741,9 +756,10 @@ If attribute is set to null, The default value is set to a false.
  2.3.1
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var advertise = new tizen.BluetoothLEAdvertiseData();
- advertise.uuids = ["180d"];
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var advertise = new tizen.BluetoothLEAdvertiseData();
+advertise.uuids = ["180d"];
+</pre>
 </div>
 </li>
 <li class="attribute" id="BluetoothLEAdvertiseData::solicitationuuids">
@@ -756,9 +772,10 @@ If attribute is set to null, The default value is set to a false.
  2.3.1
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var advertise = new tizen.BluetoothLEAdvertiseData();
- advertise.solicitationuuids = ["180f"];
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var advertise = new tizen.BluetoothLEAdvertiseData();
+advertise.solicitationuuids = ["180f"];
+</pre>
 </div>
 </li>
 <li class="attribute" id="BluetoothLEAdvertiseData::appearance">
@@ -775,9 +792,10 @@ See the <a href="https://developer.bluetooth.org/gatt/characteristics/Pages/Char
  2.3.1
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var advertise = new tizen.BluetoothLEAdvertiseData();
- advertise.appearance = 192;
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var advertise = new tizen.BluetoothLEAdvertiseData();
+advertise.appearance = 192;
+</pre>
 </div>
 </li>
 <li class="attribute" id="BluetoothLEAdvertiseData::includeTxPowerLevel">
@@ -790,9 +808,10 @@ If attribute is set to null, The default value is set to a false.
  2.3.1
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var advertise = new tizen.BluetoothLEAdvertiseData();
- advertise.includeTxPowerLevel = true;
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var advertise = new tizen.BluetoothLEAdvertiseData();
+advertise.includeTxPowerLevel = true;
+</pre>
 </div>
 </li>
 <li class="attribute" id="BluetoothLEAdvertiseData::serviceData">
@@ -804,10 +823,11 @@ If attribute is set to null, The default value is set to a false.
  2.3.1
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var advertise = new tizen.BluetoothLEAdvertiseData();
- var service = new tizen.BluetoothLEServiceData("c500-11e5", "0x1811");
- advertise.serviceData = service;
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var advertise = new tizen.BluetoothLEAdvertiseData();
+var service = new tizen.BluetoothLEServiceData("c500-11e5", "0x1811");
+advertise.serviceData = service;
+</pre>
 </div>
 </li>
 <li class="attribute" id="BluetoothLEAdvertiseData::manufacturerData">
@@ -819,10 +839,11 @@ If attribute is set to null, The default value is set to a false.
  2.3.1
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var advertise = new tizen.BluetoothLEAdvertiseData();
- var manufacture = new tizen.BluetoothLEManufacturerData("127", "0x0057");
- advertise.manufacturerData = manufacture;
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var advertise = new tizen.BluetoothLEAdvertiseData();
+var manufacture = new tizen.BluetoothLEManufacturerData("127", "0x0057");
+advertise.manufacturerData = manufacture;
+</pre>
 </div>
 </li>
 </ul>
@@ -858,8 +879,9 @@ If attribute is set to null, The default value is set to a false.
  2.3.1
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> console.log(tizen.bluetooth.deviceMajor);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+console.log(tizen.bluetooth.deviceMajor);
+</pre>
 </div>
 </li>
 <li class="attribute" id="BluetoothManager::deviceMinor">
@@ -872,8 +894,9 @@ If attribute is set to null, The default value is set to a false.
  2.3.1
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> console.log(tizen.bluetooth.deviceMinor);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+console.log(tizen.bluetooth.deviceMinor);
+</pre>
 </div>
 </li>
 <li class="attribute" id="BluetoothManager::deviceService">
@@ -886,8 +909,9 @@ If attribute is set to null, The default value is set to a false.
  2.3.1
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> console.log(tizen.bluetooth.deviceService);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+console.log(tizen.bluetooth.deviceService);
+</pre>
 </div>
 </li>
 </ul>
@@ -937,12 +961,16 @@ Instead, use  <em>http://tizen.org/privilege/bluetooth</em>.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> try {
-     var adapter = tizen.bluetooth.getDefaultAdapter() ;
- } catch (err) {
-     console.log (err.name +": " + err.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+try
+{
+&nbsp;&nbsp;&nbsp;var adapter = tizen.bluetooth.getDefaultAdapter();
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="BluetoothManager::getLEAdapter">
@@ -993,12 +1021,16 @@ Instead, use <em>http://tizen.org/privilege/bluetooth</em>.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> try {
-     var adapter = tizen.bluetooth.getLEAdapter();
- } catch (err) {
-     console.log(err.name +": " + err.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+try
+{
+&nbsp;&nbsp;&nbsp;var adapter = tizen.bluetooth.getLEAdapter();
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+}
+</pre>
 </div>
 </dd>
 </dl>
@@ -1089,10 +1121,11 @@ Registering a service in the device service database            </li>
  2.3.1
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Access adapter name
- var adapter = tizen.bluetooth.getDefaultAdapter();
- console.log ("Bluetooth adapter name: " + adapter.name);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Access adapter name */
+var adapter = tizen.bluetooth.getDefaultAdapter();
+console.log("Bluetooth adapter name: " + adapter.name);
+</pre>
 </div>
 </li>
 <li class="attribute" id="BluetoothAdapter::address">
@@ -1105,9 +1138,10 @@ Registering a service in the device service database            </li>
  2.3.1
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var adapter = tizen.bluetooth.getDefaultAdapter();
- console.log("Bluetooth device address: " + adapter.address);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var adapter = tizen.bluetooth.getDefaultAdapter();
+console.log("Bluetooth device address: " + adapter.address);
+</pre>
 </div>
 </li>
 <li class="attribute" id="BluetoothAdapter::powered">
@@ -1131,9 +1165,10 @@ This attribute holds one of the following 2 values:
  2.3.1
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var adapter = tizen.bluetooth.getDefaultAdapter();
- console.log("Bluetooth state: " + (adapter.powered ? "On" : "Off"));
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var adapter = tizen.bluetooth.getDefaultAdapter();
+console.log("Bluetooth state: " + (adapter.powered ? "On" : "Off"));
+</pre>
 </div>
 </li>
 <li class="attribute" id="BluetoothAdapter::visible">
@@ -1146,10 +1181,11 @@ This attribute holds one of the following 2 values:
  2.3.1
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Queries the current visible state
- var adapter = tizen.bluetooth.getDefaultAdapter();
- console.log ("Bluetooth Visibility: " + (adapter.visible ? "On" : "Off"));
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Queries the current visible state */
+var adapter = tizen.bluetooth.getDefaultAdapter();
+console.log("Bluetooth Visibility: " + (adapter.visible ? "On" : "Off"));
+</pre>
 </div>
 </li>
 </ul>
@@ -1232,25 +1268,30 @@ Instead, use <em>http://tizen.org/privilege/bluetooth</em>.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var adapter = tizen.bluetooth.getDefaultAdapter();
-
- var bt_always_on = tizen.systeminfo.getCapability("http://tizen.org/capability/network.bluetooth.always_on");
-
- function changeName(newName) {
-     if (adapter.name != newName) {
-         // initiate change name
-         adapter.setName(newName, function() {
-             console.log("Adapter name changed to " + adapter.name);
-         },
-         function(e) {
-             console.log("Failed to change name: " + e.message);
-         });
-     }
- }
- if (bt_always_on === false) {
-     changeName("myDevice");
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var adapter = tizen.bluetooth.getDefaultAdapter();
+
+var bt_always_on = tizen.systeminfo.getCapability("http://tizen.org/capability/network.bluetooth.always_on");
+
+function changeName(newName)
+{
+&nbsp;&nbsp;&nbsp;if (adapter.name != newName)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Initiate change name */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;adapter.setName(newName, function()
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Adapter name changed to " + adapter.name);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}, function(e)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Failed to change name: " + e.message);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;});
+&nbsp;&nbsp;&nbsp;}
+}
+if (bt_always_on === false)
+{
+&nbsp;&nbsp;&nbsp;changeName("myDevice");
+}
+</pre>
 </div>
 </dd>
 <dt class="deprecated method" id="BluetoothAdapter::setPowered">
@@ -1330,41 +1371,51 @@ Instead, use <em>http://tizen.org/privilege/bluetooth</em>.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var adapter = tizen.bluetooth.getDefaultAdapter();
-
- function powerOn() {
-      // If adapter is not powered on
-      if (!adapter.powered) {
-           // Initiates power on
-           adapter.setPowered(true, function() {
-               console.log("Bluetooth powered on success.");
-           },
-           function(e) {
-               console.log("Failed to power on Bluetooth: " + e.message);
-           });
-      }
- }
-
- function powerOff() {
-      // If powered on
-      if (adapter.powered) {
-           // Initiates power off
-           adapter.setPowered(false, function() {
-               console.log("Bluetooth powered off successfully.");
-           },
-           function(e) {
-               console.log("Failed to power off Bluetooth: " + e.message);
-           });
-      }
- }
-
- var bt_always_on = tizen.systeminfo.getCapability("http://tizen.org/capability/network.bluetooth.always_on");
- if (bt_always_on === true) {
-     console.log("Bluetooth cannot be turn off or on because this device must be always enabled.");
- } else {
-     powerOn();
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var adapter = tizen.bluetooth.getDefaultAdapter();
+
+function powerOn()
+{
+&nbsp;&nbsp;&nbsp;/* If adapter is not powered on */
+&nbsp;&nbsp;&nbsp;if (!adapter.powered)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Initiates power on */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;adapter.setPowered(true, function()
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Bluetooth powered on success.");
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}, function(e)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Failed to power on Bluetooth: " + e.message);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;});
+&nbsp;&nbsp;&nbsp;}
+}
+
+function powerOff()
+{
+&nbsp;&nbsp;&nbsp;/* If powered on */
+&nbsp;&nbsp;&nbsp;if (adapter.powered)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Initiates power off */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;adapter.setPowered(false, function()
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Bluetooth powered off successfully.");
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}, function(e)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Failed to power off Bluetooth: " + e.message);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;});
+&nbsp;&nbsp;&nbsp;}
+}
+
+var bt_always_on = tizen.systeminfo.getCapability("http://tizen.org/capability/network.bluetooth.always_on");
+if (bt_always_on === true)
+{
+&nbsp;&nbsp;&nbsp;console.log("Bluetooth cannot be turn off or on because this device must be always enabled.");
+}
+else
+{
+&nbsp;&nbsp;&nbsp;powerOn();
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="BluetoothAdapter::setChangeListener">
@@ -1405,21 +1456,26 @@ Instead, use <em>http://tizen.org/privilege/bluetooth</em>.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var changeListener = {
-      onstatechanged: function(powered) {
-          console.log ("Power state is changed into: " + powered);
-      },
-      onnamechanged: function(name) {
-          console.log("Name is changed to: " + name);
-      },
-      onvisibilitychanged: function(visible) {
-          console.log("Visibility is changed into: " + visible);
-      }
- };
-
- var adapter = tizen.bluetooth.getDefaultAdapter();
- adapter.setChangeListener(changeListener);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var changeListener =
+{
+&nbsp;&nbsp;&nbsp;onstatechanged: function(powered)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Power state is changed into: " + powered);
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;onnamechanged: function(name)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Name is changed to: " + name);
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;onvisibilitychanged: function(visible)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Visibility is changed into: " + visible);
+&nbsp;&nbsp;&nbsp;}
+};
+
+var adapter = tizen.bluetooth.getDefaultAdapter();
+adapter.setChangeListener(changeListener);
+</pre>
 </div>
 </dd>
 <dt class="method" id="BluetoothAdapter::unsetChangeListener">
@@ -1448,24 +1504,29 @@ Instead, use <em>http://tizen.org/privilege/bluetooth</em>.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var adapter = tizen.bluetooth.getDefaultAdapter();
-
- var changeListener = {
-      onstatechanged: function(powered) {
-          console.log ("Power state is changed into: " + powered);
-          if (!powered)
-              adapter.unsetChangeListener();
-      },
-      onnamechanged: function(name) {
-          console.log("Name is changed to: " + name);
-      },
-      onvisibilitychanged: function(visible) {
-          console.log("Visibility is changed into: " + visible);
-      }
- };
-
- adapter.setChangeListener(changeListener);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var adapter = tizen.bluetooth.getDefaultAdapter();
+
+var changeListener =
+{
+&nbsp;&nbsp;&nbsp;onstatechanged: function(powered)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Power state is changed into: " + powered);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (!powered)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;adapter.unsetChangeListener();
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;onnamechanged: function(name)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Name is changed to: " + name);
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;onvisibilitychanged: function(visible)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Visibility is changed into: " + visible);
+&nbsp;&nbsp;&nbsp;}
+};
+
+adapter.setChangeListener(changeListener);
+</pre>
 </div>
 </dd>
 <dt class="method" id="BluetoothAdapter::discoverDevices">
@@ -1546,41 +1607,50 @@ Instead, use <em>http://tizen.org/privilege/bluetooth</em>.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var adapter = tizen.bluetooth.getDefaultAdapter();
-
- function startDiscovery() {
-
-  var discoverDevicesSuccessCallback = {
-      onstarted: function() {
-          console.log ("Device discovery started...");
-      },
-      ondevicefound: function(device) {
-          console.log("Found device - name: " + device.name + ", Address: "+ device.address);
-      },
-      ondevicedisappeared: function(address) {
-          console.log("Device disappeared: " + address);
-      },
-      onfinished: function(devices) {
-          console.log("Found Devices");
-          for (var i = 0; i &lt; devices.length; i++) {
-              console.log("Name: " + devices[i].name + ", Address: " + devices[i].address);
-          }
-          console.log("Total: " + devices.length);
-      }
-  };
-
-  // Starts searching for nearby devices, for about 12 sec.
-  adapter.discoverDevices(discoverDevicesSuccessCallback, function(e) {
-      console.log ("Failed to search devices: " + e.message + "(" + e.name + ")");
-  });
- }
-
- function onSetPoweredError(e) {
-     console.log ("Could not turn on device, reason: " + e.message + "(" + e.name + ")");
- }
-
- adapter.setPowered(true, startDiscovery, onSetPoweredError);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var adapter = tizen.bluetooth.getDefaultAdapter();
+
+function startDiscovery()
+{
+&nbsp;&nbsp;&nbsp;var discoverDevicesSuccessCallback =
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;onstarted: function()
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Device discovery started...");
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ondevicefound: function(device)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Found device - name: " + device.name + ", Address: " + device.address);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ondevicedisappeared: function(address)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Device disappeared: " + address);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;onfinished: function(devices)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Found Devices");
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; devices.length; i++)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Name: " + devices[i].name + ", Address: " + devices[i].address);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Total: " + devices.length);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;};
+
+&nbsp;&nbsp;&nbsp;/* Starts searching for nearby devices, for about 12 sec */
+&nbsp;&nbsp;&nbsp;adapter.discoverDevices(discoverDevicesSuccessCallback, function(e)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Failed to search devices: " + e.message + "(" + e.name + ")");
+&nbsp;&nbsp;&nbsp;});
+}
+
+function onSetPoweredError(e)
+{
+&nbsp;&nbsp;&nbsp;console.log("Could not turn on device, reason: " + e.message + "(" + e.name + ")");
+}
+
+adapter.setPowered(true, startDiscovery, onSetPoweredError);
+</pre>
 </div>
 </dd>
 <dt class="method" id="BluetoothAdapter::stopDiscovery">
@@ -1648,56 +1718,67 @@ Instead, use <em>http://tizen.org/privilege/bluetooth</em>.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var adapter = tizen.bluetooth.getDefaultAdapter();
-
- // Calls this method whenever user finds one of the device.
- function cancelDiscovery() {
-    adapter.stopDiscovery(function() {
-        console.log("Stop discovery success.");
-    },
-    function (e) {
-        console.log("Error while stopDiscovery:" + e.message);
-    });
- }
-
- function startDiscovery() {
-
-  var discoverDevicesSuccessCallback = {
-      onstarted: function() {
-          console.log ("Device discovery started...") ;
-      },
-      ondevicefound: function(device) {
-          console.log("Found device - name: " + device.name + ", Address: "+ device.address);
-          // Shows the device to user to check if this is the device user is looking for.
-          // For example, add this to list view.
-
-          cancelDiscovery();
-      },
-      ondevicedisappeared: function(address) {
-          console.log("Device disappeared: " + address);
-          // Removes from list, as it is no longer valid.
-      },
-      onfinished: function(devices) {
-          console.log("Found Devices");
-          for (var i = 0; i &lt; devices.length; i++) {
-              console.log("Name: " + devices[i].name + ", Address: " + devices[i].address);
-          }
-          console.log("Total: " + devices.length);
-      }
-  };
-
-  // Starts searching for nearby devices, for about 12 sec.
-  adapter.discoverDevices(discoverDevicesSuccessCallback, function(e) {
-      console.log ("Failed to search devices: " + e.message + "(" + e.name + ")");
-  });
- }
-
- function onSetPoweredError(e) {
-     console.log ("Could not turn on device, reason: " + e.message + "(" + e.name + ")");
- }
-
- adapter.setPowered(true, startDiscovery, onSetPoweredError);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var adapter = tizen.bluetooth.getDefaultAdapter();
+
+/* Calls this method whenever user finds one of the device */
+function cancelDiscovery()
+{
+&nbsp;&nbsp;&nbsp;adapter.stopDiscovery(function()
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Stop discovery success.");
+&nbsp;&nbsp;&nbsp;}, function(e)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Error while stopDiscovery:" + e.message);
+&nbsp;&nbsp;&nbsp;});
+}
+
+function startDiscovery()
+{
+&nbsp;&nbsp;&nbsp;var discoverDevicesSuccessCallback =
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;onstarted: function()
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Device discovery started...");
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ondevicefound: function(device)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Found device - name: " + device.name + ", Address: " + device.address);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Shows the device to user to check if this is the device user is looking for */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* For example, add this to list view */
+
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cancelDiscovery();
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ondevicedisappeared: function(address)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Device disappeared: " + address);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Removes from list, as it is no longer valid */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;onfinished: function(devices)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Found Devices");
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; devices.length; i++)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Name: " + devices[i].name + ", Address: " + devices[i].address);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Total: " + devices.length);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;};
+
+&nbsp;&nbsp;&nbsp;/* Starts searching for nearby devices, for about 12 sec */
+&nbsp;&nbsp;&nbsp;adapter.discoverDevices(discoverDevicesSuccessCallback, function(e)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Failed to search devices: " + e.message + "(" + e.name + ")");
+&nbsp;&nbsp;&nbsp;});
+}
+
+function onSetPoweredError(e)
+{
+&nbsp;&nbsp;&nbsp;console.log("Could not turn on device, reason: " + e.message + "(" + e.name + ")");
+}
+
+adapter.setPowered(true, startDiscovery, onSetPoweredError);
+</pre>
 </div>
 </dd>
 <dt class="method" id="BluetoothAdapter::getKnownDevices">
@@ -1774,27 +1855,32 @@ Instead, use <em>http://tizen.org/privilege/bluetooth</em>.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var adapter = tizen.bluetooth.getDefaultAdapter();
-
- function onGotDevices(devices) {
-    console.log("Devices");
-    for (var i = 0; i &lt; devices.length; i++) {
-        console.log(" Name: " + devices[i].name + ", Address: " + devices[i].address);
-    }
-    console.log("Total: " + devices.length);
- }
-
- function onError(e) {
-   console.log ("Error: " + e.message);
- }
-
- function onBluetoothsetPowered() {
-    adapter.getKnownDevices(onGotDevices, onError);
- }
-
- // Turns on Bluetooth
- adapter.setPowered(true, onBluetoothsetPowered);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var adapter = tizen.bluetooth.getDefaultAdapter();
+
+function onGotDevices(devices)
+{
+&nbsp;&nbsp;&nbsp;console.log("Devices");
+&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; devices.length; i++)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(" Name: " + devices[i].name + ", Address: " + devices[i].address);
+&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;console.log("Total: " + devices.length);
+}
+
+function onError(e)
+{
+&nbsp;&nbsp;&nbsp;console.log("Error: " + e.message);
+}
+
+function onBluetoothsetPowered()
+{
+&nbsp;&nbsp;&nbsp;adapter.getKnownDevices(onGotDevices, onError);
+}
+
+/* Turns on Bluetooth */
+adapter.setPowered(true, onBluetoothsetPowered);
+</pre>
 </div>
 </dd>
 <dt class="method" id="BluetoothAdapter::getDevice">
@@ -1870,20 +1956,23 @@ Instead, use <em>http://tizen.org/privilege/bluetooth</em>.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function gotDeviceInfo(device) {
-    console.log("Device Name: " + device.name);
-    console.log("Device Address: " + device.address);
-    console.log("Device Class: " + device.deviceClass.major);
-    console.log("Is Bonded: " + (device.isBonded ? "Yes" : "No"));
- }
-
- function onError(e) {
-    console.log ("Could not get device info:" + e.message);
- }
-
- var adapter = tizen.bluetooth.getDefaultAdapter();
- adapter.getDevice("35:F4:59:D1:7A:03", gotDeviceInfo, onError);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function gotDeviceInfo(device)
+{
+&nbsp;&nbsp;&nbsp;console.log("Device Name: " + device.name);
+&nbsp;&nbsp;&nbsp;console.log("Device Address: " + device.address);
+&nbsp;&nbsp;&nbsp;console.log("Device Class: " + device.deviceClass.major);
+&nbsp;&nbsp;&nbsp;console.log("Is Bonded: " + (device.isBonded ? "Yes" : "No"));
+}
+
+function onError(e)
+{
+&nbsp;&nbsp;&nbsp;console.log("Could not get device info:" + e.message);
+}
+
+var adapter = tizen.bluetooth.getDefaultAdapter();
+adapter.getDevice("35:F4:59:D1:7A:03", gotDeviceInfo, onError);
+</pre>
 </div>
 </dd>
 <dt class="method" id="BluetoothAdapter::createBonding">
@@ -1957,19 +2046,22 @@ Instead, use <em>http://tizen.org/privilege/bluetooth</em>.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function onBondingSuccess(device) {
-    console.log("Device Name:" + device.name);
-    console.log("Device Address:" + device.address);
-    console.log("Device Service UUIDs:" + device.uuids.join("\n"));
- }
-
- function onError(e) {
-    console.log ("Could not create bonding, reason:" + e.message);
- }
-
- var adapter = tizen.bluetooth.getDefaultAdapter();
- adapter.createBonding("35:F4:59:D1:7A:03", onBondingSuccess, onError);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function onBondingSuccess(device)
+{
+&nbsp;&nbsp;&nbsp;console.log("Device Name:" + device.name);
+&nbsp;&nbsp;&nbsp;console.log("Device Address:" + device.address);
+&nbsp;&nbsp;&nbsp;console.log("Device Service UUIDs:" + device.uuids.join("\n"));
+}
+
+function onError(e)
+{
+&nbsp;&nbsp;&nbsp;console.log("Could not create bonding, reason:" + e.message);
+}
+
+var adapter = tizen.bluetooth.getDefaultAdapter();
+adapter.createBonding("35:F4:59:D1:7A:03", onBondingSuccess, onError);
+</pre>
 </div>
 </dd>
 <dt class="method" id="BluetoothAdapter::destroyBonding">
@@ -2043,25 +2135,30 @@ Instead, use <em>http://tizen.org/privilege/bluetooth</em>.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var adapter = tizen.bluetooth.getDefaultAdapter();
-
- function gotDevice(device) {
-    if (device.isBonded) {
-      // Initiates destroying bonding
-      adapter.destroyBonding(device.address, function() {
-           console.log("Succeeded to destroy the bond success with:" + device.address);
-       },
-       function(e) {
-           console.log("Failed to destroy the bond with " + device.address + ", reason: " + e.message);
-       });
-    }
- }
-
- var deviceAddress = "35:F4:59:D1:7A:03";
- adapter.getDevice(deviceAddress, gotDevice, function(e) {
-     console.log("Failed to get device info for " + deviceAddress + ", reason: " + e.message);
- });
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var adapter = tizen.bluetooth.getDefaultAdapter();
+
+function gotDevice(device)
+{
+&nbsp;&nbsp;&nbsp;if (device.isBonded)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Initiates destroying bonding */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;adapter.destroyBonding(device.address, function()
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Succeeded to destroy the bond success with:" + device.address);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}, function(e)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Failed to destroy the bond with " + device.address + ", reason: " + e.message);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;});
+&nbsp;&nbsp;&nbsp;}
+}
+
+var deviceAddress = "35:F4:59:D1:7A:03";
+adapter.getDevice(deviceAddress, gotDevice, function(e)
+{
+&nbsp;&nbsp;&nbsp;console.log("Failed to get device info for " + deviceAddress + ", reason: " + e.message);
+});
+</pre>
 </div>
 </dd>
 <dt class="method" id="BluetoothAdapter::registerRFCOMMServiceByUUID">
@@ -2147,52 +2244,58 @@ Instead, use <em>http://tizen.org/privilege/bluetooth</em>.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var adapter = tizen.bluetooth.getDefaultAdapter();
- // Holds currently registered service record
- var chatServiceHandler = null;
- // Holds currently open socket
- var serviceSocket = null;
-
- function chatServiceSuccessCb(recordHandler) {
-    console.log("Chat service registration succeeds!");
-    chatServiceHandler = recordHandler;
-    recordHandler.onconnect = function(socket) {
-        console.log("Client connected: " + socket.peer.name + "," + socket.peer.address);
-        serviceSocket = socket;
-        // Messages received from remote device
-        socket.onmessage = function() {
-             var data = socket.readData();
-             // Handles message code goes here
-
-        };
-
-        socket.onclose = function() {
-            console.log('The socket is closed.');
-            serviceSocket = null;
-        };
-    };
- };
-
- function publishChatService() {
-    var CHAT_SERVICE_UUID = "5BCE9431-6C75-32AB-AFE0-2EC108A30860";
-    adapter.registerRFCOMMServiceByUUID(CHAT_SERVICE_UUID, "Chat service", chatServiceSuccessCb,
-      // Error handler
-      function(e) {
-           console.log( "Could not register service record, Error: " + e.message);
-      });
- }
-
- function unregisterChatService() {
-      if (chatServiceHandler != null) {
-          chatServiceHandler.unregister(function() {
-               console.log("Chat service is unregistered");
-               chatServiceHandler = null;
-           }, function(e) {
-               console.log("Failed to unregister service: " + e.message);
-           });
-      }
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var adapter = tizen.bluetooth.getDefaultAdapter();
+/* Holds currently registered service record */
+var chatServiceHandler = null;
+/* Holds currently open socket */
+var serviceSocket = null;
+
+function chatServiceSuccessCb(recordHandler)
+{
+&nbsp;&nbsp;&nbsp;console.log("Chat service registration succeeds!");
+&nbsp;&nbsp;&nbsp;chatServiceHandler = recordHandler;
+&nbsp;&nbsp;&nbsp;recordHandler.onconnect = function(socket)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Client connected: " + socket.peer.name + "," + socket.peer.address);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;serviceSocket = socket;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Messages received from remote device */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;socket.onmessage = function()
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var data = socket.readData();
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Handles message code goes here */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;};
+
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;socket.onclose = function()
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('The socket is closed.');
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;serviceSocket = null;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;};
+&nbsp;&nbsp;&nbsp;};
+};
+
+function publishChatService()
+{
+&nbsp;&nbsp;&nbsp;var CHAT_SERVICE_UUID = "5BCE9431-6C75-32AB-AFE0-2EC108A30860";
+&nbsp;&nbsp;&nbsp;adapter.registerRFCOMMServiceByUUID(CHAT_SERVICE_UUID, "Chat service", chatServiceSuccessCb,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Error handler: function(e) {console.log("Could not register service record, Error: " + e.message);} */);
+}
+
+function unregisterChatService() 
+{
+&nbsp;&nbsp;&nbsp;if (chatServiceHandler != null)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;chatServiceHandler.unregister(function()
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Chat service is unregistered");
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;chatServiceHandler = null;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}, function(e)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Failed to unregister service: " + e.message);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;});
+&nbsp;&nbsp;&nbsp;}
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="BluetoothAdapter::getBluetoothProfileHandler">
@@ -2239,16 +2342,20 @@ Instead, use <em>http://tizen.org/privilege/bluetooth</em>.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var adapter = tizen.bluetooth.getDefaultAdapter();
- var healthProfileHandler;
- var healthCapability = tizen.systeminfo.getCapability("http://tizen.org/feature/network.bluetooth.health");
-
- if (healthCapability) {
-     healthProfileHandler = adapter.getBluetoothProfileHandler("HEALTH");
- } else {
-     console.log("Bluetooth Health Profile is not supported on this device.");
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var adapter = tizen.bluetooth.getDefaultAdapter();
+var healthProfileHandler;
+var healthCapability = tizen.systeminfo.getCapability("http://tizen.org/feature/network.bluetooth.health");
+
+if (healthCapability)
+{
+&nbsp;&nbsp;&nbsp;healthProfileHandler = adapter.getBluetoothProfileHandler("HEALTH");
+}
+else
+{
+&nbsp;&nbsp;&nbsp;console.log("Bluetooth Health Profile is not supported on this device.");
+}
+</pre>
 </div>
 </dd>
 </dl>
@@ -2352,13 +2459,13 @@ Instead, use <em>http://tizen.org/privilege/bluetooth</em>.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var adapter = tizen.bluetooth.getLEAdapter();
- adapter.startScan(
-     function onsuccess(device) {
-         console.log("[Found device] address: " + device.address);
-     }
- );
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var adapter = tizen.bluetooth.getLEAdapter();
+adapter.startScan(function onsuccess(device)
+{
+&nbsp;&nbsp;&nbsp;console.log("[Found device] address: " + device.address);
+});
+</pre>
 </div>
 </dd>
 <dt class="method" id="BluetoothLEAdapter::stopScan">
@@ -2399,16 +2506,17 @@ Instead, use <em>http://tizen.org/privilege/bluetooth</em>.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var adapter = tizen.bluetooth.getLEAdapter();
- adapter.startScan(
-     function onsuccess(device) {
-         if (device.address == "11:22:33:44:55:66") {
-             console.log("Found device: " + device.name);
-             adapter.stopScan();
-         }
-     }
- );
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var adapter = tizen.bluetooth.getLEAdapter();
+adapter.startScan(function onsuccess(device)
+{
+&nbsp;&nbsp;&nbsp;if (device.address == "11:22:33:44:55:66")
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Found device: " + device.name);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;adapter.stopScan();
+&nbsp;&nbsp;&nbsp;}
+});
+</pre>
 </div>
 </dd>
 <dt class="method" id="BluetoothLEAdapter::startAdvertise">
@@ -2498,32 +2606,30 @@ Instead, use <em>http://tizen.org/privilege/bluetooth</em>.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var adapter = tizen.bluetooth.getLEAdapter();
- var battery_svc_uuid_16 = "180f"; // the service UUID, 16-bit UUID is supported. (e.g. 180f)
- var heart_rate_svc_uuid_16 = "180d"; // the service solicitation UUID, 16-bit UUID is supported. (e.g. 180d)
- var advertiseOptions = {
-     includeName: true,          // Whether the device name should be included
-     includeTxPowerLevel: true,    // Whether the transmission power level should be included
-     appearance: 192,     // The external appearance of device, 192 - Generic Watch
-     uuids: [battery_svc_uuid_16],
-     solicitationuuids: [heart_rate_svc_uuid_16]
- };
-
- var advertiseData = new tizen.BluetoothLEAdvertiseData(advertiseOptions);
- var connectable = true;
-
- adapter.startAdvertise(
-     advertiseData,
-     "ADVERTISE",
-     function onstate(state) {
-         console.log("Advertiser state: " + state);
-     },
-     function(e) {
-         console.log("Failed to startAdvertise : " + e.message);
-     },
-     "LOW_LATENCY",
-     connectable);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var adapter = tizen.bluetooth.getLEAdapter();
+var battery_svc_uuid_16 = "180f"; /* Service UUID, 16-bit UUID is supported (e.g. 180f) */
+var heart_rate_svc_uuid_16 = "180d"; /* Service solicitation UUID, 16-bit UUID is supported (e.g. 180d) */
+var advertiseOptions =
+{
+&nbsp;&nbsp;&nbsp;includeName: true, /* Whether the device name should be included */
+&nbsp;&nbsp;&nbsp;includeTxPowerLevel: true, /* Whether the transmission power level should be included */
+&nbsp;&nbsp;&nbsp;appearance: 192, /* External appearance of device, 192 - Generic Watch */
+&nbsp;&nbsp;&nbsp;uuids: [battery_svc_uuid_16],
+&nbsp;&nbsp;&nbsp;solicitationuuids: [heart_rate_svc_uuid_16]
+};
+
+var advertiseData = new tizen.BluetoothLEAdvertiseData(advertiseOptions);
+var connectable = true;
+
+adapter.startAdvertise(advertiseData, "ADVERTISE", function onstate(state)
+{
+&nbsp;&nbsp;&nbsp;console.log("Advertiser state: " + state);
+}, function(e)
+{
+&nbsp;&nbsp;&nbsp;console.log("Failed to startAdvertise: " + e.message);
+}, "LOW_LATENCY", connectable);
+</pre>
 </div>
 </dd>
 <dt class="method" id="BluetoothLEAdapter::stopAdvertise">
@@ -2564,25 +2670,27 @@ Instead, use <em>http://tizen.org/privilege/bluetooth</em>.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var adapter = tizen.bluetooth.getLEAdapter();
- var battery_svc_uuid_16 = "180f"; // the service UUID, 16-bit UUID is supported. (e.g. 180f)
- var heart_rate_svc_uuid_16 = "180d"; // the service solicitation UUID, 16-bit UUID is supported. (e.g. 180d)
- var advertiseOptions = {
-     includeName: true,          // Whether the device name should be included
-     includeTxPowerLevel: true,    // Whether the transmission power level should be included
-     appearance: 192,     // The external appearance of device, 192 - Generic Watch
-     uuids: [battery_svc_uuid_16],
-     solicitationuuids: [heart_rate_svc_uuid_16]
- };
-
- var advertiseData = new tizen.BluetoothLEAdvertiseData(advertiseOptions);
-
- adapter.startAdvertise(advertiseData, "ADVERTISE",
-     function onstate(state) {
-         console.log("Advertiser state: " + state);
-     });
- adapter.stopAdvertise();
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var adapter = tizen.bluetooth.getLEAdapter();
+var battery_svc_uuid_16 = "180f"; /* Service UUID, 16-bit UUID is supported (e.g. 180f) */
+var heart_rate_svc_uuid_16 = "180d"; /* Service solicitation UUID, 16-bit UUID is supported (e.g. 180d) */
+var advertiseOptions =
+{
+&nbsp;&nbsp;&nbsp;includeName: true, /* Whether the device name should be included */
+&nbsp;&nbsp;&nbsp;includeTxPowerLevel: true, /* Whether the transmission power level should be included */
+&nbsp;&nbsp;&nbsp;appearance: 192, /* External appearance of device, 192 - Generic Watch */
+&nbsp;&nbsp;&nbsp;uuids: [battery_svc_uuid_16],
+&nbsp;&nbsp;&nbsp;solicitationuuids: [heart_rate_svc_uuid_16]
+};
+
+var advertiseData = new tizen.BluetoothLEAdvertiseData(advertiseOptions);
+
+adapter.startAdvertise(advertiseData, "ADVERTISE", function onstate(state)
+{
+&nbsp;&nbsp;&nbsp;console.log("Advertiser state: " + state);
+});
+adapter.stopAdvertise();
+</pre>
 </div>
 </dd>
 </dl>
@@ -2603,20 +2711,21 @@ Instead, use <em>http://tizen.org/privilege/bluetooth</em>.
  2.3.1
           </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">  function onconnected(device) {
-      console.log("Connected to device");
-      var service = device.getService(device.uuids[0]);
-      console.log("Service got");
-  }
-
- var adapter = tizen.bluetooth.getLEAdapter();
- adapter.startScan(
-    function onsuccess(device) {
-      console.log("[Found device] address: " + device.address);
-      device.connect(onconnected.bind(null, device), onerror);
- });
-
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function onconnected(device)
+{
+&nbsp;&nbsp;&nbsp;console.log("Connected to device");
+&nbsp;&nbsp;&nbsp;var service = device.getService(device.uuids[0]);
+&nbsp;&nbsp;&nbsp;console.log("Service got");
+}
+
+var adapter = tizen.bluetooth.getLEAdapter();
+adapter.startScan(function onsuccess(device)
+{
+&nbsp;&nbsp;&nbsp;console.log("[Found device] address: " + device.address);
+&nbsp;&nbsp;&nbsp;device.connect(onconnected.bind(null, device), onerror);
+});
+</pre>
 </div>
 <div class="attributes">
 <h4>Attributes</h4>
@@ -2631,10 +2740,10 @@ Instead, use <em>http://tizen.org/privilege/bluetooth</em>.
  2.3.1
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var service = device.getService(device.uuids[0]);
- console.log("Service UUID " + service.uuid);
-
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var service = device.getService(device.uuids[0]);
+console.log("Service UUID " + service.uuid);
+</pre>
 </div>
 </li>
 <li class="attribute" id="BluetoothGATTService::services">
@@ -2648,12 +2757,13 @@ Instead, use <em>http://tizen.org/privilege/bluetooth</em>.
  2.3.1
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var service = device.getService(device.uuids[0]);
- for (var i = 0; i  service.services.length; ++i) {
-     console.log("Subservices UUID " + service.services[i].uuid);
- }
-
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var service = device.getService(device.uuids[0]);
+for (var i = 0; i  service.services.length; ++i)
+{
+&nbsp;&nbsp;&nbsp;console.log("Subservices UUID " + service.services[i].uuid);
+}
+</pre>
 </div>
 </li>
 <li class="attribute" id="BluetoothGATTService::characteristics">
@@ -2667,12 +2777,13 @@ Instead, use <em>http://tizen.org/privilege/bluetooth</em>.
  2.3.1
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var service = device.getService(device.uuids[0]);
- for (var i = 0; i  service.characteristics.length; ++i) {
-     console.log("Subservices UUID " + service.characteristics[i].isWritable);
- }
-
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var service = device.getService(device.uuids[0]);
+for (var i = 0; i  service.characteristics.length; ++i)
+{
+&nbsp;&nbsp;&nbsp;console.log("Subservices UUID " + service.characteristics[i].isWritable);
+}
+</pre>
 </div>
 </li>
 </ul>
@@ -2868,34 +2979,40 @@ Instead, use <em>http://tizen.org/privilege/bluetooth</em>.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function onerror(e) {
-      console.log("Failed to connect to device: " + e.message);
- }
-
- function proccessDevice(device) {
-     device.connect(onConnected, onerror);
-     function onConnected() {
-         var service = device.getService(device.uuids[0]);
-         if (service.characteristics.length &gt; 0) {
-             var characteristic = service.characteristics[0];
-             characteristic.readValue(function(val) {
-                  console.log("Value read: " + val);
-                  device.disconnect();
-             });
-         }
-     }
- }
-
- var adapter = tizen.bluetooth.getLEAdapter();
- adapter.startScan(
-     function onsuccess(device) {
-         if (device.address == "11:22:33:44:55:66") {
-             console.log("Found device: " + device.name);
-             proccessDevice(device);
-         }
-     }
- );
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function onerror(e)
+{
+&nbsp;&nbsp;&nbsp;console.log("Failed to connect to device: " + e.message);
+}
+
+function proccessDevice(device)
+{
+&nbsp;&nbsp;&nbsp;device.connect(onConnected, onerror);
+&nbsp;&nbsp;&nbsp;function onConnected()
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var service = device.getService(device.uuids[0]);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (service.characteristics.length &gt; 0)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var characteristic = service.characteristics[0];
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;characteristic.readValue(function(val)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Value read: " + val);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;device.disconnect();
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;});
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;}
+}
+
+var adapter = tizen.bluetooth.getLEAdapter();
+adapter.startScan(function onsuccess(device)
+{
+&nbsp;&nbsp;&nbsp;if (device.address == "11:22:33:44:55:66")
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Found device: " + device.name);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;proccessDevice(device);
+&nbsp;&nbsp;&nbsp;}
+});
+</pre>
 </div>
 </dd>
 <dt class="method" id="BluetoothGATTCharacteristic::writeValue">
@@ -2965,37 +3082,44 @@ Instead, use  <em>http://tizen.org/privilege/bluetooth</em>.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function onerror(e) {
-      console.log("Failed to connect to device: " + e.message);
- }
-
- function proccessDevice(device) {
-     device.connect(onConnected, onerror);
-     function onConnected() {
-         var service = device.getService(device.uuids[0]);
-         if (service.characteristics.length &gt; 0) {
-             var characteristic = service.characteristics[0];
-             var data = new Array(1, 2, 3, 4, 5, 6);
-             characteristic.writeValue(data, function() {
-                  console.log("Value written");
-                  device.disconnect();
-             }, function(e) {
-                  console.log("Failed to write: " + e.message);
-             });
-         }
-     }
- }
-
- var adapter = tizen.bluetooth.getLEAdapter();
- adapter.startScan(
-     function onsuccess(device) {
-         if (device.address == "11:22:33:44:55:66") {
-             console.log("Found device: " + device.name);
-             proccessDevice(device);
-         }
-     }
- );
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function onerror(e)
+{
+&nbsp;&nbsp;&nbsp;console.log("Failed to connect to device: " + e.message);
+}
+
+function proccessDevice(device)
+{
+&nbsp;&nbsp;&nbsp;device.connect(onConnected, onerror);
+&nbsp;&nbsp;&nbsp;function onConnected()
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var service = device.getService(device.uuids[0]);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (service.characteristics.length &gt; 0)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var characteristic = service.characteristics[0];
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var data = new Array(1, 2, 3, 4, 5, 6);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;characteristic.writeValue(data, function()
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Value written");
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;device.disconnect();
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}, function(e)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Failed to write: " + e.message);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;});
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;}
+}
+
+var adapter = tizen.bluetooth.getLEAdapter();
+adapter.startScan(function onsuccess(device)
+{
+&nbsp;&nbsp;&nbsp;if (device.address == "11:22:33:44:55:66")
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Found device: " + device.name);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;proccessDevice(device);
+&nbsp;&nbsp;&nbsp;}
+});
+</pre>
 </div>
 </dd>
 <dt class="method" id="BluetoothGATTCharacteristic::addValueChangeListener">
@@ -3044,36 +3168,40 @@ Instead, use <em>http://tizen.org/privilege/bluetooth</em>.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function proccessDevice(device) {
-
-     function onConnected() {
-         var service = device.getService("5BCE9431-6C75-32AB-AFE0-2EC108A30860");
-         if (service.characteristics.length &gt; 0) {
-             var characteristic = service.characteristics[0];
-             var watchID;
-
-             watchID = characteristic.addValueChangeListener(function(value) {
-                 console.log("Characteristic value changed: " + value);
-                 characteristic.removeValueChangeListener(watchID);
-                 device.disconnect();
-             });
-         }
-     }
-
-     device.connect(onConnected);
- }
-
- var adapter = tizen.bluetooth.getLEAdapter();
- adapter.startScan(
-     function onsuccess(device) {
-         if (device.address == "11:22:33:44:55:66") {
-             console.log("Found device: " + device.name);
-             adapter.stopScan();
-             proccessDevice(device);
-         }
-     }
- );
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function proccessDevice(device)
+{
+&nbsp;&nbsp;&nbsp;function onConnected()
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var service = device.getService("5BCE9431-6C75-32AB-AFE0-2EC108A30860");
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (service.characteristics.length &gt; 0)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var characteristic = service.characteristics[0];
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var watchID;
+
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;watchID = characteristic.addValueChangeListener(function(value)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Characteristic value changed: " + value);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;characteristic.removeValueChangeListener(watchID);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;device.disconnect();
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;});
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;}
+
+&nbsp;&nbsp;&nbsp;device.connect(onConnected);
+}
+
+var adapter = tizen.bluetooth.getLEAdapter();
+adapter.startScan(function onsuccess(device)
+{
+&nbsp;&nbsp;&nbsp;if (device.address == "11:22:33:44:55:66")
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Found device: " + device.name);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;adapter.stopScan();
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;proccessDevice(device);
+&nbsp;&nbsp;&nbsp;}
+});
+</pre>
 </div>
 </dd>
 <dt class="method" id="BluetoothGATTCharacteristic::removeValueChangeListener">
@@ -3186,35 +3314,41 @@ Instead, use <em>http://tizen.org/privilege/bluetooth</em>.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function onerror(e) {
-      console.log("Failed to connect to device: " + e.message);
- }
-
- function proccessDevice(device) {
-     device.connect(onConnected, onerror);
-     function onConnected() {
-         var service = device.getService(device.uuids[0]);
-         if (service.characteristics.length &gt; 0) {
-             var characteristic = service.characteristics[0];
-             var descriptor = characteristic.descriptors[0];
-             descriptor.readValue(function(val) {
-                  console.log("Value read: " + val);
-                  device.disconnect();
-             });
-         }
-     }
- }
-
- var adapter = tizen.bluetooth.getLEAdapter();
- adapter.startScan(
-     function onsuccess(device) {
-         if (device.address == "11:22:33:44:55:66") {
-             console.log("Found device: " + device.name);
-             proccessDevice(device);
-         }
-     }
- );
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function onerror(e)
+{
+&nbsp;&nbsp;&nbsp;console.log("Failed to connect to device: " + e.message);
+}
+
+function proccessDevice(device)
+{
+&nbsp;&nbsp;&nbsp;device.connect(onConnected, onerror);
+&nbsp;&nbsp;&nbsp;function onConnected()
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var service = device.getService(device.uuids[0]);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (service.characteristics.length &gt; 0)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var characteristic = service.characteristics[0];
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var descriptor = characteristic.descriptors[0];
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;descriptor.readValue(function(val)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Value read: " + val);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;device.disconnect();
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;});
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;}
+}
+
+var adapter = tizen.bluetooth.getLEAdapter();
+adapter.startScan(function onsuccess(device)
+{
+&nbsp;&nbsp;&nbsp;if (device.address == "11:22:33:44:55:66")
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Found device: " + device.name);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;proccessDevice(device);
+&nbsp;&nbsp;&nbsp;}
+});
+</pre>
 </div>
 </dd>
 <dt class="method" id="BluetoothGATTDescriptor::writeValue">
@@ -3284,38 +3418,45 @@ Instead, use <em>http://tizen.org/privilege/bluetooth</em>.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function onerror(e) {
-      console.log("Failed to connect to device: " + e.message);
- }
-
- function proccessDevice(device) {
-     device.connect(onConnected, onerror);
-     function onConnected() {
-         var service = device.getService(device.uuids[0]);
-         if (service.characteristics.length &gt; 0) {
-             var characteristic = service.characteristics[0];
-             var data = new Array(1, 2, 3, 4, 5, 6);
-             var descriptor = characteristic.descriptors[0];
-             descriptor.writeValue(data, function() {
-                  console.log("Value written");
-                  device.disconnect();
-             }, function(e) {
-                  console.log("Failed to write: " + e.message);
-             });
-         }
-     }
- }
-
- var adapter = tizen.bluetooth.getLEAdapter();
- adapter.startScan(
-     function onsuccess(device) {
-         if (device.address == "11:22:33:44:55:66") {
-             console.log("Found device: " + device.name);
-             proccessDevice(device);
-         }
-     }
- );
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function onerror(e)
+{
+&nbsp;&nbsp;&nbsp;console.log("Failed to connect to device: " + e.message);
+}
+
+function proccessDevice(device)
+{
+&nbsp;&nbsp;&nbsp;device.connect(onConnected, onerror);
+&nbsp;&nbsp;&nbsp;function onConnected()
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var service = device.getService(device.uuids[0]);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (service.characteristics.length &gt; 0)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var characteristic = service.characteristics[0];
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var data = new Array(1, 2, 3, 4, 5, 6);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var descriptor = characteristic.descriptors[0];
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;descriptor.writeValue(data, function()
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Value written");
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;device.disconnect();
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}, function(e)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Failed to write: " + e.message);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;});
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;}
+}
+
+var adapter = tizen.bluetooth.getLEAdapter();
+adapter.startScan(function onsuccess(device)
+{
+&nbsp;&nbsp;&nbsp;if (device.address == "11:22:33:44:55:66")
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Found device: " + device.name);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;proccessDevice(device);
+&nbsp;&nbsp;&nbsp;}
+});
+</pre>
 </div>
 </dd>
 </dl>
@@ -3565,11 +3706,13 @@ A <em>BluetoothDevice</em> object can be retrieved using one of the following AP
  2.3.1
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var adapter = tizen.bluetooth.getDefaultAdapter();
- adapter.getDevice("11:22:33:44:55:66", function(device) {
-    console.log("Device Name: " + device.name);
- });
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var adapter = tizen.bluetooth.getDefaultAdapter();
+adapter.getDevice("11:22:33:44:55:66", function(device)
+{
+&nbsp;&nbsp;&nbsp;console.log("Device Name: " + device.name);
+});
+</pre>
 </div>
 </li>
 <li class="attribute" id="BluetoothDevice::address">
@@ -3582,11 +3725,13 @@ A <em>BluetoothDevice</em> object can be retrieved using one of the following AP
  2.3.1
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var adapter = tizen.bluetooth.getDefaultAdapter();
- adapter.getDevice("11:22:33:44:55:66", function(device) {
-    console.log("Device Address: " + device.address);
- });
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var adapter = tizen.bluetooth.getDefaultAdapter();
+adapter.getDevice("11:22:33:44:55:66", function(device)
+{
+&nbsp;&nbsp;&nbsp;console.log("Device Address: " + device.address);
+});
+</pre>
 </div>
 </li>
 <li class="attribute" id="BluetoothDevice::deviceClass">
@@ -3599,11 +3744,13 @@ A <em>BluetoothDevice</em> object can be retrieved using one of the following AP
  2.3.1
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var adapter = tizen.bluetooth.getDefaultAdapter();
- adapter.getDevice("11:22:33:44:55:66", function(device) {
-    console.log("Device Major Class: " + device.deviceClass.major);
- });
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var adapter = tizen.bluetooth.getDefaultAdapter();
+adapter.getDevice("11:22:33:44:55:66", function(device)
+{
+&nbsp;&nbsp;&nbsp;console.log("Device Major Class: " + device.deviceClass.major);
+});
+</pre>
 </div>
 </li>
 <li class="attribute" id="BluetoothDevice::isBonded">
@@ -3616,11 +3763,13 @@ A <em>BluetoothDevice</em> object can be retrieved using one of the following AP
  2.3.1
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var adapter = tizen.bluetooth.getDefaultAdapter();
- adapter.getDevice("11:22:33:44:55:66", function(device) {
-    console.log("Is bonded: " + (device.isBonded ? "Yes" : "No"));
- });
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var adapter = tizen.bluetooth.getDefaultAdapter();
+adapter.getDevice("11:22:33:44:55:66", function(device)
+{
+&nbsp;&nbsp;&nbsp;console.log("Is bonded: " + (device.isBonded ? "Yes" : "No"));
+});
+</pre>
 </div>
 </li>
 <li class="attribute" id="BluetoothDevice::isTrusted">
@@ -3633,11 +3782,13 @@ A <em>BluetoothDevice</em> object can be retrieved using one of the following AP
  2.3.1
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var adapter = tizen.bluetooth.getDefaultAdapter();
- adapter.getDevice("11:22:33:44:55:66", function(device) {
-    console.log("Is trusted: " + (device.isTrusted ? "Yes" : "No"));
- });
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var adapter = tizen.bluetooth.getDefaultAdapter();
+adapter.getDevice("11:22:33:44:55:66", function(device)
+{
+&nbsp;&nbsp;&nbsp;console.log("Is trusted: " + (device.isTrusted ? "Yes" : "No"));
+});
+</pre>
 </div>
 </li>
 <li class="attribute" id="BluetoothDevice::isConnected">
@@ -3650,11 +3801,13 @@ A <em>BluetoothDevice</em> object can be retrieved using one of the following AP
  2.3.1
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var adapter = tizen.bluetooth.getDefaultAdapter();
- adapter.getDevice("11:22:33:44:55:66", function(device) {
-    console.log("Is connected: " + (device.isConnected ? "Yes" : "No"));
- });
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var adapter = tizen.bluetooth.getDefaultAdapter();
+adapter.getDevice("11:22:33:44:55:66", function(device)
+{
+&nbsp;&nbsp;&nbsp;console.log("Is connected: " + (device.isConnected ? "Yes" : "No"));
+});
+</pre>
 </div>
 </li>
 <li class="attribute" id="BluetoothDevice::uuids">
@@ -3668,27 +3821,31 @@ A <em>BluetoothDevice</em> object can be retrieved using one of the following AP
  2.3.1
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var adapter = tizen.bluetooth.getDefaultAdapter();
- var CHAT_SERVICE_UUID = "5BCE9431-6C75-32AB-AFE0-2EC108A30860";
- adapter.getDevice("11:22:33:44:55:66", function(device) {
-    var uuids = device.uuids;
-    var services = "";
-    for (var i = 0; i &lt; uuids.length; i++) {
-        services += uuids[i] + "\n";
-    }
-    console.log ("Services found: " + services);
-    if (uuids.indexOf(CHAT_SERVICE_UUID) != -1) {
-        // Connects to service
-        device.connectToServiceByUUID(CHAT_SERVICE_UUID, function(socket) {
-            //
-            // Connected to service, handle socket
-            //
-        }, function (e) {
-            console.log("Could not connect to chat service !!!. Error: " + e.message);
-        });
-    }
- });
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var adapter = tizen.bluetooth.getDefaultAdapter();
+var CHAT_SERVICE_UUID = "5BCE9431-6C75-32AB-AFE0-2EC108A30860";
+adapter.getDevice("11:22:33:44:55:66", function(device)
+{
+&nbsp;&nbsp;&nbsp;var uuids = device.uuids;
+&nbsp;&nbsp;&nbsp;var services = "";
+&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; uuids.length; i++)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;services += uuids[i] + "\n";
+&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;console.log("Services found: " + services);
+&nbsp;&nbsp;&nbsp;if (uuids.indexOf(CHAT_SERVICE_UUID) != -1)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Connects to service */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;device.connectToServiceByUUID(CHAT_SERVICE_UUID, function(socket)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Connected to service, handle socket */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}, function(e)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Could not connect to chat service !!!. Error: " + e.message);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;});
+&nbsp;&nbsp;&nbsp;}
+});
+</pre>
 </div>
 </li>
 </ul>
@@ -3767,57 +3924,68 @@ Instead, use <em>http://tizen.org/privilege/bluetooth</em>.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var adapter = tizen.bluetooth.getDefaultAdapter();
- var clientSocket = null;
-
- // Calls a method that is invoked when user wants to send a message to a remote device.
- function sendMessage(msg) {
-    // Validates socket state, if everything is ok.
-    if (clientSocket != null &amp;&amp; clientSocket.state == "OPEN") {
-        // Sends the message.
-        clientSocket.writeData(msg);
-    }
- }
-
- // Calls a method that is invoked when a socket is open.
- function onSocketConnected(socket) {
-    clientSocket = socket;
-    console.log("Opening a socket successfully!!!");
-    socket.onmessage = function () {
-        var data = socket.readData();
-        var recvmsg = "";
-        for (var i = 0; i &lt; data.length; i++)
-        {
-           recvmsg += String.fromCharCode(data[i]);
-        }
-        console.log("server msg &gt;&gt; " + recvmsg);
-    };
-
-    socket.onclose = function() {
-        console.log("socket disconnected.");
-    };
- }
-
- function onDeviceReady(device) {
-    // Validates device and service uuid
-    if (device.uuids.indexOf("5BCE9431-6C75-32AB-AFE0-2EC108A30860") != -1) {
-       // Opens socket
-       device.connectToServiceByUUID("5BCE9431-6C75-32AB-AFE0-2EC108A30860", onSocketConnected, function(e) {
-           console.log ("Error connecting to service. Reason: " + e.message);
-        });
-    }
-    else {
-        console.log ("Chat service is not supported by this device");
-    }
- }
-
- function onSetPowered() {
-    // Gets the BluetoothDevice object.
-    adapter.getDevice("35:F4:59:D1:7A:03", onDeviceReady, function(e) { console.log("Error: " + e.message); });
- }
-
- adapter.setPowered(true, onSetPowered, function(e) {console.log ("Could not turn on Bluetooth adapter. reason: " + e.message); });
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var adapter = tizen.bluetooth.getDefaultAdapter();
+var clientSocket = null;
+
+/* Calls a method that is invoked when user wants to send a message to a remote device */
+function sendMessage(msg)
+{
+&nbsp;&nbsp;&nbsp;/* Validates socket state, if everything is ok */
+&nbsp;&nbsp;&nbsp;if (clientSocket != null &amp;&amp; clientSocket.state == "OPEN")
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Sends the message */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;clientSocket.writeData(msg);
+&nbsp;&nbsp;&nbsp;}
+}
+
+/* Calls a method that is invoked when a socket is open */
+function onSocketConnected(socket)
+{
+&nbsp;&nbsp;&nbsp;clientSocket = socket;
+&nbsp;&nbsp;&nbsp;console.log("Opening a socket successfully!!!");
+&nbsp;&nbsp;&nbsp;socket.onmessage = function()
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var data = socket.readData();
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var recvmsg = "";
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; data.length; i++)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;recvmsg += String.fromCharCode(data[i]);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("server msg &gt;&gt; " + recvmsg);
+&nbsp;&nbsp;&nbsp;};
+
+&nbsp;&nbsp;&nbsp;socket.onclose = function()
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("socket disconnected.");
+&nbsp;&nbsp;&nbsp;};
+}
+
+function onDeviceReady(device)
+{
+&nbsp;&nbsp;&nbsp;/* Validates device and service uuid */
+&nbsp;&nbsp;&nbsp;if (device.uuids.indexOf("5BCE9431-6C75-32AB-AFE0-2EC108A30860") != -1)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Opens socket */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;device.connectToServiceByUUID("5BCE9431-6C75-32AB-AFE0-2EC108A30860", onSocketConnected, function(e)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Error connecting to service. Reason: " + e.message);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;});
+&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;else
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Chat service is not supported by this device");
+&nbsp;&nbsp;&nbsp;}
+}
+
+function onSetPowered()
+{
+&nbsp;&nbsp;&nbsp;/* Gets the BluetoothDevice object */
+&nbsp;&nbsp;&nbsp;adapter.getDevice("35:F4:59:D1:7A:03", onDeviceReady, function(e) {console.log("Error: " + e.message);});
+}
+
+adapter.setPowered(true, onSetPowered, function(e) {console.log("Could not turn on Bluetooth adapter. reason: " + e.message); });
+</pre>
 </div>
 </dd>
 </dl>
@@ -3878,13 +4046,13 @@ A <em>BluetoothLEDevice</em> object can be retrieved by using one of the followi
  2.3.1
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var adapter = tizen.bluetooth.getLEAdapter();
- adapter.startScan(
-     function onsuccess(device) {
-         console.log("Found device: " + device.address);
-     }
- );
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var adapter = tizen.bluetooth.getLEAdapter();
+adapter.startScan(function onsuccess(device)
+{
+&nbsp;&nbsp;&nbsp;console.log("Found device: " + device.address);
+});
+</pre>
 </div>
 </li>
 <li class="attribute" id="BluetoothLEDevice::name">
@@ -3897,13 +4065,13 @@ A <em>BluetoothLEDevice</em> object can be retrieved by using one of the followi
  2.3.1
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var adapter = tizen.bluetooth.getLEAdapter();
- adapter.startScan(
-     function onsuccess(device) {
-         console.log("Found device: " + device.name);
-     }
- );
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var adapter = tizen.bluetooth.getLEAdapter();
+adapter.startScan(function onsuccess(device)
+{
+&nbsp;&nbsp;&nbsp;console.log("Found device: " + device.name);
+});
+</pre>
 </div>
 </li>
 <li class="attribute" id="BluetoothLEDevice::txpowerlevel">
@@ -3916,13 +4084,13 @@ A <em>BluetoothLEDevice</em> object can be retrieved by using one of the followi
  2.3.1
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var adapter = tizen.bluetooth.getLEAdapter();
- adapter.startScan(
-     function onsuccess(device) {
-         console.log("Found device: " + device.txpowerlevel);
-     }
- );
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var adapter = tizen.bluetooth.getLEAdapter();
+adapter.startScan(function onsuccess(device)
+{
+&nbsp;&nbsp;&nbsp;console.log("Found device: " + device.txpowerlevel);
+});
+</pre>
 </div>
 </li>
 <li class="attribute" id="BluetoothLEDevice::appearance">
@@ -3935,13 +4103,13 @@ A <em>BluetoothLEDevice</em> object can be retrieved by using one of the followi
  2.3.1
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var adapter = tizen.bluetooth.getLEAdapter();
- adapter.startScan(
-     function onsuccess(device) {
-         console.log("Found device: " + device.appearance);
-     }
- );
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var adapter = tizen.bluetooth.getLEAdapter();
+adapter.startScan(function onsuccess(device)
+{
+&nbsp;&nbsp;&nbsp;console.log("Found device: " + device.appearance);
+});
+</pre>
 </div>
 </li>
 <li class="attribute" id="BluetoothLEDevice::uuids">
@@ -3955,18 +4123,19 @@ A <em>BluetoothLEDevice</em> object can be retrieved by using one of the followi
  2.3.1
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var adapter = tizen.bluetooth.getLEAdapter();
- adapter.startScan(
-     function onsuccess(device) {
-         var uuids = device.uuids;
-         var services = "";
-         for (var i = 0; i &lt; uuids.length; i++) {
-             services += uuids[i] + "\n";
-         }
-         console.log ("Service found: " + services);
-     }
- );
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var adapter = tizen.bluetooth.getLEAdapter();
+adapter.startScan(function onsuccess(device)
+{
+&nbsp;&nbsp;&nbsp;var uuids = device.uuids;
+&nbsp;&nbsp;&nbsp;var services = "";
+&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; uuids.length; i++)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;services += uuids[i] + "\n";
+&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;console.log("Service found: " + services);
+});
+</pre>
 </div>
 </li>
 <li class="attribute" id="BluetoothLEDevice::solicitationuuids">
@@ -3980,18 +4149,19 @@ A <em>BluetoothLEDevice</em> object can be retrieved by using one of the followi
  2.3.1
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var adapter = tizen.bluetooth.getLEAdapter();
- adapter.startScan(
-     function onsuccess(device) {
-         var uuids = device.solicitationuuids;
-         var services = "";
-         for (var i = 0; i &lt; uuids.length; i++) {
-             services += uuids[i] + "\n";
-         }
-         console.log ("Service solicitations found: " + services);
-     }
- );
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var adapter = tizen.bluetooth.getLEAdapter();
+adapter.startScan(function onsuccess(device)
+{
+&nbsp;&nbsp;&nbsp;var uuids = device.solicitationuuids;
+&nbsp;&nbsp;&nbsp;var services = "";
+&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; uuids.length; i++)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;services += uuids[i] + "\n";
+&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;console.log("Service solicitations found: " + services);
+});
+</pre>
 </div>
 </li>
 <li class="attribute" id="BluetoothLEDevice::serviceData">
@@ -4005,18 +4175,19 @@ A <em>BluetoothLEDevice</em> object can be retrieved by using one of the followi
  2.3.1
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var adapter = tizen.bluetooth.getLEAdapter();
- adapter.startScan(
-     function onsuccess(device) {
-         var serviceData = device.serviceData;
-         var data = "";
-         for (var i = 0; i &lt; serviceData.length; i++) {
-             data += serviceData[i].id + serviceData[i].data + "\n";
-         }
-         console.log ("Service data found: " + data);
-     }
- );
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var adapter = tizen.bluetooth.getLEAdapter();
+adapter.startScan(function onsuccess(device)
+{
+&nbsp;&nbsp;&nbsp;var serviceData = device.serviceData;
+&nbsp;&nbsp;&nbsp;var data = "";
+&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; serviceData.length; i++)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;data += serviceData[i].id + serviceData[i].data + "\n";
+&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;console.log("Service data found: " + data);
+});
+</pre>
 </div>
 </li>
 <li class="attribute" id="BluetoothLEDevice::manufacturerData">
@@ -4029,15 +4200,15 @@ A <em>BluetoothLEDevice</em> object can be retrieved by using one of the followi
  2.3.1
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var adapter = tizen.bluetooth.getLEAdapter();
- adapter.startScan(
-     function onsuccess(device) {
-         var manufacturerData = device.manufacturerData;
-         console.log ("Manufacture id: " + manufacturerData.id);
-         console.log ("Manufacture data: " + manufacturerData.data);
-     }
- );
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var adapter = tizen.bluetooth.getLEAdapter();
+adapter.startScan(function onsuccess(device)
+{
+&nbsp;&nbsp;&nbsp;var manufacturerData = device.manufacturerData;
+&nbsp;&nbsp;&nbsp;console.log("Manufacture id: " + manufacturerData.id);
+&nbsp;&nbsp;&nbsp;console.log("Manufacture data: " + manufacturerData.data);
+});
+</pre>
 </div>
 </li>
 <li class="attribute" id="BluetoothLEDevice::rssi">
@@ -4055,14 +4226,14 @@ The signal strength depends on distance (between the device and the beacon) and
  3.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var adapter = tizen.bluetooth.getLEAdapter();
- adapter.startScan(
-     function onsuccess(device) {
-         console.log("Found device: " + device.name);
-         console.log("RSSI: " + device.rssi);
-     }
- );
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var adapter = tizen.bluetooth.getLEAdapter();
+adapter.startScan(function onsuccess(device)
+{
+&nbsp;&nbsp;&nbsp;console.log("Found device: " + device.name);
+&nbsp;&nbsp;&nbsp;console.log("RSSI: " + device.rssi);
+});
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre> Found device: beacon
@@ -4138,24 +4309,27 @@ Instead, use <em>http://tizen.org/privilege/bluetooth</em>.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function onerror(e) {
-      console.log("Failed to connect to device: " + e.message);
- }
-
- function onconnected() {
-     console.log("Connected to device");
- }
-
- var adapter = tizen.bluetooth.getLEAdapter();
- adapter.startScan(
-     function onsuccess(device) {
-         if (device.address == "11:22:33:44:55:66") {
-             console.log("Found device: " + device.name);
-             device.connect(onconnected, onerror);
-         }
-     }
- );
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function onerror(e)
+{
+&nbsp;&nbsp;&nbsp;console.log("Failed to connect to device: " + e.message);
+}
+
+function onconnected()
+{
+&nbsp;&nbsp;&nbsp;console.log("Connected to device");
+}
+
+var adapter = tizen.bluetooth.getLEAdapter();
+adapter.startScan(function onsuccess(device)
+{
+&nbsp;&nbsp;&nbsp;if (device.address == "11:22:33:44:55:66")
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Found device: " + device.name);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;device.connect(onconnected, onerror);
+&nbsp;&nbsp;&nbsp;}
+});
+</pre>
 </div>
 </dd>
 <dt class="method" id="BluetoothLEDevice::disconnect">
@@ -4221,29 +4395,35 @@ Instead, use <em>http://tizen.org/privilege/bluetooth</em>.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function onerror(e) {
-     console.log("Error occured: " + e.message);
- }
-
- function onDeviceFound(device) {
-    function ondisconnect() {
-        console.log("Disconnected");
-    }
-
-    function onconnected() {
-        console.log("Connected to device");
-        device.disconnect(ondisconnect, onerror);
-    }
-
-    if (device.address == "11:22:33:44:55:66") {
-        console.log("Found device: " + device.name);
-        device.connect(onconnected, onerror);
-    }
- }
-
- var adapter = tizen.bluetooth.getLEAdapter();
- adapter.startScan(onDeviceFound, onerror);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function onerror(e)
+{
+&nbsp;&nbsp;&nbsp;console.log("Error occurred: " + e.message);
+}
+
+function onDeviceFound(device)
+{
+&nbsp;&nbsp;&nbsp;function ondisconnect()
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Disconnected");
+&nbsp;&nbsp;&nbsp;}
+
+&nbsp;&nbsp;&nbsp;function onconnected()
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Connected to device");
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;device.disconnect(ondisconnect, onerror);
+&nbsp;&nbsp;&nbsp;}
+
+&nbsp;&nbsp;&nbsp;if (device.address == "11:22:33:44:55:66")
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Found device: " + device.name);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;device.connect(onconnected, onerror);
+&nbsp;&nbsp;&nbsp;}
+}
+
+var adapter = tizen.bluetooth.getLEAdapter();
+adapter.startScan(onDeviceFound, onerror);
+</pre>
 </div>
 </dd>
 <dt class="method" id="BluetoothLEDevice::getService">
@@ -4299,26 +4479,31 @@ Instead, use <em>http://tizen.org/privilege/bluetooth</em>.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function onconnected(device) {
-     console.log("Connected to device");
-     var service = device.getService(device.uuids[0]);
-     console.log("Service got");
- }
-
- function onerror(e) {
-     console.log("Error occured: " + e.message);
- }
-
- function onDeviceFound(device) {
-    if (device.address == "11:22:33:44:55:66") {
-        console.log("Found device: " + device.name);
-        device.connect(onconnected.bind(null, device), onerror);
-    }
- }
-
- var adapter = tizen.bluetooth.getLEAdapter();
- adapter.startScan(onDeviceFound, onerror);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function onconnected(device)
+{
+&nbsp;&nbsp;&nbsp;console.log("Connected to device");
+&nbsp;&nbsp;&nbsp;var service = device.getService(device.uuids[0]);
+&nbsp;&nbsp;&nbsp;console.log("Service got");
+}
+
+function onerror(e)
+{
+&nbsp;&nbsp;&nbsp;console.log("Error occurred: " + e.message);
+}
+
+function onDeviceFound(device)
+{
+&nbsp;&nbsp;&nbsp;if (device.address == "11:22:33:44:55:66")
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Found device: " + device.name);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;device.connect(onconnected.bind(null, device), onerror);
+&nbsp;&nbsp;&nbsp;}
+}
+
+var adapter = tizen.bluetooth.getLEAdapter();
+adapter.startScan(onDeviceFound, onerror);
+</pre>
 </div>
 </dd>
 <dt class="method" id="BluetoothLEDevice::getServiceAllUuids">
@@ -4359,28 +4544,33 @@ Instead, use <em>http://tizen.org/privilege/bluetooth</em>.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // below variable should represent valid address of discoverable bluetooth low energy device
- var remoteAddress = "11:22:33:44:55:66";
-
- function onconnected(device) {
-     console.log("Connected to device");
-     var services = device.getServiceAllUuids();
-     console.log("Services length " + services.length);
- }
-
- function onerror(e) {
-     console.log("Error occured: " + e.message);
- }
-
- function onDeviceFound(device) {
-    if (device.address == remoteAddress) {
-        device.connect(onconnected.bind(null, device), onerror);
-    }
- }
-
- var adapter = tizen.bluetooth.getLEAdapter();
- adapter.startScan(onDeviceFound, onerror);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Below variable should represent valid address of discoverable bluetooth low energy device */
+var remoteAddress = "11:22:33:44:55:66";
+
+function onconnected(device)
+{
+&nbsp;&nbsp;&nbsp;console.log("Connected to device");
+&nbsp;&nbsp;&nbsp;var services = device.getServiceAllUuids();
+&nbsp;&nbsp;&nbsp;console.log("Services length " + services.length);
+}
+
+function onerror(e)
+{
+&nbsp;&nbsp;&nbsp;console.log("Error occurred: " + e.message);
+}
+
+function onDeviceFound(device)
+{
+&nbsp;&nbsp;&nbsp;if (device.address == remoteAddress)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;device.connect(onconnected.bind(null, device), onerror);
+&nbsp;&nbsp;&nbsp;}
+}
+
+var adapter = tizen.bluetooth.getLEAdapter();
+adapter.startScan(onDeviceFound, onerror);
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre> Connected to device
@@ -4422,30 +4612,37 @@ Instead, use <em>http://tizen.org/privilege/bluetooth</em>.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function onerror(e) {
-     console.log("Error occured: " + e.message);
- }
-
- function onDeviceFound(device) {
-    var onConnectionStateChange = {
-        onconnected: function(device) {
-            console.log("Device " + device.name + " connected");
-        },
-        ondisconnected: function(device) {
-            console.log("Device " + device.name + " disconnected");
-        }
-    }
-
-    if (device.address === "11:22:33:44:55:66") {
-        console.log("Found device: " + device.name);
-        device.addConnectStateChangeListener(onConnectionStateChange);
-        device.connect();
-    }
- }
-
- var adapter = tizen.bluetooth.getLEAdapter();
- adapter.startScan(onDeviceFound, onerror);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function onerror(e)
+{
+&nbsp;&nbsp;&nbsp;console.log("Error occurred: " + e.message);
+}
+
+function onDeviceFound(device)
+{
+&nbsp;&nbsp;&nbsp;var onConnectionStateChange =
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;onconnected: function(device)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Device " + device.name + " connected");
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ondisconnected: function(device)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Device " + device.name + " disconnected");
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;}
+
+&nbsp;&nbsp;&nbsp;if (device.address === "11:22:33:44:55:66")
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Found device: " + device.name);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;device.addConnectStateChangeListener(onConnectionStateChange);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;device.connect();
+&nbsp;&nbsp;&nbsp;}
+}
+
+var adapter = tizen.bluetooth.getLEAdapter();
+adapter.startScan(onDeviceFound, onerror);
+</pre>
 </div>
 </dd>
 <dt class="method" id="BluetoothLEDevice::removeConnectStateChangeListener">
@@ -4471,32 +4668,39 @@ Instead, use <em>http://tizen.org/privilege/bluetooth</em>.
         </ul>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function onerror(e) {
-     console.log("Error occured: " + e.message);
- }
-
- function onDeviceFound(device) {
-    var onConnectionStateChange = {
-        onconnected: function(device) {
-            console.log("Device " + device.name + " connected");
-        },
-        ondisconnected: function(device) {
-            console.log("Device " + device.name + " disconnected");
-            device.removeConnectStateChangeListener(listenerID);
-        }
-    }
-
-    if (device.address === "11:22:33:44:55:66") {
-        console.log("Found device: " + device.name);
-        listenerID = device.addConnectStateChangeListener(onConnectionStateChange);
-        device.connect();
-    }
- }
-
- var adapter = tizen.bluetooth.getLEAdapter();
- var listenerID = null;
- adapter.startScan(onDeviceFound, onerror);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function onerror(e)
+{
+&nbsp;&nbsp;&nbsp;console.log("Error occurred: " + e.message);
+}
+
+function onDeviceFound(device)
+{
+&nbsp;&nbsp;&nbsp;var onConnectionStateChange =
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;onconnected: function(device)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Device " + device.name + " connected");
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ondisconnected: function(device)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Device " + device.name + " disconnected");
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;device.removeConnectStateChangeListener(listenerID);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;}
+
+&nbsp;&nbsp;&nbsp;if (device.address === "11:22:33:44:55:66")
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Found device: " + device.name);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;listenerID = device.addConnectStateChangeListener(onConnectionStateChange);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;device.connect();
+&nbsp;&nbsp;&nbsp;}
+}
+
+var adapter = tizen.bluetooth.getLEAdapter();
+var listenerID = null;
+adapter.startScan(onDeviceFound, onerror);
+</pre>
 </div>
 </dd>
 </dl>
@@ -4656,46 +4860,55 @@ Instead, use <em>http://tizen.org/privilege/bluetooth</em>.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var adapter = tizen.bluetooth.getDefaultAdapter();
-
- function onSocketConnected(socket) {
-    console.log ("Opened connection to remote device");
-    socket.onmessage = function () {
-      console.log ("Message received: " + socket.readData());
-    };
-
-    socket.onclose = function() {
-       console.log("Socket closed with " + socket.peer.name);
-    };
-
-    // Sends data to peer.
-    var textmsg = "Test";
-    var sendtextmsg = new Array();
-    for (var i = 0; i &lt; textmsg.length; i++)
-    {
-        sendtextmsg[i] = textmsg.charCodeAt(i);
-    }
-    socket.writeData (sendtextmsg);
- }
-
- function onSocketError(e) {
-    console.log ("Error connecting to service. Reason: " + e.message);
- }
-
- function onDeviceReady(device) {
-    // Validates device and service uuid.
-    if (device.uuids.indexOf("5BCE9431-6C75-32AB-AFE0-2EC108A30860") != -1) {
-       // Opens socket
-       device.connectToServiceByUUID("5BCE9431-6C75-32AB-AFE0-2EC108A30860", onSocketConnected, onSocketError );
-    }
- }
- function onSetPowered() {
-    // Gets the BluetoothDevice object.
-    adapter.getDevice("35:F4:59:D1:7A:03", onDeviceReady, function(e) { console.log("Error: " + e.message); });
- }
-
- adapter.setPowered(true, onSetPowered, function(e) {console.log ("Could not turn on Bluetooth adapter. reason: " + e.message); });
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var adapter = tizen.bluetooth.getDefaultAdapter();
+
+function onSocketConnected(socket)
+{
+&nbsp;&nbsp;&nbsp;console.log("Opened connection to remote device");
+&nbsp;&nbsp;&nbsp;socket.onmessage = function()
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Message received: " + socket.readData());
+&nbsp;&nbsp;&nbsp;};
+
+&nbsp;&nbsp;&nbsp;socket.onclose = function()
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Socket closed with " + socket.peer.name);
+&nbsp;&nbsp;&nbsp;};
+
+&nbsp;&nbsp;&nbsp;/* Sends data to peer */
+&nbsp;&nbsp;&nbsp;var textmsg = "Test";
+&nbsp;&nbsp;&nbsp;var sendtextmsg = new Array();
+&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; textmsg.length; i++)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sendtextmsg[i] = textmsg.charCodeAt(i);
+&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;socket.writeData(sendtextmsg);
+}
+
+function onSocketError(e)
+{
+&nbsp;&nbsp;&nbsp;console.log("Error connecting to service. Reason: " + e.message);
+}
+
+function onDeviceReady(device)
+{
+&nbsp;&nbsp;&nbsp;/* Validates device and service uuid */
+&nbsp;&nbsp;&nbsp;if (device.uuids.indexOf("5BCE9431-6C75-32AB-AFE0-2EC108A30860") != -1)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Opens socket */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;device.connectToServiceByUUID("5BCE9431-6C75-32AB-AFE0-2EC108A30860", onSocketConnected, onSocketError);
+&nbsp;&nbsp;&nbsp;}
+}
+
+function onSetPowered()
+{
+&nbsp;&nbsp;&nbsp;/* Gets the BluetoothDevice object */
+&nbsp;&nbsp;&nbsp;adapter.getDevice("35:F4:59:D1:7A:03", onDeviceReady, function(e) {console.log("Error: " + e.message);});
+}
+
+adapter.setPowered(true, onSetPowered, function(e) {console.log("Could not turn on Bluetooth adapter. reason: " + e.message);});
+</pre>
 </div>
 </dd>
 <dt class="method" id="BluetoothSocket::readData">
@@ -4745,43 +4958,50 @@ Instead, use <em>http://tizen.org/privilege/bluetooth</em>.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var adapter = tizen.bluetooth.getDefaultAdapter();
-
- function onError(e) {
-    console.log ("Error connecting to service. Reason: " + e.message);
- }
-
- function onSocketConnected(socket) {
-    console.log ("Opening socket success!!!");
-
-    socket.onmessage = function() {
-      //  Gets a message from peer, reads it
-      var data = socket.readData();
-
-      //
-      // Code to evaluate message goes here
-      //
-    };
-
-    socket.onclose = function() {
-       console.log("Socket closed with " + socket.peer.name);
-    };
- }
-
- function onDeviceReady(device) {
-    // Validates device and service uuid
-    if (device.uuids.indexOf("5BCE9431-6C75-32AB-AFE0-2EC108A30860") != -1) {
-       // Opens socket
-       device.connectToServiceByUUID("5BCE9431-6C75-32AB-AFE0-2EC108A30860", onSocketConnected, onError);
-    }
- }
- function onSetPowered() {
-    // Gets the BluetoothDevice object.
-    adapter.getDevice("35:F4:59:D1:7A:03", onDeviceReady, function(e) { console.log("Error: " + e.message); });
- }
-
- adapter.setPowered(true, onSetPowered, function(e) {console.log ("Could not turn on Bluetooth adapter. reason: " + e.message); });
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var adapter = tizen.bluetooth.getDefaultAdapter();
+
+function onError(e)
+{
+&nbsp;&nbsp;&nbsp;console.log("Error connecting to service. Reason: " + e.message);
+}
+
+function onSocketConnected(socket)
+{
+&nbsp;&nbsp;&nbsp;console.log("Opening socket success!!!");
+
+&nbsp;&nbsp;&nbsp;socket.onmessage = function()
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Gets a message from peer, reads it */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var data = socket.readData();
+
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Code to evaluate message goes here */
+&nbsp;&nbsp;&nbsp;};
+
+&nbsp;&nbsp;&nbsp;socket.onclose = function()
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Socket closed with " + socket.peer.name);
+&nbsp;&nbsp;&nbsp;};
+}
+
+function onDeviceReady(device)
+{
+&nbsp;&nbsp;&nbsp;/* Validates device and service uuid */
+&nbsp;&nbsp;&nbsp;if (device.uuids.indexOf("5BCE9431-6C75-32AB-AFE0-2EC108A30860") != -1)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Opens socket */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;device.connectToServiceByUUID("5BCE9431-6C75-32AB-AFE0-2EC108A30860", onSocketConnected, onError);
+&nbsp;&nbsp;&nbsp;}
+}
+
+function onSetPowered()
+{
+&nbsp;&nbsp;&nbsp;/* Gets the BluetoothDevice object */
+&nbsp;&nbsp;&nbsp;adapter.getDevice("35:F4:59:D1:7A:03", onDeviceReady, function(e) {console.log("Error: " + e.message);});
+}
+
+adapter.setPowered(true, onSetPowered, function(e) {console.log("Could not turn on Bluetooth adapter. reason: " + e.message);});
+</pre>
 </div>
 </dd>
 <dt class="method" id="BluetoothSocket::close">
@@ -4886,25 +5106,31 @@ The <em>BluetoothClassDeviceMajor</em> interface contains the list of known valu
  2.3.1
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var adapter = tizen.bluetooth.getDefaultAdapter();
-
- function evaluateDevice(address) {
-    adapter.getDevice(address, function(device) {
-        if (device.deviceClass.major == tizen.bluetooth.deviceMajor.COMPUTER) {
-            // Shows computer icon for this device
-            console.log("Device is computer");
-        } else if (device.deviceClass.major == tizen.bluetooth.deviceMajor.PHONE) {
-            // Shows phone icon
-            console.log("Device is a Phone");
-        }
-    }, function(e) {
-        console.log("Couldn't get any device with the given address: " + e.message);
-    });
- }
-
- evaluateDevice("11:22:33:44:55:66");
-
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var adapter = tizen.bluetooth.getDefaultAdapter();
+
+function evaluateDevice(address)
+{
+&nbsp;&nbsp;&nbsp;adapter.getDevice(address, function(device)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (device.deviceClass.major == tizen.bluetooth.deviceMajor.COMPUTER)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Shows computer icon for this device */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Device is computer");
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;else if (device.deviceClass.major == tizen.bluetooth.deviceMajor.PHONE)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Shows phone icon */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Device is a Phone");
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;}, function(e)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Couldn't get any device with the given address: " + e.message);
+&nbsp;&nbsp;&nbsp;});
+}
+
+evaluateDevice("11:22:33:44:55:66");
+</pre>
 </div>
 </li>
 <li class="attribute" id="BluetoothClass::minor">
@@ -4993,15 +5219,19 @@ Instead, use <em>http://tizen.org/privilege/bluetooth</em>.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var adapter = tizen.bluetooth.getDefaultAdapter();
- adapter.getDevice("12:34:56:78:9A:BC", function(device) {
-    if (device.deviceClass.hasService(tizen.bluetooth.deviceService.POSITIONING)) {
-         console.log("Device supports Positioning service");
-    }
- }, function(e) {
-    console.log("Couldn't get device for given address: " + e.message);
- });
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var adapter = tizen.bluetooth.getDefaultAdapter();
+adapter.getDevice("12:34:56:78:9A:BC", function(device)
+{
+&nbsp;&nbsp;&nbsp;if (device.deviceClass.hasService(tizen.bluetooth.deviceService.POSITIONING))
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Device supports Positioning service");
+&nbsp;&nbsp;&nbsp;}
+}, function(e)
+{
+&nbsp;&nbsp;&nbsp;console.log("Couldn't get device for given address: " + e.message);
+});
+</pre>
 </div>
 </dd>
 </dl>
@@ -5210,35 +5440,39 @@ By default, this attribute is set to null.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var adapter = tizen.bluetooth.getDefaultAdapter();
-
- function chatServiceSuccessCb(handler) {
-    console.log("Chat service " + handler.name + " with UUID " + handler.uuid + " is successfully registered!");
-    console.log("There is " + (handler.isConnected ? "a" : "no") + " device using this service");
-
-    handler.onconnect = function(socket) {
-       console.log("Client is connected: " + socket.peer.name + "," + socket.peer.address);
-       socket.onmessage = function() {
-           var data = socket.readData();
-           // Handle message code goes here
-           //....
-       };
-
-       // Expected close
-       socket.onclose = function() {
-           console.log('The socket is closed.');
-       };
-    };
- }
-
- function errorCb(e) {
-     console.log( "Could not register service record, Error: " + e.message);
- }
-
- var CHAT_SERVICE_UUID = "5BCE9431-6C75-32AB-AFE0-2EC108A30860";
- adapter.registerRFCOMMServiceByUUID(CHAT_SERVICE_UUID, "Chat service", chatServiceSuccessCb, errorCb);
-
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var adapter = tizen.bluetooth.getDefaultAdapter();
+
+function chatServiceSuccessCb(handler)
+{
+&nbsp;&nbsp;&nbsp;console.log("Chat service " + handler.name + " with UUID " + handler.uuid + " is successfully registered!");
+&nbsp;&nbsp;&nbsp;console.log("There is " + (handler.isConnected ? "a" : "no") + " device using this service");
+
+&nbsp;&nbsp;&nbsp;handler.onconnect = function(socket)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Client is connected: " + socket.peer.name + "," + socket.peer.address);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;socket.onmessage = function()
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var data = socket.readData();
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Handle message code here */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;};
+
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Expected close */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;socket.onclose = function()
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('The socket is closed.');
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;};
+&nbsp;&nbsp;&nbsp;};
+}
+
+function errorCb(e)
+{
+&nbsp;&nbsp;&nbsp;console.log("Could not register service record, Error: " + e.message);
+}
+
+var CHAT_SERVICE_UUID = "5BCE9431-6C75-32AB-AFE0-2EC108A30860";
+adapter.registerRFCOMMServiceByUUID(CHAT_SERVICE_UUID, "Chat service", chatServiceSuccessCb, errorCb);
+</pre>
 </div>
 </li>
 </ul>
@@ -5306,49 +5540,54 @@ Instead, use <em>http://tizen.org/privilege/bluetooth</em>.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var adapter = tizen.bluetooth.getDefaultAdapter();
- var chatServiceHandler = null;
-
- function chatServiceSuccessCb(handler) {
-    console.log("Chat service registration was successful!");
-
-    chatServiceHandler = handler;
-    handler.onconnect = function(socket) {
-       console.log("Client is connected: " + socket.peer.name + "," + socket.peer.address);
-       socket.onmessage = function() {
-           var data = socket.readData();
-           // Handle message code goes here
-           //....
-       };
-
-       // Expected close
-       socket.onclose = function() {
-           console.log('The socket is closed.');
-       };
-    };
- }
-
- function publishChatService() {
-    var CHAT_SERVICE_UUID = "5BCE9431-6C75-32AB-AFE0-2EC108A30860";
-    adapter.registerRFCOMMServiceByUUID(CHAT_SERVICE_UUID, "Chat service", chatServiceSuccessCb,
-      // Error handler
-      function(e) {
-           console.log( "Could not register service record, Error: " + e.message);
-      });
- }
-
- function unRegisterChatService() {
-      if (chatServiceHandler != null) {
-           chatServiceHandler.unregister(function() {
-               chatServiceHandler = null;
-               console.log("Chat service is unregistered.");
-           },
-           function(e) {
-               console.log ("Error: " + e.message);
-           });
-      }
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var adapter = tizen.bluetooth.getDefaultAdapter();
+var chatServiceHandler = null;
+
+function chatServiceSuccessCb(handler)
+{
+&nbsp;&nbsp;&nbsp;console.log("Chat service registration was successful!");
+
+&nbsp;&nbsp;&nbsp;chatServiceHandler = handler;
+&nbsp;&nbsp;&nbsp;handler.onconnect = function(socket)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Client is connected: " + socket.peer.name + "," + socket.peer.address);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;socket.onmessage = function()
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var data = socket.readData();
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Handle message code here */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;};
+
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Expected close */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;socket.onclose = function()
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('The socket is closed.');
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;};
+&nbsp;&nbsp;&nbsp;};
+}
+
+function publishChatService()
+{
+&nbsp;&nbsp;&nbsp;var CHAT_SERVICE_UUID = "5BCE9431-6C75-32AB-AFE0-2EC108A30860";
+&nbsp;&nbsp;&nbsp;adapter.registerRFCOMMServiceByUUID(CHAT_SERVICE_UUID, "Chat service", chatServiceSuccessCb,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Error handler: function(e) {console.log("Could not register service record, Error: " + e.message);} */);
+}
+
+function unRegisterChatService()
+{
+&nbsp;&nbsp;&nbsp;if (chatServiceHandler != null)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;chatServiceHandler.unregister(function()
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;chatServiceHandler = null;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Chat service is unregistered.");
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}, function(e)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Error: " + e.message);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;});
+&nbsp;&nbsp;&nbsp;}
+}
+</pre>
 </div>
 </dd>
 </dl>
@@ -5379,16 +5618,20 @@ Instead, use <em>http://tizen.org/privilege/bluetooth</em>.
  2.3.1
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var adapter = tizen.bluetooth.getDefaultAdapter();
- var healthCapability = tizen.systeminfo.getCapability("http://tizen.org/feature/network.bluetooth.health");
-
- if (healthCapability) {
-     var healthProfileHandler = adapter.getBluetoothProfileHandler("HEALTH");
-     console.log("Bluetooth profile type is " + healthProfileHandler.profileType);
- } else {
-     console.log("Bluetooth Health Profile is not supported on this device.");
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var adapter = tizen.bluetooth.getDefaultAdapter();
+var healthCapability = tizen.systeminfo.getCapability("http://tizen.org/feature/network.bluetooth.health");
+
+if (healthCapability)
+{
+&nbsp;&nbsp;&nbsp;var healthProfileHandler = adapter.getBluetoothProfileHandler("HEALTH");
+&nbsp;&nbsp;&nbsp;console.log("Bluetooth profile type is " + healthProfileHandler.profileType);
+}
+else
+{
+&nbsp;&nbsp;&nbsp;console.log("Bluetooth Health Profile is not supported on this device.");
+}
+</pre>
 </div>
 </li></ul>
 </div>
@@ -5485,19 +5728,22 @@ For example, pulse oximeter is 4100 and blood pressure monitor is 4103.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var adapter = tizen.bluetooth.getDefaultAdapter();
- var healthProfileHandler = adapter.getBluetoothProfileHandler("HEALTH");
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var adapter = tizen.bluetooth.getDefaultAdapter();
+var healthProfileHandler = adapter.getBluetoothProfileHandler("HEALTH");
 
- function healthRegisterSuccess(app) {
-     console.log("Registered application: " + app.name);
- }
+function healthRegisterSuccess(app)
+{
+&nbsp;&nbsp;&nbsp;console.log("Registered application: " + app.name);
+}
 
- function healthRegisterError(e) {
-     console.log("Failed to register application: " + e.message);
- };
+function healthRegisterError(e)
+{
+&nbsp;&nbsp;&nbsp;console.log("Failed to register application: " + e.message);
+};
 
- healthProfileHandler.registerSinkApplication(4100, "testSinkApp", healthRegisterSuccess, healthRegisterError);
- </pre>
+healthProfileHandler.registerSinkApplication(4100, "testSinkApp", healthRegisterSuccess, healthRegisterError);
+</pre>
 </div>
 </dd>
 <dt class="method" id="BluetoothHealthProfileHandler::connectToSource">
@@ -5572,38 +5818,44 @@ Instead, use <em>http://tizen.org/privilege/bluetooth</em>.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var adapter = tizen.bluetooth.getDefaultAdapter();
- var healthProfileHandler = adapter.getBluetoothProfileHandler("HEALTH");
- var registerHealthApp = null;
-
- function healthConnectSuccess(channel) {
-     console.log("Health device is connected");
-     var status = "Name of remote device: " + channel.peer.name +
-         "channel type of device profile: " + channel.channelType +
-         "health application name: " + channel.appication.name;
-     console.log(status);
- }
-
- function healthConnectError(e) {
-     console.log("Failed to connect to source: " + e.message);
- };
-
- function gotDeviceInfo(device) {
-     healthProfileHandler.connectToSource(device, registerHealthApp, healthConnectSuccess, healthConnectError);
- }
-
- function healthRegisterSuccess(app) {
-     console.log("Registered application: " + app.name);
-     registerHealthApp = app;
-     adapter.getDevice("35:F4:59:D1:7A:03", gotDeviceInfo);
- }
-
- function healthRegisterError(e) {
-     console.log("Failed to register application: " + e.message);
- };
-
- healthProfileHandler.registerSinkApplication(4100, "testSinkApp", healthRegisterSuccess, healthRegisterError);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var adapter = tizen.bluetooth.getDefaultAdapter();
+var healthProfileHandler = adapter.getBluetoothProfileHandler("HEALTH");
+var registerHealthApp = null;
+
+function healthConnectSuccess(channel)
+{
+&nbsp;&nbsp;&nbsp;console.log("Health device is connected");
+&nbsp;&nbsp;&nbsp;var status = "Name of remote device: " + channel.peer.name +
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"channel type of device profile: " + channel.channelType +
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"health application name: " + channel.appication.name;
+&nbsp;&nbsp;&nbsp;console.log(status);
+}
+
+function healthConnectError(e)
+{
+&nbsp;&nbsp;&nbsp;console.log("Failed to connect to source: " + e.message);
+};
+
+function gotDeviceInfo(device)
+{
+&nbsp;&nbsp;&nbsp;healthProfileHandler.connectToSource(device, registerHealthApp, healthConnectSuccess, healthConnectError);
+}
+
+function healthRegisterSuccess(app)
+{
+&nbsp;&nbsp;&nbsp;console.log("Registered application: " + app.name);
+&nbsp;&nbsp;&nbsp;registerHealthApp = app;
+&nbsp;&nbsp;&nbsp;adapter.getDevice("35:F4:59:D1:7A:03", gotDeviceInfo);
+}
+
+function healthRegisterError(e)
+{
+&nbsp;&nbsp;&nbsp;console.log("Failed to register application: " + e.message);
+};
+
+healthProfileHandler.registerSinkApplication(4100, "testSinkApp", healthRegisterSuccess, healthRegisterError);
+</pre>
 </div>
 </dd>
 </dl>
@@ -5678,24 +5930,28 @@ By default, this attribute is set to null.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var adapter = tizen.bluetooth.getDefaultAdapter();
- var healthProfileHandler = adapter.getBluetoothProfileHandler("HEALTH");
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var adapter = tizen.bluetooth.getDefaultAdapter();
+var healthProfileHandler = adapter.getBluetoothProfileHandler("HEALTH");
 
- function healthRegisterSuccess(app) {
-     console.log("Registered application: " + app.name);
-     console.log("Data type used for communication is " + app.dataType);
+function healthRegisterSuccess(app)
+{
+&nbsp;&nbsp;&nbsp;console.log("Registered application: " + app.name);
+&nbsp;&nbsp;&nbsp;console.log("Data type used for communication is " + app.dataType);
 
-     app.onconnect = function(channel) {
-         console.log("Health device is connected");
-     }
- }
+&nbsp;&nbsp;&nbsp;app.onconnect = function(channel)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Health device is connected");
+&nbsp;&nbsp;&nbsp;}
+}
 
- function healthRegisterError(e) {
-     console.log("Failed to register application: " + e.message);
- };
+function healthRegisterError(e)
+{
+&nbsp;&nbsp;&nbsp;console.log("Failed to register application: " + e.message);
+};
 
- healthProfileHandler.registerSinkApplication(4100, "testSinkApp", healthRegisterSuccess, healthRegisterError);
- </pre>
+healthProfileHandler.registerSinkApplication(4100, "testSinkApp", healthRegisterSuccess, healthRegisterError);
+</pre>
 </div>
 </li>
 </ul>
@@ -5765,46 +6021,60 @@ Instead, use <em>http://tizen.org/privilege/bluetooth</em>.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var adapter = tizen.bluetooth.getDefaultAdapter();
- var healthProfileHandler = adapter.getBluetoothProfileHandler("HEALTH");
- var healthApp = null;
-
- function healthRegisterSuccess(app) {
-     console.log("Registered application: " + app.name);
-     healthApp = app;
-     healthApp.onconnect = function(channel) {
-         console.log("Connected!!");
-     };
- }
-
- function healthRegisterError(e) {
-     console.log("Failed to register application: " + e.message);
- };
-
- function startSink() {
-     try {
-         healthProfileHandler.registerSinkApplication(4100, "testSinkApp", healthRegisterSuccess, healthRegisterError);
-     } catch(e) {
-         console.log("Error: " + e.message);
-     }
- }
-
- function stopSink() {
-     try {
-         if (healthApp != null) {
-             healthApp.unregister(function() {
-                 healthApp = null;
-                 console.log("Health application is unregistered.");
-             },
-             function(e) {
-                 console.log ("Error: " + e.message);
-             });
-         }
-     } catch(err) {
-         console.log("Error: " + err.message);
-     }
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var adapter = tizen.bluetooth.getDefaultAdapter();
+var healthProfileHandler = adapter.getBluetoothProfileHandler("HEALTH");
+var healthApp = null;
+
+function healthRegisterSuccess(app)
+{
+&nbsp;&nbsp;&nbsp;console.log("Registered application: " + app.name);
+&nbsp;&nbsp;&nbsp;healthApp = app;
+&nbsp;&nbsp;&nbsp;healthApp.onconnect = function(channel)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Connected!!");
+&nbsp;&nbsp;&nbsp;};
+}
+
+function healthRegisterError(e)
+{
+&nbsp;&nbsp;&nbsp;console.log("Failed to register application: " + e.message);
+};
+
+function startSink()
+{
+&nbsp;&nbsp;&nbsp;try
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;healthProfileHandler.registerSinkApplication(4100, "testSinkApp", healthRegisterSuccess, healthRegisterError);
+&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;catch (e)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Error: " + e.message);
+&nbsp;&nbsp;&nbsp;}
+}
+
+function stopSink()
+{
+&nbsp;&nbsp;&nbsp;try
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (healthApp != null)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;healthApp.unregister(function()
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;healthApp = null;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Health application is unregistered.");
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}, function(e)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Error: " + e.message);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;});
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;catch (err)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Error: " + err.message);
+&nbsp;&nbsp;&nbsp;}
+}
+</pre>
 </div>
 </dd>
 </dl>
@@ -5881,22 +6151,26 @@ Instead, use <em>http://tizen.org/privilege/bluetooth</em>.
  2.3.1
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var adapter = tizen.bluetooth.getDefaultAdapter();
- var healthProfileHandler = adapter.getBluetoothProfileHandler("HEALTH");
-
- function healthRegisterSuccess(app) {
-     app.onconnect = function(channel) {
-         console.log("Health device " + (channel.isConnected ? "is" : "is not") + " connected to " + channel.peer.name + " remote device");
-         console.log("Channel type is " + channel.channelType + " and health application name used for communication is " + channel.application.name);
-     }
- }
-
- function healthRegisterError(e) {
-     console.log("Failed to register application: " + e.message);
- };
-
- healthProfileHandler.registerSinkApplication(4100, "testSinkApp", healthRegisterSuccess, healthRegisterError);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var adapter = tizen.bluetooth.getDefaultAdapter();
+var healthProfileHandler = adapter.getBluetoothProfileHandler("HEALTH");
+
+function healthRegisterSuccess(app)
+{
+&nbsp;&nbsp;&nbsp;app.onconnect = function(channel)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Health device " + (channel.isConnected ? "is" : "is not") + " connected to " + channel.peer.name + " remote device");
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Channel type is " + channel.channelType + " and health application name used for communication is " + channel.application.name);
+&nbsp;&nbsp;&nbsp;}
+}
+
+function healthRegisterError(e)
+{
+&nbsp;&nbsp;&nbsp;console.log("Failed to register application: " + e.message);
+};
+
+healthProfileHandler.registerSinkApplication(4100, "testSinkApp", healthRegisterSuccess, healthRegisterError);
+</pre>
 </div>
 </li>
 </ul>
@@ -5946,23 +6220,27 @@ Instead, use <em>http://tizen.org/privilege/bluetooth</em>.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var adapter = tizen.bluetooth.getDefaultAdapter();
- var healthProfileHandler = adapter.getBluetoothProfileHandler("HEALTH");
-
- function healthRegisterSuccess(app) {
-     console.log("Registered application: " + app.name);
-     app.onconnect = function(channel) {;
-         console.log("Health device is connected");
-         channel.close();
-     }
- }
-
- function healthRegisterError(e) {
-     console.log("Failed to register application: " + e.message);
- };
-
- healthProfileHandler.registerSinkApplication(4100, "testSinkApp", healthRegisterSuccess, healthRegisterError);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var adapter = tizen.bluetooth.getDefaultAdapter();
+var healthProfileHandler = adapter.getBluetoothProfileHandler("HEALTH");
+
+function healthRegisterSuccess(app)
+{
+&nbsp;&nbsp;&nbsp;console.log("Registered application: " + app.name);
+&nbsp;&nbsp;&nbsp;app.onconnect = function(channel)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Health device is connected");
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;channel.close();
+&nbsp;&nbsp;&nbsp;}
+}
+
+function healthRegisterError(e)
+{
+&nbsp;&nbsp;&nbsp;console.log("Failed to register application: " + e.message);
+};
+
+healthProfileHandler.registerSinkApplication(4100, "testSinkApp", healthRegisterSuccess, healthRegisterError);
+</pre>
 </div>
 </dd>
 <dt class="method" id="BluetoothHealthChannel::sendData">
@@ -6022,30 +6300,35 @@ Instead, use <em>http://tizen.org/privilege/bluetooth</em>.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var adapter = tizen.bluetooth.getDefaultAdapter();
- var healthProfileHandler = adapter.getBluetoothProfileHandler("HEALTH");
-
- // Data to send
- var textmsg = "Test";
- var dataToSend = new Array();
- for (var i = 0; i &lt; textmsg.length; i++) {
-     dataToSend[i] = textmsg.charCodeAt(i);
- }
-
- function healthRegisterSuccess(app) {
-     console.log("Registered application: " + app.name);
-     app.onconnect = function(channel) {
-         console.log("Health device is connected");
-         channel.sendData(dataToSend);
-     }
- }
-
- function healthRegisterError(e) {
-     console.log("Failed to register application: " + e.message);
- };
-
- healthProfileHandler.registerSinkApplication(4100, "testSinkApp", healthRegisterSuccess, healthRegisterError);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var adapter = tizen.bluetooth.getDefaultAdapter();
+var healthProfileHandler = adapter.getBluetoothProfileHandler("HEALTH");
+
+/* Data to send */
+var textmsg = "Test";
+var dataToSend = new Array();
+for (var i = 0; i &lt; textmsg.length; i++)
+{
+&nbsp;&nbsp;&nbsp;dataToSend[i] = textmsg.charCodeAt(i);
+}
+
+function healthRegisterSuccess(app)
+{
+&nbsp;&nbsp;&nbsp;console.log("Registered application: " + app.name);
+&nbsp;&nbsp;&nbsp;app.onconnect = function(channel)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Health device is connected");
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;channel.sendData(dataToSend);
+&nbsp;&nbsp;&nbsp;}
+}
+
+function healthRegisterError(e)
+{
+&nbsp;&nbsp;&nbsp;console.log("Failed to register application: " + e.message);
+};
+
+healthProfileHandler.registerSinkApplication(4100, "testSinkApp", healthRegisterSuccess, healthRegisterError);
+</pre>
 </div>
 </dd>
 <dt class="method" id="BluetoothHealthChannel::setListener">
@@ -6098,32 +6381,39 @@ Instead, use <em>http://tizen.org/privilege/bluetooth</em>.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var adapter = tizen.bluetooth.getDefaultAdapter();
- var healthProfileHandler = adapter.getBluetoothProfileHandler("HEALTH");
-
- var channelCallback = {
-     onmessage: function(data) {
-         console.log("data is received")
-     },
-     onclose: function() {
-         console.log("channel is closed");
-     }
- };
-
- function healthRegisterSuccess(app) {
-     console.log("Registered application: " + app.name);
-     app.onconnect = function(channel) {;
-         console.log("Health device is connected");
-         channel.setListener(channelCallback);
-     }
- }
-
- function healthRegisterError(e) {
-     console.log("Failed to register application: " + e.message);
- };
-
- healthProfileHandler.registerSinkApplication(4100, "testSinkApp", healthRegisterSuccess, healthRegisterError);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var adapter = tizen.bluetooth.getDefaultAdapter();
+var healthProfileHandler = adapter.getBluetoothProfileHandler("HEALTH");
+
+var channelCallback =
+{
+&nbsp;&nbsp;&nbsp;onmessage: function(data)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("data is received")
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;onclose: function()
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("channel is closed");
+&nbsp;&nbsp;&nbsp;}
+};
+
+function healthRegisterSuccess(app)
+{
+&nbsp;&nbsp;&nbsp;console.log("Registered application: " + app.name);
+&nbsp;&nbsp;&nbsp;app.onconnect = function(channel)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Health device is connected");
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;channel.setListener(channelCallback);
+&nbsp;&nbsp;&nbsp;}
+}
+
+function healthRegisterError(e)
+{
+&nbsp;&nbsp;&nbsp;console.log("Failed to register application: " + e.message);
+};
+
+healthProfileHandler.registerSinkApplication(4100, "testSinkApp", healthRegisterSuccess, healthRegisterError);
+</pre>
 </div>
 </dd>
 <dt class="method" id="BluetoothHealthChannel::unsetListener">
@@ -6165,35 +6455,42 @@ Instead, use <em>http://tizen.org/privilege/bluetooth</em>.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var adapter = tizen.bluetooth.getDefaultAdapter();
- var healthProfileHandler = adapter.getBluetoothProfileHandler("HEALTH");
- var connectedChannel = null;
-
- var channelCallback = {
-     onmessage: function(data) {
-         console.log("data is received")
-     },
-     onclose: function() {
-         console.log("channel is closed");
-         connectedChannel.unsetListener();
-     }
- };
-
- function healthRegisterSuccess(app) {
-     console.log("Registered application: " + app.name);
-     app.onconnect = function(channel) {;
-         console.log("Health device is connected");
-         connectedChannel = channel;
-         connectedChannel.setListener(channelCallback);
-     }
- }
-
- function healthRegisterError(e) {
-     console.log("Failed to register application: " + e.message);
- };
-
- healthProfileHandler.registerSinkApplication(4100, "testSinkApp", healthRegisterSuccess, healthRegisterError);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var adapter = tizen.bluetooth.getDefaultAdapter();
+var healthProfileHandler = adapter.getBluetoothProfileHandler("HEALTH");
+var connectedChannel = null;
+
+var channelCallback =
+{
+&nbsp;&nbsp;&nbsp;onmessage: function(data)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("data is received")
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;onclose: function()
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("channel is closed");
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;connectedChannel.unsetListener();
+&nbsp;&nbsp;&nbsp;}
+};
+
+function healthRegisterSuccess(app)
+{
+&nbsp;&nbsp;&nbsp;console.log("Registered application: " + app.name);
+&nbsp;&nbsp;&nbsp;app.onconnect = function(channel)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Health device is connected");
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;connectedChannel = channel;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;connectedChannel.setListener(channelCallback);
+&nbsp;&nbsp;&nbsp;}
+}
+
+function healthRegisterError(e)
+{
+&nbsp;&nbsp;&nbsp;console.log("Failed to register application: " + e.message);
+};
+
+healthProfileHandler.registerSinkApplication(4100, "testSinkApp", healthRegisterSuccess, healthRegisterError);
+</pre>
 </div>
 </dd>
 </dl>
index f2fa510..20057c1 100644 (file)
@@ -450,13 +450,15 @@ contain an invalid value.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Assume the content is a Content object as a result of find method.
- // Check the description is editable, and then set a description.
- if (content.editableAttributes.indexOf("description") &gt;= 0) {
-     content.description = "Sample content";
- }
- tizen.content.update(content);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Assume the content is a Content object as a result of find method */
+/* Check the description is editable, and then set a description */
+if (content.editableAttributes.indexOf("description") &gt;= 0)
+{
+&nbsp;&nbsp;&nbsp;content.description = "Sample content";
+}
+tizen.content.update(content);
+</pre>
 </div>
 </dd>
 <dt class="method" id="ContentManager::updateBatch">
@@ -531,23 +533,27 @@ is not compatible with the expected type for that parameter.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // The following example increases rating of an content by 1
-
- function errorCB(err) {
-     console.log( 'The following error occurred: ' +  err.name);
- }
-
- function successCB() {
-     console.log('Attributes set successfully');
- }
-
- // Assume the content is a Content object as a result of find method.
- // Check the rating is editable, and then increase by 1.
- if (content.editableAttributes.indexOf("rating") &gt;= 0) {
-     content.rating++;
- }
- tizen.content.updateBatch([content], successCB, errorCB);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Following example increases rating of a content by 1 */
+
+function errorCB(err)
+{
+&nbsp;&nbsp;&nbsp;console.log('The following error occurred: ' +  err.name);
+}
+
+function successCB()
+{
+&nbsp;&nbsp;&nbsp;console.log('Attributes set successfully');
+}
+
+/* Assume the content is a Content object as a result of find method */
+/* Check the rating is editable, and then increase by 1 */
+if (content.editableAttributes.indexOf("rating") &gt;= 0)
+{
+&nbsp;&nbsp;&nbsp;content.rating++;
+}
+tizen.content.updateBatch([content], successCB, errorCB);
+</pre>
 </div>
 </dd>
 <dt class="method" id="ContentManager::getDirectories">
@@ -598,21 +604,26 @@ is not compatible with the expected type for that parameter.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // The following example retrieves content directories in the storage.
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Following example retrieves content directories in the storage */
 
- function errorCB(err) {
-     console.log( 'The following error occurred: ' +  err.name);
- }
+function errorCB(err)
+{
+&nbsp;&nbsp;&nbsp;console.log('The following error occurred: ' +  err.name);
+}
 
- function printDirectory(directory, index, directories) {
-     console.log('directoryURI: ' + directory.directoryURI + ' Title: ' + directory.title);
- }
- function getDirectoriesCB(directories) {
-     directories.forEach(printDirectory);
- }
+function printDirectory(directory, index, directories)
+{
+&nbsp;&nbsp;&nbsp;console.log('directoryURI: ' + directory.directoryURI + ' Title: ' + directory.title);
+}
 
- tizen.content.getDirectories(getDirectoriesCB, errorCB);
- </pre>
+function getDirectoriesCB(directories)
+{
+&nbsp;&nbsp;&nbsp;directories.forEach(printDirectory);
+}
+
+tizen.content.getDirectories(getDirectoriesCB, errorCB);
+</pre>
 </div>
 </dd>
 <dt class="method" id="ContentManager::find">
@@ -699,35 +710,40 @@ is not compatible with the expected type for that parameter.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // The following example retrieves all songs from the album "The Joshua Tree", by artist "U2", ordered by the name.
- var count = 100;
- var offset = 0;
- var sortMode = new tizen.SortMode("name", "ASC");
- var artistFilter = new tizen.AttributeFilter("artists", "EXACTLY", "U2");
- var albumFilter = new tizen.AttributeFilter("album", "EXACTLY", "The Joshua Tree");
- var filter = new tizen.CompositeFilter("INTERSECTION", [albumFilter, artistFilter]);
-
- function errorCB(err) {
-     console.log( 'The following error occurred: ' +  err.name);
- }
-
- function printContent(content, index, contents) {
-     console.log('Name: ' + content.name + ' Title: ' + content.title + 'URL: ' + content.contentURI + 'MIME: ' + content.mimeType);
- }
-
- function findCB(contents) {
-     console.log('The Joshua Tree by U2:');
-     contents.forEach(printContent);
-     // Increase the offset as much as the count and then find content again.
-     if (contents.length === count) {
-         offset += count;
-         tizen.content.find(findCB, errorCB, null, filter, sortMode, count, offset);
-     }
- }
-
- tizen.content.find(findCB, errorCB, null, filter, sortMode, count, offset);
-
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Following example retrieves all songs from the album "The Joshua Tree", by artist "U2", ordered by the name */
+var count = 100;
+var offset = 0;
+var sortMode = new tizen.SortMode("name", "ASC");
+var artistFilter = new tizen.AttributeFilter("artists", "EXACTLY", "U2");
+var albumFilter = new tizen.AttributeFilter("album", "EXACTLY", "The Joshua Tree");
+var filter = new tizen.CompositeFilter("INTERSECTION", [albumFilter, artistFilter]);
+
+function errorCB(err)
+{
+&nbsp;&nbsp;&nbsp;console.log('The following error occurred: ' +  err.name);
+}
+
+function printContent(content, index, contents)
+{
+&nbsp;&nbsp;&nbsp;console.log('Name: ' + content.name + ' Title: ' + content.title +
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'URL: ' + content.contentURI + 'MIME: ' + content.mimeType);
+}
+
+function findCB(contents)
+{
+&nbsp;&nbsp;&nbsp;console.log('The Joshua Tree by U2:');
+&nbsp;&nbsp;&nbsp;contents.forEach(printContent);
+&nbsp;&nbsp;&nbsp;/* Increase the offset as much as the count and then find content again */
+&nbsp;&nbsp;&nbsp;if (contents.length === count)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;offset += count;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tizen.content.find(findCB, errorCB, null, filter, sortMode, count, offset);
+&nbsp;&nbsp;&nbsp;}
+}
+
+tizen.content.find(findCB, errorCB, null, filter, sortMode, count, offset);
+</pre>
 </div>
 </dd>
 <dt class="method" id="ContentManager::scanFile">
@@ -799,21 +815,24 @@ contain an invalid value (e.g. given <em>contentURI</em> is an empty string).
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // The following example scan 'tizen.jpg' in media directory
-
- function errorCB(err) {
-     console.log( 'The following error occurred: ' +  err.name);
- }
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Following example scans 'tizen.jpg' in media directory */
 
- function successCB(path) {
-     console.log('scanning is completed');
- }
+function errorCB(err)
+{
+&nbsp;&nbsp;&nbsp;console.log('The following error occurred: ' +  err.name);
+}
 
- tizen.filesystem.resolve("images/tizen.jpg", function(imageFile) {
-     tizen.content.scanFile(imageFile.toURI(), successCB, errorCB);
- });
+function successCB(path)
+{
+&nbsp;&nbsp;&nbsp;console.log('scanning is completed');
+}
 
- </pre>
+tizen.filesystem.resolve("images/tizen.jpg", function(imageFile)
+{
+&nbsp;&nbsp;&nbsp;tizen.content.scanFile(imageFile.toURI(), successCB, errorCB);
+});
+</pre>
 </div>
 </dd>
 <dt class="method" id="ContentManager::scanDirectory">
@@ -893,21 +912,24 @@ contain an invalid value (e.g. given <em>contentDirURI</em> is an empty string).
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // The following example scans 'images' directory
-
- function errorCB(err) {
-     console.log( 'The following error occurred: ' +  err.name);
- }
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Following example scans 'images' directory */
 
- function successCB(path) {
-     console.log('scanning is completed');
- }
+function errorCB(err)
+{
+&nbsp;&nbsp;&nbsp;console.log('The following error occurred: ' +  err.name);
+}
 
- tizen.filesystem.resolve("images", function(directory) {
-     tizen.content.scanDirectory(directory.toURI(), true, successCB, errorCB);
- });
+function successCB(path)
+{
+&nbsp;&nbsp;&nbsp;console.log('scanning is completed');
+}
 
- </pre>
+tizen.filesystem.resolve("images", function(directory)
+{
+&nbsp;&nbsp;&nbsp;tizen.content.scanDirectory(directory.toURI(), true, successCB, errorCB);
+});
+</pre>
 </div>
 </dd>
 <dt class="method" id="ContentManager::cancelScanDirectory">
@@ -962,9 +984,9 @@ contain an invalid value (e.g. given <em>contentDirURI</em> is an empty string).
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> tizen.content.cancelScanDirectory(directory.toURI());
-
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+tizen.content.cancelScanDirectory(directory.toURI());
+</pre>
 </div>
 </dd>
 <dt class="method" id="ContentManager::addChangeListener">
@@ -1006,32 +1028,40 @@ contain an invalid value (e.g. given <em>contentDirURI</em> is an empty string).
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var listener = {
-    oncontentadded: function(content) {
-        console.log(content.contentURI + ' content is added');
-    },
-    oncontentupdated: function(content) {
-        console.log(content.contentURI + ' content is updated');
-    },
-    oncontentremoved: function(id) {
-        console.log(id + ' is removed');
-    },
-    oncontentdiradded: function(contentDir) {
-        console.log(contentDir.directoryURI + ' content directory is added');
-    },
-    oncontentdirupdated: function(contentDir) {
-        console.log(contentDir.directoryURI + ' content directory is updated');
-    },
-    oncontentdirremoved: function(id) {
-        console.log(id + ' directory is removed');
-    }
- };
-
- // Adds the listener
- var listenerId = tizen.content.addChangeListener(listener);
-
- console.log('Listener ID: ' + listenerId);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var listener =
+{
+&nbsp;&nbsp;&nbsp;oncontentadded: function(content)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(content.contentURI + ' content is added');
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;oncontentupdated: function(content) 
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(content.contentURI + ' content is updated');
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;oncontentremoved: function(id)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(id + ' is removed');
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;oncontentdiradded: function(contentDir)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(contentDir.directoryURI + ' content directory is added');
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;oncontentdirupdated: function(contentDir)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(contentDir.directoryURI + ' content directory is updated');
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;oncontentdirremoved: function(id)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(id + ' directory is removed');
+&nbsp;&nbsp;&nbsp;}
+};
+
+/* Adds the listener */
+var listenerId = tizen.content.addChangeListener(listener);
+
+console.log('Listener ID: ' + listenerId);
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre> Listener ID: 1
@@ -1069,34 +1099,42 @@ contain an invalid value (e.g. given <em>contentDirURI</em> is an empty string).
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var listener = {
-    oncontentadded: function(content) {
-        console.log(content.contentURI + ' content is added');
-    },
-    oncontentupdated: function(content) {
-        console.log(content.contentURI + ' content is updated');
-    },
-    oncontentremoved: function(id) {
-        console.log(id + ' is removed');
-    },
-    oncontentdiradded: function(contentDir) {
-        console.log(contentDir.directoryURI + ' content directory is added');
-    },
-    oncontentdirupdated: function(contentDir) {
-        console.log(contentDir.directoryURI + ' content directory is updated');
-    },
-    oncontentdirremoved: function(id) {
-        console.log(id + ' directory is removed');
-    }
- };
-
- var listenerId = tizen.content.addChangeListener(listener);
-
- // Do some job here and when the listener is not needed anymore remove it
-
- // Removes the listener
- tizen.content.removeChangeListener(listenerId);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var listener =
+{
+&nbsp;&nbsp;&nbsp;oncontentadded: function(content)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(content.contentURI + ' content is added');
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;oncontentupdated: function(content)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(content.contentURI + ' content is updated');
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;oncontentremoved: function(id)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(id + ' is removed');
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;oncontentdiradded: function(contentDir)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(contentDir.directoryURI + ' content directory is added');
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;oncontentdirupdated: function(contentDir)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(contentDir.directoryURI + ' content directory is updated');
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;oncontentdirremoved: function(id)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(id + ' directory is removed');
+&nbsp;&nbsp;&nbsp;}
+};
+
+var listenerId = tizen.content.addChangeListener(listener);
+
+/* Do some job here and when the listener is not needed anymore remove it */
+
+/* Removes the listener */
+tizen.content.removeChangeListener(listenerId);
+</pre>
 </div>
 </dd>
 <dt class="deprecated method" id="ContentManager::setChangeListener">
@@ -1152,31 +1190,38 @@ developers to add a listener and get notified when content is added, removed or
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var listener= {
-    oncontentadded: function(content) {
-        console.log(content.contentURI + ' content is added');
-    },
-    oncontentupdated: function(content) {
-        console.log(content.contentURI + ' content is updated');
-    },
-    oncontentremoved: function(id) {
-        console.log(id + ' is removed');
-    },
-    oncontentdiradded: function(contentDir) {
-        console.log(contentDir.directoryURI + ' content directory is added');
-    },
-    oncontentdirupdated: function(contentDir) {
-        console.log(contentDir.directoryURI + ' content directory is updated');
-    },
-    oncontentdirremoved: function(id) {
-        console.log(id + ' directory is removed');
-    }
- };
-
- // Registers to be notified when the content changes
- tizen.content.setChangeListener(listener);
-
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var listener =
+{
+&nbsp;&nbsp;&nbsp;oncontentadded: function(content)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(content.contentURI + ' content is added');
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;oncontentupdated: function(content)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(content.contentURI + ' content is updated');
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;oncontentremoved: function(id)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(id + ' is removed');
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;oncontentdiradded: function(contentDir)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(contentDir.directoryURI + ' content directory is added');
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;oncontentdirupdated: function(contentDir)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(contentDir.directoryURI + ' content directory is updated');
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;oncontentdirremoved: function(id)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(id + ' directory is removed');
+&nbsp;&nbsp;&nbsp;}
+};
+
+/* Registers to be notified when the content changes */
+tizen.content.setChangeListener(listener);
+</pre>
 </div>
 </dd>
 <dt class="deprecated method" id="ContentManager::unsetChangeListener">
@@ -1216,9 +1261,9 @@ developers to add a listener and get notified when content is added, removed or
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> tizen.content.unsetChangeListener();
-
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+tizen.content.unsetChangeListener();
+</pre>
 </div>
 </dd>
 <dt class="method" id="ContentManager::getPlaylists">
@@ -1277,24 +1322,28 @@ UnknownError: In case of any error              </li>
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var gPlaylists;
-
- function getPlaylistsFail(err) {
-     console.log("getPlaylists failed: " + err);
- }
-
- function getPlaylistsSuccess(playlists) {
-     var cur, i;
-     gPlaylists = playlists;
-     for(i = 0; i &lt; gPlaylists.length; ++i) {
-         cur = gPlaylists[i];
-         console.log("[" + i + "] name:" + cur.name + " num tracks:" +
-                 cur.numberOfTracks);
-     }
- }
-
- tizen.content.getPlaylists(getPlaylistsSuccess, getPlaylistsFail);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var gPlaylists;
+
+function getPlaylistsFail(err)
+{
+&nbsp;&nbsp;&nbsp;console.log("getPlaylists failed: " + err);
+}
+
+function getPlaylistsSuccess(playlists)
+{
+&nbsp;&nbsp;&nbsp;var cur, i;
+&nbsp;&nbsp;&nbsp;gPlaylists = playlists;
+&nbsp;&nbsp;&nbsp;for (i = 0; i &lt; gPlaylists.length; ++i)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cur = gPlaylists[i];
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("[" + i + "] name:" + cur.name + " num tracks:" +
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cur.numberOfTracks);
+&nbsp;&nbsp;&nbsp;}
+}
+
+tizen.content.getPlaylists(getPlaylistsSuccess, getPlaylistsFail);
+</pre>
 </div>
 </dd>
 <dt class="method" id="ContentManager::createPlaylist">
@@ -1363,50 +1412,58 @@ UnknownError: In case of any other error              </li>
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var gPlaylists;
- var gPlaylist;
-
- function getPlaylistsFail(err) {
-     console.log("getPlaylists failed: " + err.message);
- }
-
- function getPlaylistsSuccess(playlists) {
-     var cur, i;
-     gPlaylists = playlists;
-     for(i = 0; i &lt; gPlaylists.length; ++i) {
-         cur = gPlaylists[i];
-         console.log("[" + i + "] name:" + cur.name + " num tracks:" +
-                 cur.numberOfTracks);
-     }
- }
-
- function findSuccess(contents) {
-     if (contents.length &gt; 0) {
-         gPlaylist.add(contents[0]);
-     }
-
-     tizen.content.getPlaylists(getPlaylistsSuccess, getPlaylistsFail);
- }
-
- function findFail(err) {
-     console.log("find FAIL: " + err.message);
- }
-
- function createSuccess(playlist) {
-     console.log("create SUCCESS");
-
-     gPlaylist = playlist;
-     tizen.content.find(findSuccess, findFail, null,
-             new tizen.AttributeFilter("type", "EXACTLY", "AUDIO"));
- }
-
- function createFail(err) {
-     console.log("create FAIL: " + err.message);
- }
-
- tizen.content.createPlaylist("My new playlist", createSuccess, createFail);
-
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var gPlaylists;
+var gPlaylist;
+
+function getPlaylistsFail(err)
+{
+&nbsp;&nbsp;&nbsp;console.log("getPlaylists failed: " + err.message);
+}
+
+function getPlaylistsSuccess(playlists)
+{
+&nbsp;&nbsp;&nbsp;var cur, i;
+&nbsp;&nbsp;&nbsp;gPlaylists = playlists;
+&nbsp;&nbsp;&nbsp;for (i = 0; i &lt; gPlaylists.length; ++i)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cur = gPlaylists[i];
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("[" + i + "] name:" + cur.name + " num tracks:" +
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cur.numberOfTracks);
+&nbsp;&nbsp;&nbsp;}
+}
+
+function findSuccess(contents)
+{
+&nbsp;&nbsp;&nbsp;if (contents.length &gt; 0)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;gPlaylist.add(contents[0]);
+&nbsp;&nbsp;&nbsp;}
+
+&nbsp;&nbsp;&nbsp;tizen.content.getPlaylists(getPlaylistsSuccess, getPlaylistsFail);
+}
+
+function findFail(err)
+{
+&nbsp;&nbsp;&nbsp;console.log("find FAIL: " + err.message);
+}
+
+function createSuccess(playlist)
+{
+&nbsp;&nbsp;&nbsp;console.log("create SUCCESS");
+
+&nbsp;&nbsp;&nbsp;gPlaylist = playlist;
+&nbsp;&nbsp;&nbsp;tizen.content.find(findSuccess, findFail, null,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;new tizen.AttributeFilter("type", "EXACTLY", "AUDIO"));
+}
+
+function createFail(err)
+{
+&nbsp;&nbsp;&nbsp;console.log("create FAIL: " + err.message);
+}
+
+tizen.content.createPlaylist("My new playlist", createSuccess, createFail);
+</pre>
 </div>
 </dd>
 <dt class="method" id="ContentManager::removePlaylist">
@@ -1469,44 +1526,51 @@ UnknownError: In case of any error              </li>
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var gPlaylists;
-
- function removePlaylistSuccess() {
-     console.log("removePlaylist SUCCESS");
- }
-
- function removePlaylistFail(err) {
-     console.log("removePlaylist FAIL: " + err);
- }
-
- function getPlaylistsFail(err) {
-     console.log("getPlaylists failed: " + err);
- }
-
- function getPlaylistsSuccess(playlists) {
-     var cur, i;
-     gPlaylists = playlists;
-     for(i = 0; i &lt; gPlaylists.length; ++i) {
-         cur = gPlaylists[i];
-         console.log("[" + i + "] name:" + cur.name + " num tracks:" +
-                 cur.numberOfTracks);
-     }
-
-     if(gPlaylists.length &lt; 1) {
-         console.log("Please add at least 1 playlist");
-         return;
-     }
-
-     console.log("will remove playlist at index [0] name:"
-             + gPlaylists[0].name);
-
-     tizen.content.removePlaylist(gPlaylists[0].id, removePlaylistSuccess,
-             removePlaylistFail);
- }
-
- tizen.content.getPlaylists(getPlaylistsSuccess, getPlaylistsFail);
-
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var gPlaylists;
+
+function removePlaylistSuccess()
+{
+&nbsp;&nbsp;&nbsp;console.log("removePlaylist SUCCESS");
+}
+
+function removePlaylistFail(err)
+{
+&nbsp;&nbsp;&nbsp;console.log("removePlaylist FAIL: " + err);
+}
+
+function getPlaylistsFail(err)
+{
+&nbsp;&nbsp;&nbsp;console.log("getPlaylists failed: " + err);
+}
+
+function getPlaylistsSuccess(playlists)
+{
+&nbsp;&nbsp;&nbsp;var cur, i;
+&nbsp;&nbsp;&nbsp;gPlaylists = playlists;
+&nbsp;&nbsp;&nbsp;for (i = 0; i &lt; gPlaylists.length; ++i)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cur = gPlaylists[i];
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("[" + i + "] name:" + cur.name + " num tracks:" +
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cur.numberOfTracks);
+&nbsp;&nbsp;&nbsp;}
+
+&nbsp;&nbsp;&nbsp;if (gPlaylists.length &lt; 1)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Please add at least 1 playlist");
+
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return;
+&nbsp;&nbsp;&nbsp;}
+
+&nbsp;&nbsp;&nbsp;console.log("will remove playlist at index [0] name:"
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;+ gPlaylists[0].name);
+
+&nbsp;&nbsp;&nbsp;tizen.content.removePlaylist(gPlaylists[0].id, removePlaylistSuccess,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;removePlaylistFail);
+}
+
+tizen.content.getPlaylists(getPlaylistsSuccess, getPlaylistsFail);
+</pre>
 </div>
 </dd>
 <dt class="method" id="ContentManager::createThumbnail">
@@ -1571,18 +1635,22 @@ AbortError: In case of any error.              </li>
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function createCB(path) {
-   console.log("The thumbnail path is " + path);
- }
-
- function findCB(contents) {
-   if (contents.length &gt; 0) {
-     tizen.content.createThumbnail(contents[0], createCB);
-   }
- }
-
- tizen.content.find(findCB);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function createCB(path)
+{
+&nbsp;&nbsp;&nbsp;console.log("The thumbnail path is " + path);
+}
+
+function findCB(contents)
+{
+&nbsp;&nbsp;&nbsp;if (contents.length &gt; 0)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tizen.content.createThumbnail(contents[0], createCB);
+&nbsp;&nbsp;&nbsp;}
+}
+
+tizen.content.find(findCB);
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre> The thumbnail path is /home/owner/share/media/.thumb/phone/.jpg-bed1d5f494830f7a52e1217f1e924aff.jpg
@@ -2820,59 +2888,71 @@ UnknownError: In case of any error              </li>
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var gPlaylists, gItems, gCurPlaylist;
-
- function get2Fail(err) {
-     console.log("get items (after remove) failed: " + err);
- }
-
- function get2Success(items) {
-    console.log("Playlist items:");
-    for(var i = 0; i &lt; items.length ; ++i) {
-        console.log("[" + i + "]: name:" + items[i].content.name);
-    }
- }
-
- function getSuccess(items) {
-    gItems = items;
-
-    if(gItems.length &lt; 1) {
-        console.log("Please add at least 1 tracks to playlist!");
-        return;
-    }
-
-    console.log("Original playlist:");
-    for(var i = 0; i &lt; gItems.length ; ++i) {
-        console.log("[" + i + "]: name:" + gItems[i].content.name);
-    }
-
-    console.log("Will remove item at index [0] name:" + gItems[0].content.name);
-    gCurPlaylist.remove(gItems[0]);
-    gCurPlaylist.get(get2Success, get2Fail);
- }
-
- function getFail(err) {
-     console.log("get items failed: " + err);
- }
-
- function getPlaylistsFail(err) {
-     console.log("getPlaylists failed: " + err);
- }
-
- function getPlaylistsSuccess(playlists) {
-     gPlaylists = playlists;
-     if(gPlaylists.length === 0) {
-         console.log("Please create at least 1 playlist!");
-         return;
-     }
-
-     gCurPlaylist = gPlaylists[0];
-     gCurPlaylist.get(getSuccess, getFail);
- }
-
- tizen.content.getPlaylists(getPlaylistsSuccess, getPlaylistsFail);
-
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var gPlaylists, gItems, gCurPlaylist;
+
+function get2Fail(err)
+{
+&nbsp;&nbsp;&nbsp;console.log("get items (after remove) failed: " + err);
+}
+
+function get2Success(items)
+{
+&nbsp;&nbsp;&nbsp;console.log("Playlist items:");
+&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; items.length; ++i)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("[" + i + "]: name:" + items[i].content.name);
+&nbsp;&nbsp;&nbsp;}
+}
+
+function getSuccess(items)
+{
+&nbsp;&nbsp;&nbsp;gItems = items;
+
+&nbsp;&nbsp;&nbsp;if (gItems.length &lt; 1)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Please add at least 1 tracks to playlist!");
+
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return;
+&nbsp;&nbsp;&nbsp;}
+
+&nbsp;&nbsp;&nbsp;console.log("Original playlist:");
+&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; gItems.length; ++i)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("[" + i + "]: name:" + gItems[i].content.name);
+&nbsp;&nbsp;&nbsp;}
+
+&nbsp;&nbsp;&nbsp;console.log("Will remove item at index [0] name:" + gItems[0].content.name);
+&nbsp;&nbsp;&nbsp;gCurPlaylist.remove(gItems[0]);
+&nbsp;&nbsp;&nbsp;gCurPlaylist.get(get2Success, get2Fail);
+}
+
+function getFail(err)
+{
+&nbsp;&nbsp;&nbsp;console.log("get items failed: " + err);
+}
+
+function getPlaylistsFail(err)
+{
+&nbsp;&nbsp;&nbsp;console.log("getPlaylists failed: " + err);
+}
+
+function getPlaylistsSuccess(playlists)
+{
+&nbsp;&nbsp;&nbsp;gPlaylists = playlists;
+&nbsp;&nbsp;&nbsp;if (gPlaylists.length === 0)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Please create at least 1 playlist!");
+
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return;
+&nbsp;&nbsp;&nbsp;}
+
+&nbsp;&nbsp;&nbsp;gCurPlaylist = gPlaylists[0];
+&nbsp;&nbsp;&nbsp;gCurPlaylist.get(getSuccess, getFail);
+}
+
+tizen.content.getPlaylists(getPlaylistsSuccess, getPlaylistsFail);
+</pre>
 </div>
 </dd>
 <dt class="method" id="Playlist::removeBatch">
@@ -2935,69 +3015,82 @@ UnknownError: In case of any other error              </li>
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var gPlaylists, gItems, gCurPlaylist;
-
- function get2Fail(err) {
-     console.log("get items (after remove batch) failed: " + err);
- }
-
- function get2Success(items) {
-    console.log("Playlist after remove batch:");
-    for(var i = 0; i &lt; items.length ; ++i) {
-        console.log("[" + i + "]: name:" + items[i].content.name);
-    }
- }
-
- function removeBatchSuccess() {
-     console.log("removeBatch success");
-     gCurPlaylist.get(get2Success, get2Fail);
- }
-
- function removeBatchFail(err) {
-     console.log("removeBatch failed: " + err);
- }
-
- function getSuccess(items) {
-    gItems = items;
-
-    if(gItems.length &lt; 4) {
-        console.log("Please add at least 4 tracks to playlist!");
-        return;
-    }
-
-    console.log("Original playlist:");
-    for(var i = 0; i &lt; gItems.length ; ++i) {
-        console.log("[" + i + "]: name:" + gItems[i].content.name);
-    }
-
-    console.log("Will remove items at index [0](name:" + gItems[0].content.name
-            + ") and at index [2](name:" + gItems[2].content.name + ")");
-    gCurPlaylist.removeBatch([gItems[2], gItems[0]],
-            removeBatchSuccess, removeBatchFail);
- }
-
- function getFail(err) {
-     console.log("get items failed: " + err);
- }
-
- function getPlaylistsFail(err) {
-     console.log("getPlaylists failed: " + err);
- }
-
- function getPlaylistsSuccess(playlists) {
-     gPlaylists = playlists;
-     if(gPlaylists.length === 0) {
-         console.log("Please create at least 1 playlist!");
-         return;
-     }
-
-     gCurPlaylist = gPlaylists[0];
-     gCurPlaylist.get(getSuccess, getFail);
- }
-
- tizen.content.getPlaylists(getPlaylistsSuccess, getPlaylistsFail);
-
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var gPlaylists, gItems, gCurPlaylist;
+
+function get2Fail(err)
+{
+&nbsp;&nbsp;&nbsp;console.log("get items (after remove batch) failed: " + err);
+}
+
+function get2Success(items)
+{
+&nbsp;&nbsp;&nbsp;console.log("Playlist after remove batch:");
+&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; items.length; ++i)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("[" + i + "]: name:" + items[i].content.name);
+&nbsp;&nbsp;&nbsp;}
+}
+
+function removeBatchSuccess()
+{
+&nbsp;&nbsp;&nbsp;console.log("removeBatch success");
+&nbsp;&nbsp;&nbsp;gCurPlaylist.get(get2Success, get2Fail);
+}
+
+function removeBatchFail(err)
+{
+&nbsp;&nbsp;&nbsp;console.log("removeBatch failed: " + err);
+}
+
+function getSuccess(items)
+{
+&nbsp;&nbsp;&nbsp;gItems = items;
+
+&nbsp;&nbsp;&nbsp;if (gItems.length &lt; 4)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Please add at least 4 tracks to playlist!");
+
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return;
+&nbsp;&nbsp;&nbsp;}
+
+&nbsp;&nbsp;&nbsp;console.log("Original playlist:");
+&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; gItems.length; ++i)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("[" + i + "]: name:" + gItems[i].content.name);
+&nbsp;&nbsp;&nbsp;}
+
+&nbsp;&nbsp;&nbsp;console.log("Will remove items at index [0](name:" + gItems[0].content.name
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;+ ") and at index [2](name:" + gItems[2].content.name + ")");
+&nbsp;&nbsp;&nbsp;gCurPlaylist.removeBatch([gItems[2], gItems[0]], removeBatchSuccess, removeBatchFail);
+}
+
+function getFail(err)
+{
+&nbsp;&nbsp;&nbsp;console.log("get items failed: " + err);
+}
+
+function getPlaylistsFail(err)
+{
+&nbsp;&nbsp;&nbsp;console.log("getPlaylists failed: " + err);
+}
+
+function getPlaylistsSuccess(playlists)
+{
+&nbsp;&nbsp;&nbsp;gPlaylists = playlists;
+&nbsp;&nbsp;&nbsp;if (gPlaylists.length === 0)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Please create at least 1 playlist!");
+
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return;
+&nbsp;&nbsp;&nbsp;}
+
+&nbsp;&nbsp;&nbsp;gCurPlaylist = gPlaylists[0];
+&nbsp;&nbsp;&nbsp;gCurPlaylist.get(getSuccess, getFail);
+}
+
+tizen.content.getPlaylists(getPlaylistsSuccess, getPlaylistsFail);
+</pre>
 </div>
 </dd>
 <dt class="method" id="Playlist::get">
@@ -3066,38 +3159,46 @@ UnknownError: In case of any error              </li>
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var gPlaylists, gItems, gCurPlaylist;
-
- function getSuccess(items) {
-     gItems = items;
-     console.log("Playlist items:");
-     for(var i = 0; i &lt; items.length ; ++i) {
-         console.log("[" + i + "]: name:" + items[i].name);
-     }
- }
-
- function getFail(err) {
-     console.log("get items failed: " + err);
- }
-
- function getPlaylistsFail(err) {
-     console.log("getPlaylists failed: " + err);
- }
-
- function getPlaylistsSuccess(playlists) {
-     gPlaylists = playlists;
-     if(gPlaylists.length === 0) {
-         console.log("Please create at least 1 playlist!");
-         return;
-     }
-
-     gCurPlaylist = gPlaylists[0];
-     // To retrieves all playlist items of 'gCurPlaylist' playlist.
-     gCurPlaylist.get(getSuccess, getFail);
- }
-
- tizen.content.getPlaylists(getPlaylistsSuccess, getPlaylistsFail);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var gPlaylists, gItems, gCurPlaylist;
+
+function getSuccess(items)
+{
+&nbsp;&nbsp;&nbsp;gItems = items;
+&nbsp;&nbsp;&nbsp;console.log("Playlist items:");
+&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; items.length; ++i)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("[" + i + "]: name:" + items[i].name);
+&nbsp;&nbsp;&nbsp;}
+}
+
+function getFail(err)
+{
+&nbsp;&nbsp;&nbsp;console.log("get items failed: " + err);
+}
+
+function getPlaylistsFail(err)
+{
+&nbsp;&nbsp;&nbsp;console.log("getPlaylists failed: " + err);
+}
+
+function getPlaylistsSuccess(playlists)
+{
+&nbsp;&nbsp;&nbsp;gPlaylists = playlists;
+&nbsp;&nbsp;&nbsp;if (gPlaylists.length === 0)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Please create at least 1 playlist!");
+
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return;
+&nbsp;&nbsp;&nbsp;}
+
+&nbsp;&nbsp;&nbsp;gCurPlaylist = gPlaylists[0];
+&nbsp;&nbsp;&nbsp;/* To retrieve all playlist items of 'gCurPlaylist' playlist */
+&nbsp;&nbsp;&nbsp;gCurPlaylist.get(getSuccess, getFail);
+}
+
+tizen.content.getPlaylists(getPlaylistsSuccess, getPlaylistsFail);
+</pre>
 </div>
 </dd>
 <dt class="method" id="Playlist::setOrder">
@@ -3162,74 +3263,89 @@ UnknownError: In case of any other error              </li>
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var gPlaylists, gItems, gCurPlaylist, gExpectedOrder;
-
- function get2Fail(err) {
-     console.log("get items (after set order) failed: " + err);
- }
-
- function get2Success(items) {
-    console.log("Playlist order after setOrder:");
-    for(var i = 0; i &lt; items.length ; ++i) {
-        console.log("[" + i + "]: name:" + items[i].content.name);
-    }
- }
-
- function setOrderSuccess() {
-     console.log("set items order SUCCESS");
-     gCurPlaylist.get(get2Success, get2Fail);
- }
-
- function setOrderFail(err) {
-     console.log("set items order failed: " + err);
- }
-
- function getSuccess(items) {
-    gItems = items;
-
-    if(gItems.length &lt; 2) {
-        console.log("Please add at least 2 tracks to playlist!");
-        return;
-    }
-
-    console.log("Original order:");
-    for(var i = 0; i &lt; gItems.length ; ++i) {
-        console.log("[" + i + "]: name:" + gItems[i].content.name);
-    }
-
-    gExpectedOrder = gItems.slice(0);
-    gExpectedOrder.reverse();
-
-    console.log("New order:");
-    for(var i = 0; i &lt; gExpectedOrder.length ; ++i) {
-        console.log("[" + i + "]: name:" + gExpectedOrder[i].content.name);
-    }
-
-    gCurPlaylist.setOrder(gExpectedOrder, setOrderSuccess, setOrderFail);
- }
-
- function getFail(err) {
-     console.log("get items failed: " + err);
- }
-
- function getPlaylistsFail(err) {
-     console.log("getPlaylists failed: " + err);
- }
-
- function getPlaylistsSuccess(playlists) {
-     gPlaylists = playlists;
-     if(gPlaylists.length === 0) {
-         console.log("Please create at least 1 playlist!");
-         return;
-     }
-
-     gCurPlaylist = gPlaylists[0];
-     gCurPlaylist.get(getSuccess, getFail);
- }
-
- tizen.content.getPlaylists(getPlaylistsSuccess, getPlaylistsFail);
-
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var gPlaylists, gItems, gCurPlaylist, gExpectedOrder;
+
+function get2Fail(err)
+{
+&nbsp;&nbsp;&nbsp;console.log("get items (after set order) failed: " + err);
+}
+
+function get2Success(items)
+{
+&nbsp;&nbsp;&nbsp;console.log("Playlist order after setOrder:");
+&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; items.length; ++i)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("[" + i + "]: name:" + items[i].content.name);
+&nbsp;&nbsp;&nbsp;}
+}
+
+function setOrderSuccess()
+{
+&nbsp;&nbsp;&nbsp;console.log("set items order SUCCESS");
+&nbsp;&nbsp;&nbsp;gCurPlaylist.get(get2Success, get2Fail);
+}
+
+function setOrderFail(err)
+{
+&nbsp;&nbsp;&nbsp;console.log("set items order failed: " + err);
+}
+
+function getSuccess(items)
+{
+&nbsp;&nbsp;&nbsp;gItems = items;
+
+&nbsp;&nbsp;&nbsp;if (gItems.length &lt; 2)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Please add at least 2 tracks to playlist!");
+
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return;
+&nbsp;&nbsp;&nbsp;}
+
+&nbsp;&nbsp;&nbsp;console.log("Original order:");
+&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; gItems.length; ++i)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("[" + i + "]: name:" + gItems[i].content.name);
+&nbsp;&nbsp;&nbsp;}
+
+&nbsp;&nbsp;&nbsp;gExpectedOrder = gItems.slice(0);
+&nbsp;&nbsp;&nbsp;gExpectedOrder.reverse();
+
+&nbsp;&nbsp;&nbsp;console.log("New order:");
+&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; gExpectedOrder.length; ++i)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("[" + i + "]: name:" + gExpectedOrder[i].content.name);
+&nbsp;&nbsp;&nbsp;}
+
+&nbsp;&nbsp;&nbsp;gCurPlaylist.setOrder(gExpectedOrder, setOrderSuccess, setOrderFail);
+}
+
+function getFail(err)
+{
+&nbsp;&nbsp;&nbsp;console.log("get items failed: " + err);
+}
+
+function getPlaylistsFail(err)
+{
+&nbsp;&nbsp;&nbsp;console.log("getPlaylists failed: " + err);
+}
+
+function getPlaylistsSuccess(playlists)
+{
+&nbsp;&nbsp;&nbsp;gPlaylists = playlists;
+&nbsp;&nbsp;&nbsp;if (gPlaylists.length === 0)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Please create at least 1 playlist!");
+
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return;
+&nbsp;&nbsp;&nbsp;}
+
+&nbsp;&nbsp;&nbsp;gCurPlaylist = gPlaylists[0];
+&nbsp;&nbsp;&nbsp;gCurPlaylist.get(getSuccess, getFail);
+}
+
+tizen.content.getPlaylists(getPlaylistsSuccess, getPlaylistsFail);
+</pre>
 </div>
 </dd>
 <dt class="method" id="Playlist::move">
@@ -3307,69 +3423,84 @@ UnknownError: In case of any other error              </li>
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var gPlaylists, gItems, gCurPlaylist;
-
- function get2Fail(err) {
-     console.log("get items (after move item) failed: " + err);
- }
-
- function get2Success(items) {
-    console.log("Playlist order after move:");
-    for(var i = 0; i &lt; items.length ; ++i) {
-        console.log("[" + i + "]: name:" + items[i].content.name);
-    }
- }
-
- function moveSuccess() {
-     console.log("move item SUCCESS");
-     gCurPlaylist.get(get2Success, get2Fail);
- }
-
- function moveFail(err) {
-     console.log("move item failed: " + err);
- }
-
- function getSuccess(items) {
-    gItems = items;
-
-    if(gItems.length &lt; 2) {
-        console.log("Please add at least 2 tracks to playlist!");
-        return;
-    }
-
-    console.log("Original order:");
-    for(var i = 0; i &lt; gItems.length ; ++i) {
-        console.log("[" + i + "]: name:" + gItems[i].content.name);
-    }
-
-    console.log("Will move item at index [1] (name: " +
-            gItems[1].content.name + ") up by one place (to [0])");
-
-    gCurPlaylist.move(gItems[1], -1, moveSuccess, moveFail);
-    gItems.unshift(gItems.splice(1, 1)[0]);
- }
-
- function getFail(err) {
-     console.log("get items failed: " + err);
- }
-
- function getPlaylistsFail(err) {
-     console.log("getPlaylists failed: " + err);
- }
-
- function getPlaylistsSuccess(playlists) {
-     gPlaylists = playlists;
-     if(gPlaylists.length === 0) {
-         console.log("Please create at least 1 playlist!");
-         return;
-     }
-
-     gCurPlaylist = gPlaylists[0];
-     gCurPlaylist.get(getSuccess, getFail);
- }
-
- tizen.content.getPlaylists(getPlaylistsSuccess, getPlaylistsFail);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var gPlaylists, gItems, gCurPlaylist;
+
+function get2Fail(err)
+{
+&nbsp;&nbsp;&nbsp;console.log("get items (after move item) failed: " + err);
+}
+
+function get2Success(items)
+{
+&nbsp;&nbsp;&nbsp;console.log("Playlist order after move:");
+&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; items.length; ++i)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("[" + i + "]: name:" + items[i].content.name);
+&nbsp;&nbsp;&nbsp;}
+}
+
+function moveSuccess()
+{
+&nbsp;&nbsp;&nbsp;console.log("move item SUCCESS");
+&nbsp;&nbsp;&nbsp;gCurPlaylist.get(get2Success, get2Fail);
+}
+
+function moveFail(err)
+{
+&nbsp;&nbsp;&nbsp;console.log("move item failed: " + err);
+}
+
+function getSuccess(items)
+{
+&nbsp;&nbsp;&nbsp;gItems = items;
+
+&nbsp;&nbsp;&nbsp;if (gItems.length &lt; 2)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Please add at least 2 tracks to playlist!");
+
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return;
+&nbsp;&nbsp;&nbsp;}
+
+&nbsp;&nbsp;&nbsp;console.log("Original order:");
+&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; gItems.length; ++i)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("[" + i + "]: name:" + gItems[i].content.name);
+&nbsp;&nbsp;&nbsp;}
+
+&nbsp;&nbsp;&nbsp;console.log("Will move item at index [1] (name: " +
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;gItems[1].content.name + ") up by one place (to [0])");
+
+&nbsp;&nbsp;&nbsp;gCurPlaylist.move(gItems[1], -1, moveSuccess, moveFail);
+&nbsp;&nbsp;&nbsp;gItems.unshift(gItems.splice(1, 1)[0]);
+}
+
+function getFail(err)
+{
+&nbsp;&nbsp;&nbsp;console.log("get items failed: " + err);
+}
+
+function getPlaylistsFail(err)
+{
+&nbsp;&nbsp;&nbsp;console.log("getPlaylists failed: " + err);
+}
+
+function getPlaylistsSuccess(playlists)
+{
+&nbsp;&nbsp;&nbsp;gPlaylists = playlists;
+&nbsp;&nbsp;&nbsp;if (gPlaylists.length === 0)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Please create at least 1 playlist!");
+
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return;
+&nbsp;&nbsp;&nbsp;}
+
+&nbsp;&nbsp;&nbsp;gCurPlaylist = gPlaylists[0];
+&nbsp;&nbsp;&nbsp;gCurPlaylist.get(getSuccess, getFail);
+}
+
+tizen.content.getPlaylists(getPlaylistsSuccess, getPlaylistsFail);
+</pre>
 </div>
 </dd>
 </dl>
index 793d0c5..e323542 100644 (file)
@@ -3,7 +3,7 @@
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
 <link rel="stylesheet" type="text/css" href="../tizen.css" media="screen">
-<script type="text/javascript" src="snippet.js"></script><title>Console API</title>
+<script type="text/javascript" src="../snippet.js"></script><title>Console API</title>
 </head>
 <body id="page-content" onload="prettyPrint()">
 <div class="api" id="::Console">
@@ -121,8 +121,7 @@ The text will be logged as a standard message.
         </ul>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> console.log('A is for Alice.');
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">console.log('A is for Alice.');</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>A is for Alice.
@@ -153,8 +152,7 @@ The text will be logged as an error message.
         </ul>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> console.error('B is for Bob.');
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">console.error('B is for Bob.');</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>B is for Bob.
@@ -185,8 +183,7 @@ The text will be logged as a warning message.
         </ul>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> console.warn('C is for Christopher.');
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">console.warn('C is for Christopher.');</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>C is for Christopher.
@@ -217,8 +214,7 @@ The text will be logged as an info message.
         </ul>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> console.info('D is for Dorothy.');
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">console.info('D is for Dorothy.');</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>D is for Dorothy.
@@ -249,8 +245,7 @@ The text will be logged as a debug message.
         </ul>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> console.debug('E is for Eve.');
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">console.debug('E is for Eve.');</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>E is for Eve.
@@ -285,11 +280,12 @@ the message is written to the console.
         </ul>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var felix = 'Felix';
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var felix = 'Felix';
 
- // This assertion checks whether the first letter in name 'Felix' is 'A':
- console.assert(felix.charAt(0) === 'A', felix + ' does not start with A.');
- </pre>
+/* This assertion checks whether the first letter in name 'Felix' is 'A' */
+console.assert(felix.charAt(0) === 'A', felix + ' does not start with A.');
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Felix does not start with A.
@@ -321,9 +317,10 @@ Object view is forced.
         </ul>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var john = {name: "John", surname: "Doe"};
- console.dir(john.name);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var john = {name: "John", surname: "Doe"};
+console.dir(john.name);
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>John
@@ -354,9 +351,10 @@ if possible or the JavaScript Object if it is not.
         </ul>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var john = {name: "John", surname: "Doe"};
- console.dirxml(john.surname);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var john = {name: "John", surname: "Doe"};
+console.dirxml(john.surname);
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Doe
@@ -388,13 +386,15 @@ is displayed in the console. Timer values are accurate to the sub-millisecond.
         </ul>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> console.time("Big array initialization");
- var array = new Array(1000000);
- for (var i = array.length - 1; i &gt;= 0; i -= 1) {
-   array[i] = new Object();
- };
- console.timeEnd("Big array initialization");
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+console.time("Big array initialization");
+var array = new Array(1000000);
+for (var i = array.length - 1; i &gt;= 0; i -= 1)
+{
+&nbsp;&nbsp;&nbsp;array[i] = new Object();
+};
+console.timeEnd("Big array initialization");
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Big array initialization: 461.989ms
@@ -424,13 +424,15 @@ is displayed in the console. Timer values are accurate to the sub-millisecond.
         </ul>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> console.time("Big array initialization");
- var array = new Array(1000000);
- for (var i = array.length - 1; i &gt;= 0; i -= 1) {
-   array[i] = new Object();
- };
- console.timeEnd("Big array initialization");
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+console.time("Big array initialization");
+var array = new Array(1000000);
+for (var i = array.length - 1; i &gt;= 0; i -= 1)
+{
+&nbsp;&nbsp;&nbsp;array[i] = new Object();
+};
+console.timeEnd("Big array initialization");
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Big array initialization: 461.989ms
index 31b3dd8..6d96f02 100644 (file)
@@ -3,7 +3,7 @@
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
 <link rel="stylesheet" type="text/css" href="../tizen.css" media="screen">
-<script type="text/javascript" src="snippet.js"></script><title>Cordova API</title>
+<script type="text/javascript" src="../snippet.js"></script><title>Cordova API</title>
 </head>
 <body id="page-content" onload="prettyPrint()">
 <div class="api" id="::Cordova">
index 9d48e14..2130818 100644 (file)
@@ -3,7 +3,7 @@
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
 <link rel="stylesheet" type="text/css" href="../tizen.css" media="screen">
-<script type="text/javascript" src="snippet.js"></script><title>DeviceMotion API</title>
+<script type="text/javascript" src="../snippet.js"></script><title>DeviceMotion API</title>
 </head>
 <body id="page-content" onload="prettyPrint()">
 <div class="api" id="::DeviceMotion">
@@ -133,19 +133,22 @@ Original documentation: <a href="https://cordova.apache.org/docs/en/3.0.0/cordov
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function onSuccess(acceleration) {
-   console.log('Acceleration X: ' + acceleration.x + '\n' +
-               'Acceleration Y: ' + acceleration.y + '\n' +
-               'Acceleration Z: ' + acceleration.z + '\n' +
-               'Timestamp: '      + acceleration.timestamp);
- };
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function onSuccess(acceleration)
+{
+&nbsp;&nbsp;&nbsp;console.log('Acceleration X: ' + acceleration.x + '\n' +
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'Acceleration Y: ' + acceleration.y + '\n' +
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'Acceleration Z: ' + acceleration.z + '\n' +
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'Timestamp: ' + acceleration.timestamp);
+};
 
- function onError() {
-   console.log('onError!');
- };
+function onError()
+{
+&nbsp;&nbsp;&nbsp;console.log('onError!');
+};
 
- navigator.accelerometer.getCurrentAcceleration(onSuccess, onError);
- </pre>
+navigator.accelerometer.getCurrentAcceleration(onSuccess, onError);
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Acceleration X: 0.00
@@ -197,22 +200,25 @@ Timestamp: 1456480118000
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function onSuccess(acceleration) {
-   console.log('Acceleration X: ' + acceleration.x + '\n' +
-               'Acceleration Y: ' + acceleration.y + '\n' +
-               'Acceleration Z: ' + acceleration.z + '\n' +
-               'Timestamp: '      + acceleration.timestamp);
-   console.log('Please wait 3 seconds for the next measurement...');
- };
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function onSuccess(acceleration)
+{
+&nbsp;&nbsp;&nbsp;console.log('Acceleration X: ' + acceleration.x + '\n' +
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'Acceleration Y: ' + acceleration.y + '\n' +
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'Acceleration Z: ' + acceleration.z + '\n' +
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'Timestamp: ' + acceleration.timestamp);
+&nbsp;&nbsp;&nbsp;console.log('Please wait 3 seconds for the next measurement...');
+};
 
- function onError() {
-   console.log('onError!');
- };
+function onError()
+{
+&nbsp;&nbsp;&nbsp;console.log('onError!');
+};
 
- var options = { frequency: 3000 };  // Update every 3 seconds
+var options = {frequency: 3000}; /* Update every 3 seconds */
 
- var watchID = navigator.accelerometer.watchAcceleration(onSuccess, onError, options);
- </pre>
+var watchID = navigator.accelerometer.watchAcceleration(onSuccess, onError, options);
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Acceleration X: 0.00
@@ -259,26 +265,30 @@ Please wait 3 seconds for the next measurement...
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var counter = 0, watchID;
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var counter = 0, watchID;
 
- function onSuccess(acceleration) {
-   console.log('Acceleration X: ' + acceleration.x + '\n' +
-               'Acceleration Y: ' + acceleration.y + '\n' +
-               'Acceleration Z: ' + acceleration.z + '\n' +
-               'Timestamp: '      + acceleration.timestamp);
-   if(3 == ++counter) {
-     navigator.accelerometer.clearWatch(watchID);
-   }
- };
+function onSuccess(acceleration)
+{
+&nbsp;&nbsp;&nbsp;console.log('Acceleration X: ' + acceleration.x + '\n' +
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'Acceleration Y: ' + acceleration.y + '\n' +
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'Acceleration Z: ' + acceleration.z + '\n' +
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'Timestamp: ' + acceleration.timestamp);
+&nbsp;&nbsp;&nbsp;if (3 == ++counter)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;navigator.accelerometer.clearWatch(watchID);
+&nbsp;&nbsp;&nbsp;}
+};
 
- function onError() {
-   console.log('onError!');
- };
+function onError()
+{
+&nbsp;&nbsp;&nbsp;console.log('onError!');
+};
 
- var options = { frequency: 30 };  // Update every 0.03 seconds
+var options = {frequency: 30}; /* Update every 0.03 seconds */
 
- watchID = navigator.accelerometer.watchAcceleration(onSuccess, onError, options);
- </pre>
+watchID = navigator.accelerometer.watchAcceleration(onSuccess, onError, options);
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Acceleration X: 0.00
index e64876e..dcacaba 100644 (file)
@@ -3,7 +3,7 @@
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
 <link rel="stylesheet" type="text/css" href="../tizen.css" media="screen">
-<script type="text/javascript" src="snippet.js"></script><title>Device API</title>
+<script type="text/javascript" src="../snippet.js"></script><title>Device API</title>
 </head>
 <body id="page-content" onload="prettyPrint()">
 <div class="api" id="::Device">
@@ -94,12 +94,14 @@ Original documentation: <a href="https://cordova.apache.org/docs/en/3.0.0/cordov
  Returns the version of Cordova running on the device.
             </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> document.addEventListener('deviceready', onDeviceReady, false);
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+document.addEventListener('deviceready', onDeviceReady, false);
 
- function onDeviceReady() {
-   console.log('Device Cordova: '  + device.cordova);
- }
- </pre>
+function onDeviceReady()
+{
+&nbsp;&nbsp;&nbsp;console.log('Device Cordova: ' + device.cordova);
+}
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Device Cordova: 5.1.1
@@ -112,12 +114,14 @@ Original documentation: <a href="https://cordova.apache.org/docs/en/3.0.0/cordov
  Get the the name of the device's model or product. The value is set by the device manufacturer and may be different across versions of the same product.
             </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> document.addEventListener('deviceready', onDeviceReady, false);
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+document.addEventListener('deviceready', onDeviceReady, false);
 
- function onDeviceReady() {
-   console.log('Device Model: '  + device.model);
- }
- </pre>
+function onDeviceReady()
+{
+&nbsp;&nbsp;&nbsp;console.log('Device Model: ' + device.model);
+}
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Device Model: tm1
@@ -130,12 +134,14 @@ Original documentation: <a href="https://cordova.apache.org/docs/en/3.0.0/cordov
  Get the device's operating system name.
             </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> document.addEventListener('deviceready', onDeviceReady, false);
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+document.addEventListener('deviceready', onDeviceReady, false);
 
- function onDeviceReady() {
-   console.log('Device Platform: '  + device.platform);
- }
- </pre>
+function onDeviceReady()
+{
+&nbsp;&nbsp;&nbsp;console.log('Device Platform: ' + device.platform);
+}
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Device Platform: Tizen
@@ -148,12 +154,14 @@ Original documentation: <a href="https://cordova.apache.org/docs/en/3.0.0/cordov
  Get the device's Universally Unique Identifier (UUID). The details of how a UUID is generated are determined by the device manufacturer and are specific to the device's platform or model.
             </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> document.addEventListener('deviceready', onDeviceReady, false);
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+document.addEventListener('deviceready', onDeviceReady, false);
 
- function onDeviceReady() {
-   console.log('Device UUID: '  + device.uuid);
- }
- </pre>
+function onDeviceReady()
+{
+&nbsp;&nbsp;&nbsp;console.log('Device UUID: ' + device.uuid);
+}
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Device UUID: 2LR1b3MXfEUSFvH04m4e1EXYvQA=
@@ -166,12 +174,14 @@ Original documentation: <a href="https://cordova.apache.org/docs/en/3.0.0/cordov
  Get the operating system version.
             </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> document.addEventListener('deviceready', onDeviceReady, false);
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+document.addEventListener('deviceready', onDeviceReady, false);
 
- function onDeviceReady() {
-   console.log('Device Version: '  + device.version);
- }
- </pre>
+function onDeviceReady()
+{
+&nbsp;&nbsp;&nbsp;console.log('Device Version: ' + device.version);
+}
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Device Version: 3.0
index bfee537..3625992 100644 (file)
@@ -3,7 +3,7 @@
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
 <link rel="stylesheet" type="text/css" href="../tizen.css" media="screen">
-<script type="text/javascript" src="snippet.js"></script><title>Dialogs API</title>
+<script type="text/javascript" src="../snippet.js"></script><title>Dialogs API</title>
 </head>
 <body id="page-content" onload="prettyPrint()">
 <div class="api" id="::Dialogs">
@@ -140,13 +140,15 @@ The <em>navigator.notification</em> object allows access to the Dialogs API.
         </ul>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var alertDismissed = function() {
-    console.log('Alert was dismissed');
- }
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var alertDismissed = function()
+{
+&nbsp;&nbsp;&nbsp;console.log('Alert was dismissed');
+}
 
- navigator.notification.alert('Please click OK button', alertDismissed,
-                              'OK click alert', 'OK');
- </pre>
+navigator.notification.alert('Please click OK button', alertDismissed,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'OK click alert', 'OK');
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Alert was dismissed
@@ -189,13 +191,15 @@ Callback provides index of button pressed (1,2,3 etc.) or 0, if dialog was dismi
         </ul>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var confirmCallback = function(buttonIndex) {
-    console.log('Selected option was ' + buttonIndex);
- }
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var confirmCallback = function(buttonIndex)
+{
+&nbsp;&nbsp;&nbsp;console.log('Selected option was ' + buttonIndex);
+}
 
- navigator.notification.confirm('Choose one option', confirmCallback,
-                              'Options', ['Option1', 'Option2']);
- </pre>
+navigator.notification.confirm('Choose one option', confirmCallback,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'Options', ['Option1', 'Option2']);
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Selected option was 1
@@ -242,16 +246,15 @@ Callback provides <em>PromptData</em> object, which holds all data provided by u
         </ul>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var promptCallback = function(results) {
-    console.log('Hello ' + results.input1 + ', you selected option ' + results.buttonIndex);
- }
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var promptCallback = function(results)
+{
+&nbsp;&nbsp;&nbsp;console.log('Hello ' + results.input1 + ', you selected option ' + results.buttonIndex);
+}
 
- navigator.notification.prompt('Please enter your name',
-                               promptCallback,
-                              'Registration Box',
-                              ['Ok', 'Exit'],
-                              'e.g. Jane Doe');
- </pre>
+navigator.notification.prompt('Please enter your name', promptCallback,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'Registration Box', ['Ok', 'Exit'], 'e.g. Jane Doe');
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Hello Jane Doe, you selected option 1
@@ -281,10 +284,11 @@ Callback provides <em>PromptData</em> object, which holds all data provided by u
         </ul>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var times = 2;
- console.log('Device would beep ' + times + ' times');
- navigator.notification.beep(times);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var times = 2;
+console.log('Device would beep ' + times + ' times');
+navigator.notification.beep(times);
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Device would beep 2 times
index aad2427..95c00e7 100644 (file)
@@ -3,7 +3,7 @@
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
 <link rel="stylesheet" type="text/css" href="../tizen.css" media="screen">
-<script type="text/javascript" src="snippet.js"></script><title>Events API</title>
+<script type="text/javascript" src="../snippet.js"></script><title>Events API</title>
 </head>
 <body id="page-content" onload="prettyPrint()">
 <div class="api" id="::Events">
@@ -211,12 +211,14 @@ The deviceready event behaves somewhat differently from others. Any event handle
 Original documentation: <a href="https://cordova.apache.org/docs/en/latest/cordova/events/events.deviceready.html">Cordova deviceredy event</a>          </p>
          </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> document.addEventListener('deviceready', onDeviceReady, false);
-
- function onDeviceReady() {
-   // Now safe to use device APIs
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+document.addEventListener('deviceready', onDeviceReady, false);
+
+function onDeviceReady()
+{
+&nbsp;&nbsp;&nbsp;/* Now safe to use device APIs */
+}
+</pre>
 </div>
 </div>
 <div class="interface" id="PauseEventCallback">
@@ -243,16 +245,19 @@ Applications typically should use document.addEventListener() to attach an event
 Original documentation: <a href="https://cordova.apache.org/docs/en/latest/cordova/events/events.pause.html">Cordova pause event</a>          </p>
          </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> document.addEventListener('deviceready', onDeviceReady, false);
-
- function onDeviceReady() {
-   document.addEventListener('pause', onPause, false);
- }
-
- function onPause() {
-   // Handle the pause event
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+document.addEventListener('deviceready', onDeviceReady, false);
+
+function onDeviceReady()
+{
+&nbsp;&nbsp;&nbsp;document.addEventListener('pause', onPause, false);
+}
+
+function onPause()
+{
+&nbsp;&nbsp;&nbsp;/* Handle the pause event */
+}
+</pre>
 </div>
 </div>
 <div class="interface" id="ResumeEventCallback">
@@ -279,16 +284,19 @@ Applications typically should use document.addEventListener() to attach an event
 Original documentation: <a href="https://cordova.apache.org/docs/en/latest/cordova/events/events.resume.html">Cordova resume event</a>          </p>
          </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> document.addEventListener('deviceready', onDeviceReady, false);
-
- function onDeviceReady() {
-   document.addEventListener('resume', onResume, false);
- }
-
- function onResume() {
-   // Handle the resume event
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+document.addEventListener('deviceready', onDeviceReady, false);
+
+function onDeviceReady()
+{
+&nbsp;&nbsp;&nbsp;document.addEventListener('resume', onResume, false);
+}
+
+function onResume()
+{
+&nbsp;&nbsp;&nbsp;/* Handle the resume event */
+}
+</pre>
 </div>
 </div>
 <div class="interface" id="BackButtonEventCallback">
@@ -313,16 +321,19 @@ It is no longer necessary to call any other method to override the back-button b
 Original documentation: <a href="https://cordova.apache.org/docs/en/latest/cordova/events/events.backbutton.html">Cordova backbutton event</a>          </p>
          </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> document.addEventListener('deviceready', onDeviceReady, false);
-
- function onDeviceReady() {
-   document.addEventListener('backbutton', onBackKeyDown, false);
- }
-
- function onBackKeyDown() {
-    // Handle the back button
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+document.addEventListener('deviceready', onDeviceReady, false);
+
+function onDeviceReady()
+{
+&nbsp;&nbsp;&nbsp;document.addEventListener('backbutton', onBackKeyDown, false);
+}
+
+function onBackKeyDown()
+{
+&nbsp;&nbsp;&nbsp;/* Handle the back button */
+}
+</pre>
 </div>
 </div>
 <div class="interface" id="MenuButtonEventCallback">
@@ -349,16 +360,19 @@ Applications typically should use document.addEventListener() to attach an event
 Original documentation: <a href="https://cordova.apache.org/docs/en/latest/cordova/events/events.menubutton.html">Cordova menubutton event</a>          </p>
          </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> document.addEventListener('deviceready', onDeviceReady, false);
-
- function onDeviceReady() {
-   document.addEventListener('menubutton', onMenuKeyDown, false);
- }
-
- function onMenuKeyDown() {
-   // Handle the back button
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+document.addEventListener('deviceready', onDeviceReady, false);
+
+function onDeviceReady()
+{
+&nbsp;&nbsp;&nbsp;document.addEventListener('menubutton', onMenuKeyDown, false);
+}
+
+function onMenuKeyDown()
+{
+&nbsp;&nbsp;&nbsp;/* Handle the back button */
+}
+</pre>
 </div>
 </div>
 <div class="interface" id="SearchButtonEventCallback">
@@ -385,16 +399,19 @@ Applications typically should use document.addEventListener() to attach an event
 Original documentation: <a href="https://cordova.apache.org/docs/en/latest/cordova/events/events.searchbutton.html">Cordova searchbutton event</a>          </p>
          </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> document.addEventListener('deviceready', onDeviceReady, false);
-
- function onDeviceReady() {
-   document.addEventListener('searchbutton', onSearchKeyDown, false);
- }
-
- function onSearchKeyDown() {
-   // Handle the search button
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+document.addEventListener('deviceready', onDeviceReady, false);
+
+function onDeviceReady()
+{
+&nbsp;&nbsp;&nbsp;document.addEventListener('searchbutton', onSearchKeyDown, false);
+}
+
+function onSearchKeyDown()
+{
+&nbsp;&nbsp;&nbsp;/* Handle the search button */
+}
+</pre>
 </div>
 </div>
 <div class="interface" id="StartCallEventCallback">
@@ -421,16 +438,19 @@ Applications typically should use document.addEventListener() to attach an event
 Original documentation: <a href="https://cordova.apache.org/docs/en/latest/cordova/events/events.startcallbutton.html">Cordova startcallbutton event</a>          </p>
          </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> document.addEventListener('deviceready', onDeviceReady, false);
-
- function onDeviceReady() {
-   document.addEventListener('startcallbutton', onStartCallKeyDown, false);
- }
-
- function onStartCallKeyDown() {
-   // Handle the start call button
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+document.addEventListener('deviceready', onDeviceReady, false);
+
+function onDeviceReady()
+{
+&nbsp;&nbsp;&nbsp;document.addEventListener('startcallbutton', onStartCallKeyDown, false);
+}
+
+function onStartCallKeyDown()
+{
+&nbsp;&nbsp;&nbsp;/* Handle the start call button */
+}
+</pre>
 </div>
 </div>
 <div class="interface" id="EndCallButtonEventCallback">
@@ -457,16 +477,19 @@ Applications typically should use document.addEventListener() to attach an event
 Original documentation: <a href="https://cordova.apache.org/docs/en/latest/cordova/events/events.endcallbutton.html">Cordova endcallbutton event</a>          </p>
          </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> document.addEventListener('deviceready', onDeviceReady, false);
-
- function onDeviceReady() {
-   document.addEventListener('endcallbutton', onEndCallKeyDown, false);
- }
-
- function onEndCallKeyDown() {
-   // Handle the end call button
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+document.addEventListener('deviceready', onDeviceReady, false);
+
+function onDeviceReady()
+{
+&nbsp;&nbsp;&nbsp;document.addEventListener('endcallbutton', onEndCallKeyDown, false);
+}
+
+function onEndCallKeyDown()
+{
+&nbsp;&nbsp;&nbsp;/* Handle the end call button */
+}
+</pre>
 </div>
 </div>
 <div class="interface" id="VolumeDownButtonEventCallback">
@@ -493,16 +516,19 @@ Applications typically should use document.addEventListener() to attach an event
 Original documentation: <a href="https://cordova.apache.org/docs/en/latest/cordova/events/events.volumedownbutton.html">Cordova volumedownbutton event</a>          </p>
          </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> document.addEventListener('deviceready', onDeviceReady, false);
-
- function onDeviceReady() {
-   document.addEventListener('volumedownbutton', onVolumeDownKeyDown, false);
- }
-
- function onVolumeDownKeyDown() {
-   // Handle the volume down button
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+document.addEventListener('deviceready', onDeviceReady, false);
+
+function onDeviceReady()
+{
+&nbsp;&nbsp;&nbsp;document.addEventListener('volumedownbutton', onVolumeDownKeyDown, false);
+}
+
+function onVolumeDownKeyDown()
+{
+&nbsp;&nbsp;&nbsp;/* Handle the volume down button */
+}
+</pre>
 </div>
 </div>
 <div class="interface" id="VolumeUpButtonEventCallback">
@@ -529,16 +555,19 @@ Applications typically should use document.addEventListener() to attach an event
 Original documentation: <a href="https://cordova.apache.org/docs/en/latest/cordova/events/events.volumeupbutton.html">Cordova volumeupbutton event</a>          </p>
          </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> document.addEventListener('deviceready', onDeviceReady, false);
-
- function onDeviceReady() {
-   document.addEventListener('volumeupbutton', onVolumeUpKeyDown, false);
- }
-
- function onVolumeUpKeyDown() {
-   // Handle the volume up button
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+document.addEventListener('deviceready', onDeviceReady, false);
+
+function onDeviceReady()
+{
+&nbsp;&nbsp;&nbsp;document.addEventListener('volumeupbutton', onVolumeUpKeyDown, false);
+}
+
+function onVolumeUpKeyDown()
+{
+&nbsp;&nbsp;&nbsp;/* Handle the volume up button */
+}
+</pre>
 </div>
 </div>
 </div>
index 42ec325..359bbbe 100644 (file)
@@ -3,7 +3,7 @@
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
 <link rel="stylesheet" type="text/css" href="../tizen.css" media="screen">
-<script type="text/javascript" src="snippet.js"></script><title>File API</title>
+<script type="text/javascript" src="../snippet.js"></script><title>File API</title>
 </head>
 <body id="page-content" onload="prettyPrint()">
 <div class="api" id="::File">
@@ -332,12 +332,14 @@ Original documentation: <a href="https://www.npmjs.com/package/cordova-plugin-fi
  3.0
           </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var eventInit = {
-   loaded: 128,
-   total: 1024
- };
- var event = new ProgressEvent('submit', eventInit);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var eventInit =
+{
+&nbsp;&nbsp;&nbsp;loaded: 128,
+&nbsp;&nbsp;&nbsp;total: 1024
+};
+var event = new ProgressEvent('submit', eventInit);
+</pre>
 </div>
 <div class="constructors">
 <h4 id="ProgressEvent::constructor">Constructors</h4>
@@ -501,8 +503,7 @@ This manager interface exposes the Filesystem base API constants.
  3.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> console.log("The directory where the application is installed " + cordova.file.applicationDirectory);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">console.log("The directory where the application is installed " + cordova.file.applicationDirectory);</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>The directory where the application is installed file:///opt/usr/apps/WfigBlWDyf/res/wgt/
@@ -519,8 +520,7 @@ This manager interface exposes the Filesystem base API constants.
  3.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> console.log("Root directory of the application's sandbox " + cordova.file.applicationStorageDirectory);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">console.log("Root directory of the application's sandbox " + cordova.file.applicationStorageDirectory);</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Root directory of the application's sandbox file:///opt/usr/apps/WfigBlWDyf/
@@ -537,8 +537,7 @@ This manager interface exposes the Filesystem base API constants.
  3.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> console.log("Data directory " + cordova.file.dataDirectory);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">console.log("Data directory " + cordova.file.dataDirectory);</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Data directory file:///opt/usr/apps/WfigBlWDyf/data/
@@ -555,8 +554,7 @@ This manager interface exposes the Filesystem base API constants.
  3.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> console.log("Cache directory " + cordova.file.cacheDirectory);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">console.log("Cache directory " + cordova.file.cacheDirectory);</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Cache directory file:///opt/usr/apps/WfigBlWDyf/tmp/
@@ -573,8 +571,7 @@ This manager interface exposes the Filesystem base API constants.
  3.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> console.log("Space on external storage " + cordova.file.externalApplicationStorageDirectory);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">console.log("Space on external storage " + cordova.file.externalApplicationStorageDirectory);</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Space on external storage null
@@ -591,8 +588,7 @@ This manager interface exposes the Filesystem base API constants.
  3.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> console.log("Data files on external storage " + cordova.file.externalDataDirectory);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">console.log("Data files on external storage " + cordova.file.externalDataDirectory);</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Data files on external storage null
@@ -609,8 +605,7 @@ This manager interface exposes the Filesystem base API constants.
  3.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> console.log("Cache on external storage " + cordova.file.externalCacheDirectory);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">console.log("Cache on external storage " + cordova.file.externalCacheDirectory);</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Cache on external storage null
@@ -627,8 +622,7 @@ This manager interface exposes the Filesystem base API constants.
  3.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> console.log("Root on external storage " + cordova.file.externalRootDirectory);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">console.log("Root on external storage " + cordova.file.externalRootDirectory);</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Root on external storage file:///usr/storage/sdcard/
@@ -645,8 +639,7 @@ This manager interface exposes the Filesystem base API constants.
  3.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> console.log("Temp directory " + cordova.file.tempDirectory);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">console.log("Temp directory " + cordova.file.tempDirectory);</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Temp directory null
@@ -663,8 +656,7 @@ This manager interface exposes the Filesystem base API constants.
  3.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> console.log("Synced data directory " + cordova.file.syncedDataDirectory);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">console.log("Synced data directory " + cordova.file.syncedDataDirectory);</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Synced data directory null
@@ -681,8 +673,7 @@ This manager interface exposes the Filesystem base API constants.
  3.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> console.log("Documents directory " + cordova.file.documentsDirectory);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">console.log("Documents directory " + cordova.file.documentsDirectory);</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Documents directory null
@@ -699,8 +690,7 @@ This manager interface exposes the Filesystem base API constants.
  3.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> console.log("Files globally available to all applications " + cordova.file.sharedDirectory);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">console.log("Files globally available to all applications " + cordova.file.sharedDirectory);</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Files globally available to all applications file:///opt/usr/media/
@@ -743,10 +733,12 @@ The specifics of naming filesystems is unspecified, but a name must be unique ac
  3.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> requestFileSystem(TEMPORARY, 100, function (fileSystem) {
-        console.log('Name of the filesystem: '+fileSystem.name);
- });
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+requestFileSystem(TEMPORARY, 100, function(fileSystem)
+{
+&nbsp;&nbsp;&nbsp;console.log('Name of the filesystem: ' + fileSystem.name);
+});
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Name of the filesystem: temporary
@@ -1007,17 +999,19 @@ The specifics of naming filesystems is unspecified, but a name must be unique ac
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> successCallback = function(fs) {
-     console.log('File system name ' + fs.name);
- };
-
- errorCallback = function(err) {
-     console.log(err.code);
- };
-
- requestFileSystem(TEMPORARY, 1024*1024, successCallback, errorCallback);
-
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+successCallback = function(fs)
+{
+&nbsp;&nbsp;&nbsp;console.log('File system name ' + fs.name);
+};
+
+errorCallback = function(err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.code);
+};
+
+requestFileSystem(TEMPORARY, 1024 * 1024, successCallback, errorCallback);
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>File system name temporary
@@ -1070,18 +1064,20 @@ The specifics of naming filesystems is unspecified, but a name must be unique ac
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> successCallback = function(entry) {
-     console.log('Entry name ' + entry.name);
- };
-
- errorCallback = function(err) {
-     console.log(err.code);
- };
-
- var uri = 'file:///home/owner/content/Documents/example.txt';
- resolveLocalFileSystemURL(uri, successCallback, errorCallback);
-
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+successCallback = function(entry)
+{
+&nbsp;&nbsp;&nbsp;console.log('Entry name ' + entry.name);
+};
+
+errorCallback = function(err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.code);
+};
+
+var uri = 'file:///home/owner/content/Documents/example.txt';
+resolveLocalFileSystemURL(uri, successCallback, errorCallback);
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Entry name example.txt
@@ -1224,12 +1220,15 @@ The specifics of naming filesystems is unspecified, but a name must be unique ac
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">   requestFileSystem(TEMPORARY, 100, function(fs) {
-     fs.root.getMetadata(function (metadata) {
-       console.log("Last modification time: " + metadata.modificationTime);// get metadata successfully
-     });
-   });
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+requestFileSystem(TEMPORARY, 100, function(fs)
+{
+&nbsp;&nbsp;&nbsp;fs.root.getMetadata(function(metadata)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Last modification time: " + metadata.modificationTime); /* Get metadata successfully */
+&nbsp;&nbsp;&nbsp;});
+});
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Last modification time: Fri Jan 02 2015 03:58:08 GMT+0900 (KST)
@@ -1311,16 +1310,21 @@ A move of a directory on top of an existing empty directory must attempt to dele
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">  successCallback = function(entry){console.log('Full path to the moved file: '+entry.fullPath)};
-   requestFileSystem(TEMPORARY, 100, function(fs) {
-     fs.root.getDirectory('testDirectory', {create:true}, function(direntry) {
-       fs.root.getFile("aa.txt", {create:true}, function(fileentry) {
-         console.log('Full path before move: '+fileentry.fullPath);
-         fileentry.moveTo(direntry,'newname.txt',successCallback);
-       });
-     });
-   });
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+successCallback = function(entry) {console.log('Full path to the moved file: ' + entry.fullPath)};
+
+requestFileSystem(TEMPORARY, 100, function(fs)
+{
+&nbsp;&nbsp;&nbsp;fs.root.getDirectory('testDirectory', {create:true}, function(direntry)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;fs.root.getFile("aa.txt", {create:true}, function(fileentry)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('Full path before move: ' + fileentry.fullPath);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;fileentry.moveTo(direntry, 'newname.txt', successCallback);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;});
+&nbsp;&nbsp;&nbsp;});
+});
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Full path before move: /aa.txt
@@ -1404,18 +1408,20 @@ Directory copies are always recursive--that is, they copy all contents of the di
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">   successCallback = function(entry){console.log('Full path to the copied file: '+entry.fullPath);};
-   requestFileSystem(TEMPORARY, 100, function(fs) {
-     fs.root.getDirectory('testDirectory', {create:true},
-       function(direntry) {
-         fs.root.getFile("test.txt", {create:true},
-           function(fileentry) {
-             fileentry.copyTo(direntry,'newname.txt',successCallback);
-           }
-       );
-     });
-   });
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+successCallback = function(entry) {console.log('Full path to the copied file: ' + entry.fullPath);};
+
+requestFileSystem(TEMPORARY, 100, function(fs)
+{
+&nbsp;&nbsp;&nbsp;fs.root.getDirectory('testDirectory', {create:true}, function(direntry)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;fs.root.getFile("test.txt", {create:true}, function(fileentry)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;fileentry.copyTo(direntry, 'newname.txt', successCallback);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;});
+&nbsp;&nbsp;&nbsp;});
+});
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Full path to the copied file: /testDirectory/newname.txt
@@ -1464,12 +1470,15 @@ Directory copies are always recursive--that is, they copy all contents of the di
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">   requestFileSystem(TEMPORARY, 100, function(fs) {
-     fs.root.getParent(function (entry) {
-       console.log("success");
-     });
-   });
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+requestFileSystem(TEMPORARY, 100, function(fs)
+{
+&nbsp;&nbsp;&nbsp;fs.root.getParent(function(entry)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("success");
+&nbsp;&nbsp;&nbsp;});
+});
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>success
@@ -1522,14 +1531,18 @@ Directory copies are always recursive--that is, they copy all contents of the di
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">   requestFileSystem(TEMPORARY, 100, function(fs) {
-     fs.root.getFile('test.txt', {create: true}, function(fileEntry) {
-       fileEntry.remove(function () {
-         console.log("success");
-       });
-     });
-   });
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+requestFileSystem(TEMPORARY, 100, function(fs)
+{
+&nbsp;&nbsp;&nbsp;fs.root.getFile('test.txt', {create: true}, function(fileEntry)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;fileEntry.remove(function()
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("success");
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;});
+&nbsp;&nbsp;&nbsp;});
+});
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>success
@@ -1554,14 +1567,16 @@ Directory copies are always recursive--that is, they copy all contents of the di
  URL that can be used to identify this entry.
               </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">   requestFileSystem(TEMPORARY, 100, function(fs) {
-     fs.root.getDirectory('testDirectory', {create:true},
-       function(entry) {
-         var url = entry.toURL();
-         console.log('URL: '+url);
-     });
-   });
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+requestFileSystem(TEMPORARY, 100, function(fs)
+{
+&nbsp;&nbsp;&nbsp;fs.root.getDirectory('testDirectory', {create:true}, function(entry)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var url = entry.toURL();
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('URL: ' + url);
+&nbsp;&nbsp;&nbsp;});
+});
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>URL: file:///home/owner/apps_rw/WfigBlWDyf/tmp/testDirectory/
@@ -1620,12 +1635,15 @@ Directory copies are always recursive--that is, they copy all contents of the di
  DirectoryReader
               </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">   requestFileSystem(TEMPORARY, 100, function (entry) {
-     entry.root.getDirectory("MyDocument", {create:true}, function(dirEntry) {
-          var directoryReader = dirEntry.createReader();
-      });
-   });
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+requestFileSystem(TEMPORARY, 100, function(entry)
+{
+&nbsp;&nbsp;&nbsp;entry.root.getDirectory("MyDocument", {create:true}, function(dirEntry)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var directoryReader = dirEntry.createReader();
+&nbsp;&nbsp;&nbsp;});
+});
+</pre>
 </div>
 </dd>
 <dt class="method" id="DirectoryEntry::getDirectory">
@@ -1696,12 +1714,15 @@ Otherwise, if no other error occurs, getDirectory must return a DirectoryEntry c
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">   requestFileSystem(TEMPORARY, 100, function(fs) {
-     fs.root.getDirectory("ert",{create:true},function(dir){
-         console.log('Created dir: '+dir.name);
-      })
-   });
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+requestFileSystem(TEMPORARY, 100, function(fs)
+{
+&nbsp;&nbsp;&nbsp;fs.root.getDirectory("ert", {create:true}, function(dir)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('Created dir: ' + dir.name);
+&nbsp;&nbsp;&nbsp;})
+});
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Created dir: ert
@@ -1776,12 +1797,15 @@ Otherwise, if no other error occurs, getFile must return a FileEntry correspondi
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">   requestFileSystem(TEMPORARY, 100, function(fs) {
-     fs.root.getFile("qa.txt",{create:true},function(file){
-           console.log('Created file: '+file.name);
-     });
-   });
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+requestFileSystem(TEMPORARY, 100, function(fs)
+{
+&nbsp;&nbsp;&nbsp;fs.root.getFile("qa.txt", {create:true}, function(file)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('Created file: ' + file.name);
+&nbsp;&nbsp;&nbsp;});
+});
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Created file: qa.txt
@@ -1834,15 +1858,18 @@ Otherwise, if no other error occurs, getFile must return a FileEntry correspondi
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">   requestFileSystem(TEMPORARY, 100, function(fs) {
-     fs.root.getDirectory("testDirectory", {create:true},
-       function(directoryEntry) {
-         directoryEntry.removeRecursively(function() {
-           console.log("success");
-         });
-     });
-   });
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+requestFileSystem(TEMPORARY, 100, function(fs)
+{
+&nbsp;&nbsp;&nbsp;fs.root.getDirectory("testDirectory", {create:true}, function(directoryEntry)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;directoryEntry.removeRecursively(function()
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("success");
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;});
+&nbsp;&nbsp;&nbsp;});
+});
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>success
@@ -1906,13 +1933,16 @@ Otherwise, if no other error occurs, getFile must return a FileEntry correspondi
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">   requestFileSystem(TEMPORARY, 100, function(fs) {
-     var a = fs.root.createReader();
-     a.readEntries(function successCallback(entries) {
-       console.log("success");
-     });
-   });
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+requestFileSystem(TEMPORARY, 100, function(fs)
+{
+&nbsp;&nbsp;&nbsp;var a = fs.root.createReader();
+&nbsp;&nbsp;&nbsp;a.readEntries(function successCallback(entries)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("success");
+&nbsp;&nbsp;&nbsp;});
+});
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>success
@@ -1976,20 +2006,26 @@ Otherwise, if no other error occurs, getFile must return a FileEntry correspondi
         </ul>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">   requestFileSystem(TEMPORARY, 100, function(fs) {
-     fs.root.getFile("logFile.txt", {create: true}, function (f) {
-       f.createWriter(function(fileWriter) {
-         fileWriter.write(new Blob(['hello']));
-         fileWriter.onerror = function(e) {
-           console.log('Write file failed:' + e);
-         };
-         fileWriter.onwriteend = function () {
-           console.log("success");
-         };
-       });
-     });
-   });
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+requestFileSystem(TEMPORARY, 100, function(fs)
+{
+&nbsp;&nbsp;&nbsp;fs.root.getFile("logFile.txt", {create: true}, function(f)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;f.createWriter(function(fileWriter)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;fileWriter.write(new Blob(['hello']));
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;fileWriter.onerror = function(e)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('Write file failed:' + e);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;};
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;fileWriter.onwriteend = function()
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("success");
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;};
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;});
+&nbsp;&nbsp;&nbsp;});
+});
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>success
@@ -2031,14 +2067,18 @@ Otherwise, if no other error occurs, getFile must return a FileEntry correspondi
         </ul>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">   requestFileSystem(TEMPORARY, 100, function(fs) {
-     fs.root.getFile("abcdz.txt", {create: true}, function (f) {
-       f.file(function (file) {
-         console.log("success");
-       });
-     });
-   });
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+requestFileSystem(TEMPORARY, 100, function(fs)
+{
+&nbsp;&nbsp;&nbsp;fs.root.getFile("abcdz.txt", {create: true}, function(f)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;f.file(function(file)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("success");
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;});
+&nbsp;&nbsp;&nbsp;});
+});
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>success
@@ -2090,12 +2130,14 @@ Otherwise, if no other error occurs, getFile must return a FileEntry correspondi
  3.0
           </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var deviceReady, fileReader;
- deviceReady = function() {
-     fileReader = new FileReader();
- };
- document.addEventListener('deviceready', deviceReady, true);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var deviceReady, fileReader;
+deviceReady = function()
+{
+&nbsp;&nbsp;&nbsp;fileReader = new FileReader();
+};
+document.addEventListener('deviceready', deviceReady, true);
+</pre>
 </div>
 <div class="constructors">
 <h4 id="FileReader::constructor">Constructors</h4>
@@ -2236,17 +2278,20 @@ Returns a Blob's data as a DOMString, or byte[], or null, depending on the read
  3.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var blob = new Blob(['abc']);
- var fileReader = new FileReader();
- fileReader.onload = function(){
-     console.log('Loaded');
- };
- fileReader.onabort = function(){
-     console.log('aborted');
- };
- fileReader.readAsDataURL(blob);
- fileReader.abort();
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var blob = new Blob(['abc']);
+var fileReader = new FileReader();
+fileReader.onload = function()
+{
+&nbsp;&nbsp;&nbsp;console.log('Loaded');
+};
+fileReader.onabort = function()
+{
+&nbsp;&nbsp;&nbsp;console.log('aborted');
+};
+fileReader.readAsDataURL(blob);
+fileReader.abort();
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>aborted
@@ -2295,13 +2340,15 @@ Returns a Blob's data as a DOMString, or byte[], or null, depending on the read
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var blob = new Blob(['abc']);
- var fileReader = new FileReader();
- fileReader.onload = function(){
-     console.log('Loaded, result = '+fileReader.result);
- };
-  fileReader.readAsDataURL(blob);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var blob = new Blob(['abc']);
+var fileReader = new FileReader();
+fileReader.onload = function()
+{
+&nbsp;&nbsp;&nbsp;console.log('Loaded, result = ' + fileReader.result);
+};
+fileReader.readAsDataURL(blob);
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Loaded, result = data:;base64,YWJj
@@ -2354,13 +2401,15 @@ Returns a Blob's data as a DOMString, or byte[], or null, depending on the read
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var blob = new Blob(['abc']);
- var fileReader = new FileReader();
- fileReader.onload = function(){
-     console.log('Loaded, result = '+fileReader.result);
- };
- fileReader.readAsText(blob);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var blob = new Blob(['abc']);
+var fileReader = new FileReader();
+fileReader.onload = function()
+{
+&nbsp;&nbsp;&nbsp;console.log('Loaded, result = ' + fileReader.result);
+};
+fileReader.readAsText(blob);
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Loaded, result = abc
@@ -2409,13 +2458,15 @@ Returns a Blob's data as a DOMString, or byte[], or null, depending on the read
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var blob = new Blob(['abc']);
- var fileReader = new FileReader();
- fileReader.onload = function(){
-     console.log('Loaded, result = '+fileReader.result);
- };
- fileReader.readAsBinaryString(blob);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var blob = new Blob(['abc']);
+var fileReader = new FileReader();
+fileReader.onload = function()
+{
+&nbsp;&nbsp;&nbsp;console.log('Loaded, result = ' + fileReader.result);
+};
+fileReader.readAsBinaryString(blob);
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Loaded, result = abc
@@ -2464,14 +2515,16 @@ Returns a Blob's data as a DOMString, or byte[], or null, depending on the read
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var blob = new Blob(['abc']);
- var fileReader = new FileReader();
- fileReader.onload = function(){
-     resultValue = fileReader.result;
-      console.log("Result: "+resultValue.toString()+'<br>'+'ByteLength: '+resultValue.byteLength);
- };
- fileReader.readAsArrayBuffer(blob);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var blob = new Blob(['abc']);
+var fileReader = new FileReader();
+fileReader.onload = function()
+{
+&nbsp;&nbsp;&nbsp;resultValue = fileReader.result;
+&nbsp;&nbsp;&nbsp;console.log("Result: " + resultValue.toString() + '&lt;br&gt;' + 'ByteLength: ' + resultValue.byteLength);
+};
+fileReader.readAsArrayBuffer(blob);
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Result: [object ArrayBuffer]
@@ -2660,24 +2713,29 @@ ByteLength: 3
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> successCallback = function(writer) {
-    writer.onwrite = function(evt) {
-         console.log('write success');
-    };
-    writer.onabort = function(e){
-          console.log('abort');
-    };
-    writer.write('some sample text');
-    writer.abort();
- };
-
- errorCallback = function(err) {
-     console.log(err.code);
- };
-
- // entry is FileEntry object retrieved by getFile() function of DirectoryEntry interface.
- entry.createWriter(successCallback, errorCallback);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+successCallback = function(writer)
+{
+&nbsp;&nbsp;&nbsp;writer.onwrite = function(evt)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('write success');
+&nbsp;&nbsp;&nbsp;};
+&nbsp;&nbsp;&nbsp;writer.onabort = function(e)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('abort');
+&nbsp;&nbsp;&nbsp;};
+&nbsp;&nbsp;&nbsp;writer.write('some sample text');
+&nbsp;&nbsp;&nbsp;writer.abort();
+};
+
+errorCallback = function(err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.code);
+};
+
+/* entry is FileEntry object retrieved by getFile() method of DirectoryEntry interface */
+entry.createWriter(successCallback, errorCallback);
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>abort
@@ -2719,18 +2777,21 @@ If the offset is a negative number the position of the file pointer is rewound.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> successCallback = function(writer) {
-    // fast forwards file pointer to the end of file.
-    writer.seek(writer.length);
- };
-
- errorCallback = function(err) {
-     console.log(err.code);
- };
-
- // entry is FileEntry object retrieved by getFile() function of DirectoryEntry interface.
- entry.createWriter(successCallback, errorCallback);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+successCallback = function(writer)
+{
+&nbsp;&nbsp;&nbsp;/* Fast forwards file pointer to the end of file */
+&nbsp;&nbsp;&nbsp;writer.seek(writer.length);
+};
+
+errorCallback = function(err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.code);
+};
+
+/* entry is FileEntry object retrieved by getFile() method of DirectoryEntry interface */
+entry.createWriter(successCallback, errorCallback);
+</pre>
 </div>
 </dd>
 <dt class="method" id="FileWriter::truncate">
@@ -2771,21 +2832,25 @@ If the offset is a negative number the position of the file pointer is rewound.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> successCallback = function(writer) {
-    writer.onwrite = function(evt) {
-         console.log('truncate success');
-    };
-
-    writer.truncate(10);
- };
-
- errorCallback = function(err) {
-     console.log(err.code);
- };
-
- // entry is FileEntry object retrieved by getFile() function of DirectoryEntry interface.
- entry.createWriter(successCallback, errorCallback);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+successCallback = function(writer)
+{
+&nbsp;&nbsp;&nbsp;writer.onwrite = function(evt)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('truncate success');
+&nbsp;&nbsp;&nbsp;};
+
+&nbsp;&nbsp;&nbsp;writer.truncate(10);
+};
+
+errorCallback = function(err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.code);
+};
+
+/* entry is FileEntry object retrieved by getFile() method of DirectoryEntry interface */
+entry.createWriter(successCallback, errorCallback);
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>truncate success
@@ -2834,21 +2899,25 @@ If the offset is a negative number the position of the file pointer is rewound.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> successCallback = function(writer) {
-    writer.onwrite = function(evt) {
-         console.log('write success');
-    };
-
-    writer.write('some sample text');
- };
-
- errorCallback = function(err) {
-     console.log(err.code);
- };
-
- // entry is FileEntry object retrieved by getFile() function of DirectoryEntry interface.
- entry.createWriter(successCallback, errorCallback);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+successCallback = function(writer)
+{
+&nbsp;&nbsp;&nbsp;writer.onwrite = function(evt)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('write success');
+&nbsp;&nbsp;&nbsp;};
+
+&nbsp;&nbsp;&nbsp;writer.write('some sample text');
+};
+
+errorCallback = function(err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.code);
+};
+
+/* entry is FileEntry object retrieved by getFile() method of DirectoryEntry interface */
+entry.createWriter(successCallback, errorCallback);
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>write success
index 3778ad6..e7d6dee 100644 (file)
@@ -3,7 +3,7 @@
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
 <link rel="stylesheet" type="text/css" href="../tizen.css" media="screen">
-<script type="text/javascript" src="snippet.js"></script><title>FileTransfer API</title>
+<script type="text/javascript" src="../snippet.js"></script><title>FileTransfer API</title>
 </head>
 <body id="page-content" onload="prettyPrint()">
 <div class="api" id="::FileTransfer">
@@ -169,34 +169,37 @@ The key / value type of download options values.  Currently only supports header
  3.0
           </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var fileURL; // We assume the variable fileURL contains a valid URL to a text file on the device.
-
- var win = function (r) {
-   console.log('Code = ' + r.responseCode);
-   console.log('Response = ' + r.response);
-   console.log('Sent = ' + r.bytesSent);
- }
-
- var fail = function (error) {
-   alert('An error has occurred: Code = ' + error.code);
-   console.log('upload error source ' + error.source);
-   console.log('upload error target ' + error.target);
- }
-
- var options = new FileUploadOptions();
- options.fileKey = 'file';
- options.fileName = fileURL.substr(fileURL.lastIndexOf('/') + 1);
- options.mimeType = 'text/plain';
-
- var params = {};
- params.value1 = 'test';
- params.value2 = 'param';
-
- options.params = params;
-
- var ft = new FileTransfer();
- ft.upload(fileURL, encodeURI('http://some.server.com/upload.php'), win, fail, options);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var fileURL; /* Assume the variable fileURL contains a valid URL to a text file on the device */
+
+var win = function(r)
+{
+&nbsp;&nbsp;&nbsp;console.log('Code = ' + r.responseCode);
+&nbsp;&nbsp;&nbsp;console.log('Response = ' + r.response);
+&nbsp;&nbsp;&nbsp;console.log('Sent = ' + r.bytesSent);
+}
+
+var fail = function(error)
+{
+&nbsp;&nbsp;&nbsp;alert('An error has occurred: Code = ' + error.code);
+&nbsp;&nbsp;&nbsp;console.log('upload error source ' + error.source);
+&nbsp;&nbsp;&nbsp;console.log('upload error target ' + error.target);
+}
+
+var options = new FileUploadOptions();
+options.fileKey = 'file';
+options.fileName = fileURL.substr(fileURL.lastIndexOf('/') + 1);
+options.mimeType = 'text/plain';
+
+var params = {};
+params.value1 = 'test';
+params.value2 = 'param';
+
+options.params = params;
+
+var ft = new FileTransfer();
+ft.upload(fileURL, encodeURI('http://some.server.com/upload.php'), win, fail, options);
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Code = 200
@@ -209,9 +212,10 @@ Sent = 1024
 <dl>
 <pre class="webidl prettyprint">FileUploadOptions(DOMString fileKey, DOMString fileName, DOMString mimeType, <a href="#FileUploadParams">FileUploadParams</a> params, <a href="#HeaderFields">HeaderFields</a> headers, DOMString httpMethod);</pre>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Creates a FileUploadOptions object.
- var options = new FileUploadOptions('file', 'doc.txt', 'text/plain', null, null, 'POST');
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Creates a FileUploadOptions object */
+var options = new FileUploadOptions('file', 'doc.txt', 'text/plain', null, null, 'POST');
+</pre>
 </div>
 </dl>
 </div>
@@ -502,9 +506,10 @@ Sent = 1024
 <dl>
 <pre class="webidl prettyprint">FileTransfer();</pre>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Creates a FileTransfer object.
- var file_transfer = new FileTransfer();
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Creates a FileTransfer object */
+var file_transfer = new FileTransfer();
+</pre>
 </div>
 </dl>
 </div>
@@ -519,32 +524,36 @@ Sent = 1024
  3.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var fileURL; // should be a valid url eg. cdvfile://localhost/persistent/path/to/file.txt
-
- var win = function(r) {
-   console.log('Success.  File uploaded.');
- }
-
- var fail = function(error) {
-   // error.code == FileTransferError.ABORT_ERR
-   alert('An error has occurred: Code = ' + error.code);
-   console.log('upload error source ' + error.source);
-   console.log('upload error target ' + error.target);
- };
-
- var ft = new FileTransfer();
-
- ft.onprogress = function(event) {
-   console.log('uploaded: ' + event.loaded);
- };
-
- ft.upload(fileURL, encodeURI('http://some.server.com/upload.php'), win, fail);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var fileURL; /* Must be a valid url, such as cdvfile://localhost/persistent/path/to/file.txt */
+
+var win = function(r)
+{
+&nbsp;&nbsp;&nbsp;console.log('Success. File uploaded.');
+}
+
+var fail = function(error)
+{
+&nbsp;&nbsp;&nbsp;/* error.code == FileTransferError.ABORT_ERR */
+&nbsp;&nbsp;&nbsp;alert('An error has occurred: Code = ' + error.code);
+&nbsp;&nbsp;&nbsp;console.log('upload error source ' + error.source);
+&nbsp;&nbsp;&nbsp;console.log('upload error target ' + error.target);
+};
+
+var ft = new FileTransfer();
+
+ft.onprogress = function(event)
+{
+&nbsp;&nbsp;&nbsp;console.log('uploaded: ' + event.loaded);
+};
+
+ft.upload(fileURL, encodeURI('http://some.server.com/upload.php'), win, fail);
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>uploaded: 512
 uploaded: 1024
-Success.  File uploaded.
+Success. File uploaded.
 </pre>
 </div>
 </li></ul>
@@ -607,23 +616,26 @@ Success.  File uploaded.
         </ul>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var fileURL; // should be a valid url eg. cdvfile://localhost/persistent/path/to/file.txt
-
- var win = function (r) {
-   console.log('Code = ' + r.responseCode);
-   console.log('Response = ' + r.response);
-   console.log('Sent = ' + r.bytesSent);
- }
-
- var fail = function (error) {
-   alert('An error has occurred: Code = ' + error.code);
-   console.log('upload error source ' + error.source);
-   console.log('upload error target ' + error.target);
- }
-
- var ft = new FileTransfer();
- ft.upload(fileURL, encodeURI('http://some.server.com/upload.php'), win, fail);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var fileURL; /* Must be a valid url, such as cdvfile://localhost/persistent/path/to/file.txt */
+
+var win = function(r)
+{
+&nbsp;&nbsp;&nbsp;console.log('Code = ' + r.responseCode);
+&nbsp;&nbsp;&nbsp;console.log('Response = ' + r.response);
+&nbsp;&nbsp;&nbsp;console.log('Sent = ' + r.bytesSent);
+}
+
+var fail = function(error)
+{
+&nbsp;&nbsp;&nbsp;alert('An error has occurred: Code = ' + error.code);
+&nbsp;&nbsp;&nbsp;console.log('upload error source ' + error.source);
+&nbsp;&nbsp;&nbsp;console.log('upload error target ' + error.target);
+}
+
+var ft = new FileTransfer();
+ft.upload(fileURL, encodeURI('http://some.server.com/upload.php'), win, fail);
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Code = 200
@@ -687,30 +699,28 @@ Sent = 1024
         </ul>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var fileURL; // should be a valid url eg. cdvfile://localhost/persistent/path/to/file.txt
-
- var fileTransfer = new FileTransfer();
- var uri = encodeURI('http://some.server.com/download.php');
-
- fileTransfer.download(
-   uri,
-   fileURL,
-   function(entry) {
-     console.log('download complete: ' + entry.toURL());
-   },
-   function(error) {
-     console.log('download error source ' + error.source);
-     console.log('download error target ' + error.target);
-     console.log('upload error code' + error.code);
-   },
-   false,
-   {
-     headers: {
-       'Authorization': 'Basic dGVzdHVzZXJuYW1lOnRlc3RwYXNzd29yZA=='
-     }
-   }
- );
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var fileURL; /* Must be a valid url, such as cdvfile://localhost/persistent/path/to/file.txt */
+
+var fileTransfer = new FileTransfer();
+var uri = encodeURI('http://some.server.com/download.php');
+
+fileTransfer.download(uri, fileURL, function(entry)
+{
+&nbsp;&nbsp;&nbsp;console.log('download complete: ' + entry.toURL());
+}, function(error)
+{
+&nbsp;&nbsp;&nbsp;console.log('download error source ' + error.source);
+&nbsp;&nbsp;&nbsp;console.log('download error target ' + error.target);
+&nbsp;&nbsp;&nbsp;console.log('upload error code' + error.code);
+}, false,
+{
+&nbsp;&nbsp;&nbsp;headers:
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'Authorization': 'Basic dGVzdHVzZXJuYW1lOnRlc3RwYXNzd29yZA=='
+&nbsp;&nbsp;&nbsp;}
+});
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>download complete: file:///home/owner/apps_rw/Gk6hf8hjk/tmp/file.txt
@@ -739,26 +749,29 @@ Sent = 1024
  http://tizen.org/privilege/internet
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var fileURL; // should be a valid url eg. cdvfile://localhost/persistent/path/to/file.txt
-
- var win = function(r) {
-   console.log('Should not be called.');
- }
-
- var fail = function(error) {
-   // error.code == FileTransferError.ABORT_ERR
-   alert('An error has occurred: Code = ' + error.code);
-   console.log('upload error source ' + error.source);
-   console.log('upload error target ' + error.target);
- };
-
- var ft = new FileTransfer();
- ft.upload(fileURL, encodeURI('http://some.server.com/upload.php'), win, fail);
- ft.abort();
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var fileURL; /* Must be a valid url, such as cdvfile://localhost/persistent/path/to/file.txt */
+
+var win = function(r)
+{
+&nbsp;&nbsp;&nbsp;console.log('Should not be called.');
+}
+
+var fail = function(error)
+{
+&nbsp;&nbsp;&nbsp;/* error.code == FileTransferError.ABORT_ERR */
+&nbsp;&nbsp;&nbsp;alert('An error has occurred: Code = ' + error.code);
+&nbsp;&nbsp;&nbsp;console.log('upload error source ' + error.source);
+&nbsp;&nbsp;&nbsp;console.log('upload error target ' + error.target);
+};
+
+var ft = new FileTransfer();
+ft.upload(fileURL, encodeURI('http://some.server.com/upload.php'), win, fail);
+ft.abort();
+</pre>
 </div>
 <div class="output">
-<span class="title"><p>Output example:</p></span><pre>An error has occured: Code = 4
+<span class="title"><p>Output example:</p></span><pre>An error has occurred: Code = 4
 upload error source file:///home/owner/apps_rw/Gk6hf8hjk/tmp/file.txt
 upload error target http://some.server.com/file.txt
 </pre>
index 8140d67..b48ed50 100644 (file)
@@ -3,7 +3,7 @@
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
 <link rel="stylesheet" type="text/css" href="../tizen.css" media="screen">
-<script type="text/javascript" src="snippet.js"></script><title>Globalization API</title>
+<script type="text/javascript" src="../snippet.js"></script><title>Globalization API</title>
 </head>
 <body id="page-content" onload="prettyPrint()">
 <div class="api" id="::Globalization">
@@ -263,15 +263,20 @@ during this method's execution.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // When the browser is set to the en-US language,
- // this should output the text
- // similar to the results that follow.
-
- navigator.globalization.getPreferredLanguage(
-   function (language) { console.log('Language: ' + language.value); },
-   function () { console.log('Error getting language.'); }
- );
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/*
+   When the browser is set to the en-US language,
+   this outputs the text
+   similar to the results that follow
+*/
+navigator.globalization.getPreferredLanguage(function(language)
+{
+&nbsp;&nbsp;&nbsp;console.log('Language: ' + language.value);
+}, function()
+{
+&nbsp;&nbsp;&nbsp;console.log('Error getting language.');
+});
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Language: en-US
@@ -323,15 +328,20 @@ occuring while getting a locale name.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // When the browser is set to the en-US language,
- // this should output the text
- // similar to the results that follow.
-
- navigator.globalization.getLocaleName(
-   function (locale) { console.log('Locale: ' + locale.value); },
-   function () { console.log('Error getting locale.'); }
- );
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/*
+   When the browser is set to the en-US language,
+   this outputs the text
+   similar to the results that follow
+*/
+navigator.globalization.getLocaleName(function(locale)
+{
+&nbsp;&nbsp;&nbsp;console.log('Locale: ' + locale.value);
+}, function()
+{
+&nbsp;&nbsp;&nbsp;console.log('Error getting locale.');
+});
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Locale: en-US
@@ -387,17 +397,20 @@ passed as a parameter to the successCallback.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // When the browser is set to the en-US language,
- // this should output text similar to the results that follow.
- // This example uses the default conversion options.
-
- navigator.globalization.dateToString(
-   new Date(),
-   function (date) { console.log('Date: ' + date.value); },
-   function () { console.log('Error getting dateString.'); },
-   { formatLength: 'short', selector: 'date and time' }
- );
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/*
+   When the browser is set to the en-US language,
+   this outputs the text similar to the results that follow
+   This example uses the default conversion options
+*/
+navigator.globalization.dateToString(new Date(), function(date)
+{
+&nbsp;&nbsp;&nbsp;console.log('Date: ' + date.value);
+}, function()
+{
+&nbsp;&nbsp;&nbsp;console.log('Error getting dateString.');
+}, {formatLength: 'short', selector: 'date and time'});
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Date: 9/25/2012 4:21PM
@@ -450,24 +463,25 @@ for example 'USD'.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // When the browser is set to the en-US locale and the selected
- // currency is United States Dollars, this example outputs
- // text similar to the results that follow.
-
- navigator.globalization.getCurrencyPattern(
-   'USD',
-   function (pattern) {
-     console.log('pattern: '  + pattern.pattern);
-     console.log('code: ' + pattern.code);
-     console.log('fraction: ' + pattern.fraction);
-     console.log('rounding: ' + pattern.rounding);
-     console.log('decimal: '  + pattern.decimal);
-     console.log('grouping: ' + pattern.grouping);
-   },
-   function () { console.log('Error getting pattern.'); }
- );
-
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/*
+   When the browser is set to the en-US language,
+   and the selected currency is United States Dollars,
+   this outputs the text similar to the results that follow
+*/
+navigator.globalization.getCurrencyPattern('USD', function(pattern)
+{
+&nbsp;&nbsp;&nbsp;console.log('pattern: '  + pattern.pattern);
+&nbsp;&nbsp;&nbsp;console.log('code: ' + pattern.code);
+&nbsp;&nbsp;&nbsp;console.log('fraction: ' + pattern.fraction);
+&nbsp;&nbsp;&nbsp;console.log('rounding: ' + pattern.rounding);
+&nbsp;&nbsp;&nbsp;console.log('decimal: '  + pattern.decimal);
+&nbsp;&nbsp;&nbsp;console.log('grouping: ' + pattern.grouping);
+}, function()
+{
+&nbsp;&nbsp;&nbsp;console.log('Error getting pattern.');
+});
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>pattern: $#,##0.##;($#,##0.##)
@@ -527,20 +541,23 @@ The default value is <var>{type: 'wide', item: 'months'}</var>                </
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // When the browser is set to the en_US locale,
- // this example logs the names of months, as per locale settings,
- // with text similar to the results that follow.
-
- navigator.globalization.getDateNames(
-   function (names) {
-     for (var i = 0; i &lt; names.value.length; i++) {
-       console.log('month: ' + names.value[i]);
-     }
-   },
-   function () { console.log('Error getting names.'); },
-   { type: 'wide', item: 'months' }
- );
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/*
+   When the browser is set to the en-US language,
+   this example logs the names of months, as per locale settings
+   with text similar to the results that follow
+*/
+navigator.globalization.getDateNames(function(names)
+{
+&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; names.value.length; i++)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('month: ' + names.value[i]);
+&nbsp;&nbsp;&nbsp;}
+}, function()
+{
+&nbsp;&nbsp;&nbsp;console.log('Error getting names.');
+}, {type: 'wide', item: 'months'});
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>month: January
@@ -604,20 +621,25 @@ The default value is <var>{formatLength: 'short', selector: 'date and time'}</va
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // This example displays the locale date pattern.
- // When the browser is set to the en_US locale,
- // the text displayed is similar to the results that follow.
-
- function checkDatePattern () {
-   navigator.globalization.getDatePattern(
-     function (date) { console.log('Date pattern: ' + date.pattern); },
-     function () { console.log('Error getting pattern'); },
-     { formatLength: 'short', selector: 'date and time' }
-   );
- }
-
- checkDatePattern();
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/*
+   This example displays the locale date pattern
+   When the browser is set to the en-US locale,
+   this outputs the text similar to the results that follow
+*/
+function checkDatePattern()
+{
+&nbsp;&nbsp;&nbsp;navigator.globalization.getDatePattern(function(date)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('Date pattern: ' + date.pattern);
+&nbsp;&nbsp;&nbsp;}, function()
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('Error getting pattern');
+&nbsp;&nbsp;&nbsp;}, {formatLength: 'short', selector: 'date and time'});
+}
+
+checkDatePattern();
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Date pattern: M/d/yyyy h:mm a
@@ -667,14 +689,19 @@ the first day of a week.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // When the browser is set to the en_US locale,
- // this outputs the text similar to "day: 1".
-
- navigator.globalization.getFirstDayOfWeek(
-   function (day) { console.log('day: ' + day.value); },
-   function () { console.log('Error getting first day of week.'); }
- );
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/*
+   When the browser is set to the en_US locale,
+   this outputs the text similar to "day: 1"
+*/
+navigator.globalization.getFirstDayOfWeek(function(day)
+{
+&nbsp;&nbsp;&nbsp;console.log('day: ' + day.value);
+}, function()
+{
+&nbsp;&nbsp;&nbsp;console.log('Error getting first day of week.');
+});
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>day: 1
@@ -729,26 +756,26 @@ the pattern will be returned.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // When the browser is set to the en_US locale,
- // this example outputs the text
- // similar to the results that follow.
-
- navigator.globalization.getNumberPattern(
-   function (pattern) {
-     console.log('pattern: '  + pattern.pattern);
-     console.log('symbol: '   + pattern.symbol);
-     console.log('fraction: ' + pattern.fraction);
-     console.log('rounding: ' + pattern.rounding);
-     console.log('positive: ' + pattern.positive);
-     console.log('negative: ' + pattern.negative);
-     console.log('decimal: '  + pattern.decimal);
-     console.log('grouping: ' + pattern.grouping);
-   },
-   function() { console.log('An error occurred.'); },
-   { type: 'decimal' }
- );
-
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/*
+   When the browser is set to the en_US locale,
+   this outputs the text similar to the results that follow
+*/
+navigator.globalization.getNumberPattern(function(pattern)
+{
+&nbsp;&nbsp;&nbsp;console.log('pattern: ' + pattern.pattern);
+&nbsp;&nbsp;&nbsp;console.log('symbol: ' + pattern.symbol);
+&nbsp;&nbsp;&nbsp;console.log('fraction: ' + pattern.fraction);
+&nbsp;&nbsp;&nbsp;console.log('rounding: ' + pattern.rounding);
+&nbsp;&nbsp;&nbsp;console.log('positive: ' + pattern.positive);
+&nbsp;&nbsp;&nbsp;console.log('negative: ' + pattern.negative);
+&nbsp;&nbsp;&nbsp;console.log('decimal: ' + pattern.decimal);
+&nbsp;&nbsp;&nbsp;console.log('grouping: ' + pattern.grouping);
+}, function()
+{
+&nbsp;&nbsp;&nbsp;console.log('An error occurred.');
+}, {type: 'decimal'});
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>pattern: #,##0.###
@@ -811,16 +838,19 @@ errors occuring during this method's execution.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // During the summer, and if the browser
- // is set to a DST-enabled timezone,
- // this should log text similar to "dst: true":
-
- navigator.globalization.isDayLightSavingsTime(
-   new Date(),
-   function (date) { console.log('dst: ' + date.dst); },
-   function () { console.log('Error getting the DST state.'); }
- );
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/*
+   During the summer, and if the browser is set to a DST-enabled timezone,
+   this logs text similar to "dst: true"
+*/
+navigator.globalization.isDayLightSavingsTime(new Date(), function(date)
+{
+&nbsp;&nbsp;&nbsp;console.log('dst: ' + date.dst);
+}, function()
+{
+&nbsp;&nbsp;&nbsp;console.log('Error getting the DST state.');
+});
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>dst: true
@@ -884,37 +914,43 @@ The default value of this parameter is <var>{type: 'decimal'}</var>.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // When the browser is set to the en_US locale,
- // this code displays the results that follow.
-
- navigator.globalization.numberToString(
-    3.1415926,
-    function (number) { console.log('decimal number: ' + number.value); },
-    function () { console.log('Error getting number.'); },
-    { type: 'decimal' }
- );
-
- navigator.globalization.numberToString(
-    1000003,
-    function (number) { console.log('big decimal number: ' + number.value); },
-    function () { console.log('Error getting number.'); },
-    { type: 'decimal' }
- );
-
- navigator.globalization.numberToString(
-    0.3183099,
-    function (number) { console.log('percentile: ' + number.value); },
-    function () { console.log('Error getting number.'); },
-    { type: 'percent' }
- );
-
- navigator.globalization.numberToString(
-    1099.95,
-    function (number) { console.log('currency: ' + number.value); },
-    function () { console.log('Error getting number'); },
-    { type: 'currency' }
- );
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/*
+   When the browser is set to the en_US locale,
+   this code displays the results that follow
+*/
+navigator.globalization.numberToString(3.1415926, function(number)
+{
+&nbsp;&nbsp;&nbsp;console.log('decimal number: ' + number.value);
+}, function()
+{
+&nbsp;&nbsp;&nbsp;console.log('Error getting number.');
+}, {type: 'decimal'});
+
+navigator.globalization.numberToString(1000003, function(number)
+{
+&nbsp;&nbsp;&nbsp;console.log('big decimal number: ' + number.value);
+}, function()
+{
+&nbsp;&nbsp;&nbsp;console.log('Error getting number.');
+}, {type: 'decimal'});
+
+navigator.globalization.numberToString(0.3183099, function(number)
+{
+&nbsp;&nbsp;&nbsp;console.log('percentile: ' + number.value);
+}, function()
+{
+&nbsp;&nbsp;&nbsp;console.log('Error getting number.');
+}, {type: 'percent'});
+
+navigator.globalization.numberToString(1099.95, function(number)
+{
+&nbsp;&nbsp;&nbsp;console.log('currency: ' + number.value);
+}, function()
+{
+&nbsp;&nbsp;&nbsp;console.log('Error getting number');
+}, {type: 'currency'});
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>decimal number: 3.142
@@ -973,22 +1009,23 @@ The default value is <var>{formatLength: 'short', selector: 'date and time'}</va
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // when the browser is set to the en_US locale,
- // this example outputs text similar to the results that follow.
- // Note that the month integer is one less than the string,
- // as the month integer represents an array index.
-
- navigator.globalization.stringToDate(
-     '9/25/2012',
-     function (date) {
-       console.log('month: '  + date.month +
-                   ', day: '  + date.day   +
-                   ', year: ' + date.year)
-     },
-     function () { console.log('Error getting date.'); },
-     { selector: 'date' }
- );
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/*
+   When the browser is set to the en_US locale,
+   this example outputs text similar to the results that follow
+   Note that the month integer is one less than the string,
+   as the month integer represents an array index
+*/
+navigator.globalization.stringToDate('9/25/2012', function(date)
+{
+&nbsp;&nbsp;&nbsp;console.log('month: ' + date.month +
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;', day: ' + date.day +
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;', year: ' + date.year)
+}, function()
+{
+&nbsp;&nbsp;&nbsp;console.log('Error getting date.');
+}, {selector: 'date'});
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>month: 8, day: 25, year: 2012
@@ -1047,16 +1084,19 @@ The default value is <var>{type: 'decimal'}</var>                </li>
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // When the browser is set to the en_US locale,
- // this should display the text similar to the results that follow.
-
- navigator.globalization.stringToNumber(
-     '1234.56',
-     function (number) { console.log('number: ' + number.value); },
-     function () { console.log('Error getting number.'); },
-     { type: 'decimal' }
- );
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/*
+   When the browser is set to the en_US locale,
+   this displays the text similar to the results that follow
+*/
+navigator.globalization.stringToNumber('1234.56', function(number)
+{
+&nbsp;&nbsp;&nbsp;console.log('number: ' + number.value);
+}, function()
+{
+&nbsp;&nbsp;&nbsp;console.log('Error getting number.');
+}, {type: 'decimal'});
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>number: 1234.56
index ad1f581..da409ca 100644 (file)
@@ -3,7 +3,7 @@
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
 <link rel="stylesheet" type="text/css" href="../tizen.css" media="screen">
-<script type="text/javascript" src="snippet.js"></script><title>Media API</title>
+<script type="text/javascript" src="../snippet.js"></script><title>Media API</title>
 </head>
 <body id="page-content" onload="prettyPrint()">
 <div class="api" id="::Media">
@@ -125,8 +125,8 @@ Original documentation: <a href="https://www.npmjs.com/package/cordova-plugin-me
        void stop();
    };</pre>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var myMedia = new Media(src, successCallback, errorCallback, statusCallback);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var myMedia = new Media(src, successCallback, errorCallback, statusCallback);</pre>
 </div>
 <div class="constructors">
 <h4 id="Media::constructor">Constructors</h4>
@@ -247,28 +247,32 @@ Original documentation: <a href="https://www.npmjs.com/package/cordova-plugin-me
         </ul>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> successCallback = function() {
-    console.log('Audio file has been played back.');
- }
-
- errorCallback = function(err) {
-    console.log('Error occurred ' + err.message);
- }
-
- positionSuccessCallback = function(position) {
-    console.log('Current position is ' + position);
- }
-
- var src = 'file:///home/app/content/Documents/play.mp3';
- var myMedia = new Media(src, successCallback, errorCallback);
-
- myMedia.play();
-
- setTimeout(function() {
-     myMedia.getCurrentPosition(positionSuccessCallback);
- }, 2000);
-
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+successCallback = function()
+{
+&nbsp;&nbsp;&nbsp;console.log('Audio file has been played back.');
+}
+
+errorCallback = function(err)
+{
+&nbsp;&nbsp;&nbsp;console.log('Error occurred ' + err.message);
+}
+
+positionSuccessCallback = function(position)
+{
+&nbsp;&nbsp;&nbsp;console.log('Current position is ' + position);
+}
+
+var src = 'file:///home/app/content/Documents/play.mp3';
+var myMedia = new Media(src, successCallback, errorCallback);
+
+myMedia.play();
+
+setTimeout(function()
+{
+&nbsp;&nbsp;&nbsp;myMedia.getCurrentPosition(positionSuccessCallback);
+}, 2000);
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Audio file has been played back.
@@ -290,20 +294,23 @@ Current position is 2.000
  3.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> successCallback = function() {
-   console.log('Audio file has been played back.);
- }
-
- errorCallback = function(err) {
-    console.log('Error occurred ' + err.message);
- }
-
- var src = 'file:///home/app/content/Documents/play.mp3';
- var myMedia = new Media(src, successCallback, errorCallback);
-
- var duration = myMedia.getDuration();
- console.log('Audio duration is ' + duration);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+successCallback = function()
+{
+&nbsp;&nbsp;&nbsp;console.log('Audio file has been played back.');
+}
+
+errorCallback = function(err)
+{
+&nbsp;&nbsp;&nbsp;console.log('Error occurred ' + err.message);
+}
+
+var src = 'file:///home/app/content/Documents/play.mp3';
+var myMedia = new Media(src, successCallback, errorCallback);
+
+var duration = myMedia.getDuration();
+console.log('Audio duration is ' + duration);
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Audio duration is 281.035
@@ -324,31 +331,36 @@ Current position is 2.000
  3.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> successCallback = function() {
-   console.log('Audio file has been played back.');
- }
-
- errorCallback = function(err) {
-    console.log('Error occurred ' + err.message);
- }
-
- statusCallback = function(status) {
-    if (status == Media.MEDIA_PAUSED) {
-        console.log('Audio file has been paused');
-    }
- }
-
- var src = 'file:///home/app/content/Documents/play.mp3';
- var myMedia = new Media(src, successCallback, errorCallback, statusCallback);
-
- myMedia.play();
-
- //Pause after 2 seconds
- setTimeout(function() {
-     myMedia.pause();
- }, 2000);
-
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+successCallback = function()
+{
+&nbsp;&nbsp;&nbsp;console.log('Audio file has been played back.');
+}
+
+errorCallback = function(err)
+{
+&nbsp;&nbsp;&nbsp;console.log('Error occurred ' + err.message);
+}
+
+statusCallback = function(status)
+{
+&nbsp;&nbsp;&nbsp;if (status == Media.MEDIA_PAUSED)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('Audio file has been paused');
+&nbsp;&nbsp;&nbsp;}
+}
+
+var src = 'file:///home/app/content/Documents/play.mp3';
+var myMedia = new Media(src, successCallback, errorCallback, statusCallback);
+
+myMedia.play();
+
+/* Pause after 2 seconds */
+setTimeout(function()
+{
+&nbsp;&nbsp;&nbsp;myMedia.pause();
+}, 2000);
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Audio file has been paused.
@@ -369,19 +381,22 @@ Current position is 2.000
  3.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> successCallback = function() {
-    console.log('Audio file has been played back.');
- }
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+successCallback = function()
+{
+&nbsp;&nbsp;&nbsp;console.log('Audio file has been played back.');
+}
 
- errorCallback = function(err) {
-    console.log('Error occurred ' + err.message);
- }
+errorCallback = function(err)
+{
+&nbsp;&nbsp;&nbsp;console.log('Error occurred ' + err.message);
+}
 
- var src = 'file:///home/app/content/Documents/play.mp3';
- var myMedia = new Media(src, successCallback, errorCallback);
+var src = 'file:///home/app/content/Documents/play.mp3';
+var myMedia = new Media(src, successCallback, errorCallback);
 
- myMedia.play();
- </pre>
+myMedia.play();
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Audio file has been played back.
@@ -403,21 +418,24 @@ Applications should call the release function for any Media resource that is no
  3.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> successCallback = function() {
-    console.log('Audio file has been stopped or released.');
- }
-
- errorCallback = function(err) {
-    console.log('An error occurred: ' + err.message);
- }
-
- var src = 'file://home/app/content/Documents/play.mp3';
- var myMedia = new Media(src, successCallback, errorCallback);
-
- myMedia.play();
- myMedia.stop();
- myMedia.release();
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+successCallback = function()
+{
+&nbsp;&nbsp;&nbsp;console.log('Audio file has been stopped or released.');
+}
+
+errorCallback = function(err)
+{
+&nbsp;&nbsp;&nbsp;console.log('An error occurred: ' + err.message);
+}
+
+var src = 'file://home/app/content/Documents/play.mp3';
+var myMedia = new Media(src, successCallback, errorCallback);
+
+myMedia.play();
+myMedia.stop();
+myMedia.release();
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Audio file has been stopped or released.
@@ -448,24 +466,28 @@ Audio file has been stopped or released.
         </ul>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> successCallback = function() {
-    console.log('Audio file has been played back.');
- }
-
- errorCallback = function(err) {
-    console.log('An error occurred: ' + err.message);
- }
-
- var src = 'file://home/app/content/Documents/play.mp3';
- var myMedia = new Media(src, successCallback, errorCallback);
-
- myMedia.play();
-
- //SeekTo to 10 seconds after 5 seconds
- setTimeout(function() {
-     myMedia.seekTo(10000);
-     console.log('Playback position has been set to 10 seconds.');
- }, 5000);
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+successCallback = function()
+{
+&nbsp;&nbsp;&nbsp;console.log('Audio file has been played back.');
+}
+
+errorCallback = function(err)
+{
+&nbsp;&nbsp;&nbsp;console.log('An error occurred: ' + err.message);
+}
+
+var src = 'file://home/app/content/Documents/play.mp3';
+var myMedia = new Media(src, successCallback, errorCallback);
+
+myMedia.play();
+
+/* SeekTo to 10 seconds after 5 seconds */
+setTimeout(function()
+{
+&nbsp;&nbsp;&nbsp;myMedia.seekTo(10000);
+&nbsp;&nbsp;&nbsp;console.log('Playback position has been set to 10 seconds.');
+}, 5000);
  </pre>
 </div>
 <div class="output">
@@ -505,31 +527,36 @@ Audio file has been played back.
         </ul>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> successCallback = function() {
-    console.log('Audio file has been played back.');
- }
-
- errorCallback = function(err) {
-    console.log('Error occurred ' + err.message);
- }
-
- var src = 'file://home/app/content/Documents/play.mp3';
- var myMedia = new Media(src, successCallback, errorCallback);
-
- myMedia.play();
-
- // Mute volume after 2 seconds
- setTimeout(function() {
-     myMedia.setVolume(0.0);
-     console.log('Playback volume has been muted.');
- }, 2000);
-
- // Set volume to 1.0 after 5 seconds
- setTimeout(function() {
-    myMedia.setVolume(1.0);
-    console.log('Playback volume has been set to 1.0.');
- }, 5000);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+successCallback = function()
+{
+&nbsp;&nbsp;&nbsp;console.log('Audio file has been played back.');
+}
+
+errorCallback = function(err)
+{
+&nbsp;&nbsp;&nbsp;console.log('Error occurred ' + err.message);
+}
+
+var src = 'file://home/app/content/Documents/play.mp3';
+var myMedia = new Media(src, successCallback, errorCallback);
+
+myMedia.play();
+
+/* Mute volume after 2 seconds */
+setTimeout(function()
+{
+&nbsp;&nbsp;&nbsp;myMedia.setVolume(0.0);
+&nbsp;&nbsp;&nbsp;console.log('Playback volume has been muted.');
+}, 2000);
+
+/* Set volume to 1.0 after 5 seconds */
+setTimeout(function()
+{
+&nbsp;&nbsp;&nbsp;myMedia.setVolume(1.0);
+&nbsp;&nbsp;&nbsp;console.log('Playback volume has been set to 1.0.');
+}, 5000);
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Playback volume has been muted.
@@ -560,19 +587,22 @@ Audio file has been played back.
  http://tizen.org/privilege/mediacapture
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> successCallback = function() {
-    console.log('Started recording an audio file.');
- }
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+successCallback = function()
+{
+&nbsp;&nbsp;&nbsp;console.log('Started recording an audio file.');
+}
 
- errorCallback = function(err) {
-    console.log('Error occurred ' + err.message);
- }
+errorCallback = function(err)
+{
+&nbsp;&nbsp;&nbsp;console.log('Error occurred ' + err.message);
+}
 
- var src = 'recordAudio.mp3';
- var myRecMedia = new Media(src, successCallback, errorCallback);
+var src = 'recordAudio.mp3';
+var myRecMedia = new Media(src, successCallback, errorCallback);
 
- myRecMedia.startRecord();
- </pre>
+myRecMedia.startRecord();
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Started recording an audio file.
@@ -601,25 +631,29 @@ Audio file has been played back.
  http://tizen.org/privilege/mediacapture
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> successCallback = function() {
-    console.log('Started recording an audio file.');
- }
-
- errorCallback = function(err) {
-    console.log('Error occurred ' + err.message);
- }
-
- var src = 'recordAudio.mp3';
- var myRecMedia = new Media(src, successCallback, errorCallback);
-
- myRecMedia.startRecord();
-
- // Stop recording after 10 seconds
- setTimeout(function() {
-     myRecMedia.stopRecord();
-     console.log('Stopped recording an audio file.');
- }, 10000);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+successCallback = function()
+{
+&nbsp;&nbsp;&nbsp;console.log('Started recording an audio file.');
+}
+
+errorCallback = function(err)
+{
+&nbsp;&nbsp;&nbsp;console.log('Error occurred ' + err.message);
+}
+
+var src = 'recordAudio.mp3';
+var myRecMedia = new Media(src, successCallback, errorCallback);
+
+myRecMedia.startRecord();
+
+/* Stop recording after 10 seconds */
+setTimeout(function()
+{
+&nbsp;&nbsp;&nbsp;myRecMedia.stopRecord();
+&nbsp;&nbsp;&nbsp;console.log('Stopped recording an audio file.');
+}, 10000);
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Started recording an audio file.
@@ -641,24 +675,28 @@ Stopped recording an audio file.
  3.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> successCallback = function() {
-    console.log('Audio file has been stopped.');
- }
-
- errorCallback = function(err) {
-    console.log('Error occurred ' + err.message);
- }
-
- var src = 'file://home/app/content/Documents/play.mp3';
- var myMedia = new Media(src, successCallback, errorCallback);
-
- myMedia.play();
-
- // Stop after 10 seconds
- setTimeout(function() {
-     myMedia.stop();
- }, 10000);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+successCallback = function()
+{
+&nbsp;&nbsp;&nbsp;console.log('Audio file has been stopped.');
+}
+
+errorCallback = function(err)
+{
+&nbsp;&nbsp;&nbsp;console.log('Error occurred ' + err.message);
+}
+
+var src = 'file://home/app/content/Documents/play.mp3';
+var myMedia = new Media(src, successCallback, errorCallback);
+
+myMedia.play();
+
+/* Stop after 10 seconds */
+setTimeout(function()
+{
+&nbsp;&nbsp;&nbsp;myMedia.stop();
+}, 10000);
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Audio playback has been stopped.
index 0fbe5ff..20b6da0 100644 (file)
@@ -3,7 +3,7 @@
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
 <link rel="stylesheet" type="text/css" href="../tizen.css" media="screen">
-<script type="text/javascript" src="snippet.js"></script><title>NetworkInformation API</title>
+<script type="text/javascript" src="../snippet.js"></script><title>NetworkInformation API</title>
 </head>
 <body id="page-content" onload="prettyPrint()">
 <div class="api" id="::NetworkInformation">
@@ -112,23 +112,25 @@ The <em>navigator.connection</em> object allows access to the NetworkInformation
  http://tizen.org/privilege/telephony
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function checkConnection() {
-   var networkState = navigator.connection.type;
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function checkConnection()
+{
+&nbsp;&nbsp;&nbsp;var networkState = navigator.connection.type;
 
-   var states = {};
-   states[Connection.UNKNOWN]  = 'Unknown connection';
-   states[Connection.ETHERNET] = 'Ethernet connection';
-   states[Connection.WIFI]     = 'WiFi connection';
-   states[Connection.CELL_2G]  = 'Cell 2G connection';
-   states[Connection.CELL_3G]  = 'Cell 3G connection';
-   states[Connection.CELL_4G]  = 'Cell 4G connection';
-   states[Connection.CELL]     = 'Cell generic connection';
-   states[Connection.NONE]     = 'No network connection';
-   alert('Connection type: ' + states[networkState]);
- }
+&nbsp;&nbsp;&nbsp;var states = {};
+&nbsp;&nbsp;&nbsp;states[Connection.UNKNOWN] = 'Unknown connection';
+&nbsp;&nbsp;&nbsp;states[Connection.ETHERNET] = 'Ethernet connection';
+&nbsp;&nbsp;&nbsp;states[Connection.WIFI] = 'WiFi connection';
+&nbsp;&nbsp;&nbsp;states[Connection.CELL_2G] = 'Cell 2G connection';
+&nbsp;&nbsp;&nbsp;states[Connection.CELL_3G] = 'Cell 3G connection';
+&nbsp;&nbsp;&nbsp;states[Connection.CELL_4G] = 'Cell 4G connection';
+&nbsp;&nbsp;&nbsp;states[Connection.CELL] = 'Cell generic connection';
+&nbsp;&nbsp;&nbsp;states[Connection.NONE] = 'No network connection';
+&nbsp;&nbsp;&nbsp;alert('Connection type: ' + states[networkState]);
+}
 
- checkConnection();
- </pre>
+checkConnection();
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>Connection type: Cell 3G connection
@@ -165,8 +167,7 @@ The <em>navigator.connection</em> object allows access to the NetworkInformation
  3.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> console.log(Connection.UNKNOWN);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">console.log(Connection.UNKNOWN);</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>unknown
@@ -183,8 +184,7 @@ The <em>navigator.connection</em> object allows access to the NetworkInformation
  3.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> console.log(Connection.ETHERNET);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">console.log(Connection.ETHERNET);</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>ethernet
@@ -201,8 +201,7 @@ The <em>navigator.connection</em> object allows access to the NetworkInformation
  3.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> console.log(Connection.WIFI);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">console.log(Connection.WIFI);</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>wifi
@@ -219,8 +218,7 @@ The <em>navigator.connection</em> object allows access to the NetworkInformation
  3.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> console.log(Connection.CELL_2G);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">console.log(Connection.CELL_2G);</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>2g
@@ -237,8 +235,7 @@ The <em>navigator.connection</em> object allows access to the NetworkInformation
  3.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> console.log(Connection.CELL_3G);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">console.log(Connection.CELL_3G);</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>3g
@@ -255,8 +252,7 @@ The <em>navigator.connection</em> object allows access to the NetworkInformation
  3.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> console.log(Connection.CELL_4G);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">console.log(Connection.CELL_4G);</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>4g
@@ -273,8 +269,7 @@ The <em>navigator.connection</em> object allows access to the NetworkInformation
  3.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> console.log(Connection.CELL);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">console.log(Connection.CELL);</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>cellular
@@ -291,8 +286,7 @@ The <em>navigator.connection</em> object allows access to the NetworkInformation
  3.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> console.log(Connection.NONE);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">console.log(Connection.NONE);</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>none
@@ -326,16 +320,19 @@ Applications typically should use document.addEventListener() to attach an event
 Original documentation: <a href="https://www.npmjs.com/package/cordova-plugin-network-information#online">Cordova online event</a>          </p>
          </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> document.addEventListener('deviceready', onDeviceReady, false);
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+document.addEventListener('deviceready', onDeviceReady, false);
 
- function onDeviceReady() {
-   document.addEventListener('online', onOnline, false);
- }
+function onDeviceReady()
+{
+&nbsp;&nbsp;&nbsp;document.addEventListener('online', onOnline, false);
+}
 
- function onOnline() {
-   // Handle the online event
- }
- </pre>
+function onOnline()
+{
+&nbsp;&nbsp;&nbsp;/* Handle the online event */
+}
+</pre>
 </div>
 </div>
 <div class="interface" id="OfflineEventCallback">
@@ -362,16 +359,19 @@ Applications typically should use document.addEventListener() to attach an event
 Original documentation: <a href="https://www.npmjs.com/package/cordova-plugin-network-information#offline">Cordova offline event</a>          </p>
          </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> document.addEventListener('deviceready', onDeviceReady, false);
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+document.addEventListener('deviceready', onDeviceReady, false);
 
- function onDeviceReady() {
-   document.addEventListener('offline', onOffline, false);
- }
+function onDeviceReady()
+{
+&nbsp;&nbsp;&nbsp;document.addEventListener('offline', onOffline, false);
+}
 
- function onOffline() {
-   // Handle the offline event
- }
- </pre>
+function onOffline()
+{
+&nbsp;&nbsp;&nbsp;/* Handle the offline event */
+}
+</pre>
 </div>
 </div>
 </div>
index d1e6a30..801422d 100644 (file)
@@ -231,25 +231,34 @@ DataControl API.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> //The data provider, a native application, should be pre-installed and launched.
- //The same provider ID should be defined for the use of this API between a native application(provider) and a web application(consumer).
- //In this example, the DictionaryDataControlProvider native sample application is used as a data control provider.
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* 
+   The data provider, a native application, should be pre-installed and launched
+   The same provider ID should be defined for the use of this API between a native application(provider) and a web application(consumer)
+   In this example, the DictionaryDataControlProvider native sample application is used as a data control provider
+*/
 
- //Gets SQL type DataControlConsumerObject
- try {
-     var globalSQLConsumer = tizen.datacontrol.getDataControlConsumer(
-     "http://tizen.org/datacontrol/provider/DictionaryDataControlProvider", "Dictionary", "SQL");
- } catch (err) {
-     console.log (err.name +": " + err.message);
- }
- // Gets MAP type DataControlConsumerObject
- try {
-      globalMappedConsumer = tizen.datacontrol.getDataControlConsumer(
-      "http://tizen.org/datacontrol/provider/DictionaryDataControlProvider", "Dictionary", "MAP");
- } catch (err) {
-      console.log (err.name +": " + err.message);
- }
- </pre>
+/* Gets SQL type DataControlConsumerObject */
+try
+{
+&nbsp;&nbsp;&nbsp;var globalSQLConsumer = tizen.datacontrol.getDataControlConsumer(
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"http://tizen.org/datacontrol/provider/DictionaryDataControlProvider", "Dictionary", "SQL");
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name +": " + err.message);
+}
+/* Gets MAP type DataControlConsumerObject */
+try
+{
+&nbsp;&nbsp;&nbsp;globalMappedConsumer = tizen.datacontrol.getDataControlConsumer(
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"http://tizen.org/datacontrol/provider/DictionaryDataControlProvider", "Dictionary", "MAP");
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name +": " + err.message);
+}
+</pre>
 </div>
 </dd>
 </dl>
@@ -398,29 +407,34 @@ The string consists of one or more components, separated by a slash('/').
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function successcb(id, insertRowId)
- {
-     console.log("ok : reqid " + id);
- }
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function successcb(id, insertRowId)
+{
+&nbsp;&nbsp;&nbsp;console.log("ok: reqid " + id);
+}
 
- function errorcb(id, error)
- {
-     console.log("error id : " + id + ", error msg : " + error.message);
- }
+function errorcb(id, error)
+{
+&nbsp;&nbsp;&nbsp;console.log("error id: " + id + ", error msg: " + error.message);
+}
 
- try {
-     var rowData = {
-         columns : ["WORD", "WORD_DESC"] ,
-         values  : ["'tizen1'", "'tizen2'"]
-     };
-     // Defines globalReqId before
-     // Increases globalReqId for uniqueness
-     globalReqId++;
-     globalSQLConsumer.insert(globalReqId, rowData, successcb, errorcb);
- } catch (err) {
-     console.log (err.name +": " + err.message);
- }
- </pre>
+try
+{
+&nbsp;&nbsp;&nbsp;var rowData =
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;columns: ["WORD", "WORD_DESC"] ,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;values: ["'tizen1'", "'tizen2'"]
+&nbsp;&nbsp;&nbsp;};
+&nbsp;&nbsp;&nbsp;/* Defines globalReqId before */
+&nbsp;&nbsp;&nbsp;/* Increases globalReqId for uniqueness */
+&nbsp;&nbsp;&nbsp;globalReqId++;
+&nbsp;&nbsp;&nbsp;globalSQLConsumer.insert(globalReqId, rowData, successcb, errorcb);
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="SQLDataControlConsumer::update">
@@ -488,29 +502,34 @@ The string consists of one or more components, separated by a slash('/').
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function successcb(id)
- {
-     console.log("ok : reqid " + id);
- }
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function successcb(id)
+{
+&nbsp;&nbsp;&nbsp;console.log("ok: reqid " + id);
+}
 
- function errorcb(id, error)
- {
-     console.log("error id : " + id + ", error msg : " + error.message);
- }
+function errorcb(id, error)
+{
+&nbsp;&nbsp;&nbsp;console.log("error id: " + id + ", error msg: " + error.message);
+}
 
- try {
-     var rowData = {
-         columns : ["WORD", "WORD_DESC"] ,
-         values  : ["'tizen1'", "'Web apps platform!'"]
-     };
-     // Defines globalReqId before
-     // Increases globalReqId for uniqueness
-     globalReqId++;
-     globalSQLConsumer.update(globalReqId, rowData, "WORD='tizen1'", successcb, errorcb);
- } catch (err) {
-     console.log (err.name +": " + err.message);
- }
- </pre>
+try
+{
+&nbsp;&nbsp;&nbsp;var rowData =
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;columns: ["WORD", "WORD_DESC"] ,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;values: ["'tizen1'", "'Web apps platform!'"]
+&nbsp;&nbsp;&nbsp;};
+&nbsp;&nbsp;&nbsp;/* Defines globalReqId before */
+&nbsp;&nbsp;&nbsp;/* Increases globalReqId for uniqueness */
+&nbsp;&nbsp;&nbsp;globalReqId++;
+&nbsp;&nbsp;&nbsp;globalSQLConsumer.update(globalReqId, rowData, "WORD='tizen1'", successcb, errorcb);
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="SQLDataControlConsumer::remove">
@@ -574,25 +593,29 @@ The string consists of one or more components, separated by a slash('/').
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function successcb(id)
- {
-     console.log("ok : reqid " + id);
- }
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function successcb(id)
+{
+&nbsp;&nbsp;&nbsp;console.log("ok: reqid " + id);
+}
 
- function errorcb(id, error)
- {
-     console.log("error id : " + id + ", error msg : " + error.message);
- }
+function errorcb(id, error)
+{
+&nbsp;&nbsp;&nbsp;console.log("error id: " + id + ", error msg: " + error.message);
+}
 
- try {
-     // Defines globalReqId before
-     // Increases globalReqId for uniqueness
-     globalReqId++;
-     globalSQLConsumer.remove(globalReqId, "WORD='tizen1'", successcb, errorcb);
- } catch (err) {
-     console.log (err.name +": " + err.message);
- }
- </pre>
+try
+{
+&nbsp;&nbsp;&nbsp;/* Defines globalReqId before */
+&nbsp;&nbsp;&nbsp;/* Increases globalReqId for uniqueness */
+&nbsp;&nbsp;&nbsp;globalReqId++;
+&nbsp;&nbsp;&nbsp;globalSQLConsumer.remove(globalReqId, "WORD='tizen1'", successcb, errorcb);
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="SQLDataControlConsumer::select">
@@ -672,46 +695,49 @@ The string consists of one or more components, separated by a slash('/').
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function getValueSuccessCB(result, id)
- {
-     console.log("getValueSuccessCB result.length: " + result.length);
-     var length = result.length;
-     for (var i = 0; i &lt; length; i++)
-     {
-         var rowData = "| ";
-         var j = 0;
-         for (j = 0; j &lt; result[i].columns.length; j++)
-         {
-             rowData += "column: " + result[i].columns[j] + ", value: " + result[i].values[j] + " | ";
-         }
-         console.log(rowData);
-     }
- }
- function errorcb(id, error)
- {
-     console.log("error id : " + id + ", error msg : " + error.message);
- }
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function getValueSuccessCB(result, id)
+{
+&nbsp;&nbsp;&nbsp;console.log("getValueSuccessCB result.length: " + result.length);
+&nbsp;&nbsp;&nbsp;var length = result.length;
+&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; length; i++)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var rowData = "| ";
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var j = 0;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;for (j = 0; j &lt; result[i].columns.length; j++)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;rowData += "column: " + result[i].columns[j] + ", value: " + result[i].values[j] + " | ";
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(rowData);
+&nbsp;&nbsp;&nbsp;}
+}
+function errorcb(id, error)
+{
+&nbsp;&nbsp;&nbsp;console.log("error id: " + id + ", error msg: " + error.message);
+}
 
- try {
-     // globalSQLConsumer and globalReqId should be defined before.
-     // Increases globalReqId for uniqueness
-     globalReqId++;
-     var columns = ["WORD", "WORD_DESC" ];
-     var whereClause = "1";
-     console.log("----- Calling for ascending order -----");
-     globalSQLConsumer.select(globalReqId, columns, whereClause, getValueSuccessCB, errorcb,
-             null, null, "WORD_DESC ASC");
-     setTimeout( function() {
-         console.log("----- Calling descending order -----");
-         globalSQLConsumer.select(globalReqId, columns, whereClause, getValueSuccessCB, errorcb,
-             null, null, "WORD_DESC DESC");
-     }, 1000);
- }
- catch (err) {
-     console.log (err.name +": " + err.message);
- }
-
- </pre>
+try
+{
+&nbsp;&nbsp;&nbsp;/* globalSQLConsumer and globalReqId should be defined before */
+&nbsp;&nbsp;&nbsp;/* Increases globalReqId for uniqueness */
+&nbsp;&nbsp;&nbsp;globalReqId++;
+&nbsp;&nbsp;&nbsp;var columns = ["WORD", "WORD_DESC"];
+&nbsp;&nbsp;&nbsp;var whereClause = "1";
+&nbsp;&nbsp;&nbsp;console.log("----- Calling for ascending order -----");
+&nbsp;&nbsp;&nbsp;globalSQLConsumer.select(globalReqId, columns, whereClause, getValueSuccessCB, errorcb,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;null, null, "WORD_DESC ASC");
+&nbsp;&nbsp;&nbsp;setTimeout(function()
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("----- Calling descending order -----");
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;globalSQLConsumer.select(globalReqId, columns, whereClause, getValueSuccessCB, errorcb,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;null, null, "WORD_DESC DESC");
+&nbsp;&nbsp;&nbsp;}, 1000);
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+}
+</pre>
 </div>
 </dd>
 </dl>
@@ -812,25 +838,29 @@ The string consists of one or more components, separated by a slash('/').
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function successcb(id)
- {
-     console.log("ok : reqid " + id);
- }
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function successcb(id)
+{
+&nbsp;&nbsp;&nbsp;console.log("ok: reqid " + id);
+}
 
- function errorcb(id, error)
- {
-     console.log("error id : " + id + ", error msg : " + error.message);
- }
+function errorcb(id, error)
+{
+&nbsp;&nbsp;&nbsp;console.log("error id: " + id + ", error msg: " + error.message);
+}
 
- try {
-     // Defines globalReqId before
-     // Increases globalReqId for uniqueness
-     globalReqId++;
-     globalMappedConsumer.addValue(globalReqId, "tizen", "Foo", successcb, errorcb);
- } catch (err) {
-     console.log (err.name +": " + err.message);
- }
- </pre>
+try
+{
+&nbsp;&nbsp;&nbsp;/* Defines globalReqId before */
+&nbsp;&nbsp;&nbsp;/* Increases globalReqId for uniqueness */
+&nbsp;&nbsp;&nbsp;globalReqId++;
+&nbsp;&nbsp;&nbsp;globalMappedConsumer.addValue(globalReqId, "tizen", "Foo", successcb, errorcb);
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="MappedDataControlConsumer::removeValue">
@@ -901,25 +931,29 @@ The string consists of one or more components, separated by a slash('/').
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function successcb(id)
- {
-     console.log("ok : reqid " + id);
- }
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function successcb(id)
+{
+&nbsp;&nbsp;&nbsp;console.log("ok: reqid " + id);
+}
 
- function errorcb(id, error)
- {
-     console.log("error id : " + id + ", error msg : " + error.message);
- }
+function errorcb(id, error)
+{
+&nbsp;&nbsp;&nbsp;console.log("error id: " + id + ", error msg: " + error.message);
+}
 
- try {
-     // Defines globalReqId before
-     // Increases globalReqId for uniqueness
-     globalReqId++;
-     globalMappedConsumer.removeValue(globalReqId, "tizen", "Foo", successcb, errorcb);
- } catch (err) {
-     console.log (err.name +": " + err.message);
- }
- </pre>
+try
+{
+&nbsp;&nbsp;&nbsp;/* Defines globalReqId before */
+&nbsp;&nbsp;&nbsp;/* Increases globalReqId for uniqueness */
+&nbsp;&nbsp;&nbsp;globalReqId++;
+&nbsp;&nbsp;&nbsp;globalMappedConsumer.removeValue(globalReqId, "tizen", "Foo", successcb, errorcb);
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="MappedDataControlConsumer::getValue">
@@ -986,25 +1020,29 @@ The string consists of one or more components, separated by a slash('/').
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function getValueSuccessCB(result, id)
- {
-     console.log(result.length + ":" + result[0]);
- }
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function getValueSuccessCB(result, id)
+{
+&nbsp;&nbsp;&nbsp;console.log(result.length + ":" + result[0]);
+}
 
- function errorcb(id, error)
- {
-     console.log("error id : " + id + ", error msg : " + error.message);
- }
+function errorcb(id, error)
+{
+&nbsp;&nbsp;&nbsp;console.log("error id: " + id + ", error msg: " + error.message);
+}
 
- try {
-     // Defines globalReqId before
-     // Increases globalReqId for uniqueness
-     globalReqId++;
-     globalMappedConsumer.getValue(globalReqId, "tizen", getValueSuccessCB, errorcb);
- } catch (err) {
-     console.log (err.name +": " + err.message);
- }
- </pre>
+try
+{
+&nbsp;&nbsp;&nbsp;/* Defines globalReqId before */
+&nbsp;&nbsp;&nbsp;/* Increases globalReqId for uniqueness */
+&nbsp;&nbsp;&nbsp;globalReqId++;
+&nbsp;&nbsp;&nbsp;globalMappedConsumer.getValue(globalReqId, "tizen", getValueSuccessCB, errorcb);
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="MappedDataControlConsumer::updateValue">
@@ -1079,25 +1117,29 @@ The string consists of one or more components, separated by a slash('/').
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function successcb(id)
- {
-     console.log("ok : reqid " + id);
- }
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function successcb(id)
+{
+&nbsp;&nbsp;&nbsp;console.log("ok: reqid " + id);
+}
 
- function errorcb(id, error)
- {
-     console.log("error id : " + id + ", error msg : " + error.message);
- }
+function errorcb(id, error)
+{
+&nbsp;&nbsp;&nbsp;console.log("error id: " + id + ", error msg: " + error.message);
+}
 
- try {
-     // Defines globalReqId before
-     // Increases globalReqId for uniqueness
-     globalReqId++;
-     globalMappedConsumer.updateValue(globalReqId, "tizen", "Foo", "Bar", successcb, errorcb);
- } catch (err) {
-     console.log (err.name +": " + err.message);
- }
- </pre>
+try
+{
+&nbsp;&nbsp;&nbsp;/* Defines globalReqId before */
+&nbsp;&nbsp;&nbsp;/* Increases globalReqId for uniqueness */
+&nbsp;&nbsp;&nbsp;globalReqId++;
+&nbsp;&nbsp;&nbsp;globalMappedConsumer.updateValue(globalReqId, "tizen", "Foo", "Bar", successcb, errorcb);
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+}
+</pre>
 </div>
 </dd>
 </dl>
index feff51c..ec469ad 100644 (file)
@@ -279,11 +279,12 @@ The default value is an empty object.
  2.1
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var req = new tizen.DownloadRequest("http://download.tizen.org/tools/README.txt");
- req.httpHeader["Pragma"] = "no-cache";
- req.httpHeader["Cookie"] = "version=1; Skin=new";
- req.httpHeader["X-Agent"] = "Tizen Sample App";
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var req = new tizen.DownloadRequest("http://download.tizen.org/tools/README.txt");
+req.httpHeader["Pragma"] = "no-cache";
+req.httpHeader["Cookie"] = "version=1; Skin=new";
+req.httpHeader["X-Agent"] = "Tizen Sample App";
+</pre>
 </div>
 </li>
 </ul>
@@ -384,47 +385,59 @@ If the network is not available for downloading, the return value is -1 since Ti
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Check if Download API is supported not on a device.
- var download_api_capability = tizen.systeminfo.getCapability("http://tizen.org/feature/download");
- if (download_api_capability === false) {
-     console.log("Download API is not supported on this device.");
-     return;
- }
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Check whether Download API is supported on a device */
+var download_api_capability = tizen.systeminfo.getCapability("http://tizen.org/feature/download");
+if (download_api_capability === false)
+{
+&nbsp;&nbsp;&nbsp;console.log("Download API is not supported on this device.");
 
- var listener = {
-   onprogress: function(id, receivedSize, totalSize) {
-     console.log('Received with id: ' + id + ', ' + receivedSize + '/' + totalSize);
-   },
-   onpaused: function(id) {
-     console.log('Paused with id: ' + id);
-   },
-   oncanceled: function(id) {
-     console.log('Canceled with id: ' + id);
-   },
-   oncompleted: function(id, path) {
-     console.log('Completed with id: ' + id + ', path: ' + path);
-   },
-   onfailed: function(id, error) {
-     console.log('Failed with id: ' + id + ', error name: ' + error.name);
-   }
- };
+&nbsp;&nbsp;&nbsp;return;
+}
 
- // Starts downloading the file from the Web with the corresponding callbacks.
- var downloadRequest = new tizen.DownloadRequest("http://download.tizen.org/tools/README.txt", "documents");
- var downloadId = tizen.download.start(downloadRequest, listener);
+var listener =
+{
+&nbsp;&nbsp;&nbsp;onprogress: function(id, receivedSize, totalSize)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('Received with id: ' + id + ', ' + receivedSize + '/' + totalSize);
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;onpaused: function(id)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('Paused with id: ' + id);
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;oncanceled: function(id)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('Canceled with id: ' + id);
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;oncompleted: function(id, path)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('Completed with id: ' + id + ', path: ' + path);
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;onfailed: function(id, error)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('Failed with id: ' + id + ', error name: ' + error.name);
+&nbsp;&nbsp;&nbsp;}
+};
 
- // If you want to download a large file through Wi-Fi,
- var wifi_capability = tizen.systeminfo.getCapability("http://tizen.org/feature/network.wifi");
- var wifiDownloadRequest = new tizen.DownloadRequest("http://download.tizen.org/tools/archive/14.02.2/Ubuntu_12.04/qemu_1.6.0rc3.orig.tar.gz", "downloads", null, "WIFI");
+/* Starts downloading the file from the Web with the corresponding callbacks */
+var downloadRequest = new tizen.DownloadRequest("http://download.tizen.org/tools/README.txt", "documents");
+var downloadId = tizen.download.start(downloadRequest, listener);
 
- if (wifi_capability === true) {
-     var downlodId_wifi = tizen.download.start(wifiDownloadRequest, listener);
- } else {
-     // If you call tizen.download.start(), NotSupportedError will be thrown.
-     console.log("This device doesn't support Download API through Wi-Fi.");
- }
+/* If you want to download a large file through Wi-Fi */
+var wifi_capability = tizen.systeminfo.getCapability("http://tizen.org/feature/network.wifi");
+var wifiDownloadRequest = new tizen.DownloadRequest(
+&nbsp;&nbsp;&nbsp;"http://download.tizen.org/tools/archive/14.02.2/Ubuntu_12.04/qemu_1.6.0rc3.orig.tar.gz", "downloads", null, "WIFI");
 
- </pre>
+if (wifi_capability === true)
+{
+&nbsp;&nbsp;&nbsp;var downlodId_wifi = tizen.download.start(wifiDownloadRequest, listener);
+}
+else
+{
+&nbsp;&nbsp;&nbsp;/* If you call tizen.download.start(), NotSupportedError will be thrown */
+&nbsp;&nbsp;&nbsp;console.log("This device doesn't support Download API through Wi-Fi.");
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="DownloadManager::cancel">
@@ -468,9 +481,10 @@ If the network is not available for downloading, the return value is -1 since Ti
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Cancels the ongoing download operation with the specified ID.
- tizen.download.cancel(downloadId);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Cancels the ongoing download operation with the specified ID */
+tizen.download.cancel(downloadId);
+</pre>
 </div>
 </dd>
 <dt class="method" id="DownloadManager::pause">
@@ -515,9 +529,10 @@ The paused download operation can be resumed later by the <em>resume()</em> meth
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Pauses the ongoing download operation with the specified ID.
- tizen.download.pause(downloadId);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Pauses the ongoing download operation with the specified ID */
+tizen.download.pause(downloadId);
+</pre>
 </div>
 </dd>
 <dt class="method" id="DownloadManager::resume">
@@ -561,9 +576,10 @@ The paused download operation can be resumed later by the <em>resume()</em> meth
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Resumes the paused download operation with the specified ID.
- tizen.download.resume(downloadId);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Resumes the paused download operation with the specified ID */
+tizen.download.resume(downloadId);
+</pre>
 </div>
 </dd>
 <dt class="method" id="DownloadManager::getState">
@@ -611,9 +627,10 @@ The paused download operation can be resumed later by the <em>resume()</em> meth
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Gets the state of the download operation with the given ID.
- var state = tizen.download.getState(downloadId);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Gets the state of the download operation with the given ID */
+var state = tizen.download.getState(downloadId);
+</pre>
 </div>
 </dd>
 <dt class="method" id="DownloadManager::getDownloadRequest">
@@ -664,9 +681,10 @@ parameters contain an invalid value.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Gets the download request information with the given ID.
- var downloadRequest = tizen.download.getDownloadRequest(downloadId);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Gets the download request information with the given ID */
+var downloadRequest = tizen.download.getDownloadRequest(downloadId);
+</pre>
 </div>
 </dd>
 <dt class="method" id="DownloadManager::getMIMEType">
@@ -721,9 +739,10 @@ parameters contain an invalid value.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Get the MIME type of the download operation with the given ID.
- var MIMEtype = tizen.download.getMIMEType(downloadId);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Get the MIME type of the download operation with the given ID */
+var MIMEtype = tizen.download.getMIMEType(downloadId);
+</pre>
 </div>
 </dd>
 <dt class="method" id="DownloadManager::setListener">
@@ -775,31 +794,38 @@ parameters contain an invalid value.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var listener = {
-   onprogress: function(id, receivedSize, totalSize) {
-     console.log('Received with id: ' + id + ', ' + receivedSize + '/' + totalSize);
-   },
-   onpaused: function(id) {
-     console.log('Paused with id: ' + id);
-   },
-   oncanceled: function(id) {
-     console.log('Canceled with id: ' + id);
-   },
-   oncompleted: function(id, fileName) {
-     console.log('Completed with id: ' + id + ', file name: ' + fileName);
-   },
-   onfailed: function(id, error) {
-     console.log('Failed with id: ' + id + ', error name: ' + error.name);
-   }
- };
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var listener =
+{
+&nbsp;&nbsp;&nbsp;onprogress: function(id, receivedSize, totalSize)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('Received with id: ' + id + ', ' + receivedSize + '/' + totalSize);
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;onpaused: function(id)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('Paused with id: ' + id);
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;oncanceled: function(id)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('Canceled with id: ' + id);
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;oncompleted: function(id, fileName)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('Completed with id: ' + id + ', file name: ' + fileName);
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;onfailed: function(id, error)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('Failed with id: ' + id + ', error name: ' + error.name);
+&nbsp;&nbsp;&nbsp;}
+};
 
- // Start downloading the html file on the web with the corresponding callbacks.
- var downloadRequest = new tizen.DownloadRequest("http://download.tizen.org/tools/README.txt", "documents");
- downloadId = tizen.download.start(downloadRequest);
+/* Start downloading the html file on the web with the corresponding callbacks */
+var downloadRequest = new tizen.DownloadRequest("http://download.tizen.org/tools/README.txt", "documents");
+downloadId = tizen.download.start(downloadRequest);
 
- // Add the listener.
- tizen.download.setListener(downloadId, listener);
- </pre>
+/* Add the listener */
+tizen.download.setListener(downloadId, listener);
+</pre>
 </div>
 </dd>
 </dl>
index de58318..7b8ea7d 100755 (executable)
@@ -250,27 +250,33 @@ UnknownError: In any other error case              </li>
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> //Preconditions: please provide images/tizen.jpg file with present Exif data
-
- // Defines success callback
- function onSuccess(exifInfo) {
-     console.log("success to get Exif information object");
- }
-
- // Defines error callback
- function onError(error) {
-     console.log("error occurred: " + error.name);
- }
-
- function resolveSuccess(file) {
-     tizen.exif.getExifInfo(file.toURI(), onSuccess, onError);
- }
-
- function resolveFail(error) {
-    console.log("error occurred: " + error.name);
- }
- tizen.filesystem.resolve("images/tizen.jpg", resolveSuccess, resolveFail);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Preconditions: provide images/tizen.jpg file with present Exif data */
+
+/* Defines success callback */
+function onSuccess(exifInfo)
+{
+&nbsp;&nbsp;&nbsp;console.log("success to get Exif information object");
+}
+
+/* Defines error callback */
+function onError(error)
+{
+&nbsp;&nbsp;&nbsp;console.log("error occurred: " + error.name);
+}
+
+function resolveSuccess(file)
+{
+&nbsp;&nbsp;&nbsp;tizen.exif.getExifInfo(file.toURI(), onSuccess, onError);
+}
+
+function resolveFail(error)
+{
+&nbsp;&nbsp;&nbsp;console.log("error occurred: " + error.name);
+}
+
+tizen.filesystem.resolve("images/tizen.jpg", resolveSuccess, resolveFail);
+</pre>
 </div>
 </dd>
 <dt class="method" id="ExifManager::saveExifInfo">
@@ -324,41 +330,47 @@ UnknownError: In any other error case              </li>
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> //Preconditions: please provide images/tizen.jpg file with present Exif data
-
- // Defines success callback
- function onSaveSuccess() {
-     console.log("success to save Exif information");
- }
-
- // Defines error callback
- function onSaveError(error) {
-     console.log("error occur" + error.name);
- }
-
- // Defines success callback
- function onSuccess(exifInfo) {
-     console.log("success to get Exif information object");
-     exifInfo.orientation = "ROTATE_90";
-     tizen.exif.saveExifInfo(exifInfo, onSaveSuccess, onSaveError);
- }
-
- // Defines error callback
- function onError(error) {
-     console.log("error occur" + error.name);
- }
-
- function resolveSuccess(file) {
-     tizen.exif.getExifInfo(file.toURI(), onSuccess, onError);
- }
-
- function resolveFail(error) {
-    console.log("error occurred: " + error.name);
- }
-
- tizen.filesystem.resolve("images/tizen.jpg", resolveSuccess, resolveFail);
-
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Preconditions: provide images/tizen.jpg file with present Exif data */
+
+/* Defines success callback */
+function onSaveSuccess()
+{
+&nbsp;&nbsp;&nbsp;console.log("success to save Exif information");
+}
+
+/* Defines error callback */
+function onSaveError(error)
+{
+&nbsp;&nbsp;&nbsp;console.log("error occur" + error.name);
+}
+
+/* Defines success callback */
+function onSuccess(exifInfo)
+{
+&nbsp;&nbsp;&nbsp;console.log("success to get Exif information object");
+&nbsp;&nbsp;&nbsp;exifInfo.orientation = "ROTATE_90";
+&nbsp;&nbsp;&nbsp;tizen.exif.saveExifInfo(exifInfo, onSaveSuccess, onSaveError);
+}
+
+/* Defines error callback */
+function onError(error)
+{
+&nbsp;&nbsp;&nbsp;console.log("error occur" + error.name);
+}
+
+function resolveSuccess(file)
+{
+&nbsp;&nbsp;&nbsp;tizen.exif.getExifInfo(file.toURI(), onSuccess, onError);
+}
+
+function resolveFail(error)
+{
+&nbsp;&nbsp;&nbsp;console.log("error occurred: " + error.name);
+}
+
+tizen.filesystem.resolve("images/tizen.jpg", resolveSuccess, resolveFail);
+</pre>
 </div>
 </dd>
 <dt class="method" id="ExifManager::getThumbnail">
@@ -419,33 +431,39 @@ UnknownError: In any other error case              </li>
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> //Preconditions: please provide images/tizen.jpg file with present Exif data
-
- // Defines success callback
- function onSuccess(thumbData) {
-     console.log("got thumbnail data of JPEG file");
-     if (thumbData) {
-         var img = new Image();
-         img.src = thumbData;
-         document.body.appendChild(img);
-     }
- }
-
- // Defines error callback
- function onError(error) {
-     console.log("error occur" + error.name);
- }
-
- function resolveSuccess(file) {
-     tizen.exif.getThumbnail(file.toURI(), onSuccess, onError);
- }
-
- function resolveFail(error) {
-    console.log("error occurred: " + error.name);
- }
-
- tizen.filesystem.resolve("images/tizen.jpg", resolveSuccess, resolveFail);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Preconditions: provide images/tizen.jpg file with present Exif data */
+
+/* Defines success callback */
+function onSuccess(thumbData)
+{
+&nbsp;&nbsp;&nbsp;console.log("got thumbnail data of JPEG file");
+&nbsp;&nbsp;&nbsp;if (thumbData)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var img = new Image();
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;img.src = thumbData;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;document.body.appendChild(img);
+&nbsp;&nbsp;&nbsp;}
+}
+
+/* Defines error callback */
+function onError(error)
+{
+&nbsp;&nbsp;&nbsp;console.log("error occur" + error.name);
+}
+
+function resolveSuccess(file)
+{
+&nbsp;&nbsp;&nbsp;tizen.exif.getThumbnail(file.toURI(), onSuccess, onError);
+}
+
+function resolveFail(error)
+{
+&nbsp;&nbsp;&nbsp;console.log("error occurred: " + error.name);
+}
+
+tizen.filesystem.resolve("images/tizen.jpg", resolveSuccess, resolveFail);
+</pre>
 </div>
 </dd>
 </dl>
index ccbd8a7..261ab8a 100644 (file)
@@ -320,12 +320,16 @@ If this method is called without the <em>type</em> value, <em>patterns</em> are
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> try {
-     tizen.feedback.play("CHARGERCONN", "TYPE_SOUND");
- } catch (err) {
-     console.log (err.name +': ' + err.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+try
+{
+&nbsp;&nbsp;&nbsp;tizen.feedback.play("CHARGERCONN", "TYPE_SOUND");
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + ': ' + err.message);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="FeedbackManager::stop">
@@ -357,13 +361,17 @@ This function can be used to stop various types of vibration reactions that are
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> try {
-     tizen.feedback.play("BT_CONNECTED", "TYPE_VIBRATION");
-     tizen.feedback.stop();
- } catch (err) {
-     console.log (err.name +': ' + err.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+try
+{
+&nbsp;&nbsp;&nbsp;tizen.feedback.play("BT_CONNECTED", "TYPE_VIBRATION");
+&nbsp;&nbsp;&nbsp;tizen.feedback.stop();
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + ': ' + err.message);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="FeedbackManager::isPatternSupported">
@@ -409,14 +417,16 @@ This function can be used to stop various types of vibration reactions that are
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var pattern = "BT_CONNECTED", type = "TYPE_SOUND";
- var isPatternSupported = tizen.feedback.isPatternSupported(pattern, type);
- var isSupported = "";
- if(!isPatternSupported) {
- isSupported = " not";
- }
- console.log("pattern " + pattern + " is" + isSupported + " supported");
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var pattern = "BT_CONNECTED", type = "TYPE_SOUND";
+var isPatternSupported = tizen.feedback.isPatternSupported(pattern, type);
+var isSupported = "";
+if (!isPatternSupported)
+{
+&nbsp;&nbsp;&nbsp;isSupported = " not";
+}
+console.log("pattern " + pattern + " is" + isSupported + " supported");
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre> pattern BT_CONNECTED is supported
index cf4e9e0..a292656 100644 (file)
@@ -357,41 +357,44 @@ as determining root and default locations, resolving a given location into a fil
           </p>
          </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var documentsDir;
- function onsuccess(files) {
-   for (var i = 0; i &lt; files.length; i++) {
-     console.log("File Name is " + files[i].name); // displays file name
-   }
-
-   var testFile = documentsDir.createFile("test.txt");
-
-   if (testFile != null) {
-     testFile.openStream(
-       "w",
-       function(fs) {
-         fs.write("HelloWorld");
-         fs.close();
-       }, function(e) {
-         console.log("Error " + e.message);
-       }, "UTF-8"
-     );
-   }
- }
-
- function onerror(error) {
-   console.log("The error " + error.message + " occurred when listing the files in the selected folder");
- }
-
- tizen.filesystem.resolve(
-   'documents',
-   function(dir) {
-     documentsDir = dir;
-     dir.listFiles(onsuccess, onerror);
-   }, function(e) {
-     console.log("Error" + e.message);
-   }, "rw"
- );
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var documentsDir;
+function onsuccess(files)
+{
+&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; files.length; i++)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("File Name is " + files[i].name); /* Displays file name */
+&nbsp;&nbsp;&nbsp;}
+
+&nbsp;&nbsp;&nbsp;var testFile = documentsDir.createFile("test.txt");
+
+&nbsp;&nbsp;&nbsp;if (testFile != null)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;testFile.openStream("w", function(fs)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;fs.write("HelloWorld");
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;fs.close();
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}, function(e)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Error " + e.message);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}, "UTF-8");
+&nbsp;&nbsp;&nbsp;}
+}
+
+function onerror(error)
+{
+&nbsp;&nbsp;&nbsp;console.log("The error " + error.message + " occurred when listing the files in the selected folder");
+}
+
+tizen.filesystem.resolve('documents', function(dir)
+{
+&nbsp;&nbsp;&nbsp;documentsDir = dir;
+&nbsp;&nbsp;&nbsp;dir.listFiles(onsuccess, onerror);
+}, function(e)
+{
+&nbsp;&nbsp;&nbsp;console.log("Error" + e.message);
+}, "rw");
+</pre>
 </div>
 <div class="attributes">
 <h4>Attributes</h4>
@@ -405,8 +408,9 @@ as determining root and default locations, resolving a given location into a fil
  1.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> console.log("The maximum path length is " + tizen.filesystem.maxPathLength);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+console.log("The maximum path length is " + tizen.filesystem.maxPathLength);
+</pre>
 </div>
 </li></ul>
 </div>
@@ -520,15 +524,15 @@ UnknownError - If any other error occurs.              </li>
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> tizen.filesystem.resolve(
-   'images',
-   function(dir) {
-     console.log("Mount point Name is " +  dir.path);
-   }, function(e) {
-     console.log("Error: " + e.message);
-   }, "r"
- );
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+tizen.filesystem.resolve('images', function(dir)
+{
+&nbsp;&nbsp;&nbsp;console.log("Mount point Name is " +  dir.path);
+}, function(e)
+{
+&nbsp;&nbsp;&nbsp;console.log("Error: " + e.message);
+}, "r");
+</pre>
 </div>
 </dd>
 <dt class="method" id="FileSystemManager::getStorage">
@@ -598,16 +602,19 @@ UnknownError - If any other error occurs.               </li>
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function onStorage(storage) {
-     // Do something
- }
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function onStorage(storage)
+{
+&nbsp;&nbsp;&nbsp;/* Do something */
+}
 
- function onStorageError(e) {
- console.log("Storage not found!" + e.message);
- }
+function onStorageError(e)
+{
+&nbsp;&nbsp;&nbsp;console.log("Storage not found!" + e.message);
+}
 
- tizen.filesystem.getStorage("music", onStorage, onStorageError);
- </pre>
+tizen.filesystem.getStorage("music", onStorage, onStorageError);
+</pre>
 </div>
 </dd>
 <dt class="method" id="FileSystemManager::listStorages">
@@ -676,17 +683,20 @@ UnknownError - If any other error occurs.              </li>
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function alertForCorruptedRemovableDrives(storages) {
-     for (var i = 0; i &lt; storages.length; i++) {
-         if (storages[i].type != "EXTERNAL")
-             continue;
-         if (storages[i].state == "UNMOUNTABLE")
-             console.log("External drive " + storages[i].label + " is corrupted.");
-     }
- }
-
- tizen.filesystem.listStorages(alertForCorruptedRemovableDrives);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function alertForCorruptedRemovableDrives(storages)
+{
+&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; storages.length; i++)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (storages[i].type != "EXTERNAL")
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;continue;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (storages[i].state == "UNMOUNTABLE")
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("External drive " + storages[i].label + " is corrupted.");
+&nbsp;&nbsp;&nbsp;}
+}
+
+tizen.filesystem.listStorages(alertForCorruptedRemovableDrives);
+</pre>
 </div>
 </dd>
 <dt class="method" id="FileSystemManager::addStorageStateChangeListener">
@@ -754,14 +764,16 @@ The watch operation must continue until the removeStorageStateChangeListener() m
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var watchID;
- function onStorageStateChanged(storage) {
-     if (storage.state == "MOUNTED")
-         console.log("Storage " + storage.label + " was added!");
- }
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var watchID;
+function onStorageStateChanged(storage)
+{
+&nbsp;&nbsp;&nbsp;if (storage.state == "MOUNTED")
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Storage " + storage.label + " was added!");
+}
 
- watchID = tizen.filesystem.addStorageStateChangeListener(onStorageStateChanged);
- </pre>
+watchID = tizen.filesystem.addStorageStateChangeListener(onStorageStateChanged);
+</pre>
 </div>
 </dd>
 <dt class="method" id="FileSystemManager::removeStorageStateChangeListener">
@@ -813,16 +825,17 @@ Otherwise, the method call has no effect.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var watchID;
- function onStorageStateChanged(storage) {
-     if (storage.state == "MOUNTED")
-         console.log("Storage " + storage.label + " was added!");
-     tizen.filesystem.removeStorageStateChangeListener(watchID);
- }
-
- watchID = tizen.filesystem.addStorageStateChangeListener(onStorageStateChanged);
-
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var watchID;
+function onStorageStateChanged(storage)
+{
+&nbsp;&nbsp;&nbsp;if (storage.state == "MOUNTED")
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Storage " + storage.label + " was added!");
+&nbsp;&nbsp;&nbsp;tizen.filesystem.removeStorageStateChangeListener(watchID);
+}
+
+watchID = tizen.filesystem.addStorageStateChangeListener(onStorageStateChanged);
+</pre>
 </div>
 </dd>
 </dl>
@@ -986,21 +999,25 @@ files and directories rooted as the file handle location.
           </p>
          </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function onsuccess(files) {
-   for (var i = 0; i &lt; files.length; i++) {
-     // alerts each name of dir's contents
-     console.log(files[i].name);
-   }
- }
-
- function onerror(error) {
-   console.log("The error " + error.message +
-               " occurred when listing the files in the selected folder");
- }
-
- // list directory contents
- dir.listFiles(onsuccess, onerror);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function onsuccess(files)
+{
+&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; files.length; i++)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Alerts each name of dir's contents */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(files[i].name);
+&nbsp;&nbsp;&nbsp;}
+}
+
+function onerror(error)
+{
+&nbsp;&nbsp;&nbsp;console.log("The error " + error.message +
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" occurred when listing the files in the selected folder");
+}
+
+/* List directory contents */
+dir.listFiles(onsuccess, onerror);
+</pre>
 </div>
 <div class="attributes">
 <h4>Attributes</h4>
@@ -1020,23 +1037,29 @@ This attribute is set to<var>null</var> if there is no parent directory. This al
  1.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // list directory contents
- dir.listFiles(onsuccess, onerror);
-
- function onsuccess(files) {
-   for (var i = 0; i &lt; files.length; i++) {
-     // prints the file parent, should contain the
-     // same value for all the files in the loop
-     console.log("All the files should have the same parent " +
-                 files[i].parent);
-   }
- }
-
- function onerror(error) {
-   console.log("The error " + error.message +
-               " occurred when listing the files in the selected folder");
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* List directory contents */
+dir.listFiles(onsuccess, onerror);
+
+function onsuccess(files)
+{
+&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; files.length; i++)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* 
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;   Prints the file parent, must contain the
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;   same value for all the files in the loop
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("All the files should have the same parent " +
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;files[i].parent);
+&nbsp;&nbsp;&nbsp;}
+}
+
+function onerror(error)
+{
+&nbsp;&nbsp;&nbsp;console.log("The error " + error.message +
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" occurred when listing the files in the selected folder");
+}
+</pre>
 </div>
 </li>
 <li class="attribute" id="File::readOnly">
@@ -1063,22 +1086,26 @@ This attribute represents the actual state of a file or directory in the filesys
  1.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // lists directory contents
- dir.listFiles(onsuccess, onerror);
-
- function onsuccess(files) {
-   for (var i = 0; i &lt; files.length; i++) {
-     if (files[i].readOnly)
-       console.log("Cannot write to file " + files[i].name);
-     else
-       console.log("Can write to file " + files[i].name);
-   }
- }
-
- function onerror(error) {
-   console.log("The error " + error.message + " occurred when listing the files in the selected folder");
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Lists directory contents */
+dir.listFiles(onsuccess, onerror);
+
+function onsuccess(files)
+{
+&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; files.length; i++)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (files[i].readOnly)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Cannot write to file " + files[i].name);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;else
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Can write to file " + files[i].name);
+&nbsp;&nbsp;&nbsp;}
+}
+
+function onerror(error)
+{
+&nbsp;&nbsp;&nbsp;console.log("The error " + error.message + " occurred when listing the files in the selected folder");
+}
+</pre>
 </div>
 </li>
 <li class="attribute" id="File::isFile">
@@ -1168,8 +1195,7 @@ timestamp changes when a file is moved.
  1.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> console.log(file.modified); // displays the modification timestamp
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">console.log(file.modified); /* Displays the modification timestamp */</pre>
 </div>
 </li>
 <li class="attribute" id="File::path">
@@ -1203,8 +1229,7 @@ For example, if the root is music, then the path is music. If the root is docume
  1.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> console.log(file.path); // should be 'music/' if the file is music/foo.mp3
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">console.log(file.path); /* Must be 'music/' if the file is music/foo.mp3 */</pre>
 </div>
 </li>
 <li class="attribute" id="File::name">
@@ -1233,9 +1258,10 @@ For the special case of the root itself, the <em>name </em> is an empty string.
  1.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // should be foo.mp3 if the file path is music/foo.mp3
- console.log(file.name);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Must be foo.mp3 if the file path is music/foo.mp3 */
+console.log(file.name);
+</pre>
 </div>
 </li>
 <li class="attribute" id="File::fullPath">
@@ -1266,9 +1292,10 @@ The <em>fullPath </em>is always equal to path + name.
  1.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">  // should be music/track1.mp3 if the file is music/track1.mp3
- console.log(file.fullPath);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Must be music/track1.mp3 if the file is music/track1.mp3 */
+console.log(file.fullPath);
+</pre>
 </div>
 </li>
 <li class="attribute" id="File::fileSize">
@@ -1286,9 +1313,10 @@ If an attempt to read this attribute for a directory is made, <var>undefined</va
  1.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // displays the file size
- console.log(file.fileSize);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Displays the file size */
+console.log(file.fileSize);
+</pre>
 </div>
 </li>
 <li class="attribute" id="File::length">
@@ -1306,9 +1334,10 @@ If an attempt to read this attribute for a file is made, <var>undefined</var> is
  1.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // '3' if the directory contains two files and one sub-directory
- console.log(file.length);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* '3' if the directory contains two files and one sub-directory */
+console.log(file.length);
+</pre>
 </div>
 </li>
 </ul>
@@ -1367,12 +1396,14 @@ These URIs must not be accessible to other widgets, apart from the one invoking
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> tizen.filesystem.resolve('music/ramones/RockawayBeach.mp3', function(file) {
-   var audio = new Audio(file.toURI());
-   audio.play();
-   console.log(file.toURI());
- });
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+tizen.filesystem.resolve('music/ramones/RockawayBeach.mp3', function(file)
+{
+&nbsp;&nbsp;&nbsp;var audio = new Audio(file.toURI());
+&nbsp;&nbsp;&nbsp;audio.play();
+&nbsp;&nbsp;&nbsp;console.log(file.toURI());
+});
+</pre>
 </div>
 </dd>
 <dt class="method" id="File::listFiles">
@@ -1448,23 +1479,25 @@ UnknownError - If any other error occurs.              </li>
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function onsuccess(files) {
-   console.log("There are " + files.length  + " in the selected folder");
- }
-
- function onerror(error) {
-   console.log("The error " + error.message + " occurred when listing the files in the selected folder");
- }
-
- tizen.filesystem.resolve(
-     "documents",
-     function(dir) {
-       dir.listFiles(onsuccess, onerror);
-     }, function(e) {
-       console.log("Error " + e.message);
-     }, "r"
- );
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function onsuccess(files)
+{
+&nbsp;&nbsp;&nbsp;console.log("There are " + files.length  + " in the selected folder");
+}
+
+function onerror(error)
+{
+&nbsp;&nbsp;&nbsp;console.log("The error " + error.message + " occurred when listing the files in the selected folder");
+}
+
+tizen.filesystem.resolve("documents", function(dir)
+{
+&nbsp;&nbsp;&nbsp;dir.listFiles(onsuccess, onerror);
+}, function(e)
+{
+&nbsp;&nbsp;&nbsp;console.log("Error " + e.message);
+}, "r");
+</pre>
 </div>
 </dd>
 <dt class="method" id="File::openStream">
@@ -1537,39 +1570,43 @@ UnknownError - If any other error occurs.              </li>
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var documentsDir;
- function onsuccess(files) {
-   for (var i = 0; i &lt; files.length; i++) {
-     console.log("File Name is " + files[i].name); // displays file name
-   }
-
-   var testFile = documentsDir.createFile("test.txt");
-   if (testFile != null) {
-     testFile.openStream(
-         "w",
-         function(fs) {
-           fs.write("HelloWorld");
-           fs.close();
-         }, function(e) {
-           console.log("Error " + e.message);
-         }, "UTF-8"
-     );
-   }
- }
-
- function onerror(error) {
-   console.log("The error " + error.message + " occurred when listing the files in the selected folder");
- }
-
- tizen.filesystem.resolve(
-     'documents',
-     function(dir) {
-       documentsDir = dir; dir.listFiles(onsuccess,onerror);
-     }, function(e) {
-       console.log("Error" + e.message);
-     }, "rw"
- );
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var documentsDir;
+function onsuccess(files)
+{
+&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; files.length; i++)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("File Name is " + files[i].name); /* Displays file name */
+&nbsp;&nbsp;&nbsp;}
+
+&nbsp;&nbsp;&nbsp;var testFile = documentsDir.createFile("test.txt");
+&nbsp;&nbsp;&nbsp;if (testFile != null)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;testFile.openStream("w", function(fs)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;fs.write("HelloWorld");
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;fs.close();
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}, function(e)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Error " + e.message);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}, "UTF-8");
+&nbsp;&nbsp;&nbsp;}
+}
+
+function onerror(error)
+{
+&nbsp;&nbsp;&nbsp;console.log("The error " + error.message + " occurred when listing the files in the selected folder");
+}
+
+tizen.filesystem.resolve('documents', function(dir)
+{
+&nbsp;&nbsp;&nbsp;documentsDir = dir;
+&nbsp;&nbsp;&nbsp;dir.listFiles(onsuccess, onerror);
+}, function(e)
+{
+&nbsp;&nbsp;&nbsp;console.log("Error" + e.message);
+}, "rw");
+</pre>
 </div>
 </dd>
 <dt class="method" id="File::readAsText">
@@ -1639,35 +1676,40 @@ UnknownError - If any other error occurs.              </li>
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function onsuccess(files) {
-   for (var i = 0; i &lt; files.length; i++) {
-     console.log("File Name is " + files[i].name); // displays file name
-     if (files[i].isDirectory == false)
-       files[i].readAsText(
-           function(str) {
-             console.log("The file content " + str);
-           }, function(e) {
-             console.log("Error " + e.message);
-           }, "UTF-8"
-       );
-   }
- }
-
- function onerror(error) {
-   console.log("The error " + error.message + " occurred when listing the files in the selected folder");
- }
-
- var documentsDir;
- tizen.filesystem.resolve(
-     'documents',
-     function(dir) {
-       documentsDir = dir;
-       dir.listFiles(onsuccess,onerror);
-     }, function(e) {
-       console.log("Error" + e.message);
-     }, "rw"
- );
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function onsuccess(files)
+{
+&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; files.length; i++)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("File Name is " + files[i].name); /* Displays file name */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (files[i].isDirectory == false)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;files[i].readAsText(function(str)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("The file content " + str);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}, function(e)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Error " + e.message);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}, "UTF-8");
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;}
+}
+
+function onerror(error)
+{
+&nbsp;&nbsp;&nbsp;console.log("The error " + error.message + " occurred when listing the files in the selected folder");
+}
+
+var documentsDir;
+tizen.filesystem.resolve('documents', function(dir)
+{
+&nbsp;&nbsp;&nbsp;documentsDir = dir;
+&nbsp;&nbsp;&nbsp;dir.listFiles(onsuccess, onerror);
+}, function(e)
+{
+&nbsp;&nbsp;&nbsp;console.log("Error" + e.message);
+}, "rw");
+</pre>
 </div>
 </dd>
 <dt class="method" id="File::copyTo">
@@ -1754,33 +1796,36 @@ UnknownError - If any other error occurs.              </li>
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var documentsDir;
- function onsuccess(files) {
-   for (var i = 0; i &lt; files.length; i++) {
-     if (files[i].isDirectory == false) {
-       documentsDir.copyTo(files[i].fullPath,
-                           "images/backup/" + files[i].name,
-                           false,
-                           function() {console.log("file copied");});
-     }
-   }
- }
-
- function onerror(error) {
-   console.log("The error " + error.message +
-               " occurred when listing the files in the selected folder");
- }
-
- tizen.filesystem.resolve(
-     'documents',
-     function(dir) {
-       documentsDir = dir;
-       dir.listFiles(onsuccess, onerror);
-     }, function(e) {
-       console.log("Error" + e.message);
-     }, "rw"
- );
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var documentsDir;
+function onsuccess(files)
+{
+&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; files.length; i++)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (files[i].isDirectory == false)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;documentsDir.copyTo(files[i].fullPath,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"images/backup/" + files[i].name, false,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;function() {console.log("file copied");});
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;}
+}
+
+function onerror(error)
+{
+&nbsp;&nbsp;&nbsp;console.log("The error " + error.message +
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" occurred when listing the files in the selected folder");
+}
+
+tizen.filesystem.resolve('documents', function(dir)
+{
+&nbsp;&nbsp;&nbsp;documentsDir = dir;
+&nbsp;&nbsp;&nbsp;dir.listFiles(onsuccess, onerror);
+}, function(e)
+{
+&nbsp;&nbsp;&nbsp;console.log("Error" + e.message);
+}, "rw");
+</pre>
 </div>
 </dd>
 <dt class="method" id="File::moveTo">
@@ -1867,33 +1912,36 @@ UnknownError - If any other error occurs.              </li>
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var documentsDir;
- function onsuccess(files) {
-   for (var i = 0; i &lt; files.length; i++) {
-     if (files[i].isDirectory == false) {
-       documentsDir.moveTo(files[i].fullPath,
-                           "images/newFolder/" + files[i].name,
-                           false,
-                           function() {console.log("file moved");});
-     }
-   }
- }
-
- function onerror(error) {
-   console.log("The error " + error.message +
-               " occurred during listing the files in the selected folder");
- }
-
- tizen.filesystem.resolve(
-     'documents',
-     function(dir) {
-       documentsDir = dir;
-       dir.listFiles(onsuccess, onerror);
-     }, function(e) {
-       console.log("Error" + e.message);
-     }, "rw"
- );
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var documentsDir;
+function onsuccess(files)
+{
+&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; files.length; i++)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (files[i].isDirectory == false)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;documentsDir.moveTo(files[i].fullPath,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"images/newFolder/" + files[i].name, false,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;function() {console.log("file moved");});
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;}
+}
+
+function onerror(error)
+{
+&nbsp;&nbsp;&nbsp;console.log("The error " + error.message +
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" occurred during listing the files in the selected folder");
+}
+
+tizen.filesystem.resolve('documents', function(dir)
+{
+&nbsp;&nbsp;&nbsp;documentsDir = dir;
+&nbsp;&nbsp;&nbsp;dir.listFiles(onsuccess, onerror);
+}, function(e)
+{
+&nbsp;&nbsp;&nbsp;console.log("Error" + e.message);
+}, "rw");
+</pre>
 </div>
 </dd>
 <dt class="method" id="File::createDirectory">
@@ -1970,10 +2018,11 @@ The new <em>File </em>object has "rw" access rights, as it inherits this from th
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var dir; //Directory object obtained from filesystem API
- var newDir = dir.createDirectory("newDir");
- var anotherNewDir = dir.createDirectory("newDir1/subNewDir1");
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var dir; /* Directory object obtained from filesystem API */
+var newDir = dir.createDirectory("newDir");
+var anotherNewDir = dir.createDirectory("newDir1/subNewDir1");
+</pre>
 </div>
 </dd>
 <dt class="method" id="File::createFile">
@@ -2045,8 +2094,7 @@ called.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var newFile = dir.createFile("newFilePath");
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">var newFile = dir.createFile("newFilePath");</pre>
 </div>
 </dd>
 <dt class="method" id="File::resolve">
@@ -2117,15 +2165,20 @@ The new <em>File </em>object inherits its access rights from the <em>File </em>o
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var file;
- // Resolves helloWorld.doc file that is located in the
- // documents root location
- tizen.filesystem.resolve(
-   'documents',
-   function(dir) { file = dir.resolve("helloWorld.doc");},
-   function(e) { console.log("Error" + e.message);},
-   "rw");
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var file;
+/*
+   Resolves helloWorld.doc file that is located in the
+   documents root location
+*/
+tizen.filesystem.resolve('documents', function(dir)
+{
+&nbsp;&nbsp;&nbsp;file = dir.resolve("helloWorld.doc");
+}, function(e)
+{
+&nbsp;&nbsp;&nbsp;console.log("Error" + e.message);
+}, "rw");
+</pre>
 </div>
 </dd>
 <dt class="method" id="File::deleteDirectory">
@@ -2208,36 +2261,39 @@ all data in all subdirectories and so needs to be used with caution.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var documentsDir;
- function onsuccess(files) {
-   for (var i = 0; i &lt; files.length; i++) {
-     if (files[i].isDirectory) {
-       documentsDir.deleteDirectory(
-           files[i].fullPath,
-           false,
-           function() {
-             console.log("Directory Deleted");
-           }, function(e) {
-             console.log("Error" + e.message);
-           });
-     }
-   }
- }
-
- function onerror(error) {
-   console.log("The error " + error.message + " occurred when listing the files in the selected folder");
- }
-
- tizen.filesystem.resolve(
-     'documents',
-     function(dir) {
-       documentsDir = dir;
-       dir.listFiles(onsuccess,onerror);
-     }, function(e) {
-       console.log("Error" + e.message);
-     }, "rw"
- );
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var documentsDir;
+function onsuccess(files)
+{
+&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; files.length; i++)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (files[i].isDirectory)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;documentsDir.deleteDirectory(files[i].fullPath, false, function()
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Directory Deleted");
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}, function(e)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Error" + e.message);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;});
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;}
+}
+
+function onerror(error)
+{
+&nbsp;&nbsp;&nbsp;console.log("The error " + error.message + " occurred when listing the files in the selected folder");
+}
+
+tizen.filesystem.resolve('documents', function(dir)
+{
+&nbsp;&nbsp;&nbsp;documentsDir = dir;
+&nbsp;&nbsp;&nbsp;dir.listFiles(onsuccess, onerror);
+}, function(e)
+{
+&nbsp;&nbsp;&nbsp;console.log("Error" + e.message);
+}, "rw");
+</pre>
 </div>
 </dd>
 <dt class="method" id="File::deleteFile">
@@ -2309,35 +2365,39 @@ UnknownError - If any other error occurs.              </li>
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function onsuccess(files) {
-   for (var i = 0; i &lt; files.length; i++) {
-     if (!files[i].isDirectory) {
-       documentsDir.deleteFile(
-           files[i].fullPath,
-           function() {
-             console.log("File Deleted");
-           }, function(e) {
-             console.log("Error" + e.message);
-           });
-     }
-   }
- }
-
- function onerror(error) {
-   console.log("The error " + error.message + " occurred when listing the files in the selected folder");
- }
-
- var documentsDir;
- tizen.filesystem.resolve(
-   'documents',
-   function(dir) {
-     documentsDir = dir;
-     dir.listFiles(onsuccess,onerror);
-   }, function(e) {
-     console.log("Error" + e.message);
-   }, "rw"
- );
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function onsuccess(files)
+{
+&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; files.length; i++)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (!files[i].isDirectory)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;documentsDir.deleteFile(files[i].fullPath, function()
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("File Deleted");
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}, function(e)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Error" + e.message);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;});
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;}
+}
+
+function onerror(error)
+{
+&nbsp;&nbsp;&nbsp;console.log("The error " + error.message + " occurred when listing the files in the selected folder");
+}
+
+var documentsDir;
+tizen.filesystem.resolve('documents', function(dir)
+{
+&nbsp;&nbsp;&nbsp;documentsDir = dir;
+&nbsp;&nbsp;&nbsp;dir.listFiles(onsuccess,onerror);
+}, function(e)
+{
+&nbsp;&nbsp;&nbsp;console.log("Error" + e.message);
+}, "rw");
+</pre>
 </div>
 </dd>
 </dl>
@@ -2528,10 +2588,12 @@ If set to <var>false</var>, this attribute indicates that the file pointer is no
  1.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> if (stream.eof) {
-   // file has been read completely
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+if (stream.eof)
+{
+&nbsp;&nbsp;&nbsp;/* File has been read completely */
+}
+</pre>
 </div>
 </li>
 <li class="attribute" id="FileStream::position">
@@ -2548,11 +2610,14 @@ The stream position is an offset of bytes from the start of the file stream. Whe
  1.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> console.log(stream.position); // displays current stream position
- // alters current stream position to the begin of the file,
- // like seek() in C
- stream.position = 0;
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+console.log(stream.position); /* Displays current stream position */
+/*
+   Alters current stream position to the begin of the file,
+   like seek() in C
+*/
+stream.position = 0;
+</pre>
 </div>
 </li>
 <li class="attribute" id="FileStream::bytesAvailable">
@@ -2574,8 +2639,8 @@ It corresponds to the number of bytes available after the file pointer denoted b
  1.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> console.log(stream.bytesAvailable); // displays the available bytes to be read
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+console.log(stream.bytesAvailable); /* Displays the available bytes to be read */</pre>
 </div>
 </li>
 </ul>
@@ -2611,8 +2676,9 @@ Note that pending writes might not succeed.
       http://tizen.org/privilege/filesystem.read
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> stream.close(); // closes this stream, no subsequent access to stream allowed
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+stream.close(); /* Closes this stream, no subsequent access to stream allowed */
+</pre>
 </div>
 </dd>
 <dt class="method" id="FileStream::read">
@@ -2669,9 +2735,10 @@ The resulting string length might be shorter than <em>charCount </em>if EOF is <
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var text = stream.read(file.fileSize);
- stream.close();
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var text = stream.read(file.fileSize);
+stream.close();
+</pre>
 </div>
 </dd>
 <dt class="method" id="FileStream::readBytes">
@@ -2727,12 +2794,14 @@ The resulting string length might be shorter than <em>charCount </em>if EOF is <
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // reads up to 256 bytes from the stream
- var raw = stream.readBytes(256);
- for (var i = 0; i &lt; raw.length; i++) {
-   // raw[i] contains the i-th byte of the current data chunk
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Reads up to 256 bytes from the stream */
+var raw = stream.readBytes(256);
+for (var i = 0; i &lt; raw.length; i++)
+{
+&nbsp;&nbsp;&nbsp;/* raw[i] contains the i-th byte of the current data chunk */
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="FileStream::readBase64">
@@ -2768,9 +2837,10 @@ The resulting string length might be shorter than <em>charCount </em>if EOF is <
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // reads up to 256 bytes from the stream
- var base64 = stream.readBase64(256);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Reads up to 256 bytes from the stream */
+var base64 = stream.readBase64(256);
+</pre>
 </div>
 </dd>
 <dt class="method" id="FileStream::write">
@@ -2819,9 +2889,10 @@ The resulting string length might be shorter than <em>charCount </em>if EOF is <
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var text = "Hello world";
- stream.write(text);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var text = "Hello world";
+stream.write(text);
+</pre>
 </div>
 </dd>
 <dt class="method" id="FileStream::writeBytes">
@@ -2871,10 +2942,11 @@ is not compatible with the expected type for that parameter.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var bytes = in.readBytes(256);
- // writes the bytes read from in to out
- out.writeBytes(bytes);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var bytes = in.readBytes(256);
+/* Writes the bytes read from in to out */
+out.writeBytes(bytes);
+</pre>
 </div>
 </dd>
 <dt class="method" id="FileStream::writeBase64">
@@ -2924,10 +2996,11 @@ is not compatible with the expected type for that parameter.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var base64 = in.readBase64(256);
- // writes the base64 data read from in to out
- out.writeBase64(base64);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var base64 = in.readBase64(256);
+/* Writes the base64 data read from in to out */
+out.writeBase64(base64);
+</pre>
 </div>
 </dd>
 </dl>
index 9982659..bb5cc8d 100644 (file)
@@ -279,17 +279,19 @@ UNKNOWN - Sleep status could not be determined            </li>
           </ul>
          </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function onchangedCB(sleepInfo) {
-     console.log("Sleep status : " + sleepInfo.status);
-     console.log("Timestamp : " + sleepInfo.timestamp);
- }
-
- tizen.humanactivitymonitor.start("SLEEP_MONITOR", onchangedCB);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function onchangedCB(sleepInfo)
+{
+&nbsp;&nbsp;&nbsp;console.log("Sleep status: " + sleepInfo.status);
+&nbsp;&nbsp;&nbsp;console.log("Timestamp: " + sleepInfo.timestamp);
+}
+
+tizen.humanactivitymonitor.start("SLEEP_MONITOR", onchangedCB);
+</pre>
 </div>
 <div class="output">
-<span class="title"><p>Output example:</p></span><pre> Sleep status : ASLEEP
- Timestamp : 1456735296123
+<span class="title"><p>Output example:</p></span><pre> Sleep status: ASLEEP
+ Timestamp: 1456735296123
  </pre>
 </div>
 </div>
@@ -415,28 +417,32 @@ The <em>ErrorCallback</em> method is launched with these error types:
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function onsuccessCB(pedometerInfo) {
-     console.log("Step status : " + pedometerInfo.stepStatus);
-     console.log("Cumulative total step count : " + pedometerInfo.cumulativeTotalStepCount);
- }
-
- function onerrorCB(error) {
-     console.log("Error occurs. name:"+error.name + ", message: "+error.message);
- }
-
- function onchangedCB(pedometerdata) {
-     console.log("From now on, you will be notified when the pedometer data changes.");
-     // To get the current data information
-     tizen.humanactivitymonitor.getHumanActivityData("PEDOMETER", onsuccessCB, onerrorCB);
- }
-
- tizen.humanactivitymonitor.start("PEDOMETER", onchangedCB);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function onsuccessCB(pedometerInfo)
+{
+&nbsp;&nbsp;&nbsp;console.log("Step status: " + pedometerInfo.stepStatus);
+&nbsp;&nbsp;&nbsp;console.log("Cumulative total step count: " + pedometerInfo.cumulativeTotalStepCount);
+}
+
+function onerrorCB(error)
+{
+&nbsp;&nbsp;&nbsp;console.log("Error occurs. name:" + error.name + ", message: " + error.message);
+}
+
+function onchangedCB(pedometerdata)
+{
+&nbsp;&nbsp;&nbsp;console.log("From now on, you will be notified when the pedometer data changes.");
+&nbsp;&nbsp;&nbsp;/* To get the current data information */
+&nbsp;&nbsp;&nbsp;tizen.humanactivitymonitor.getHumanActivityData("PEDOMETER", onsuccessCB, onerrorCB);
+}
+
+tizen.humanactivitymonitor.start("PEDOMETER", onchangedCB);
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre> From now on, you will be notified when the pedometer data changes.
- Step status : WALKING
- Cumulative total step count : 100
+ Step status: WALKING
+ Cumulative total step count: 100
  </pre>
 </div>
 </dd>
@@ -530,38 +536,47 @@ For other types, only <b>'http://tizen.org/privilege/healthinfo'</b> should be d
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function onchangedCB(pedometerInfo) {
-     console.log("Step status : " + pedometerInfo.stepStatus);
-     console.log("Cumulative total step count : " + pedometerInfo.cumulativeTotalStepCount);
- }
-
- tizen.humanactivitymonitor.start("PEDOMETER", onchangedCB);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function onchangedCB(pedometerInfo)
+{
+&nbsp;&nbsp;&nbsp;console.log("Step status: " + pedometerInfo.stepStatus);
+&nbsp;&nbsp;&nbsp;console.log("Cumulative total step count: " + pedometerInfo.cumulativeTotalStepCount);
+}
+
+tizen.humanactivitymonitor.start("PEDOMETER", onchangedCB);
+</pre>
 </div>
 <div class="output">
-<span class="title"><p>Output example:</p></span><pre> Step status : WALKING
- Cumulative total step count : 100
+<span class="title"><p>Output example:</p></span><pre> Step status: WALKING
+ Cumulative total step count: 100
  </pre>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function onchangedCB(info) {
-     var gpsInfo = info.gpsInfo;
-     for (var index = 0; index &lt; gpsInfo.length; index++) {
-         console.log("latitude: " + gpsInfo[index].latitude);
-         console.log("longitude: " + gpsInfo[index].longitude);
-     }
- }
-
- function onerrorCB(error) {
-     console.log("Error occurred. Name:" + error.name + ", message: " + error.message);
- }
-
- try {
-     tizen.humanactivitymonitor.start("GPS", onchangedCB, onerrorCB, {callbackInterval: 150000, sampleInterval: 1000});
- } catch(err) {
-     console.log(err.name + ": " + err.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function onchangedCB(info)
+{
+&nbsp;&nbsp;&nbsp;var gpsInfo = info.gpsInfo;
+&nbsp;&nbsp;&nbsp;for (var index = 0; index &lt; gpsInfo.length; index++)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("latitude: " + gpsInfo[index].latitude);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("longitude: " + gpsInfo[index].longitude);
+&nbsp;&nbsp;&nbsp;}
+}
+
+function onerrorCB(error)
+{
+&nbsp;&nbsp;&nbsp;console.log("Error occurred. Name:" + error.name + ", message: " + error.message);
+}
+
+try
+{
+&nbsp;&nbsp;&nbsp;tizen.humanactivitymonitor.start("GPS", onchangedCB, onerrorCB, {callbackInterval: 150000, sampleInterval: 1000});
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="HumanActivityMonitorManager::stop">
@@ -624,8 +639,9 @@ For other types, only <b>'http://tizen.org/privilege/healthinfo'</b> should be d
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> tizen.humanactivitymonitor.stop("PEDOMETER");
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+tizen.humanactivitymonitor.stop("PEDOMETER");
+</pre>
 </div>
 </dd>
 <dt class="method" id="HumanActivityMonitorManager::setAccumulativePedometerListener">
@@ -682,17 +698,19 @@ Note that the setAccumulativePedometerListener() method does not need to call th
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function onchangedCB(pedometerInfo) {
-        console.log("Step status : " + pedometerInfo.stepStatus);
-        console.log("Accumulative total step count : " + pedometerInfo.accumulativeTotalStepCount);
- }
-
- tizen.humanactivitymonitor.setAccumulativePedometerListener(onchangedCB);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function onchangedCB(pedometerInfo)
+{
+&nbsp;&nbsp;&nbsp;console.log("Step status: " + pedometerInfo.stepStatus);
+&nbsp;&nbsp;&nbsp;console.log("Accumulative total step count: " + pedometerInfo.accumulativeTotalStepCount);
+}
+
+tizen.humanactivitymonitor.setAccumulativePedometerListener(onchangedCB);
+</pre>
 </div>
 <div class="output">
-<span class="title"><p>Output example:</p></span><pre> Step status : WALKING
- Accumulative total step count : 100
+<span class="title"><p>Output example:</p></span><pre> Step status: WALKING
+ Accumulative total step count: 100
  </pre>
 </div>
 </dd>
@@ -730,8 +748,8 @@ Note that the setAccumulativePedometerListener() method does not need to call th
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> tizen.humanactivitymonitor.unsetAccumulativePedometerListener();
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">tizen.humanactivitymonitor.unsetAccumulativePedometerListener();
+</pre>
 </div>
 </dd>
 <dt class="method" id="HumanActivityMonitorManager::addActivityRecognitionListener">
@@ -790,22 +808,28 @@ The <em>ErrorCallback</em> method is launched with this error type:
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function errorCallback(error) {
-     console.log (error.name +': ' + error.message);
- }
-
- function listener(info) {
-     console.log('type: '      + info.type);
-     console.log('timestamp: ' + info.timestamp);
-     console.log('accuracy: '  + info.accuracy);
- }
-
- try {
-     var listenerId = tizen.humanactivitymonitor.addActivityRecognitionListener("WALKING", listener, errorCallback);
- } catch (error) {
-     console.log (error.name +': ' + error.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function errorCallback(error)
+{
+&nbsp;&nbsp;&nbsp;console.log(error.name + ': ' + error.message);
+}
+
+function listener(info)
+{
+&nbsp;&nbsp;&nbsp;console.log('type: ' + info.type);
+&nbsp;&nbsp;&nbsp;console.log('timestamp: ' + info.timestamp);
+&nbsp;&nbsp;&nbsp;console.log('accuracy: ' + info.accuracy);
+}
+
+try
+{
+&nbsp;&nbsp;&nbsp;var listenerId = tizen.humanactivitymonitor.addActivityRecognitionListener("WALKING", listener, errorCallback);
+}
+catch (error)
+{
+&nbsp;&nbsp;&nbsp;console.log(error.name + ': ' + error.message);
+}
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre> type: WALKING
@@ -850,26 +874,32 @@ The <em>ErrorCallback</em> method is launched with this error type:
         </ul>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var listenerId;
-
- function errorCallback(error) {
-     console.log (error.name +': ' + error.message);
- }
-
- function listener(info) {
-     console.log('type: '      + info.type);
-     console.log('timestamp: ' + info.timestamp);
-     console.log('accuracy: '  + info.accuracy);
-
-     tizen.humanactivitymonitor.removeActivityRecognitionListener(listenerId, errorCallback);
- }
-
- try {
-     listenerId = tizen.humanactivitymonitor.addActivityRecognitionListener("WALKING", listener, errorCallback);
- } catch (error) {
-     console.log (error.name +': ' + error.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var listenerId;
+
+function errorCallback(error)
+{
+&nbsp;&nbsp;&nbsp;console.log(error.name + ': ' + error.message);
+}
+
+function listener(info)
+{
+&nbsp;&nbsp;&nbsp;console.log('type: ' + info.type);
+&nbsp;&nbsp;&nbsp;console.log('timestamp: ' + info.timestamp);
+&nbsp;&nbsp;&nbsp;console.log('accuracy: ' + info.accuracy);
+
+&nbsp;&nbsp;&nbsp;tizen.humanactivitymonitor.removeActivityRecognitionListener(listenerId, errorCallback);
+}
+
+try
+{
+&nbsp;&nbsp;&nbsp;listenerId = tizen.humanactivitymonitor.addActivityRecognitionListener("WALKING", listener, errorCallback);
+}
+catch (error)
+{
+&nbsp;&nbsp;&nbsp;console.log(error.name + ': ' + error.message);
+}
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre> type: WALKING
index c48d429..63c8151 100644 (file)
@@ -215,22 +215,26 @@ Mandatory keys will not be retrieved by this method.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var i, keyCode = {}, supportedKeys;
- supportedKeys = tizen.inputdevice.getSupportedKeys();
- for (i = 0; i &lt; supportedKeys.length; i++) {
-     keyCode[supportedKeys[i].name] = supportedKeys[i].code;
- }
- if(keyCode.hasOwnProperty("VolumeUp")) {
-     tizen.inputdevice.registerKey("VolumeUp");
- }
- window.addEventListener("keydown", function(keyEvent) {
-     // identify the key by the numeric code from the keyEvent
-     if(keyEvent.keyCode === keyCode.VolumeUp) {
-         console.log("The VOLUME UP was pressed");
-     }
- });
-
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var i, keyCode = {}, supportedKeys;
+supportedKeys = tizen.inputdevice.getSupportedKeys();
+for (i = 0; i &lt; supportedKeys.length; i++)
+{
+&nbsp;&nbsp;&nbsp;keyCode[supportedKeys[i].name] = supportedKeys[i].code;
+}
+if (keyCode.hasOwnProperty("VolumeUp"))
+{
+&nbsp;&nbsp;&nbsp;tizen.inputdevice.registerKey("VolumeUp");
+}
+window.addEventListener("keydown", function(keyEvent)
+{
+&nbsp;&nbsp;&nbsp;/* Identify the key by the numeric code from the keyEvent */
+&nbsp;&nbsp;&nbsp;if (keyEvent.keyCode === keyCode.VolumeUp)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("The VOLUME UP was pressed");
+&nbsp;&nbsp;&nbsp;}
+});
+</pre>
 </div>
 </dd>
 <dt class="method" id="InputDeviceManager::getKey">
@@ -315,15 +319,20 @@ An application can not register the mandatory keys (ArrowLeft, ArrowRight, Arrow
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var keys = ["VolumeUp", "VolumeDown"], i;
- for (i = 0; i &lt; keys.length; i++) {
-     try {
-         tizen.inputdevice.registerKey(keys[i]);
-     } catch(error) {
-         console.log("failed to register " + keys[i] + ": " + error);
-     }
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var keys = ["VolumeUp", "VolumeDown"], i;
+for (i = 0; i &lt; keys.length; i++)
+{
+&nbsp;&nbsp;&nbsp;try
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tizen.inputdevice.registerKey(keys[i]);
+&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;catch (error)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("failed to register " + keys[i] + ": " + error);
+&nbsp;&nbsp;&nbsp;}
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="InputDeviceManager::unregisterKey">
@@ -361,8 +370,9 @@ An application can not register the mandatory keys (ArrowLeft, ArrowRight, Arrow
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> tizen.inputdevice.unregisterKey("VolumeDown");
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+tizen.inputdevice.unregisterKey("VolumeDown");
+</pre>
 </div>
 </dd>
 <dt class="method" id="InputDeviceManager::registerKeyBatch">
@@ -428,17 +438,20 @@ An application can not register the mandatory keys (ArrowLeft, ArrowRight, Arrow
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function errorCB(err) {
-     console.log( 'The following error occurred: ' +  err.name);
- }
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function errorCB(err)
+{
+&nbsp;&nbsp;&nbsp;console.log('The following error occurred: ' +  err.name);
+}
 
- function successCB() {
-     console.log('Registsered successfully');
- }
+function successCB()
+{
+&nbsp;&nbsp;&nbsp;console.log('Registered successfully');
+}
 
- var keys = ["VolumeUp", "VolumeDown"];
- tizen.inputdevice.registerKeyBatch(keys, successCB, errorCB);
- </pre>
+var keys = ["VolumeUp", "VolumeDown"];
+tizen.inputdevice.registerKeyBatch(keys, successCB, errorCB);
+</pre>
 </div>
 </dd>
 <dt class="method" id="InputDeviceManager::unregisterKeyBatch">
@@ -498,16 +511,20 @@ UnknownError: In case of any other error              </li>
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function errorCB(err) {
-     console.log( 'The following error occurred: ' +  err.name);
- }
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function errorCB(err)
+{
+&nbsp;&nbsp;&nbsp;console.log('The following error occurred: ' +  err.name);
+}
+
+function successCB()
+{
+&nbsp;&nbsp;&nbsp;console.log('Unregistsered successfully');
+}
 
- function successCB() {
-     console.log('Unregistsered successfully');
- }
- var keys = ["VolumeUp", "VolumeDown"];
- tizen.inputdevice.unregisterKeyBatch(keys, successCB, errorCB);
- </pre>
+var keys = ["VolumeUp", "VolumeDown"];
+tizen.inputdevice.unregisterKeyBatch(keys, successCB, errorCB);
+</pre>
 </div>
 </dd>
 </dl>
index b8931f0..c08e2ef 100644 (file)
@@ -214,14 +214,16 @@ UnknownError - If the method cannot be completed because of an unknown error.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var data_name = "data1", raw_data = "my data";
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var data_name = "data1", raw_data = "my data";
 
- function onSave() {
-     console.log("Successfully saved data");
- }
+function onSave()
+{
+&nbsp;&nbsp;&nbsp;console.log("Successfully saved data");
+}
 
- tizen.keymanager.saveData(data_name, raw_data, null, onSave);
- </pre>
+tizen.keymanager.saveData(data_name, raw_data, null, onSave);
+</pre>
 </div>
 </dd>
 <dt class="method" id="KeyManager::removeData">
@@ -270,31 +272,36 @@ If an application calls this method to remove data which it saved into the KeyMa
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var data_name = "data1", raw_data = "my data";
-
- function onSave() {
-
-     // do something
-
-     // Dictionary does not require package ID because the
-     // application which is calling removeData() saved "data1"
-     tizen.keymanager.removeData({
-         "name": data_name
-     });
- }
-
- tizen.keymanager.saveData(data_name, raw_data, null, onSave);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var data_name = "data1", raw_data = "my data";
+
+function onSave()
+{
+&nbsp;&nbsp;&nbsp;/* Do something */
+
+&nbsp;&nbsp;&nbsp;/*
+&nbsp;&nbsp;&nbsp;   Dictionary does not require package ID because the
+&nbsp;&nbsp;&nbsp;   application which is calling removeData() saved "data1"
+&nbsp;&nbsp;&nbsp;*/
+&nbsp;&nbsp;&nbsp;tizen.keymanager.removeData({"name": data_name});
+}
+
+tizen.keymanager.saveData(data_name, raw_data, null, onSave);
+</pre>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var aliases = tizen.keymanager.getDataAliasList();
-
- if (aliases.length != 0) {
-     // Assuming the application calling removeData() has permission
-     // to remove aliases[0]
-     var app_data = tizen.keymanager.removeData(aliases[0]);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var aliases = tizen.keymanager.getDataAliasList();
+
+if (aliases.length != 0)
+{
+&nbsp;&nbsp;&nbsp;/*
+&nbsp;&nbsp;&nbsp;   Assuming the application calling removeData() has permission
+&nbsp;&nbsp;&nbsp;   to remove aliases[0]
+&nbsp;&nbsp;&nbsp;*/
+&nbsp;&nbsp;&nbsp;var app_data = tizen.keymanager.removeData(aliases[0]);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="KeyManager::getData">
@@ -354,30 +361,36 @@ If an application calls this method to retrieve raw data which it saved into the
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var data_name = "data1", raw_data = "my data";
-
- function onSave() {
-     // Dictionary does not require package ID because the
-     // application which is calling getData() saved "data1"
-     var app_data = tizen.keymanager.getData({
-         "name": data_name
-     });
-     console.log("App data: " + app_data + " was retrieved");
- }
-
- tizen.keymanager.saveData(data_name, raw_data, null, onSave);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var data_name = "data1", raw_data = "my data";
+
+function onSave()
+{
+&nbsp;&nbsp;&nbsp;/*
+&nbsp;&nbsp;&nbsp;   Dictionary does not require package ID because the
+&nbsp;&nbsp;&nbsp;   application which is calling getData() saved "data1"
+&nbsp;&nbsp;&nbsp;*/
+&nbsp;&nbsp;&nbsp;var app_data = tizen.keymanager.getData({"name": data_name});
+&nbsp;&nbsp;&nbsp;console.log("App data: " + app_data + " was retrieved");
+}
+
+tizen.keymanager.saveData(data_name, raw_data, null, onSave);
+</pre>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var aliases = tizen.keymanager.getDataAliasList();
-
- if (aliases.length != 0) {
-     // Assuming the application calling getData() has permission to read
-     // aliases[0]
-     var app_data = tizen.keymanager.getData(aliases[0]);
-     console.log("App data: " + app_data + " was retrieved");
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var aliases = tizen.keymanager.getDataAliasList();
+
+if (aliases.length != 0)
+{
+&nbsp;&nbsp;&nbsp;/*
+&nbsp;&nbsp;&nbsp;   Assuming the application calling getData() has permission to read
+&nbsp;&nbsp;&nbsp;   aliases[0]
+&nbsp;&nbsp;&nbsp;*/
+&nbsp;&nbsp;&nbsp;var app_data = tizen.keymanager.getData(aliases[0]);
+&nbsp;&nbsp;&nbsp;console.log("App data: " + app_data + " was retrieved");
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="KeyManager::getDataAliasList">
@@ -405,14 +418,16 @@ If an application calls this method to retrieve raw data which it saved into the
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var aliases = tizen.keymanager.getDataAliasList();
-
- console.log("aliases: ");
- for (var i = 0; i &lt; aliases.length; i++) {
-     console.log("Package ID: " + aliases[i].packageId + ", Name: "
-             + aliases[i].name);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var aliases = tizen.keymanager.getDataAliasList();
+
+console.log("aliases: ");
+for (var i = 0; i &lt; aliases.length; i++)
+{
+&nbsp;&nbsp;&nbsp;console.log("Package ID: " + aliases[i].packageId + ", Name: "
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;+ aliases[i].name);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="KeyManager::setPermission">
@@ -475,41 +490,53 @@ UnknownError - If the method cannot be completed because of an unknown error.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var data_name = "data1", raw_data = "my data";
-
- function onPermissionSet() {
-     console.log("Successfully set permssion");
- }
-
- function onSave() {
-     // Dictionary does not require package ID because an
-     // application can only set permission for data which it saved
-     tizen.keymanager.setPermission({
-         "name": data_name
-     }, "9PdoiICQ4c", "READ_REMOVE", onPermissionSet);
- }
-
- tizen.keymanager.saveData(data_name, raw_data, null, onSave);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var data_name = "data1", raw_data = "my data";
+
+function onPermissionSet()
+{
+&nbsp;&nbsp;&nbsp;console.log("Successfully set permission");
+}
+
+function onSave()
+{
+&nbsp;&nbsp;&nbsp;/*
+&nbsp;&nbsp;&nbsp;   Dictionary does not require package ID because an
+&nbsp;&nbsp;&nbsp;   application can only set permission for data which it saved
+&nbsp;&nbsp;&nbsp;*/
+&nbsp;&nbsp;&nbsp;tizen.keymanager.setPermission({"name": data_name}, "9PdoiICQ4c", "READ_REMOVE",
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;onPermissionSet);
+}
+
+tizen.keymanager.saveData(data_name, raw_data, null, onSave);
+</pre>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var aliases = tizen.keymanager.getDataAliasList();
-
- function onPermissionSet() {
-     console.log("Successfully set permssion");
- }
-
- if (aliases.length != 0) {
-     // Check that the application calling setPermission() saved aliases[0] into
-     // the KeyManager
-     if (aliases[0].packageId === tizen.package.getPackageInfo().id) {
-         tizen.keymanager.setPermission(aliases[0], "9PdoiICQ4c", "READ_REMOVE",
-                 onPermissionSet);
-     } else {
-         console.log("This application did not save aliases[0] into the KeyManager");
-     }
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var aliases = tizen.keymanager.getDataAliasList();
+
+function onPermissionSet()
+{
+&nbsp;&nbsp;&nbsp;console.log("Successfully set permssion");
+}
+
+if (aliases.length != 0)
+{
+&nbsp;&nbsp;&nbsp;/*
+&nbsp;&nbsp;&nbsp;   Check that the application calling setPermission() saved aliases[0] into
+&nbsp;&nbsp;&nbsp;   the KeyManager
+&nbsp;&nbsp;&nbsp;*/
+&nbsp;&nbsp;&nbsp;if (aliases[0].packageId === tizen.package.getPackageInfo().id)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tizen.keymanager.setPermission(aliases[0], "9PdoiICQ4c", "READ_REMOVE",
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;onPermissionSet);
+&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;else
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("This application did not save aliases[0] into the KeyManager");
+&nbsp;&nbsp;&nbsp;}
+}
+</pre>
 </div>
 </dd>
 </dl>
index a252609..c5764e7 100644 (file)
@@ -279,12 +279,16 @@ There is a <em>tizen.mediacontroller</em> object that allows access to the Media
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> try {
-     var mcClient = tizen.mediacontroller.getClient();
- } catch (err) {
-     console.log (err.name +': ' + err.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+try
+{
+&nbsp;&nbsp;&nbsp;var mcClient = tizen.mediacontroller.getClient();
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + ': ' + err.message);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="MediaControllerManager::createServer">
@@ -329,12 +333,16 @@ and is controlled by Client.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> try {
-     var mcServer = tizen.mediacontroller.createServer();
- } catch (err) {
-     console.log (err.name +': ' + err.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+try
+{
+&nbsp;&nbsp;&nbsp;var mcServer = tizen.mediacontroller.createServer();
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + ': ' + err.message);
+}
+</pre>
 </div>
 </dd>
 </dl>
@@ -434,11 +442,12 @@ how to receive playback info changes from server on client side.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var mcServer = tizen.mediacontroller.createServer();
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var mcServer = tizen.mediacontroller.createServer();
 
- mcServer.updatePlaybackState('PLAY');
- console.log('Current playback state is: ' + mcServer.playbackInfo.state);
- </pre>
+mcServer.updatePlaybackState('PLAY');
+console.log('Current playback state is: ' + mcServer.playbackInfo.state);
+</pre>
 </div>
 </dd>
 <dt class="method" id="MediaControllerServer::updatePlaybackPosition">
@@ -476,11 +485,12 @@ how to receive playback info changes from server on client side.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var mcServer = tizen.mediacontroller.createServer();
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var mcServer = tizen.mediacontroller.createServer();
 
- mcServer.updatePlaybackPosition(164);
- console.log('Current playback position is: ' + mcServer.playbackInfo.position);
- </pre>
+mcServer.updatePlaybackPosition(164);
+console.log('Current playback position is: ' + mcServer.playbackInfo.position);
+</pre>
 </div>
 </dd>
 <dt class="method" id="MediaControllerServer::updateShuffleMode">
@@ -513,11 +523,12 @@ how to receive playback info changes from server on client side.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var mcServer = tizen.mediacontroller.createServer();
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var mcServer = tizen.mediacontroller.createServer();
 
- mcServer.updateShuffleMode(true);
- console.log('Current shuffle mode is: ' + mcServer.playbackInfo.shuffleMode);
- </pre>
+mcServer.updateShuffleMode(true);
+console.log('Current shuffle mode is: ' + mcServer.playbackInfo.shuffleMode);
+</pre>
 </div>
 </dd>
 <dt class="method" id="MediaControllerServer::updateRepeatMode">
@@ -550,11 +561,12 @@ how to receive playback info changes from server on client side.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var mcServer = tizen.mediacontroller.createServer();
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var mcServer = tizen.mediacontroller.createServer();
 
- mcServer.updateRepeatMode(true);
- console.log('Current repeat mode is: ' + mcServer.playbackInfo.repeatMode);
- </pre>
+mcServer.updateRepeatMode(true);
+console.log('Current repeat mode is: ' + mcServer.playbackInfo.repeatMode);
+</pre>
 </div>
 </dd>
 <dt class="method" id="MediaControllerServer::updateMetadata">
@@ -592,14 +604,15 @@ how to receive playback info changes from server on client side.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var mcServer = tizen.mediacontroller.createServer();
- var metadata = mcServer.playbackInfo.metadata;
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var mcServer = tizen.mediacontroller.createServer();
+var metadata = mcServer.playbackInfo.metadata;
 
- metadata.artist = 'Artist Name';
- mcServer.updateMetadata(metadata);
+metadata.artist = 'Artist Name';
+mcServer.updateMetadata(metadata);
 
- console.log('Current metadata is: ' + JSON.stringify(mcServer.playbackInfo.metadata));
- </pre>
+console.log('Current metadata is: ' + JSON.stringify(mcServer.playbackInfo.metadata));
+</pre>
 </div>
 </dd>
 <dt class="method" id="MediaControllerServer::addChangeRequestPlaybackInfoListener">
@@ -643,27 +656,33 @@ requests from client.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var watcherId = 0; // watcher identifier
- var mcServer = tizen.mediacontroller.createServer();
-
- var playbackRequestListener = {
-     onplaybackstaterequest: function(state) {
-         console.log('Playback state requested to: ' + state);
-     },
-     onplaybackpositionrequest: function(position) {
-         console.log('Playback position requested to: ' + position);
-     },
-     onshufflemoderequest: function(mode) {
-         console.log('Shuffle mode requested to: ' + mode);
-     },
-     onrepeatmoderequest: function(mode) {
-         console.log('Repeat mode requested to: ' + mode);
-     }
- };
-
- // Registers to receive playback info change requests from client.
- watcherId = mcServer.addChangeRequestPlaybackInfoListener(playbackRequestListener);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var watcherId = 0; /* Watcher identifier */
+var mcServer = tizen.mediacontroller.createServer();
+
+var playbackRequestListener =
+{
+&nbsp;&nbsp;&nbsp;onplaybackstaterequest: function(state)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('Playback state requested to: ' + state);
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;onplaybackpositionrequest: function(position)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('Playback position requested to: ' + position);
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;onshufflemoderequest: function(mode)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('Shuffle mode requested to: ' + mode);
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;onrepeatmoderequest: function(mode)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('Repeat mode requested to: ' + mode);
+&nbsp;&nbsp;&nbsp;}
+};
+
+/* Registers to receive playback info change requests from client */
+watcherId = mcServer.addChangeRequestPlaybackInfoListener(playbackRequestListener);
+</pre>
 </div>
 </dd>
 <dt class="method" id="MediaControllerServer::removeChangeRequestPlaybackInfoListener">
@@ -696,30 +715,36 @@ requests from client.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var watcherId = 0; // watcher identifier
- var mcServer = tizen.mediacontroller.createServer();
-
- var playbackRequestListener = {
-     onplaybackstaterequest: function(state) {
-         console.log('Playback state requested to: ' + state);
-     },
-     onplaybackpositionrequest: function(position) {
-         console.log('Playback position requested to: ' + position);
-     },
-     onshufflemoderequest: function(mode) {
-         console.log('Shuffle mode requested to: ' + mode);
-     },
-     onrepeatmoderequest: function(mode) {
-         console.log('Repeat mode requested to: ' + mode);
-     }
- };
-
- // Registers to receive playback info change requests.
- watcherId = mcServer.addChangeRequestPlaybackInfoListener(playbackRequestListener);
-
- // Cancels the watch operation.
- mcServer.removeChangeRequestPlaybackInfoListener(watcherId);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var watcherId = 0; /* Watcher identifier */
+var mcServer = tizen.mediacontroller.createServer();
+
+var playbackRequestListener =
+{
+&nbsp;&nbsp;&nbsp;onplaybackstaterequest: function(state)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('Playback state requested to: ' + state);
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;onplaybackpositionrequest: function(position)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('Playback position requested to: ' + position);
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;onshufflemoderequest: function(mode)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('Shuffle mode requested to: ' + mode);
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;onrepeatmoderequest: function(mode)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('Repeat mode requested to: ' + mode);
+&nbsp;&nbsp;&nbsp;}
+};
+
+/* Registers to receive playback info change requests */
+watcherId = mcServer.addChangeRequestPlaybackInfoListener(playbackRequestListener);
+
+/* Cancels the watch operation */
+mcServer.removeChangeRequestPlaybackInfoListener(watcherId);
+</pre>
 </div>
 </dd>
 <dt class="method" id="MediaControllerServer::addCommandListener">
@@ -762,23 +787,23 @@ See <em>MediaControllerServerInfo</em> to check how to send custom commands from
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var watcherId = 0; // watcher identifier
- var mcServer = tizen.mediacontroller.createServer();
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var watcherId = 0; /* Watcher identifier */
+var mcServer = tizen.mediacontroller.createServer();
 
- var commandReceiveListener = function(clientName, command, data) {
-     console.log('Command ' + command + ' received from: ' + clientName +
-         ' with data: ' + JSON.stringify(data));
+var commandReceiveListener = function(clientName, command, data)
+{
+&nbsp;&nbsp;&nbsp;console.log('Command ' + command + ' received from: ' + clientName +
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;' with data: ' + JSON.stringify(data));
 
-     var reply = {
-         myReply: 'someValue'
-     };
+&nbsp;&nbsp;&nbsp;var reply = {myReply: 'someValue'};
 
-     return reply;
- };
+&nbsp;&nbsp;&nbsp;return reply;
+};
 
- // Registers to receive custom commands from client.
- watcherId = mcServer.addCommandListener(commandReceiveListener);
- </pre>
+/* Registers to receive custom commands from client */
+watcherId = mcServer.addCommandListener(commandReceiveListener);
+</pre>
 </div>
 </dd>
 <dt class="method" id="MediaControllerServer::removeCommandListener">
@@ -811,26 +836,26 @@ See <em>MediaControllerServerInfo</em> to check how to send custom commands from
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var watcherId = 0; // watcher identifier
- var mcServer = tizen.mediacontroller.createServer();
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var watcherId = 0; /* Watcher identifier */
+var mcServer = tizen.mediacontroller.createServer();
 
- var commandReceiveListener = function(clientName, command, data) {
-     console.log('Command ' + command + ' received from: ' + clientName +
-         ' with data: ' + JSON.stringify(data));
+var commandReceiveListener = function(clientName, command, data)
+{
+&nbsp;&nbsp;&nbsp;console.log('Command ' + command + ' received from: ' + clientName +
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;' with data: ' + JSON.stringify(data));
 
-     var reply = {
-         myReply: 'someValue'
-     };
+&nbsp;&nbsp;&nbsp;var reply = {myReply: 'someValue'};
 
-     return reply;
- };
+&nbsp;&nbsp;&nbsp;return reply;
+};
 
- // Registers to receive custom commands from client.
- watcherId = mcServer.addCommandListener(commandReceiveListener);
+/* Registers to receive custom commands from client */
+watcherId = mcServer.addCommandListener(commandReceiveListener);
 
- // Cancels the watch operation.
- mcServer.removeCommandListener(watcherId);
- </pre>
+/* Cancels the watch operation */
+mcServer.removeCommandListener(watcherId);
+</pre>
 </div>
 </dd>
 </dl>
@@ -922,12 +947,13 @@ Functions include operations to get the latest status of the media controller se
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Access latest server info
- var mcClient = tizen.mediacontroller.getClient();
- var mcServerInfo = mcClient.getLatestServerInfo();
- console.log('Latest server name is: ' + mcServerInfo.name +
-             ', server state: ' + mcServerInfo.name);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Access latest server info */
+var mcClient = tizen.mediacontroller.getClient();
+var mcServerInfo = mcClient.getLatestServerInfo();
+console.log('Latest server name is: ' + mcServerInfo.name +
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;', server state: ' + mcServerInfo.name);
+</pre>
 </div>
 </dd>
 </dl>
@@ -1058,15 +1084,18 @@ Provides methods to send commands to server and listen for server status change.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var mcClient = tizen.mediacontroller.getClient();
- var mcServerInfo = mcClient.getLatestServerInfo();
-
- mcServerInfo.sendPlaybackState('STOP', function() {
-     console.log('Playback has stopped');
- }, function(e) {
-     console.log('Unable to change playback state: ' + e.message);
- });
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var mcClient = tizen.mediacontroller.getClient();
+var mcServerInfo = mcClient.getLatestServerInfo();
+
+mcServerInfo.sendPlaybackState('STOP', function()
+{
+&nbsp;&nbsp;&nbsp;console.log('Playback has stopped');
+}, function(e)
+{
+&nbsp;&nbsp;&nbsp;console.log('Unable to change playback state: ' + e.message);
+});
+</pre>
 </div>
 </dd>
 <dt class="method" id="MediaControllerServerInfo::sendPlaybackPosition">
@@ -1115,15 +1144,18 @@ Provides methods to send commands to server and listen for server status change.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var mcClient = tizen.mediacontroller.getClient();
- var mcServerInfo = mcClient.getLatestServerInfo();
-
- mcServerInfo.sendPlaybackPosition(164, function() {
-     console.log('Playback position changed');
- }, function(e) {
-     console.log('Unable to change playback position: ' + e.message);
- });
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var mcClient = tizen.mediacontroller.getClient();
+var mcServerInfo = mcClient.getLatestServerInfo();
+
+mcServerInfo.sendPlaybackPosition(164, function()
+{
+&nbsp;&nbsp;&nbsp;console.log('Playback position changed');
+}, function(e)
+{
+&nbsp;&nbsp;&nbsp;console.log('Unable to change playback position: ' + e.message);
+});
+</pre>
 </div>
 </dd>
 <dt class="method" id="MediaControllerServerInfo::sendShuffleMode">
@@ -1169,15 +1201,18 @@ Provides methods to send commands to server and listen for server status change.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var mcClient = tizen.mediacontroller.getClient();
- var mcServerInfo = mcClient.getLatestServerInfo();
-
- mcServerInfo.sendShuffleMode(true, function() {
-     console.log('Shuffle mode changed');
- }, function(e) {
-     console.log('Unable to change shuffle mode: ' + e.message);
- });
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var mcClient = tizen.mediacontroller.getClient();
+var mcServerInfo = mcClient.getLatestServerInfo();
+
+mcServerInfo.sendShuffleMode(true, function()
+{
+&nbsp;&nbsp;&nbsp;console.log('Shuffle mode changed');
+}, function(e)
+{
+&nbsp;&nbsp;&nbsp;console.log('Unable to change shuffle mode: ' + e.message);
+});
+</pre>
 </div>
 </dd>
 <dt class="method" id="MediaControllerServerInfo::sendRepeatMode">
@@ -1223,15 +1258,18 @@ Provides methods to send commands to server and listen for server status change.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var mcClient = tizen.mediacontroller.getClient();
- var mcServerInfo = mcClient.getLatestServerInfo();
-
- mcServerInfo.sendRepeatMode(false, function() {
-     console.log('Repeat mode changed');
- }, function(e) {
-     console.log('Unable to change repeat mode: ' + e.message);
- });
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var mcClient = tizen.mediacontroller.getClient();
+var mcServerInfo = mcClient.getLatestServerInfo();
+
+mcServerInfo.sendRepeatMode(false, function()
+{
+&nbsp;&nbsp;&nbsp;console.log('Repeat mode changed');
+}, function(e)
+{
+&nbsp;&nbsp;&nbsp;console.log('Unable to change repeat mode: ' + e.message);
+});
+</pre>
 </div>
 </dd>
 <dt class="method" id="MediaControllerServerInfo::sendCommand">
@@ -1285,18 +1323,20 @@ and respond to custom commands.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var mcClient = tizen.mediacontroller.getClient();
- var mcServerInfo = mcClient.getLatestServerInfo();
-
- var exampleCustomCommandData = {
-     myFilter: 'rock'
- };
- mcServerInfo.sendCommand('myPlaylistFilter', exampleCustomCommandData, function(response) {
-     console.log('Command executed with result: ' + JSON.stringify(response));
- }, function(e) {
-     console.log('Error executing command: ' + e.message);
- });
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var mcClient = tizen.mediacontroller.getClient();
+var mcServerInfo = mcClient.getLatestServerInfo();
+
+var exampleCustomCommandData = {myFilter: 'rock'};
+
+mcServerInfo.sendCommand('myPlaylistFilter', exampleCustomCommandData, function(response)
+{
+&nbsp;&nbsp;&nbsp;console.log('Command executed with result: ' + JSON.stringify(response));
+}, function(e)
+{
+&nbsp;&nbsp;&nbsp;console.log('Error executing command: ' + e.message);
+});
+</pre>
 </div>
 </dd>
 <dt class="method" id="MediaControllerServerInfo::addServerStatusChangeListener">
@@ -1338,15 +1378,17 @@ and respond to custom commands.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var watcherId = 0; // watcher identifier
- var mcClient = tizen.mediacontroller.getClient();
- var mcServerInfo = mcClient.getLatestServerInfo();
-
- // Registers to be notified when server status changes.
- watcherId = mcServerInfo.addServerStatusChangeListener(function(status) {
-     console.log(mcServerInfo.name + ' server status changed to ' + status);
- });
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var watcherId = 0; /* Watcher identifier */
+var mcClient = tizen.mediacontroller.getClient();
+var mcServerInfo = mcClient.getLatestServerInfo();
+
+/* Registers to be notified when server status changes */
+watcherId = mcServerInfo.addServerStatusChangeListener(function(status)
+{
+&nbsp;&nbsp;&nbsp;console.log(mcServerInfo.name + ' server status changed to ' + status);
+});
+</pre>
 </div>
 </dd>
 <dt class="method" id="MediaControllerServerInfo::removeServerStatusChangeListener">
@@ -1379,18 +1421,20 @@ and respond to custom commands.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var watcherId = 0; // watcher identifier
- var mcClient = tizen.mediacontroller.getClient();
- var mcServerInfo = mcClient.getLatestServerInfo();
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var watcherId = 0; /* Watcher identifier */
+var mcClient = tizen.mediacontroller.getClient();
+var mcServerInfo = mcClient.getLatestServerInfo();
 
- // Registers to be notified when server status changes.
- watcherId = mcServerInfo.addServerStatusChangeListener(function(status) {
-     console.log(mcServerInfo.name + ' server status changed to ' + status);
- });
+/* Registers to be notified when server status changes */
+watcherId = mcServerInfo.addServerStatusChangeListener(function(status)
+{
+&nbsp;&nbsp;&nbsp;console.log(mcServerInfo.name + ' server status changed to ' + status);
+});
 
- // Cancels the watch operation.
- mcServerInfo.removeServerStatusChangeListener(watcherId);
- </pre>
+/* Cancels the watch operation */
+mcServerInfo.removeServerStatusChangeListener(watcherId);
+</pre>
 </div>
 </dd>
 <dt class="method" id="MediaControllerServerInfo::addPlaybackInfoChangeListener">
@@ -1432,29 +1476,35 @@ and respond to custom commands.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var watcherId = 0; // watcher identifier
- var mcClient = tizen.mediacontroller.getClient();
- var mcServerInfo = mcClient.getLatestServerInfo();
-
- var playbackListener = {
-     onplaybackchanged: function(state, position) {
-         console.log('Current playback state: ' + state);
-         console.log('Current playback position: ' + position);
-     },
-     onshufflemodechanged: function(mode) {
-         console.log('Shuffle mode changed to: ' + mode);
-     },
-     onrepeatmodechanged: function(mode) {
-         console.log('Repeat mode changed to: ' + mode);
-     },
-     onmetadatachanged: function(metadata) {
-         console.log('Playback metadata changed: ' + JSON.stringify(metadata));
-     }
- };
-
- // Registers to be notified when playback state changes.
- watcherId = mcServerInfo.addPlaybackInfoChangeListener(playbackListener);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var watcherId = 0; /* Watcher identifier */
+var mcClient = tizen.mediacontroller.getClient();
+var mcServerInfo = mcClient.getLatestServerInfo();
+
+var playbackListener =
+{
+&nbsp;&nbsp;&nbsp;onplaybackchanged: function(state, position)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('Current playback state: ' + state);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('Current playback position: ' + position);
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;onshufflemodechanged: function(mode)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('Shuffle mode changed to: ' + mode);
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;onrepeatmodechanged: function(mode)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('Repeat mode changed to: ' + mode);
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;onmetadatachanged: function(metadata)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('Playback metadata changed: ' + JSON.stringify(metadata));
+&nbsp;&nbsp;&nbsp;}
+};
+
+/* Registers to be notified when playback state changes */
+watcherId = mcServerInfo.addPlaybackInfoChangeListener(playbackListener);
+</pre>
 </div>
 </dd>
 <dt class="method" id="MediaControllerServerInfo::removePlaybackInfoChangeListener">
@@ -1487,33 +1537,39 @@ and respond to custom commands.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var watcherId = 0; // watcher identifier
- var mcClient = tizen.mediacontroller.getClient();
- var mcServerInfo = mcClient.getLatestServerInfo();
-
- // receives playback state changes
- var playbackListener = {
-     onplaybackchanged: function(state, position) {
-         console.log('Current playback state: ' + state);
-         console.log('Current playback position: ' + position);
-     },
-     onshufflemodechanged: function(mode) {
-         console.log('Shuffle mode changed to: ' + mode);
-     },
-     onrepeatmodechanged: function(mode) {
-         console.log('Repeat mode changed to: ' + mode);
-     },
-     onmetadatachanged: function(metadata) {
-         console.log('Playback metadata changed: ' + JSON.stringify(metadata));
-     }
- };
-
- // Registers to be notified when playback state changes.
- watcherId = mcServerInfo.addPlaybackInfoChangeListener(playbackListener);
-
- // Cancels the watch operation.
-  mcServerInfo.removePlaybackInfoChangeListener(watcherId);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var watcherId = 0; /* Watcher identifier */
+var mcClient = tizen.mediacontroller.getClient();
+var mcServerInfo = mcClient.getLatestServerInfo();
+
+/* Receives playback state changes */
+var playbackListener =
+{
+&nbsp;&nbsp;&nbsp;onplaybackchanged: function(state, position)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('Current playback state: ' + state);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('Current playback position: ' + position);
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;onshufflemodechanged: function(mode)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('Shuffle mode changed to: ' + mode);
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;onrepeatmodechanged: function(mode)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('Repeat mode changed to: ' + mode);
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;onmetadatachanged: function(metadata)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('Playback metadata changed: ' + JSON.stringify(metadata));
+&nbsp;&nbsp;&nbsp;}
+};
+
+/* Registers to be notified when playback state changes */
+watcherId = mcServerInfo.addPlaybackInfoChangeListener(playbackListener);
+
+/* Cancels the watch operation */
+mcServerInfo.removePlaybackInfoChangeListener(watcherId);
+</pre>
 </div>
 </dd>
 </dl>
index 64dfd16..df8f7a6 100644 (file)
@@ -184,15 +184,19 @@ There is a tizen.mediakey object that allows accessing the functionality of the
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> tizen.mediakey.setMediaKeyEventListener({
-     onpressed: function(key) {
-         console.log("Pressed  key: " + key);
-     },
-     onreleased: function(key) {
-         console.log("Released key: " + key);
-     }
- });
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+tizen.mediakey.setMediaKeyEventListener(
+{
+&nbsp;&nbsp;&nbsp;onpressed: function(key)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Pressed key: " + key);
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;onreleased: function(key)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Released key: " + key);
+&nbsp;&nbsp;&nbsp;}
+});
+</pre>
 </div>
 </dd>
 <dt class="method" id="MediaKeyManager::unsetMediaKeyEventListener">
@@ -216,8 +220,9 @@ There is a tizen.mediakey object that allows accessing the functionality of the
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> tizen.mediakey.unsetMediaKeyEventListener();
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+tizen.mediakey.unsetMediaKeyEventListener();
+</pre>
 </div>
 </dd>
 </dl>
index c5bcd1e..8b93b6f 100644 (file)
@@ -240,9 +240,10 @@ The <em>tizen.messageport</em> object allows access to the functionality of the
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Requests the LocalMessagePort instance with the specified message port name
- var localMsgPort = tizen.messageport.requestLocalMessagePort('MessagePortA');
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Requests the LocalMessagePort instance with the specified message port name */
+var localMsgPort = tizen.messageport.requestLocalMessagePort('MessagePortA');
+</pre>
 </div>
 </dd>
 <dt class="method" id="MessagePortManager::requestTrustedLocalMessagePort">
@@ -292,9 +293,10 @@ Trusted local message port can communicate with applications that are signed wit
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Requests the LocalMessagePort instance with the specified message port name
- var localMsgPort = tizen.messageport.requestTrustedLocalMessagePort('MessagePortB');
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Requests the LocalMessagePort instance with the specified message port name */
+var localMsgPort = tizen.messageport.requestTrustedLocalMessagePort('MessagePortB');
+</pre>
 </div>
 </dd>
 <dt class="method" id="MessagePortManager::requestRemoteMessagePort">
@@ -351,9 +353,10 @@ If the message port name and application ID are the same, the platform returns t
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Requests the RemoteMessagePort instance with the specified message port name
- var remoteMsgPort = tizen.messageport.requestRemoteMessagePort('6xaeuflskd.App1', 'MessagePortA');
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Requests the RemoteMessagePort instance with the specified message port name */
+var remoteMsgPort = tizen.messageport.requestRemoteMessagePort('6xaeuflskd.App1', 'MessagePortA');
+</pre>
 </div>
 </dd>
 <dt class="method" id="MessagePortManager::requestTrustedRemoteMessagePort">
@@ -414,9 +417,10 @@ Trusted remote message port can communicate with applications that are signed wi
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Requests the RemoteMessagePort instance with the specified message port name.
- var remoteMsgPort = tizen.messageport.requestTrustedRemoteMessagePort('6xauflskd.App1', 'MessagePortB');
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Requests the RemoteMessagePort instance with the specified message port name */
+var remoteMsgPort = tizen.messageport.requestTrustedRemoteMessagePort('6xauflskd.App1', 'MessagePortB');
+</pre>
 </div>
 </dd>
 </dl>
@@ -511,13 +515,15 @@ Trusted remote message port can communicate with applications that are signed wi
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function onreceived(data, remoteMsgPort) {
-   console.log('Received data to \'' + remoteMsgPort.messagePortName + '\'');
- }
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function onreceived(data, remoteMsgPort)
+{
+&nbsp;&nbsp;&nbsp;console.log('Received data to \'' + remoteMsgPort.messagePortName + '\'');
+}
 
- var localMsgPort = tizen.messageport.requestLocalMessagePort('MessagePortA');
- var watchId = localMsgPort.addMessagePortListener(onreceived);
- </pre>
+var localMsgPort = tizen.messageport.requestLocalMessagePort('MessagePortA');
+var watchId = localMsgPort.addMessagePortListener(onreceived);
+</pre>
 </div>
 </dd>
 <dt class="method" id="LocalMessagePort::removeMessagePortListener">
@@ -561,11 +567,13 @@ Trusted remote message port can communicate with applications that are signed wi
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var localMsgPort = tizen.messageport.requestLocalMessagePort('MessagePortA');
- var watchId = localMsgPort.addMessagePortListener(onreceived);
- // Communication routines of your app...
- localMsgPort.removeMessagePortListener(watchId);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var localMsgPort = tizen.messageport.requestLocalMessagePort('MessagePortA');
+var watchId = localMsgPort.addMessagePortListener(onreceived);
+/* Communication routines of your app */
+
+localMsgPort.removeMessagePortListener(watchId);
+</pre>
 </div>
 </dd>
 </dl>
@@ -679,30 +687,34 @@ array must not be duplicated or empty.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Sends string message
- var localMsgPort = tizen.messageport.requestLocalMessagePort('MessagePortA');
- var remoteMsgPort = tizen.messageport.requestRemoteMessagePort('6xaeuflskd.App1', 'MessagePortB');
- localMsgPort.addMessagePortListener(function(items, remoteport) {
-   // ...
-   if(remoteport !== null) {
-     remoteport.sendMessage([{key:'RESULT', value:'OK'}]);
-   }
- });
- // stream - FileStream object
- var bytePockets = [], byteCount = 0, i = 0;
- while(byteCount  stream.bytesAvailable - 256) {
-   bytePockets[i] = stream.readBytes(256);
-   byteCount+=256;
-   i++;
- }
- bytePockets[i] = stream.readBytes(stream.bytesAvailable - byteCount);
-
- var messagePortPockets = [{key: "key1", value: "val1"},
-                        {key: "key2", value: ["val2", "val3", "val4"]},
-                        {key: "key3", value: bytePockets[0]},
-                        {key: "key4", value: bytePockets}];
- remoteMsgPort.sendMessage(messagePortPockets, localMsgPort);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Sends string message */
+var localMsgPort = tizen.messageport.requestLocalMessagePort('MessagePortA');
+var remoteMsgPort = tizen.messageport.requestRemoteMessagePort('6xaeuflskd.App1', 'MessagePortB');
+localMsgPort.addMessagePortListener(function(items, remoteport)
+{
+&nbsp;&nbsp;&nbsp;/* ... */
+&nbsp;&nbsp;&nbsp;if (remoteport !== null)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;remoteport.sendMessage([{key:'RESULT', value:'OK'}]);
+&nbsp;&nbsp;&nbsp;}
+});
+/* stream - FileStream object */
+var bytePockets = [], byteCount = 0, i = 0;
+while (byteCount &lt; stream.bytesAvailable - 256)
+{
+&nbsp;&nbsp;&nbsp;bytePockets[i] = stream.readBytes(256);
+&nbsp;&nbsp;&nbsp;byteCount+=256;
+&nbsp;&nbsp;&nbsp;i++;
+}
+bytePockets[i] = stream.readBytes(stream.bytesAvailable - byteCount);
+
+var messagePortPockets = [{key: "key1", value: "val1"},
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{key: "key2", value: ["val2", "val3", "val4"]},
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{key: "key3", value: bytePockets[0]},
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{key: "key4", value: bytePockets}];
+remoteMsgPort.sendMessage(messagePortPockets, localMsgPort);
+</pre>
 </div>
 </dd>
 </dl>
@@ -778,14 +790,16 @@ array must not be duplicated or empty.
         </ul>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // MessagePortCallback instance
- function onreceived(data, remoteMsgPort) {
-   console.log('Received data to \'' + remoteMsgPort.messagePortName + '\'');
- }
-
- var localMsgPort = tizen.messageport.requestLocalMessagePort('MessagePortA');
- var watchId = localMsgPort.addMessagePortListener(onreceived);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* MessagePortCallback instance */
+function onreceived(data, remoteMsgPort)
+{
+&nbsp;&nbsp;&nbsp;console.log('Received data to \'' + remoteMsgPort.messagePortName + '\'');
+}
+
+var localMsgPort = tizen.messageport.requestLocalMessagePort('MessagePortA');
+var watchId = localMsgPort.addMessagePortListener(onreceived);
+</pre>
 </div>
 </dd>
 </dl>
index f15498d..4f08720 100755 (executable)
@@ -559,12 +559,16 @@ It provides access to the API functionalities through the tizen.nfc interface.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> try {
-     var adapter = tizen.nfc.getDefaultAdapter();
- } catch (err) {
-     console.log(err.name +": " + err.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+try
+{
+&nbsp;&nbsp;&nbsp;var adapter = tizen.nfc.getDefaultAdapter();
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="NFCManager::setExclusiveMode">
@@ -624,12 +628,16 @@ The exclusive mode can only be set when NFC is on. If NFC is off, the mode is ig
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> try {
-   tizen.nfc.setExclusiveMode(true) ;
- } catch (err) {
-   console.log(err.name + ": " + err.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+try
+{
+&nbsp;&nbsp;&nbsp;tizen.nfc.setExclusiveMode(true);
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+}
+</pre>
 </div>
 </dd>
 </dl>
@@ -892,33 +900,43 @@ is not compatible with the expected type for that parameter.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var gNfcAdapter;
- var onPowerOn = function(){ // Called when NFC adapter is powered on
-   try {
-     console.log("Power on succeed");
-     // Implement NFC communication routines ...
-     gNfcAdapter.setPowered(
-         false, // Disable NFC adapter
-         function () {console.log("Power off succeed"); }, // Handle success
-         function () {console.log("Power off failed"); }); // Handle failure
-   } catch (err) {
-     console.log(err.name + ": " + err.message);
-   }
- };
- try {
-   gNfcAdapter = tizen.nfc.getDefaultAdapter();
-   if (!gNfcAdapter.powered) {
-     gNfcAdapter.setPowered(
-         true, // Enable NFC adapter
-         onPowerOn,                                     // Handle success
-         function () {console.log("Power on failed")}); // Handle failure
-   } else {
-     onPowerOn();
-   }
- } catch (err) {
-   console.log(err.name + ": " + err.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var gNfcAdapter;
+var onPowerOn = function()
+{
+&nbsp;&nbsp;&nbsp;/* Called when NFC adapter is powered on */
+&nbsp;&nbsp;&nbsp;try
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Power on succeed");
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Implement NFC communication routines */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;gNfcAdapter.setPowered(false, /* Disable NFC adapter */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;function() {console.log("Power off succeed");}, /* Handle success */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;function() {console.log("Power off failed");}); /* Handle failure */
+&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;catch (err)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+&nbsp;&nbsp;&nbsp;}
+};
+try
+{
+&nbsp;&nbsp;&nbsp;gNfcAdapter = tizen.nfc.getDefaultAdapter();
+&nbsp;&nbsp;&nbsp;if (!gNfcAdapter.powered)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;gNfcAdapter.setPowered(true, /* Enable NFC adapter */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;onPowerOn, /* Handle success */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;function() {console.log("Power on failed")}); /* Handle failure */
+&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;else
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;onPowerOn();
+&nbsp;&nbsp;&nbsp;}
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="NFCAdapter::setTagListener">
@@ -990,14 +1008,21 @@ is not compatible with the expected type for that parameter.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var adapter = tizen.nfc.getDefaultAdapter();
- var onSuccessCB = {onattach : function(nfcTag) {
-     console.log("NFC Tag's type is " + nfcTag.type);
-   }, ondetach : function() {
-     console.log("NFC Tag is detached");
-   }};
- adapter.setTagListener(onSuccessCB);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var adapter = tizen.nfc.getDefaultAdapter();
+var onSuccessCB =
+{
+&nbsp;&nbsp;&nbsp;onattach: function(nfcTag)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("NFC Tag's type is " + nfcTag.type);
+&nbsp;&nbsp;&nbsp;}, 
+&nbsp;&nbsp;&nbsp;ondetach: function() 
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("NFC Tag is detached");
+&nbsp;&nbsp;&nbsp;}
+};
+adapter.setTagListener(onSuccessCB);
+</pre>
 </div>
 </dd>
 <dt class="method" id="NFCAdapter::setPeerListener">
@@ -1062,14 +1087,21 @@ is not compatible with the expected type for that parameter.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var adapter = tizen.nfc.getDefaultAdapter();
- var onSuccessCB = {onattach : function(nfcPeer) {
-     console.log("NFC Target is detected");
-   }, ondetach : function() {
-     console.log("NFC Target is detached");
-   }};
- adapter.setPeerListener(onSuccessCB);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var adapter = tizen.nfc.getDefaultAdapter();
+var onSuccessCB =
+{
+&nbsp;&nbsp;&nbsp;onattach: function(nfcPeer)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("NFC Target is detected");
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;ondetach: function()
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("NFC Target is detached");
+&nbsp;&nbsp;&nbsp;}
+};
+adapter.setPeerListener(onSuccessCB);
+</pre>
 </div>
 </dd>
 <dt class="method" id="NFCAdapter::unsetTagListener">
@@ -1115,24 +1147,28 @@ is not compatible with the expected type for that parameter.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var adapter = tizen.nfc.getDefaultAdapter();
-
- // Receives NFCTag
- var onSuccessCB = {
-     onattach : function(nfcTag) {
-         console.log("The attached NFC tag's type is " + nfcTag.type);
-     },
-     ondetach : function() {
-         console.log("NFC tag is detached.");
-
-         // Unregister the listener when the NFC tag is detached.
-         adapter.unsetTagListener();
-     }
- };
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var adapter = tizen.nfc.getDefaultAdapter();
+
+/* Receives NFCTag */
+var onSuccessCB =
+{
+&nbsp;&nbsp;&nbsp;onattach: function(nfcTag)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("The attached NFC tag's type is " + nfcTag.type);
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;ondetach: function()
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("NFC tag is detached.");
+
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Unregister the listener when the NFC tag is detached */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;adapter.unsetTagListener();
+&nbsp;&nbsp;&nbsp;}
+};
 
- // Registers to be notified when NFC tag is detected.
- adapter.setTagListener(onSuccessCB);
- </pre>
+/* Registers to be notified when NFC tag is detected */
+adapter.setTagListener(onSuccessCB);
+</pre>
 </div>
 </dd>
 <dt class="method" id="NFCAdapter::unsetPeerListener">
@@ -1178,24 +1214,28 @@ is not compatible with the expected type for that parameter.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var adapter = tizen.nfc.getDefaultAdapter();
-
- // Receives an NFC peer.
- var onSuccessCB = {
-     onattach : function(nfcPeer) {
-         console.log("NFC peer target is attached.");
-     },
-     ondetach : function() {
-         console.log("NFC peer target is detached.");
-
-         // Unregisters the listener when NFC peer target is detached.
-         adapter.unsetPeerListener();
-     }
- };
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var adapter = tizen.nfc.getDefaultAdapter();
+
+/* Receives an NFC peer */
+var onSuccessCB =
+{
+&nbsp;&nbsp;&nbsp;onattach: function(nfcPeer)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("NFC peer target is attached.");
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;ondetach: function()
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("NFC peer target is detached.");
+
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Unregisters the listener when NFC peer target is detached */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;adapter.unsetPeerListener();
+&nbsp;&nbsp;&nbsp;}
+};
 
- // Registers to be notified when NFC peer target is detected.
- adapter.setPeerListener(onSuccessCB);
- </pre>
+/* Registers to be notified when NFC peer target is detected */
+adapter.setPeerListener(onSuccessCB);
+</pre>
 </div>
 </dd>
 <dt class="method" id="NFCAdapter::addCardEmulationModeChangeListener">
@@ -1251,15 +1291,20 @@ is not compatible with the expected type for that parameter.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> try {
-   var onSuccessCB = function(mode) {
-      console.log("The card emulation mode is " + mode);
-   };
-   var listenerId = adapter.addCardEmulationModeChangeListener(onSuccessCB) ;
- } catch (err) {
-   console.log(err.name + ": " + err.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+try
+{
+&nbsp;&nbsp;&nbsp;var onSuccessCB = function(mode)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("The card emulation mode is " + mode);
+&nbsp;&nbsp;&nbsp;};
+&nbsp;&nbsp;&nbsp;var listenerId = adapter.addCardEmulationModeChangeListener(onSuccessCB);
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="NFCAdapter::removeCardEmulationModeChangeListener">
@@ -1308,12 +1353,16 @@ is not compatible with the expected type for that parameter.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> try {
-   adapter.removeCardEmulationModeChangeListener(listenerId) ;
- } catch (err) {
-   console.log(err.name + ": " + err.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+try
+{
+&nbsp;&nbsp;&nbsp;adapter.removeCardEmulationModeChangeListener(listenerId);
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="NFCAdapter::addTransactionEventListener">
@@ -1374,12 +1423,16 @@ Such an event may indicate initiating a financial transaction using the device.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> try {
-   var listenerId = adapter.addTransactionEventListener("UICC", function(aid, data){console.log("transaction event occurs");}) ;
- } catch (err) {
-   console.log(err.name + ": " + err.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+try
+{
+&nbsp;&nbsp;&nbsp;var listenerId = adapter.addTransactionEventListener("UICC", function(aid, data) {console.log("transaction event occurs");});
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="NFCAdapter::removeTransactionEventListener">
@@ -1428,12 +1481,16 @@ Such an event may indicate initiating a financial transaction using the device.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> try {
-   adapter.removeTransactionEventListener(listenerId) ;
- } catch (err) {
-   console.log(err.name + ": " + err.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+try
+{
+&nbsp;&nbsp;&nbsp;adapter.removeTransactionEventListener(listenerId);
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="NFCAdapter::addActiveSecureElementChangeListener">
@@ -1489,15 +1546,20 @@ Such an event may indicate initiating a financial transaction using the device.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> try {
-   var onSuccessCB = function(seType) {
-      console.log("Active secure element is " + seType);
-   };
-   var listenerId = adapter.addActiveSecureElementChangeListener(onSuccessCB) ;
- } catch (err) {
-   console.log(err.name + ": " + err.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+try
+{
+&nbsp;&nbsp;&nbsp;var onSuccessCB = function(seType)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Active secure element is " + seType);
+&nbsp;&nbsp;&nbsp;};
+&nbsp;&nbsp;&nbsp;var listenerId = adapter.addActiveSecureElementChangeListener(onSuccessCB);
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="NFCAdapter::removeActiveSecureElementChangeListener">
@@ -1546,12 +1608,16 @@ Such an event may indicate initiating a financial transaction using the device.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> try {
-   adapter.removeActiveSecureElementChangeListener(listenerId) ;
- } catch (err) {
-   console.log(err.name + ": " + err.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+try
+{
+&nbsp;&nbsp;&nbsp;adapter.removeActiveSecureElementChangeListener(listenerId);
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="NFCAdapter::getCachedMessage">
@@ -1598,9 +1664,10 @@ should be returned.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Gets the cached message
- var cachedMessage = tizen.nfc.getDefaultAdapter().getCachedMessage();
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Gets the cached message */
+var cachedMessage = tizen.nfc.getDefaultAdapter().getCachedMessage();
+</pre>
 </div>
 </dd>
 <dt class="method" id="NFCAdapter::setExclusiveModeForTransaction">
@@ -1665,12 +1732,16 @@ Losing priority is always allowed regardless of an application's status.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> try {
-   adapter.setExclusiveModeForTransaction(true) ;
- } catch (err) {
-   console.log(err.name + ": " + err.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+try
+{
+&nbsp;&nbsp;&nbsp;adapter.setExclusiveModeForTransaction(true);
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="NFCAdapter::addHCEEventListener">
@@ -1730,16 +1801,21 @@ Losing priority is always allowed regardless of an application's status.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> try {
-   var onDetectedCB = function(event_data) {
-             console.log("HCE event type  is " + event_data.eventType);
-             console.log("APDU is " + event_data.apdu);
-   };
-   var listenerId = adapter.addHCEEventListener(onDetectedCB) ;
- } catch (err) {
-   console.log(err.name + ": " + err.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+try
+{
+&nbsp;&nbsp;&nbsp;var onDetectedCB = function(event_data)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("HCE event type  is " + event_data.eventType);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("APDU is " + event_data.apdu);
+&nbsp;&nbsp;&nbsp;};
+&nbsp;&nbsp;&nbsp;var listenerId = adapter.addHCEEventListener(onDetectedCB);
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="NFCAdapter::removeHCEEventListener">
@@ -1788,12 +1864,16 @@ Losing priority is always allowed regardless of an application's status.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> try {
-   adapter.removeHCEEventListener(listenerId) ;
- } catch (err) {
-   console.log(err.name + ": " + err.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+try
+{
+&nbsp;&nbsp;&nbsp;adapter.removeHCEEventListener(listenerId);
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="NFCAdapter::sendHostAPDUResponse">
@@ -1865,21 +1945,27 @@ The ErrorCallback is launched with these error types:
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> try {
-   var successCB = function() {
-      console.log("Sending APDU reponse was successful.");
-   };
-
-   var errorCB = function() {
-      console.log("Sending APDU reponse failed.");
-   };
-
-   var apdu_response= [0x00,0xA4,0x04,0x00,0x04,0x11,0x12, 0x13, 0x14]; //set apdu response.
-   adapter.sendHostAPDUResponse(apdu_response, successCB, errorCB) ;
- } catch (err) {
-   console.log(err.name + ": " + err.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+try
+{
+&nbsp;&nbsp;&nbsp;var successCB = function()
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Sending APDU response was successful.");
+&nbsp;&nbsp;&nbsp;};
+
+&nbsp;&nbsp;&nbsp;var errorCB = function()
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Sending APDU response failed.");
+&nbsp;&nbsp;&nbsp;};
+
+&nbsp;&nbsp;&nbsp;var apdu_response= [0x00,0xA4,0x04,0x00,0x04,0x11,0x12, 0x13, 0x14]; /* Set apdu response */
+&nbsp;&nbsp;&nbsp;adapter.sendHostAPDUResponse(apdu_response, successCB, errorCB);
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="NFCAdapter::isActivatedHandlerForAID">
@@ -1943,16 +2029,21 @@ The ErrorCallback is launched with these error types:
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> try {
-   var aid = "ABC0012345";
-   var isActiveHandler = adapter.isActivatedHandlerForAID("HCE", aid);
-   if(isActiveHandler){
-      console.log("current application is activated handler for the AID");
-   }
- } catch (err) {
-   console.log(err.name + ": " + err.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+try
+{
+&nbsp;&nbsp;&nbsp;var aid = "ABC0012345";
+&nbsp;&nbsp;&nbsp;var isActiveHandler = adapter.isActivatedHandlerForAID("HCE", aid);
+&nbsp;&nbsp;&nbsp;if (isActiveHandler)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("current application is activated handler for the AID");
+&nbsp;&nbsp;&nbsp;}
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="NFCAdapter::isActivatedHandlerForCategory">
@@ -2016,15 +2107,20 @@ The ErrorCallback is launched with these error types:
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> try {
-   var isActiveHandler =  adapter.isActivatedHandlerForCategory("ESE", "PAYMENT") ;
-   if(isActiveHandler){
-      console.log("current application is activated handler for the category");
-   }
- } catch (err) {
-   console.log(err.name + ": " + err.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+try
+{
+&nbsp;&nbsp;&nbsp;var isActiveHandler = adapter.isActivatedHandlerForCategory("ESE", "PAYMENT");
+&nbsp;&nbsp;&nbsp;if (isActiveHandler)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("current application is activated handler for the category");
+&nbsp;&nbsp;&nbsp;}
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="NFCAdapter::registerAID">
@@ -2088,14 +2184,17 @@ The ErrorCallback is launched with these error types:
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> try {
-
-   var aid = "ABC0012345";
-   adapter.registerAID("HCE", aid, "PAYMENT") ;
- } catch (err) {
-   console.log(err.name + ": " + err.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+try
+{
+&nbsp;&nbsp;&nbsp;var aid = "ABC0012345";
+&nbsp;&nbsp;&nbsp;adapter.registerAID("HCE", aid, "PAYMENT");
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="NFCAdapter::unregisterAID">
@@ -2159,14 +2258,17 @@ The ErrorCallback is launched with these error types:
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> try {
-
-   var aid = "ABC0012345";
-   adapter.unregisterAID("HCE", aid, "PAYMENT") ;
- } catch (err) {
-   console.log(err.name + ": " + err.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+try
+{
+&nbsp;&nbsp;&nbsp;var aid = "ABC0012345";
+&nbsp;&nbsp;&nbsp;adapter.unregisterAID("HCE", aid, "PAYMENT");
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="NFCAdapter::getAIDsForCategory">
@@ -2326,18 +2428,25 @@ The array's index is the pair's key and value is its value.
  2.3.1
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var adapter = tizen.nfc.getDefaultAdapter();
- var onSuccessCB = {onattach : function(nfcTag) {
-     console.log("NFC Tag's type is " + nfcTag.type);
-     for(var i in nfcTag.properties) {
-       console.log("key:" + i + " value:" + nfcTag.properties[i]);
-     }
-   }, ondetach : function() {
-     console.log("NFC Tag is detached");
-   }};
- adapter.setTagListener(onSuccessCB);
-
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var adapter = tizen.nfc.getDefaultAdapter();
+var onSuccessCB =
+{
+&nbsp;&nbsp;&nbsp;onattach: function(nfcTag)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("NFC Tag's type is " + nfcTag.type);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;for (var i in nfcTag.properties)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("key:" + i + " value:" + nfcTag.properties[i]);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;}, 
+&nbsp;&nbsp;&nbsp;ondetach: function()
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("NFC Tag is detached");
+&nbsp;&nbsp;&nbsp;}
+};
+adapter.setTagListener(onSuccessCB);
+</pre>
 </div>
 </li>
 <li class="attribute" id="NFCTag::isConnected">
@@ -2644,21 +2753,28 @@ is not compatible with the expected type for that parameter.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var adapter = tizen.nfc.getDefaultAdapter();
-
- // Receives NFCPeer
- var onSuccessCB = {onattach : function(nfcPeer) {
-     console.log("NFC Target is detected");
-     nfcPeer.setReceiveNDEFListener(
-         function(message){
-            console.log("Receive message");
-         });
-   }, ondetach : function() {
-     console.log("NFC Target is detached");
-   }};
-
- adapter.setPeerListener(onSuccessCB);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var adapter = tizen.nfc.getDefaultAdapter();
+
+/* Receives NFCPeer */
+var onSuccessCB =
+{
+&nbsp;&nbsp;&nbsp;onattach: function(nfcPeer)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("NFC Target is detected");
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;nfcPeer.setReceiveNDEFListener(function(message)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Receive message");
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;});
+&nbsp;&nbsp;&nbsp;}, 
+&nbsp;&nbsp;&nbsp;ondetach: function()
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("NFC Target is detached");
+&nbsp;&nbsp;&nbsp;}
+};
+
+adapter.setPeerListener(onSuccessCB);
+</pre>
 </div>
 </dd>
 <dt class="method" id="NFCPeer::unsetReceiveNDEFListener">
@@ -2698,21 +2814,27 @@ is not compatible with the expected type for that parameter.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var adapter = tizen.nfc.getDefaultAdapter();
- var onSuccessCB = {onattach : function(nfcPeer) {
-     console.log("NFC Target is detected");
-     nfcPeer.setReceiveNDEFListener(
-         function(message){
-            console.log("Receive message");
-            nfcPeer.unsetReceiveNDEFListener();
-         });
-   }, ondetach : function() {
-     console.log("NFC Target is detached");
-   }};
- }
-
- adapter.setPeerListener(onSuccessCB);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var adapter = tizen.nfc.getDefaultAdapter();
+var onSuccessCB =
+{
+&nbsp;&nbsp;&nbsp;onattach: function(nfcPeer)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("NFC Target is detected");
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;nfcPeer.setReceiveNDEFListener(function(message)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Receive message");
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;nfcPeer.unsetReceiveNDEFListener();
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;});
+&nbsp;&nbsp;&nbsp;}, 
+&nbsp;&nbsp;&nbsp;ondetach: function()
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("NFC Target is detached");
+&nbsp;&nbsp;&nbsp;}
+};
+
+adapter.setPeerListener(onSuccessCB);
+</pre>
 </div>
 </dd>
 <dt class="method" id="NFCPeer::sendNDEF">
@@ -2874,10 +2996,11 @@ If the operation completes successfully, it returns the serial byte array of the
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Gets the cached message.
- var cachedMessage = tizen.nfc.getDefaultAdapter().getCachedMessage();
- var raw = cachedMessage.toByte();
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Gets the cached message */
+var cachedMessage = tizen.nfc.getDefaultAdapter().getCachedMessage();
+var raw = cachedMessage.toByte();
+</pre>
 </div>
 </dd>
 </dl>
@@ -2995,10 +3118,11 @@ The byte array contains <var>0</var> to <var>(2 ** 32 - 1)</var> bytes.
  2.3.1
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Creates a new NDEF record.
- var newRecord = new tizen.NDEFRecordURI("https://www.tizen.org/");
- var payload = newRecord.payload;
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Creates a new NDEF record */
+var newRecord = new tizen.NDEFRecordURI("https://www.tizen.org/");
+var payload = newRecord.payload;
+</pre>
 </div>
 </li>
 </ul>
index a42fbf2..949317b 100644 (file)
@@ -281,27 +281,29 @@ parameters contain an invalid value.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> try {
-      var appControl = new tizen.ApplicationControl(
-                       "http://tizen.org/appcontrol/operation/create_content",
-                       null,
-                       "image/jpg",
-                       null);
-      var notificationDict = {
-                  content : "This is a simple notification.",
-                  iconPath : "images/image1.jpg",
-                  soundPath : "music/Over the horizon.mp3",
-                  vibration : true,
-                  appControl : appControl};
-
-      var notification = new tizen.StatusNotification("SIMPLE",
-                  "Simple notification", notificationDict);
-
-      tizen.notification.post(notification);
- } catch (err) {
-      console.log (err.name + ": " + err.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+try
+{
+&nbsp;&nbsp;&nbsp;var appControl = new tizen.ApplicationControl("http://tizen.org/appcontrol/operation/create_content",
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;null, "image/jpg", null);
+&nbsp;&nbsp;&nbsp;var notificationDict =
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;content: "This is a simple notification.",
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;iconPath: "images/image1.jpg",
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;soundPath: "music/Over the horizon.mp3",
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;vibration: true,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;appControl: appControl
+&nbsp;&nbsp;&nbsp;};
+
+&nbsp;&nbsp;&nbsp;var notification = new tizen.StatusNotification("SIMPLE", "Simple notification", notificationDict);
+
+&nbsp;&nbsp;&nbsp;tizen.notification.post(notification);
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="NotificationManager::update">
@@ -354,14 +356,18 @@ parameters contain an invalid value.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> try {
-      // Uses a variable for the previously posted notification.
-      notification.content = "My notification";
-      tizen.notification.update(notification);
- } catch (err) {
-      console.log (err.name + ": " + err.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+try
+{
+&nbsp;&nbsp;&nbsp;/* Uses a variable for the previously posted notification */
+&nbsp;&nbsp;&nbsp;notification.content = "My notification";
+&nbsp;&nbsp;&nbsp;tizen.notification.update(notification);
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="NotificationManager::remove">
@@ -413,13 +419,17 @@ parameters contain an invalid value.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> try {
-      // Uses a variable for the previously posted notification.
-      tizen.notification.remove(notification.id);
- } catch (err) {
-      console.log (err.name + ": " + err.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+try
+{
+&nbsp;&nbsp;&nbsp;/* Uses a variable for the previously posted notification */
+&nbsp;&nbsp;&nbsp;tizen.notification.remove(notification.id);
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="NotificationManager::removeAll">
@@ -456,12 +466,16 @@ parameters contain an invalid value.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> try {
-      tizen.notification.removeAll();
- } catch (err) {
-      console.log (err.name + ": " + err.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+try
+{
+&nbsp;&nbsp;&nbsp;tizen.notification.removeAll();
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="NotificationManager::get">
@@ -498,16 +512,20 @@ parameters contain an invalid value.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> try {
-      // Uses a variable for the previously posted notification
-      // Saves the notification ID for future use
-      var myId = notification.id;
-
-      var myNotification = tizen.notification.get(myId);
- } catch (err) {
-      console.log (err.name + ": " + err.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+try
+{
+&nbsp;&nbsp;&nbsp;/* Uses a variable for the previously posted notification */
+&nbsp;&nbsp;&nbsp;/* Saves the notification ID for future use */
+&nbsp;&nbsp;&nbsp;var myId = notification.id;
+
+&nbsp;&nbsp;&nbsp;var myNotification = tizen.notification.get(myId);
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="NotificationManager::getAll">
@@ -530,27 +548,31 @@ parameters contain an invalid value.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> try {
-     var notifications = tizen.notification.getAll();
-     var index = 0;
-
-     for ( index = 0; index &lt; notifications.length; index++ )
-     {
-         console.log(notifications[index].id);
-         console.log(notifications[index].title);
-         console.log(notifications[index].statusType);
-         console.log(notifications[index].type);
-         console.log(notifications[index].content);
-         console.log(notifications[index].postedTime);
-         console.log(notifications[index].iconPath);
-         console.log(notifications[index].soundPath);
-         console.log(notifications[index].vibration);
-         console.log(notifications[index].appControl);
-     }
- } catch (err) {
-     console.log (err.name + ": " + err.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+try
+{
+&nbsp;&nbsp;&nbsp;var notifications = tizen.notification.getAll();
+&nbsp;&nbsp;&nbsp;var index = 0;
+
+&nbsp;&nbsp;&nbsp;for (index = 0; index &lt; notifications.length; index++)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(notifications[index].id);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(notifications[index].title);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(notifications[index].statusType);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(notifications[index].type);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(notifications[index].content);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(notifications[index].postedTime);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(notifications[index].iconPath);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(notifications[index].soundPath);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(notifications[index].vibration);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(notifications[index].appControl);
+&nbsp;&nbsp;&nbsp;}
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+}
+</pre>
 </div>
 </dd>
 </dl>
@@ -783,24 +805,29 @@ This method has effects when the device has notification LED.
  2.3.1
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> try {
-      var notificationDict = {
-                  content : "This is a simple notification.",
-                  iconPath : "images/image1.jpg",
-                  soundPath : "music/Over the horizon.mp3",
-                  vibration : true,
-                  ledColor : "#FFFF00",
-                  ledOnPeriod: 1000,
-                  ledOffPeriod : 500 };
-
-      var notification = new tizen.StatusNotification("SIMPLE",
-                  "Simple notification", notificationDict);
-
-      tizen.notification.post(notification);
- } catch (err) {
-      console.log (err.name + ": " + err.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+try
+{
+&nbsp;&nbsp;&nbsp;var notificationDict =
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;content: "This is a simple notification.",
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;iconPath: "images/image1.jpg",
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;soundPath: "music/Over the horizon.mp3",
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;vibration: true,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ledColor: "#FFFF00",
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ledOnPeriod: 1000,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ledOffPeriod: 500
+&nbsp;&nbsp;&nbsp;};
+
+&nbsp;&nbsp;&nbsp;var notification = new tizen.StatusNotification("SIMPLE", "Simple notification", notificationDict);
+
+&nbsp;&nbsp;&nbsp;tizen.notification.post(notification);
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+}
+</pre>
 </div>
 </li>
 <li class="attribute" id="StatusNotification::ledOnPeriod">
@@ -882,26 +909,30 @@ The maximum number of thumbnail path elements in the array is 4.
  2.3.1
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> try {
-
-      // Gets the current application information with tizen.application.getAppInfo
-      var myappInfo = tizen.application.getAppInfo();
-
-      var notificationDict = {
-                  content : "This is a simple notification.",
-                  iconPath : "images/image1.jpg",
-                  soundPath : "music/Over the horizon.mp3",
-                  vibration : true,
-                  appId : myappInfo.id };
-
-      var notification = new tizen.StatusNotification("SIMPLE",
-                  "Simple notification", notificationDict);
-
-      tizen.notification.post(notification);
- } catch (err) {
-      console.log (err.name + ": " + err.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+try
+{
+&nbsp;&nbsp;&nbsp;/* Gets the current application information with tizen.application.getAppInfo */
+&nbsp;&nbsp;&nbsp;var myappInfo = tizen.application.getAppInfo();
+
+&nbsp;&nbsp;&nbsp;var notificationDict =
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;content: "This is a simple notification.",
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;iconPath: "images/image1.jpg",
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;soundPath: "music/Over the horizon.mp3",
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;vibration: true,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;appId: myappInfo.id
+&nbsp;&nbsp;&nbsp;};
+
+&nbsp;&nbsp;&nbsp;var notification = new tizen.StatusNotification("SIMPLE", "Simple notification", notificationDict);
+
+&nbsp;&nbsp;&nbsp;tizen.notification.post(notification);
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+}
+</pre>
 </div>
 </li>
 <li class="attribute" id="StatusNotification::progressType">
@@ -937,35 +968,35 @@ Range of <em>progressValue</em>: percent (0 to 100).
  2.3.1
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> try {
-      var appControl = new tizen.ApplicationControl(
-      "http://tizen.org/appcontrol/operation/create_content",
-      null,
-      "image/jpg",
-      null);
-
-      var notificationDict = {
-                  content : "This is a progress notification.",
-                  iconPath : "images/image2.jpg",
-                  soundPath : "music/Over the horizon.mp3",
-                  vibration : true,
-                  appControl : appControl,
-                  progressValue : 20};
-      // Constructs the progress notification
-      var notification = new tizen.StatusNotification("PROGRESS",
-                         "Progress notification", notificationDict);
-      // Posts the notification
-      tizen.notification.post(notification);
-
-      // Updates the progress value of the notification
-      notification.progressValue = 59;
-      tizen.notification.update(notification);
-
-
- } catch (err) {
-     console.log (err.name + ": " + err.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+try
+{
+&nbsp;&nbsp;&nbsp;var appControl = new tizen.ApplicationControl("http://tizen.org/appcontrol/operation/create_content",
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;null, "image/jpg", null);
+
+&nbsp;&nbsp;&nbsp;var notificationDict =
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;content: "This is a progress notification.",
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;iconPath: "images/image2.jpg",
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;soundPath: "music/Over the horizon.mp3",
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;vibration: true,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;appControl: appControl,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;progressValue: 20
+&nbsp;&nbsp;&nbsp;};
+&nbsp;&nbsp;&nbsp;/* Constructs the progress notification */
+&nbsp;&nbsp;&nbsp;var notification = new tizen.StatusNotification("PROGRESS", "Progress notification", notificationDict);
+&nbsp;&nbsp;&nbsp;/* Posts the notification */
+&nbsp;&nbsp;&nbsp;tizen.notification.post(notification);
+
+&nbsp;&nbsp;&nbsp;/* Updates the progress value of the notification */
+&nbsp;&nbsp;&nbsp;notification.progressValue = 59;
+&nbsp;&nbsp;&nbsp;tizen.notification.update(notification);
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+}
+</pre>
 </div>
 </li>
 </ul>
@@ -987,8 +1018,9 @@ Range of <em>progressValue</em>: percent (0 to 100).
  2.3.1
           </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var detailInfo1 = new tizen.NotificationDetailInfo('Missed Call from James', 'Feb 11 2013');
- notification.detailInfo = [detailInfo1];
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var detailInfo1 = new tizen.NotificationDetailInfo('Missed Call from James', 'Feb 11 2013');
+notification.detailInfo = [detailInfo1];
 </pre>
 </div>
 <div class="constructors">
index a115b55..9c0f8ae 100644 (file)
@@ -225,31 +225,34 @@ UnknownError - If it is not allowed to install the package by the platform or an
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var onInstallation = {
-      onprogress: function(packageId, percentage) {
-         console.log("On installation(" + packageId + ") : progress(" + percentage + ")");
-      },
-      oncomplete: function(packageId) {
-         console.log("Installation(" + packageId + ") Complete");
-      }
- }
-
- var onError = function (err) {
-      console.log("Error occurred on installation : " + err.name);
- }
-
- // Let's assume that the "test.wgt" file exists in the downloads directory
- tizen.filesystem.resolve("downloads/test.wgt",
-     function (file) {
-         console.log("file URI : " + file.toURI());
-         tizen.package.install(file.toURI(), onInstallation, onError);
-     },
-     function (err) {
-         console.log("Error occurred on resolve : " + err.name);
-     },
-     "r");
-
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var onInstallation =
+{
+&nbsp;&nbsp;&nbsp;onprogress: function(packageId, percentage)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("On installation(" + packageId + "): progress(" + percentage + ")");
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;oncomplete: function(packageId)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Installation(" + packageId + ") Complete");
+&nbsp;&nbsp;&nbsp;}
+}
+
+var onError = function(err)
+{
+&nbsp;&nbsp;&nbsp;console.log("Error occurred on installation: " + err.name);
+}
+
+/* Let's assume that the "test.wgt" file exists in the downloads directory */
+tizen.filesystem.resolve("downloads/test.wgt", function(file)
+{
+&nbsp;&nbsp;&nbsp;console.log("file URI: " + file.toURI());
+&nbsp;&nbsp;&nbsp;tizen.package.install(file.toURI(), onInstallation, onError);
+}, function(err)
+{
+&nbsp;&nbsp;&nbsp;console.log("Error occurred on resolve: " + err.name);
+}, "r");
+</pre>
 </div>
 </dd>
 <dt class="method" id="PackageManager::uninstall">
@@ -320,22 +323,27 @@ UnknownError - If it is not allowed to uninstall the package from the platform o
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var onUninstallation = {
-      onprogress: function(packageId, percentage) {
-         console.log("On Uninstallation(" + packageId + ") : progress(" + percentage + ")");
-      },
-      oncomplete: function(packageId) {
-         console.log("Uninstallation(" + packageId + ") Complete");
-      }
- };
-
- var onError = function (err) {
-      console.log("Error occurred on installation : " + err.name);
- };
-
- // Let's assume that the package ID to uninstall is "testapp001"
- tizen.package.uninstall("testapp001", onUninstallation, onError);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var onUninstallation =
+{
+&nbsp;&nbsp;&nbsp;onprogress: function(packageId, percentage)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("On Uninstallation(" + packageId + "): progress(" + percentage + ")");
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;oncomplete: function(packageId)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Uninstallation(" + packageId + ") Complete");
+&nbsp;&nbsp;&nbsp;}
+};
+
+var onError = function(err)
+{
+&nbsp;&nbsp;&nbsp;console.log("Error occurred on installation: " + err.name);
+};
+
+/* Let's assume that the package ID to uninstall is "testapp001" */
+tizen.package.uninstall("testapp001", onUninstallation, onError);
+</pre>
 </div>
 </dd>
 <dt class="method" id="PackageManager::getPackagesInfo">
@@ -397,16 +405,20 @@ UnknownError - If any other platform error occurs.              </li>
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function onListInstalledPackages(packages) {
-     for (var i = 0; i &lt; packages.length; i++) {
-         console.log("Package id["+i+"] : " +packages[i].id);
-     }
- }
-
- tizen.package.getPackagesInfo(
-     onListInstalledPackages,
-     function (err) {console.log("Can't obtain packages list" + err.name);});
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function onListInstalledPackages(packages)
+{
+&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; packages.length; i++)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Package id[" + i + "]: " + packages[i].id);
+&nbsp;&nbsp;&nbsp;}
+}
+
+tizen.package.getPackagesInfo(onListInstalledPackages, function(err)
+{
+&nbsp;&nbsp;&nbsp;console.log("Can't obtain packages list" + err.name);
+});
+</pre>
 </div>
 </dd>
 <dt class="method" id="PackageManager::getPackageInfo">
@@ -468,10 +480,11 @@ The list of installed packages and their package IDs is obtained using <em>getPa
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var packageInfo = tizen.package.getPackageInfo(null);
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var packageInfo = tizen.package.getPackageInfo(null);
 
- console.log("Current Package ID : " + packageInfo.id);
- </pre>
+console.log("Current Package ID: " + packageInfo.id);
+</pre>
 </div>
 </dd>
 <dt class="method" id="PackageManager::setPackageInfoEventListener">
@@ -528,20 +541,25 @@ The callback lasts until the <em>unsetPackageInfoEventListener()</em> method is
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var packageEventCallback = {
-    oninstalled: function(packageInfo) {
-       console.log('The package ' + packageInfo.name + ' is installed');
-    },
-    onupdated: function(packageInfo) {
-       console.log('The package ' + packageInfo.name + ' is updated');
-    },
-    onuninstalled: function(packageId) {
-       console.log('The package ' + packageId + ' is uninstalled');
-    }
- };
-
- tizen.package.setPackageInfoEventListener(packageEventCallback);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var packageEventCallback =
+{
+&nbsp;&nbsp;&nbsp;oninstalled: function(packageInfo)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('The package ' + packageInfo.name + ' is installed');
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;onupdated: function(packageInfo)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('The package ' + packageInfo.name + ' is updated');
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;onuninstalled: function(packageId)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('The package ' + packageId + ' is uninstalled');
+&nbsp;&nbsp;&nbsp;}
+};
+
+tizen.package.setPackageInfoEventListener(packageEventCallback);
+</pre>
 </div>
 </dd>
 <dt class="method" id="PackageManager::unsetPackageInfoEventListener">
@@ -578,8 +596,9 @@ The callback lasts until the <em>unsetPackageInfoEventListener()</em> method is
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> tizen.package.unsetPackageInfoEventListener();
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+tizen.package.unsetPackageInfoEventListener();
+</pre>
 </div>
 </dd>
 </dl>
index 3f545d0..8bfe03c 100644 (file)
@@ -283,8 +283,9 @@ parameters contain an invalid value.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> tizen.power.request("SCREEN", "SCREEN_NORMAL");
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+tizen.power.request("SCREEN", "SCREEN_NORMAL");
+</pre>
 </div>
 </dd>
 <dt class="method" id="PowerManager::release">
@@ -330,9 +331,10 @@ parameters contain an invalid value.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Release SCREEN resource.
- tizen.power.release("SCREEN");
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Release SCREEN resource */
+tizen.power.release("SCREEN");
+</pre>
 </div>
 </dd>
 <dt class="method" id="PowerManager::setScreenStateChangeListener">
@@ -378,13 +380,15 @@ parameters contain an invalid value.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function onScreenStateChanged(previousState, changedState) {
-   console.log("Screen state changed from " + previousState + " to " + changedState);
- }
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function onScreenStateChanged(previousState, changedState)
+{
+&nbsp;&nbsp;&nbsp;console.log("Screen state changed from " + previousState + " to " + changedState);
+}
 
- // Sets the screen state change listener.
- tizen.power.setScreenStateChangeListener(onScreenStateChanged);
- </pre>
+/* Sets the screen state change listener */
+tizen.power.setScreenStateChangeListener(onScreenStateChanged);
+</pre>
 </div>
 </dd>
 <dt class="method" id="PowerManager::unsetScreenStateChangeListener">
@@ -413,9 +417,10 @@ parameters contain an invalid value.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Unsets the screen state change listener.
- tizen.power.unsetScreenStateChangeListener();
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Unsets the screen state change listener */
+tizen.power.unsetScreenStateChangeListener();
+</pre>
 </div>
 </dd>
 <dt class="method" id="PowerManager::getScreenBrightness">
@@ -448,9 +453,10 @@ parameters contain an invalid value.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Gets the current screen brightness value.
- var screenBrightness = tizen.power.getScreenBrightness();
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Gets the current screen brightness value */
+var screenBrightness = tizen.power.getScreenBrightness();
+</pre>
 </div>
 </dd>
 <dt class="method" id="PowerManager::setScreenBrightness">
@@ -512,9 +518,10 @@ parameters contain an invalid value.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Sets the screen brightness value for the application.
- tizen.power.setScreenBrightness(1);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Sets the screen brightness value for the application */
+tizen.power.setScreenBrightness(1);
+</pre>
 </div>
 </dd>
 <dt class="method" id="PowerManager::isScreenOn">
@@ -547,9 +554,10 @@ parameters contain an invalid value.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Checks whether the screen is on or off.
- var isScreenOn = tizen.power.isScreenOn();
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Checks whether the screen is on or off */
+var isScreenOn = tizen.power.isScreenOn();
+</pre>
 </div>
 </dd>
 <dt class="method" id="PowerManager::restoreScreenBrightness">
@@ -578,9 +586,10 @@ parameters contain an invalid value.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Restores the screen brightness value to the system default setting value.
- tizen.power.restoreScreenBrightness();
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Restores the screen brightness value to the system default setting value */
+tizen.power.restoreScreenBrightness();
+</pre>
 </div>
 </dd>
 <dt class="deprecated method" id="PowerManager::turnScreenOn">
@@ -628,9 +637,10 @@ This API triggers turn-on process and then updates the status when it completes.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Turns the screen on.
- tizen.power.turnScreenOn();
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Turns the screen on */
+tizen.power.turnScreenOn();
+</pre>
 </div>
 </dd>
 <dt class="deprecated method" id="PowerManager::turnScreenOff">
@@ -679,9 +689,10 @@ While the operation is on-going, the isScreenOn() method returns true.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Turns the screen off.
- tizen.power.turnScreenOff();
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Turns the screen off */
+tizen.power.turnScreenOff();
+</pre>
 </div>
 </dd>
 </dl>
index 05a03ae..9b169a8 100644 (file)
@@ -211,14 +211,17 @@ The <em>tizen.preference</em> object provides access to the Preference service A
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var successCB = function(preferences) {
-   if (preferences.length) {
-     console.log('The first preference - key: ' + preferences[0].key + ' value: ' + preferences[0].value);
-   }
- };
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var successCB = function(preferences)
+{
+&nbsp;&nbsp;&nbsp;if (preferences.length)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('The first preference - key: ' + preferences[0].key + ' value: ' + preferences[0].value);
+&nbsp;&nbsp;&nbsp;}
+};
 
- tizen.preference.getAll(successCB);
- </pre>
+tizen.preference.getAll(successCB);
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre> The first preference - key: key1 value: Sample value
@@ -264,8 +267,9 @@ The <em>tizen.preference</em> object provides access to the Preference service A
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> tizen.preference.setValue('key1', 'New value');
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+tizen.preference.setValue('key1', 'New value');
+</pre>
 </div>
 </dd>
 <dt class="method" id="PreferenceManager::getValue">
@@ -310,9 +314,10 @@ The <em>tizen.preference</em> object provides access to the Preference service A
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var currentValue = tizen.preference.getValue('key1');
- console.log('The current value of the preference key1 is: ' + currentValue);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var currentValue = tizen.preference.getValue('key1');
+console.log('The current value of the preference key1 is: ' + currentValue);
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre> The current value of the preference key1 is: New value
@@ -357,8 +362,9 @@ The <em>tizen.preference</em> object provides access to the Preference service A
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> tizen.preference.remove('key1');
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+tizen.preference.remove('key1');
+</pre>
 </div>
 </dd>
 <dt class="method" id="PreferenceManager::removeAll">
@@ -387,8 +393,9 @@ The <em>tizen.preference</em> object provides access to the Preference service A
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> tizen.preference.removeAll();
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+tizen.preference.removeAll();
+</pre>
 </div>
 </dd>
 <dt class="method" id="PreferenceManager::exists">
@@ -430,12 +437,16 @@ The <em>tizen.preference</em> object provides access to the Preference service A
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> if (tizen.preference.exists('key1')) {
-   console.log('Preference with the key key1 exists');
- } else {
-   console.log('Preference with the key key1 doesn't exist');
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+if (tizen.preference.exists('key1'))
+{
+&nbsp;&nbsp;&nbsp;console.log('Preference with the key key1 exists');
+}
+else
+{
+&nbsp;&nbsp;&nbsp;console.log('Preference with the key key1 doesn't exist');
+}
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre> Preference with the key key1 exists
@@ -487,12 +498,14 @@ The <em>tizen.preference</em> object provides access to the Preference service A
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var listener = function(data) {
-   console.log('Preference with the key: ' + data.key + ' has a new value: ' + data.value);
- };
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var listener = function(data)
+{
+&nbsp;&nbsp;&nbsp;console.log('Preference with the key: ' + data.key + ' has a new value: ' + data.value);
+};
 
- tizen.preference.setChangeListener('key1', listener);
- </pre>
+tizen.preference.setChangeListener('key1', listener);
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre> Preference with the key: key1 has a new value: Sample value
@@ -537,12 +550,14 @@ The <em>tizen.preference</em> object provides access to the Preference service A
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var listener = function(data) {
-   tizen.preference.unsetChangeListener(data.key);
- };
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var listener = function(data)
+{
+&nbsp;&nbsp;&nbsp;tizen.preference.unsetChangeListener(data.key);
+};
 
- tizen.preference.setChangeListener('key1', listener);
- </pre>
+tizen.preference.setChangeListener('key1', listener);
+</pre>
 </div>
 </dd>
 </dl>
@@ -586,12 +601,14 @@ The <em>tizen.preference</em> object provides access to the Preference service A
         </ul>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var listener = function(data) {
-   tizen.preference.unsetChangeListener(data.key);
- };
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var listener = function(data)
+{
+&nbsp;&nbsp;&nbsp;tizen.preference.unsetChangeListener(data.key);
+};
 
- tizen.preference.setChangeListener('key1', listener);
- </pre>
+tizen.preference.setChangeListener('key1', listener);
+</pre>
 </div>
 </dd>
 </dl>
@@ -635,14 +652,17 @@ The <em>tizen.preference</em> object provides access to the Preference service A
         </ul>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var successCB = function(preferences) {
-   if (preferences.length) {
-     console.log('First preference - key: ' + preferences[0].key + ' value: ' + preferences[0].value);
-   }
- };
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var successCB = function(preferences)
+{
+&nbsp;&nbsp;&nbsp;if (preferences.length)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('First preference - key: ' + preferences[0].key + ' value: ' + preferences[0].value);
+&nbsp;&nbsp;&nbsp;}
+};
 
- tizen.preference.getAll(successCB);
- </pre>
+tizen.preference.getAll(successCB);
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre> First preference - key: key1 value: Sample value
index 7732c3c..26aecfe 100755 (executable)
@@ -256,22 +256,25 @@ do not contain a valid value.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Defines the data to be used when this process is launched by notification service.
- var service = new tizen.ApplicationControl("http://tizen.org/appcontrol/operation/push_test");
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Defines the data to be used when this process is launched by notification service */
+var service = new tizen.ApplicationControl("http://tizen.org/appcontrol/operation/push_test");
 
- // Defines the error callback.
- function errorCallback(response) {
-   console.log( 'The following error occurred: ' +  response.name);
- }
+/* Defines the error callback */
+function errorCallback(response)
+{
+&nbsp;&nbsp;&nbsp;console.log('The following error occurred: ' +  response.name);
+}
 
- // Defines the registration success callback
- function registerSuccessCallback(id) {
-   console.log("Registration succeeded with id: " + id);
- }
+/* Defines the registration success callback */
+function registerSuccessCallback(id)
+{
+&nbsp;&nbsp;&nbsp;console.log("Registration succeeded with id: " + id);
+}
 
- // Requests registration.
- tizen.push.registerService(service, registerSuccessCallback, errorCallback);
- </pre>
+/* Requests registration */
+tizen.push.registerService(service, registerSuccessCallback, errorCallback);
+</pre>
 </div>
 </dd>
 <dt class="method" id="PushManager::register">
@@ -330,19 +333,22 @@ AbortError - If the operation cannot be finished properly.              </li>
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Defines the error callback.
- function errorCallback(response) {
-   console.log("The following error occurred: " +  response.name);
- }
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Defines the error callback */
+function errorCallback(response)
+{
+&nbsp;&nbsp;&nbsp;console.log("The following error occurred: " +  response.name);
+}
 
- // Defines the registration success callback
- function registerSuccessCallback(id) {
-   console.log("Registration succeeded with id: " + id);
- }
+/* Defines the registration success callback */
+function registerSuccessCallback(id)
+{
+&nbsp;&nbsp;&nbsp;console.log("Registration succeeded with id: " + id);
+}
 
- // Requests application registration.
- tizen.push.register(registerSuccessCallback, errorCallback);
- </pre>
+/* Requests application registration */
+tizen.push.register(registerSuccessCallback, errorCallback);
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre> Registration succeeded with id: 04a150867a50f48cb79695ac732cbe550b4a6782fffd23cbc14ba8dd5c5ab0025dad29a3e4ef5de8849b95b726bea7a6395c
@@ -414,19 +420,22 @@ UnknownError - If an unknown error occurs.              </li>
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Defines the error callback
- function errorCallback(response) {
-   console.log( 'The following error occurred: ' +  response.name);
- }
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Defines the error callback */
+function errorCallback(response)
+{
+&nbsp;&nbsp;&nbsp;console.log('The following error occurred: ' +  response.name);
+}
 
- // Defines the unregistration success callback
- function unregisterSuccessCallback() {
-   console.log("Unregistration succeeded.");
- }
+/* Defines the unregistration success callback */
+function unregisterSuccessCallback()
+{
+&nbsp;&nbsp;&nbsp;console.log("Unregistration succeeded.");
+}
 
- // Requests unregistration
- tizen.push.unregisterService(unregisterSuccessCallback, errorCallback);
- </pre>
+/* Requests unregistration */
+tizen.push.unregisterService(unregisterSuccessCallback, errorCallback);
+</pre>
 </div>
 </dd>
 <dt class="method" id="PushManager::unregister">
@@ -485,19 +494,22 @@ AbortError - If the operation cannot be finished properly.              </li>
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Defines the error callback
- function errorCallback(response) {
-   console.log("The following error occurred: " +  response.name);
- }
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Defines the error callback */
+function errorCallback(response)
+{
+&nbsp;&nbsp;&nbsp;console.log("The following error occurred: " +  response.name);
+}
 
- // Defines the unregistration success callback
- function unregisterSuccessCallback() {
-   console.log("Unregistration succeeded.");
- }
+/* Defines the unregistration success callback */
+function unregisterSuccessCallback()
+{
+&nbsp;&nbsp;&nbsp;console.log("Unregistration succeeded.");
+}
 
- // Requests unregistration
- tizen.push.unregister(unregisterSuccessCallback, errorCallback);
- </pre>
+/* Requests unregistration */
+tizen.push.unregister(unregisterSuccessCallback, errorCallback);
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre> Unregistration succeeded.
@@ -557,27 +569,31 @@ the <em>register()</em> method must be called before calling the <em>connectServ
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Defines the registration error callback.
- function errorCallback(response) {
-   console.log("The following error occurred: " +  response.name);
- }
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Defines the registration error callback */
+function errorCallback(response)
+{
+&nbsp;&nbsp;&nbsp;console.log("The following error occurred: " +  response.name);
+}
 
- // Defines the registration success callback
- function registerSuccessCallback(id) {
-   console.log("Registration succeeded with id: " + id);
- }
+/* Defines the registration success callback */
+function registerSuccessCallback(id)
+{
+&nbsp;&nbsp;&nbsp;console.log("Registration succeeded with id: " + id);
+}
 
- // Requests application registration.
- tizen.push.register(registerSuccessCallback, errorCallback);
+/* Requests application registration */
+tizen.push.register(registerSuccessCallback, errorCallback);
 
- // Defines the connect success callback
- function notificationCallback(noti) {
-   console.log("Notification received with alert message: " + noti.alertMessage);
- }
+/* Defines the connect success callback */
+function notificationCallback(noti)
+{
+&nbsp;&nbsp;&nbsp;console.log("Notification received with alert message: " + noti.alertMessage);
+}
 
- // Requests for push service connection
- tizen.push.connectService(notificationCallback);
- </pre>
+/* Requests for push service connection */
+tizen.push.connectService(notificationCallback);
+</pre>
 </div>
 </dd>
 <dt class="method" id="PushManager::disconnectService">
@@ -614,9 +630,10 @@ the <em>register()</em> method must be called before calling the <em>connectServ
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Requests disconnection
- tizen.push.disconnectService();
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Requests disconnection */
+tizen.push.disconnectService();
+</pre>
 </div>
 </dd>
 <dt class="method" id="PushManager::getRegistrationId">
@@ -657,11 +674,13 @@ the <em>register()</em> method must be called before calling the <em>connectServ
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var registrationId = tizen.push.getRegistrationId();
- if ( registrationId != null ) {
-   console.log("The registration id: " + registrationId);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var registrationId = tizen.push.getRegistrationId();
+if (registrationId != null)
+{
+&nbsp;&nbsp;&nbsp;console.log("The registration id: " + registrationId);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="PushManager::getUnreadNotifications">
@@ -715,16 +734,17 @@ Once a missed push notification is retrieved the server deletes it from its data
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Defines the connect success callback
- function notificationCallback(message) {
-     console.log("New push message : " + message.alertMessage + ", date : " + message.date + ", data : " + message.appData);
-   }
- }
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Defines the connect success callback */
+function notificationCallback(message)
+{
+&nbsp;&nbsp;&nbsp;console.log("New push message: " + message.alertMessage + ", date: " + message.date + ", data: " + message.appData);
+}
 
- // Requests for push service connection
- tizen.push.connectService(notificationCallback);
- tizen.push.getUnreadNotifications();
- </pre>
+/* Requests for push service connection */
+tizen.push.connectService(notificationCallback);
+tizen.push.getUnreadNotifications();
+</pre>
 </div>
 </dd>
 <dt class="method" id="PushManager::getPushMessage">
@@ -775,13 +795,17 @@ If the application was not launched by the push service, this method returns <em
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> try {
-   var message = tizen.push.getPushMessage();
-   console.log('Message received from: ' + message.sender);
- } catch (err) {
-   console.log('Exception - code: ' + err.name + ' message: ' + err.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+try
+{
+&nbsp;&nbsp;&nbsp;var message = tizen.push.getPushMessage();
+&nbsp;&nbsp;&nbsp;console.log('Message received from: ' + message.sender);
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log('Exception - code: ' + err.name + ' message: ' + err.message);
+}
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre> Message received from: xyz.AnotherApp
@@ -905,21 +929,23 @@ This data is the message that the sender wants to send and its length must be le
  3.0
             </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Defines the connect success callback
- function notificationCallback(noti) {
-   console.log('notification received on ' + noti.date + ' from: ' + noti.sender);
-   console.log('Details:');
-   console.log(' - data: ' + noti.appData);
-   console.log(' - alert message: ' + noti.alertMessage);
-   console.log(' - message: ' + noti.message);
-   console.log(' - session: ' + noti.sessionInfo);
-   console.log(' - request ID: ' + noti.requestId);
-   console.log(' - type: ' + noti.type);
- }
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Defines the connect success callback */
+function notificationCallback(noti)
+{
+&nbsp;&nbsp;&nbsp;console.log('notification received on ' + noti.date + ' from: ' + noti.sender);
+&nbsp;&nbsp;&nbsp;console.log('Details:');
+&nbsp;&nbsp;&nbsp;console.log(' - data: ' + noti.appData);
+&nbsp;&nbsp;&nbsp;console.log(' - alert message: ' + noti.alertMessage);
+&nbsp;&nbsp;&nbsp;console.log(' - message: ' + noti.message);
+&nbsp;&nbsp;&nbsp;console.log(' - session: ' + noti.sessionInfo);
+&nbsp;&nbsp;&nbsp;console.log(' - request ID: ' + noti.requestId);
+&nbsp;&nbsp;&nbsp;console.log(' - type: ' + noti.type);
+}
 
- // Requests for push service connection
- tizen.push.connectService(notificationCallback);
- </pre>
+/* Requests for push service connection */
+tizen.push.connectService(notificationCallback);
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre> Notification received on Thu Jan 01 2015 from: xyz.AnotherApp
index b73a15f..b774387 100644 (file)
@@ -225,22 +225,30 @@ The ErrorCallback is launched with these error types:
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> try {
-  function success(readers) {
-   for (var i = 0; i &lt; readers.length; i++) {
-    if (readers[i].isPresent) {
-     console.log ("Reader Name : " + readers[i].getName());
-    }
-   }
-  }
-  function error(err) {
-   console.log (err.name + ": " + err.message);
-  }
-  tizen.seService.getReaders(success, error);
- } catch (err) {
-  console.log (err.name + ": " + err.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+try
+{
+&nbsp;&nbsp;&nbsp;function success(readers)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; readers.length; i++)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (readers[i].isPresent)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Reader Name: " + readers[i].getName());
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;function error(err)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;tizen.seService.getReaders(success, error);
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="SEService::registerSEListener">
@@ -293,24 +301,32 @@ The ErrorCallback is launched with these error types:
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var listener = {
-   onSEReady: function(reader) {
-     console.log(reader.getName() + " is ready.");
-   },
-   onSENotReady: function(reader) {
-     console.log(reader.getName() + " is not ready.");
-   },
-   onSEError: function(reader, error) {
-     console.log(reader.getName() + ": error occurred: " + error.message);
-   }
- };
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var listener =
+{
+&nbsp;&nbsp;&nbsp;onSEReady: function(reader)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(reader.getName() + " is ready.");
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;onSENotReady: function(reader)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(reader.getName() + " is not ready.");
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;onSEError: function(reader, error)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(reader.getName() + ": error occurred: " + error.message);
+&nbsp;&nbsp;&nbsp;}
+};
 
- try {
-  var seListener = tizen.seService.registerSEListener(listener);
- } catch (err) {
-  console.log (err.name + ": " + err.message);
- }
- </pre>
+try
+{
+&nbsp;&nbsp;&nbsp;var seListener = tizen.seService.registerSEListener(listener);
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="SEService::unregisterSEListener">
@@ -356,13 +372,17 @@ The ErrorCallback is launched with these error types:
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var seListener; //seListener obtained from registerSEListener
- try {
-  tizen.seService.unregisterSEListener(seListener);
- } catch (err) {
-  console.log (err.name + ": " + err.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var seListener; /* seListener obtained from registerSEListener */
+try
+{
+&nbsp;&nbsp;&nbsp;tizen.seService.unregisterSEListener(seListener);
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="SEService::shutdown">
@@ -399,12 +419,16 @@ The ErrorCallback is launched with these error types:
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> try {
-  tizen.seService.shutdown();
- } catch (err) {
-  console.log (err.name + ": " + err.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+try
+{
+&nbsp;&nbsp;&nbsp;tizen.seService.shutdown();
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+}
+</pre>
 </div>
 </dd>
 </dl>
@@ -485,22 +509,30 @@ This interface offers methods to control sessions on the reader.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> try {
-  function success(readers) {
-   for (var i = 0; i &lt; readers.length; i++) {
-    if (readers[i].isPresent) {
-     console.log ("Reader Name : " + readers[i].getName());
-    }
-   }
-  }
-  function error(err) {
-   console.log (err.name + ": " + err.message);
-  }
-  tizen.seService.getReaders(success, error);
- } catch (err) {
-  console.log (err.name + ": " + err.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+try
+{
+&nbsp;&nbsp;&nbsp;function success(readers)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; readers.length; i++)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (readers[i].isPresent)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Reader Name: " + readers[i].getName());
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;function error(err)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;tizen.seService.getReaders(success, error);
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="Reader::openSession">
@@ -563,18 +595,24 @@ The ErrorCallback is launched with these error types:
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> try {
-  function success(session) {
-   console.log ("Open Session Success : " + !session.isClosed);
-  }
-  function error(err) {
-   console.log (err.name + ": " + err.message);
-  }
-  reader.openSession(success, error);
- } catch (err) {
-  console.log (err.name + ": " + err.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+try
+{
+&nbsp;&nbsp;&nbsp;function success(session) 
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Open Session Success: " + !session.isClosed);
+&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;function error(err)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;reader.openSession(success, error);
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="Reader::closeSessions">
@@ -611,12 +649,16 @@ The ErrorCallback is launched with these error types:
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> try {
-  reader.closeSessions();
- } catch (err) {
-  console.log (err.name + ": " + err.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+try
+{
+&nbsp;&nbsp;&nbsp;reader.closeSessions();
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+}
+</pre>
 </div>
 </dd>
 </dl>
@@ -736,31 +778,42 @@ is not compatible with the expected type for that parameter.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> try {
-  function successChannel(channel) {
-   if (channel.isBasicChannel) {
-    console.log ("Basic channel is opened.");
-   } else {
-    console.log ("Logical channel is opened.");
-   }
-  }
-  function errorChannel(err) {
-   console.log ("openBasicChannel Error :" + err.name +": " + err.message);
-  }
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+try
+{
+&nbsp;&nbsp;&nbsp;function successChannel(channel)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (channel.isBasicChannel)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Basic channel is opened.");
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;else
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Logical channel is opened.");
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;function errorChannel(err)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("openBasicChannel Error:" + err.name +": " + err.message);
+&nbsp;&nbsp;&nbsp;}
 
-  function successSession(session) {
-   console.log ("Open Session Success : " + !session.isClosed);
-   // This aid is for test. Use aid for your applet in secure element.
-   session.openBasicChannel([0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe], successChannel, errorChannel);
-  }
-  function errorSession(err) {
-   console.log ("openSession Error : " + err.name + ": " + err.message);
-  }
-  reader.openSession(successSession, errorSession);
- } catch (err) {
-  console.log (err.name + ": " + err.message);
- }
- </pre>
+&nbsp;&nbsp;&nbsp;function successSession(session)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Open Session Success: " + !session.isClosed);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* This aid is for test. Use aid for your applet in secure element */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;session.openBasicChannel([0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe], successChannel, errorChannel);
+&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;function errorSession(err)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("openSession Error: " + err.name + ": " + err.message);
+&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;reader.openSession(successSession, errorSession);
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="Session::openLogicalChannel">
@@ -840,25 +893,34 @@ The ErrorCallback is launched with these error types:
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var session; //Session obtained from openSession callback
- try {
-  function successChannel(channel) {
-   if (channel.isBasicChannel) {
-    console.log ("Basic channel is opened.");
-   } else {
-    console.log ("Logical channel is opened.");
-   }
-  }
-  function errorChannel(err) {
-   console.log ("openLogicalChannel Error :" + err.name + ": " + err.message);
-  }
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var session; /* Session obtained from openSession callback */
+try
+{
+&nbsp;&nbsp;&nbsp;function successChannel(channel)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (channel.isBasicChannel)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Basic channel is opened.");
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;else
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Logical channel is opened.");
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;function errorChannel(err)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("openLogicalChannel Error:" + err.name + ": " + err.message);
+&nbsp;&nbsp;&nbsp;}
 
-   // This aid is for test. Use aid for your applet in secure element.
-  session.openLogicalChannel([0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe], successChannel, errorChannel);
- } catch (err) {
-  console.log (err.name + ": " + err.message);
- }
- </pre>
+&nbsp;&nbsp;&nbsp;/* This aid is for test. Use aid for your applet in secure element */
+&nbsp;&nbsp;&nbsp;session.openLogicalChannel([0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe], successChannel, errorChannel);
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="Session::getATR">
@@ -899,13 +961,17 @@ The ErrorCallback is launched with these error types:
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var session; //Session obtained from openSession callback
- try {
-  var atr = session.getATR();
- } catch (err) {
-  console.log (err.name + ": " + err.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var session; /* Session obtained from openSession callback */
+try
+{
+&nbsp;&nbsp;&nbsp;var atr = session.getATR();
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="Session::close">
@@ -942,13 +1008,17 @@ The ErrorCallback is launched with these error types:
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var session; //Session obtained from openSession callback
- try {
-  session.close();
- } catch (err) {
-  console.log (err.name + ": " + err.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var session; /* Session obtained from openSession callback */
+try
+{
+&nbsp;&nbsp;&nbsp;session.close();
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="Session::closeChannels">
@@ -985,13 +1055,17 @@ The ErrorCallback is launched with these error types:
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var session; //Session obtained from openSession callback
- try {
-  session.closeChannels();
- } catch (err) {
-  console.log (err.name + ": " + err.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var session; /* Session obtained from openSession callback */
+try
+{
+&nbsp;&nbsp;&nbsp;session.closeChannels();
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+}
+</pre>
 </div>
 </dd>
 </dl>
@@ -1065,13 +1139,17 @@ The channel is defined in the ISO7816-4.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var channel; //Obtained from openLogicalChannel or openBasicChannel
- try {
-  channel.close();
- } catch (err) {
-  console.log (err.name + ": " + err.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var channel; /* Obtained from openLogicalChannel or openBasicChannel */
+try
+{
+&nbsp;&nbsp;&nbsp;channel.close();
+}
+catch (err)
+{
+&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="Channel::transmit">
index 3a269ef..8dfe9cf 100644 (file)
@@ -421,16 +421,20 @@ The supported sensor types are hardware-dependent. <br><br>To check if the given
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var proximityCapability = tizen.systeminfo.getCapability("http://tizen.org/feature/sensor.proximity");
-
- if (proximityCapability === true) {
-     // the device supports proximity sensor and you can get proximity sensor's data
-     var proximitySensor = tizen.sensorservice.getDefaultSensor("PROXIMITY");
- } else {
-     // If tizen.sensorservice.getDefaultSensor("PROXIMITY") is used, NotSupportedError would be thrown.
-     console.log("Proximity sensor is not supported on this device.");
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var proximityCapability = tizen.systeminfo.getCapability("http://tizen.org/feature/sensor.proximity");
+
+if (proximityCapability === true)
+{
+&nbsp;&nbsp;&nbsp;/* Device supports proximity sensor and you can get proximity sensor's data */
+&nbsp;&nbsp;&nbsp;var proximitySensor = tizen.sensorservice.getDefaultSensor("PROXIMITY");
+}
+else
+{
+&nbsp;&nbsp;&nbsp;/* If tizen.sensorservice.getDefaultSensor("PROXIMITY") is used, NotSupportedError is thrown */
+&nbsp;&nbsp;&nbsp;console.log("Proximity sensor is not supported on this device.");
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="SensorService::getAvailableSensors">
@@ -458,10 +462,11 @@ The supported sensor types are hardware-dependent. <br><br>To check if the given
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var sensorCapabilities = tizen.sensorservice.getAvailableSensors();
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var sensorCapabilities = tizen.sensorservice.getAvailableSensors();
 
- console.log("capable sensor : " + sensorCapabilities[0]);
- </pre>
+console.log("capable sensor: " + sensorCapabilities[0]);
+</pre>
 </div>
 </dd>
 </dl>
@@ -546,14 +551,16 @@ The supported sensor types are hardware-dependent. <br><br>To check if the given
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var proximitySensor = tizen.sensorservice.getDefaultSensor("PROXIMITY");
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var proximitySensor = tizen.sensorservice.getDefaultSensor("PROXIMITY");
 
- function onsuccessCB() {
-     console.log("The proximity sensor started successfully.");
- }
+function onsuccessCB()
+{
+&nbsp;&nbsp;&nbsp;console.log("The proximity sensor started successfully.");
+}
 
- proximitySensor.start(onsuccessCB);
- </pre>
+proximitySensor.start(onsuccessCB);
+</pre>
 </div>
 </dd>
 <dt class="method" id="Sensor::stop">
@@ -577,15 +584,17 @@ The supported sensor types are hardware-dependent. <br><br>To check if the given
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var proximitySensor = tizen.sensorservice.getDefaultSensor("PROXIMITY");
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var proximitySensor = tizen.sensorservice.getDefaultSensor("PROXIMITY");
 
- function onsuccessCB() {
-     console.log("proximity sensor start");
-     proximitySensor.stop();
- }
+function onsuccessCB()
+{
+&nbsp;&nbsp;&nbsp;console.log("proximity sensor start");
+&nbsp;&nbsp;&nbsp;proximitySensor.stop();
+}
 
- proximitySensor.start(onsuccessCB);
- </pre>
+proximitySensor.start(onsuccessCB);
+</pre>
 </div>
 </dd>
 <dt class="method" id="Sensor::setChangeListener">
@@ -649,21 +658,24 @@ The start() method must be called to turn on the sensor, or the sensor data will
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var lightSensor = tizen.sensorservice.getDefaultSensor("LIGHT");
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var lightSensor = tizen.sensorservice.getDefaultSensor("LIGHT");
 
- function onsuccessCB() {
+function onsuccessCB()
+{
      console.log("light sensor start");
- }
+}
 
- function onchangedCB(sensorData) {
+function onchangedCB(sensorData)
+{
      console.log("light level: " + sensorData.lightLevel);
- }
+}
 
- // interval and batchLatency can be ommitted.
- lightSensor.setChangeListener(onchangedCB, 200, 2000);
+/* interval and batchLatency can be omitted */
+lightSensor.setChangeListener(onchangedCB, 200, 2000);
 
- lightSensor.start(onsuccessCB);
- </pre>
+lightSensor.start(onsuccessCB);
+</pre>
 </div>
 </dd>
 <dt class="method" id="Sensor::unsetChangeListener">
@@ -687,16 +699,18 @@ The start() method must be called to turn on the sensor, or the sensor data will
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var proximitySensor = tizen.sensorservice.getDefaultSensor("PROXIMITY");
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var proximitySensor = tizen.sensorservice.getDefaultSensor("PROXIMITY");
 
- function onchangedCB(sensorData) {
-     console.log("proximity distance : " + sensorData.proximityState);
- }
+function onchangedCB(sensorData)
+{
+&nbsp;&nbsp;&nbsp;console.log("proximity distance: " + sensorData.proximityState);
+}
 
- proximitySensor.setChangeListener(onchangedCB);
+proximitySensor.setChangeListener(onchangedCB);
 
- proximitySensor.unsetChangeListener();
- </pre>
+proximitySensor.unsetChangeListener();
+</pre>
 </div>
 </dd>
 <dt class="method" id="Sensor::getSensorHardwareInfo">
@@ -744,20 +758,22 @@ IOError - If the platform fails to internally prepare a socket for IPC communica
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var gravitySensor = tizen.sensorservice.getDefaultSensor("GRAVITY");
- gravitySensor.getSensorHardwareInfo(onsuccessCB);
-
- function onsuccessCB(hardwareInfo){
-     console.log("name: " + hardwareInfo.name);
-     console.log("type: " + hardwareInfo.type);
-     console.log("vendor: " + hardwareInfo.vendor);
-     console.log("minValue: " + hardwareInfo.minValue);
-     console.log("maxValue: " + hardwareInfo.maxValue);
-     console.log("resolution: " + hardwareInfo.resolution);
-     console.log("minInterval: " + hardwareInfo.minInterval);
-     console.log("maxBatchCount: " + hardwareInfo.maxBatchCount);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var gravitySensor = tizen.sensorservice.getDefaultSensor("GRAVITY");
+gravitySensor.getSensorHardwareInfo(onsuccessCB);
+
+function onsuccessCB(hardwareInfo)
+{
+&nbsp;&nbsp;&nbsp;console.log("name: " + hardwareInfo.name);
+&nbsp;&nbsp;&nbsp;console.log("type: " + hardwareInfo.type);
+&nbsp;&nbsp;&nbsp;console.log("vendor: " + hardwareInfo.vendor);
+&nbsp;&nbsp;&nbsp;console.log("minValue: " + hardwareInfo.minValue);
+&nbsp;&nbsp;&nbsp;console.log("maxValue: " + hardwareInfo.maxValue);
+&nbsp;&nbsp;&nbsp;console.log("resolution: " + hardwareInfo.resolution);
+&nbsp;&nbsp;&nbsp;console.log("minInterval: " + hardwareInfo.minInterval);
+&nbsp;&nbsp;&nbsp;console.log("maxBatchCount: " + hardwareInfo.maxBatchCount);
+}
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre>  name: Gravity Sensor
@@ -840,24 +856,27 @@ The <em>ErrorCallback</em> method is launched with these error types:
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var lightSensor = tizen.sensorservice.getDefaultSensor("LIGHT");
-
- function onGetSuccessCB(sensorData) {
-     console.log("light level : " + sensorData.lightLevel);
- }
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var lightSensor = tizen.sensorservice.getDefaultSensor("LIGHT");
 
- function onerrorCB(error) {
-     console.log("error occured");
- }
+function onGetSuccessCB(sensorData)
+{
+&nbsp;&nbsp;&nbsp;console.log("light level: " + sensorData.lightLevel);
+}
 
- function onsuccessCB() {
-     console.log("sensor start");
-     lightSensor.getLightSensorData(onGetSuccessCB, onerrorCB);
- }
+function onerrorCB(error)
+{
+&nbsp;&nbsp;&nbsp;console.log("error occurred");
+}
 
- lightSensor.start(onsuccessCB);
+function onsuccessCB()
+{
+&nbsp;&nbsp;&nbsp;console.log("sensor start");
+&nbsp;&nbsp;&nbsp;lightSensor.getLightSensorData(onGetSuccessCB, onerrorCB);
+}
 
- </pre>
+lightSensor.start(onsuccessCB);
+</pre>
 </div>
 </dd>
 </dl>
@@ -929,26 +948,29 @@ The <em>ErrorCallback</em> method is launched with these error types:
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var magneticSensor = tizen.sensorservice.getDefaultSensor("MAGNETIC");
-
- function onGetSuccessCB(sensorData) {
-     console.log("magnetic field of the X axis : " + sensorData.x);
-     console.log("magnetic field of the Y axis : " + sensorData.y);
-     console.log("magnetic field of the Z axis : " + sensorData.z);
- }
-
- function onerrorCB(error) {
-     console.log("error occured");
- }
-
- function onsuccessCB() {
-     console.log("sensor start");
-     magneticSensor.getMagneticSensorData(onGetSuccessCB, onerrorCB);
- }
-
- magneticSensor.start(onsuccessCB);
-
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var magneticSensor = tizen.sensorservice.getDefaultSensor("MAGNETIC");
+
+function onGetSuccessCB(sensorData)
+{
+&nbsp;&nbsp;&nbsp;console.log("magnetic field of the X axis: " + sensorData.x);
+&nbsp;&nbsp;&nbsp;console.log("magnetic field of the Y axis: " + sensorData.y);
+&nbsp;&nbsp;&nbsp;console.log("magnetic field of the Z axis: " + sensorData.z);
+}
+
+function onerrorCB(error)
+{
+&nbsp;&nbsp;&nbsp;console.log("error occurred");
+}
+
+function onsuccessCB()
+{
+&nbsp;&nbsp;&nbsp;console.log("sensor start");
+&nbsp;&nbsp;&nbsp;magneticSensor.getMagneticSensorData(onGetSuccessCB, onerrorCB);
+}
+
+magneticSensor.start(onsuccessCB);
+</pre>
 </div>
 </dd>
 </dl>
@@ -1020,24 +1042,27 @@ The <em>ErrorCallback</em> method is launched with these error types:
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var pressureSensor = tizen.sensorservice.getDefaultSensor("PRESSURE");
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var pressureSensor = tizen.sensorservice.getDefaultSensor("PRESSURE");
 
- function onGetSuccessCB(sensorData) {
-     console.log("pressure : " + sensorData.pressure);
- }
+function onGetSuccessCB(sensorData)
+{
+&nbsp;&nbsp;&nbsp;console.log("pressure: " + sensorData.pressure);
+}
 
- function onerrorCB(error) {
-     console.log("error occured");
- }
+function onerrorCB(error)
+{
+&nbsp;&nbsp;&nbsp;console.log("error occurred");
+}
 
- function onsuccessCB() {
-     console.log("sensor start");
-     pressureSensor.getPressureSensorData(onGetSuccessCB, onerrorCB);
- }
+function onsuccessCB()
+{
+&nbsp;&nbsp;&nbsp;console.log("sensor start");
+&nbsp;&nbsp;&nbsp;pressureSensor.getPressureSensorData(onGetSuccessCB, onerrorCB);
+}
 
- pressureSensor.start(onsuccessCB);
-
- </pre>
+pressureSensor.start(onsuccessCB);
+</pre>
 </div>
 </dd>
 </dl>
@@ -1109,24 +1134,27 @@ The <em>ErrorCallback</em> method is launched with these error types:
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var proximitySensor = tizen.sensorservice.getDefaultSensor("PROXIMITY");
-
- function onGetSuccessCB(sensorData) {
-     console.log("proximity state : " + sensorData.proximityState);
- }
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var proximitySensor = tizen.sensorservice.getDefaultSensor("PROXIMITY");
 
- function onerrorCB(error) {
-     console.log("error occured");
- }
+function onGetSuccessCB(sensorData)
+{
+&nbsp;&nbsp;&nbsp;console.log("proximity state: " + sensorData.proximityState);
+}
 
- function onsuccessCB() {
-     console.log("proximity sensor start");
-     proximitySensor.getProximitySensorData(onGetSuccessCB, onerrorCB);
- }
+function onerrorCB(error)
+{
+&nbsp;&nbsp;&nbsp;console.log("error occurred");
+}
 
- proximitySensor.start(onsuccessCB);
+function onsuccessCB()
+{
+&nbsp;&nbsp;&nbsp;console.log("proximity sensor start");
+&nbsp;&nbsp;&nbsp;proximitySensor.getProximitySensorData(onGetSuccessCB, onerrorCB);
+}
 
- </pre>
+proximitySensor.start(onsuccessCB);
+</pre>
 </div>
 </dd>
 </dl>
@@ -1198,24 +1226,27 @@ The <em>ErrorCallback</em> method is launched with these error types:
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var ultravioletSensor = tizen.sensorservice.getDefaultSensor("ULTRAVIOLET");
-
- function onGetSuccessCB(sensorData) {
-     console.log("ultraviolet level : " + sensorData.ultravioletLevel);
- }
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var ultravioletSensor = tizen.sensorservice.getDefaultSensor("ULTRAVIOLET");
 
- function onerrorCB(error) {
-     console.log("error occured");
- }
+function onGetSuccessCB(sensorData)
+{
+&nbsp;&nbsp;&nbsp;console.log("ultraviolet level: " + sensorData.ultravioletLevel);
+}
 
- function onsuccessCB() {
-     console.log("ultraviolet sensor start");
-     ultravioletSensor.getUltravioletSensorData(onGetSuccessCB, onerrorCB);
- }
+function onerrorCB(error)
+{
+&nbsp;&nbsp;&nbsp;console.log("error occurred");
+}
 
- ultravioletSensor.start(onsuccessCB);
+function onsuccessCB()
+{
+&nbsp;&nbsp;&nbsp;console.log("ultraviolet sensor start");
+&nbsp;&nbsp;&nbsp;ultravioletSensor.getUltravioletSensorData(onGetSuccessCB, onerrorCB);
+}
 
- </pre>
+ultravioletSensor.start(onsuccessCB);
+</pre>
 </div>
 </dd>
 </dl>
@@ -1303,24 +1334,27 @@ The <em>ErrorCallback</em> method is launched with these error types:
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var HRMrawsensor = tizen.sensorservice.getDefaultSensor("HRM_RAW");
-
- function onGetSuccessCB(sensorData) {
-     console.log("HRMRaw light intensity : " + sensorData.lightIntensity);
- }
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var HRMrawsensor = tizen.sensorservice.getDefaultSensor("HRM_RAW");
 
- function onerrorCB(error) {
-     console.log("error occured");
- }
+function onGetSuccessCB(sensorData)
+{
+&nbsp;&nbsp;&nbsp;console.log("HRMRaw light intensity: " + sensorData.lightIntensity);
+}
 
- function onsuccessCB() {
-     console.log("HRMRaw sensor start");
-     HRMrawsensor.getHRMRawSensorData(onGetSuccessCB, onerrorCB);
- }
+function onerrorCB(error)
+{
+&nbsp;&nbsp;&nbsp;console.log("error occurred");
+}
 
- HRMrawsensor.start(onsuccessCB);
+function onsuccessCB()
+{
+&nbsp;&nbsp;&nbsp;console.log("HRMRaw sensor start");
+&nbsp;&nbsp;&nbsp;HRMrawsensor.getHRMRawSensorData(onGetSuccessCB, onerrorCB);
+}
 
- </pre>
+HRMrawsensor.start(onsuccessCB);
+</pre>
 </div>
 </dd>
 </dl>
@@ -1392,26 +1426,30 @@ The <em>ErrorCallback</em> method is launched with these error types:
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var gravitySensor = tizen.sensorservice.getDefaultSensor("GRAVITY");
-
- function onGetSuccessCB(sensorData) {
-     console.log("######## Get the gravity sensor data ########");
-     console.log("x: " + sensorData.x);
-     console.log("y: " + sensorData.y);
-     console.log("z: " + sensorData.z);
- }
-
- function onerrorCB(error) {
-     console.log("error occured");
- }
-
- function onsuccessCB() {
-     console.log("sensor start");
-     gravitySensor.getGravitySensorData(onGetSuccessCB, onerrorCB);
- }
-
- gravitySensor.start(onsuccessCB);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var gravitySensor = tizen.sensorservice.getDefaultSensor("GRAVITY");
+
+function onGetSuccessCB(sensorData)
+{
+&nbsp;&nbsp;&nbsp;console.log("######## Get the gravity sensor data ########");
+&nbsp;&nbsp;&nbsp;console.log("x: " + sensorData.x);
+&nbsp;&nbsp;&nbsp;console.log("y: " + sensorData.y);
+&nbsp;&nbsp;&nbsp;console.log("z: " + sensorData.z);
+}
+
+function onerrorCB(error)
+{
+&nbsp;&nbsp;&nbsp;console.log("error occurred");
+}
+
+function onsuccessCB()
+{
+&nbsp;&nbsp;&nbsp;console.log("sensor start");
+&nbsp;&nbsp;&nbsp;gravitySensor.getGravitySensorData(onGetSuccessCB, onerrorCB);
+}
+
+gravitySensor.start(onsuccessCB);
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre> sensor start
@@ -1491,26 +1529,30 @@ The <em>ErrorCallback</em> method is launched with these error types:
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var gyroscopeSensor = tizen.sensorservice.getDefaultSensor("GYROSCOPE");
-
- function onGetSuccessCB(sensorData) {
-     console.log("######## Get the gyroscope sensor date ########");
-     console.log("x: " + sensorData.x);
-     console.log("y: " + sensorData.y);
-     console.log("z: " + sensorData.z);
- }
-
- function onerrorCB(error) {
-     console.log("error occured");
- }
-
- function onsuccessCB() {
-     console.log("sensor start");
-     gyroscopeSensor.getGyroscopeSensorData(onGetSuccessCB, onerrorCB);
- }
-
- gyroscopeSensor.start(onsuccessCB);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var gyroscopeSensor = tizen.sensorservice.getDefaultSensor("GYROSCOPE");
+
+function onGetSuccessCB(sensorData)
+{
+&nbsp;&nbsp;&nbsp;console.log("######## Get the gyroscope sensor date ########");
+&nbsp;&nbsp;&nbsp;console.log("x: " + sensorData.x);
+&nbsp;&nbsp;&nbsp;console.log("y: " + sensorData.y);
+&nbsp;&nbsp;&nbsp;console.log("z: " + sensorData.z);
+}
+
+function onerrorCB(error)
+{
+&nbsp;&nbsp;&nbsp;console.log("error occurred");
+}
+
+function onsuccessCB()
+{
+&nbsp;&nbsp;&nbsp;console.log("sensor start");
+&nbsp;&nbsp;&nbsp;gyroscopeSensor.getGyroscopeSensorData(onGetSuccessCB, onerrorCB);
+}
+
+gyroscopeSensor.start(onsuccessCB);
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre> sensor start
@@ -1590,27 +1632,31 @@ The <em>ErrorCallback</em> method is launched with these error types:
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var gyroscopeRotationVectorSensor = tizen.sensorservice.getDefaultSensor("GYROSCOPE_ROTATION_VECTOR");
-
- function onGetSuccessCB(sensorData) {
-     console.log("######## Get the gyroscope rotation vector sensor data ########");
-     console.log("x: " + sensorData.x);
-     console.log("y: " + sensorData.y);
-     console.log("z: " + sensorData.z);
-     console.log("w: " + sensorData.w);
- }
-
- function onerrorCB(error) {
-     console.log("error occured");
- }
-
- function onsuccessCB() {
-     console.log("sensor start");
-     gyroscopeRotationVectorSensor.getGyroscopeRotationVectorSensorData(onGetSuccessCB, onerrorCB);
- }
-
- gyroscopeRotationVectorSensor.start(onsuccessCB);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var gyroscopeRotationVectorSensor = tizen.sensorservice.getDefaultSensor("GYROSCOPE_ROTATION_VECTOR");
+
+function onGetSuccessCB(sensorData)
+{
+&nbsp;&nbsp;&nbsp;console.log("######## Get the gyroscope rotation vector sensor data ########");
+&nbsp;&nbsp;&nbsp;console.log("x: " + sensorData.x);
+&nbsp;&nbsp;&nbsp;console.log("y: " + sensorData.y);
+&nbsp;&nbsp;&nbsp;console.log("z: " + sensorData.z);
+&nbsp;&nbsp;&nbsp;console.log("w: " + sensorData.w);
+}
+
+function onerrorCB(error)
+{
+&nbsp;&nbsp;&nbsp;console.log("error occurred");
+}
+
+function onsuccessCB()
+{
+&nbsp;&nbsp;&nbsp;console.log("sensor start");
+&nbsp;&nbsp;&nbsp;gyroscopeRotationVectorSensor.getGyroscopeRotationVectorSensorData(onGetSuccessCB, onerrorCB);
+}
+
+gyroscopeRotationVectorSensor.start(onsuccessCB);
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre> sensor start
@@ -1691,26 +1737,30 @@ The <em>ErrorCallback</em> method is launched with these error types:
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var linearAccelerationSensor = tizen.sensorservice.getDefaultSensor("LINEAR_ACCELERATION");
-
- function onGetSuccessCB(sensorData) {
-     console.log("######## Get the linear acceleration sensor data ########");
-     console.log("x: " + sensorData.x);
-     console.log("y: " + sensorData.y);
-     console.log("z: " + sensorData.z);
- }
-
- function onerrorCB(error) {
-     console.log("error occured");
- }
-
- function onsuccessCB() {
-     console.log("linear acceleration sensor start");
-     linearAccelerationSensor.getLinearAccelerationSensorData(onGetSuccessCB, onerrorCB);
- }
-
- linearAccelerationSensor.start(onsuccessCB);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var linearAccelerationSensor = tizen.sensorservice.getDefaultSensor("LINEAR_ACCELERATION");
+
+function onGetSuccessCB(sensorData)
+{
+&nbsp;&nbsp;&nbsp;console.log("######## Get the linear acceleration sensor data ########");
+&nbsp;&nbsp;&nbsp;console.log("x: " + sensorData.x);
+&nbsp;&nbsp;&nbsp;console.log("y: " + sensorData.y);
+&nbsp;&nbsp;&nbsp;console.log("z: " + sensorData.z);
+}
+
+function onerrorCB(error)
+{
+&nbsp;&nbsp;&nbsp;console.log("error occurred");
+}
+
+function onsuccessCB()
+{
+&nbsp;&nbsp;&nbsp;console.log("linear acceleration sensor start");
+&nbsp;&nbsp;&nbsp;linearAccelerationSensor.getLinearAccelerationSensorData(onGetSuccessCB, onerrorCB);
+}
+
+linearAccelerationSensor.start(onsuccessCB);
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre> linear acceleration sensor start
index 81c99a4..2397219 100644 (file)
@@ -551,12 +551,14 @@ There is a tizen.sound object that allows accessing the functionality of the Sou
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var infoArr = tizen.sound.getConnectedDeviceList();
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var infoArr = tizen.sound.getConnectedDeviceList();
 
- for (var i = 0; i &lt; infoArr.length; i++) {
-     cosole.log( infoArr[i].device );
- }
- </pre>
+for (var i = 0; i &lt; infoArr.length; i++)
+{
+&nbsp;&nbsp;&nbsp;console.log(infoArr[i].device);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="SoundManager::getActivatedDeviceList">
@@ -584,12 +586,14 @@ There is a tizen.sound object that allows accessing the functionality of the Sou
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var infoArr = tizen.sound.getActivatedDeviceList();
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var infoArr = tizen.sound.getActivatedDeviceList();
 
- for (var i = 0; i &lt; infoArr.length; i++) {
-     cosole.log( infoArr[i].device );
- }
- </pre>
+for (var i = 0; i &lt; infoArr.length; i++)
+{
+&nbsp;&nbsp;&nbsp;console.log(infoArr[i].device);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="SoundManager::addDeviceStateChangeListener">
@@ -642,28 +646,36 @@ Activation: When a device chages from being activated to being deactivated or fr
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // A callback
- var onChanged = function(info) {
-     // Some code to execute when a sound device state is changed
-     if (info.isConnected) {
-         // Some code to execute if the device is connected.
-         console.log( info.device + " is connected" );
-     } else {
-         // Some code to execute if the device is not connected.
-         console.log( info.device + " is not connected" );
-     }
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Callback */
+var onChanged = function(info)
+{
+&nbsp;&nbsp;&nbsp;/* Some code to execute when a sound device state is changed */
+&nbsp;&nbsp;&nbsp;if (info.isConnected)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Some code to execute if the device is connected */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(info.device + " is connected");
+&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;else
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Some code to execute if the device is not connected */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(info.device + " is not connected");
+&nbsp;&nbsp;&nbsp;}
 
-     if (info.isActivated) {
-         // Some code to execute if the device is activated.
-         console.log( info.device + " is activated" );
-     } else {
-         // Some code to execute if the device is not activated.
-         console.log( info.device + " is not activated" );
-     }
- }
+&nbsp;&nbsp;&nbsp;if (info.isActivated)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Some code to execute if the device is activated */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(info.device + " is activated");
+&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;else
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Some code to execute if the device is not activated */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(info.device + " is not activated");
+&nbsp;&nbsp;&nbsp;}
+}
 
- var id = tizen.sound.addDeviceStateChangeListener(onChanged);
- </pre>
+var id = tizen.sound.addDeviceStateChangeListener(onChanged);
+</pre>
 </div>
 </dd>
 <dt class="method" id="SoundManager::removeDeviceStateChangeListener">
@@ -696,9 +708,10 @@ Activation: When a device chages from being activated to being deactivated or fr
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // If a listener to be called was registered previously.
- tizen.sound.removeDeviceStateChangeListener(id);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* If a listener to be called was registered previously */
+tizen.sound.removeDeviceStateChangeListener(id);
+</pre>
 </div>
 </dd>
 </dl>
index b8fbd04..d23049e 100644 (file)
@@ -517,9 +517,10 @@ and for subscribing notifications of system information changes.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // To get total amount of system memory
- console.log("The total memory size is " + tizen.systeminfo.getTotalMemory() + " bytes.");
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* To get total amount of system memory */
+console.log("The total memory size is " + tizen.systeminfo.getTotalMemory() + " bytes.");
+</pre>
 </div>
 </dd>
 <dt class="method" id="SystemInfo::getAvailableMemory">
@@ -543,9 +544,10 @@ and for subscribing notifications of system information changes.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // To get total amount of system memory
- console.log("The available memory size is " + tizen.systeminfo.getAvailableMemory() + " bytes.");
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* To get total amount of system memory */
+console.log("The available memory size is " + tizen.systeminfo.getAvailableMemory() + " bytes.");
+</pre>
 </div>
 </dd>
 <dt class="deprecated method" id="SystemInfo::getCapabilities">
@@ -577,12 +579,14 @@ The function must synchronously acquire the capabilities of the device.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var deviceCapabilities;
- deviceCapabilities = tizen.systeminfo.getCapabilities();
- if (deviceCapabilities.bluetooth) {
-     console.log("Bluetooth is supported");
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var deviceCapabilities;
+deviceCapabilities = tizen.systeminfo.getCapabilities();
+if (deviceCapabilities.bluetooth)
+{
+&nbsp;&nbsp;&nbsp;console.log("Bluetooth is supported");
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="SystemInfo::getCapability">
@@ -625,14 +629,18 @@ The additional keys for the custom device capability are specified by OEM's and
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> try {
-     // Checks if a device supports bluetooth API or not
-     var bluetooth = tizen.systeminfo.getCapability("http://tizen.org/feature/network.bluetooth");
-     console.log(" Bluetooth = " + bluetooth);
- } catch (error) {
-     console.log("Error name: " + error.name + ", message: " + error.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+try
+{
+&nbsp;&nbsp;&nbsp;/* Checks if a device supports bluetooth API */
+&nbsp;&nbsp;&nbsp;var bluetooth = tizen.systeminfo.getCapability("http://tizen.org/feature/network.bluetooth");
+&nbsp;&nbsp;&nbsp;console.log(" Bluetooth = " + bluetooth);
+}
+catch (error)
+{
+&nbsp;&nbsp;&nbsp;console.log("Error name: " + error.name + ", message: " + error.message);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="SystemInfo::getCount">
@@ -674,13 +682,17 @@ That is the length of array retrieved by the getPropertyValueArray() method for
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var count = tizen.systeminfo.getCount("SIM");
- if (count === 0) {
-     console.log("There is no available SIM card.");
- } else {
-     console.log("There is(are) " + count + " SIM card(s) available.");
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var count = tizen.systeminfo.getCount("SIM");
+if (count === 0)
+{
+&nbsp;&nbsp;&nbsp;console.log("There is no available SIM card.");
+}
+else
+{
+&nbsp;&nbsp;&nbsp;console.log("There is(are) " + count + " SIM card(s) available.");
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="SystemInfo::getPropertyValue">
@@ -759,36 +771,45 @@ NotSupportedError - If the given <var>property</var> is not supported. (since Ti
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function onSuccessCallback(cpu) {
-     console.log("The cpu load is " + cpu.load);
- }
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function onSuccessCallback(cpu)
+{
+&nbsp;&nbsp;&nbsp;console.log("The cpu load is " + cpu.load);
+}
 
- function onErrorCallback(error) {
-     console.log("An error occurred " + error.message);
- }
+function onErrorCallback(error)
+{
+&nbsp;&nbsp;&nbsp;console.log("An error occurred " + error.message);
+}
 
- tizen.systeminfo.getPropertyValue("CPU", onSuccessCallback, onErrorCallback);
- </pre>
+tizen.systeminfo.getPropertyValue("CPU", onSuccessCallback, onErrorCallback);
+</pre>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function onSuccessCallback(cellular) {
-     console.log("The status of the cellular network is " + cellular.status);
- }
-
- function onErrorCallback(error) {
-     console.log("An error occurred " + error.message);
-     // if telephony_capability is false but getPropertyValue("CELLULAR_NETWORK, ..) is called, NotSupportedError would be passed.
- }
-
- var telephony_capability = tizen.systeminfo.getCapability("http://tizen.org/feature/network.telephony");
-
- if (telephony_capability === true) {
-     // onSuccessCallback will be invoked.
-     tizen.systeminfo.getPropertyValue("CELLULAR_NETWORK", onSuccessCallback, onErrorCallback);
- } else {
-     console.log("Telephony feature is not supported. Cellular network related information cannot be retrieved.");
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function onSuccessCallback(cellular)
+{
+&nbsp;&nbsp;&nbsp;console.log("The status of the cellular network is " + cellular.status);
+}
+
+function onErrorCallback(error)
+{
+&nbsp;&nbsp;&nbsp;console.log("An error occurred " + error.message);
+&nbsp;&nbsp;&nbsp;/* If telephony_capability is false but getPropertyValue("CELLULAR_NETWORK, ..) is called, NotSupportedError is passed */
+}
+
+var telephony_capability = tizen.systeminfo.getCapability("http://tizen.org/feature/network.telephony");
+
+if (telephony_capability === true)
+{
+&nbsp;&nbsp;&nbsp;/* onSuccessCallback will be invoked */
+&nbsp;&nbsp;&nbsp;tizen.systeminfo.getPropertyValue("CELLULAR_NETWORK", onSuccessCallback, onErrorCallback);
+}
+else
+{
+&nbsp;&nbsp;&nbsp;console.log("Telephony feature is not supported. Cellular network related information cannot be retrieved.");
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="SystemInfo::getPropertyValueArray">
@@ -863,26 +884,35 @@ NotSupportedError - If the given <var>property</var> is not supported.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function successCB(property) {
-     console.log("The SIM's current state is " + property.state);
- }
-
- function successArrayCB(properties) {
-     console.log("The number of the returned system properties is " + properties.length);
-     for (var i = 0; i &lt; properties.length; i++) {
-         console.log("[" + i + "] SIM's state is " + properties[i].state);
-     }
- }
-
- var count = tizen.systeminfo.getCount("SIM");
- if (count === 0) {
-     console.log("This device does not provide SIM card.");
- } else if (count &gt; 1) {
-     tizen.systeminfo.getPropertyValueArray("SIM", successArrayCB);
- } else {
-     tizen.systeminfo.getPropertyValue("SIM", successCB);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function successCB(property)
+{
+&nbsp;&nbsp;&nbsp;console.log("The SIM's current state is " + property.state);
+}
+
+function successArrayCB(properties)
+{
+&nbsp;&nbsp;&nbsp;console.log("The number of the returned system properties is " + properties.length);
+&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; properties.length; i++)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("[" + i + "] SIM's state is " + properties[i].state);
+&nbsp;&nbsp;&nbsp;}
+}
+
+var count = tizen.systeminfo.getCount("SIM");
+if (count === 0)
+{
+&nbsp;&nbsp;&nbsp;console.log("This device does not provide SIM card.");
+}
+else if (count &gt; 1)
+{
+&nbsp;&nbsp;&nbsp;tizen.systeminfo.getPropertyValueArray("SIM", successArrayCB);
+}
+else
+{
+&nbsp;&nbsp;&nbsp;tizen.systeminfo.getPropertyValue("SIM", successCB);
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="SystemInfo::addPropertyValueChangeListener">
@@ -986,12 +1016,14 @@ NotSupportedError - If the given <var>property</var> is not supported. (since Ti
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> function onSuccessCallback(cpu) {
-     console.log("The cpu load : " + cpu.load);
- }
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function onSuccessCallback(cpu)
+{
+&nbsp;&nbsp;&nbsp;console.log("The cpu load: " + cpu.load);
+}
 
- tizen.systeminfo.addPropertyValueChangeListener("CPU", onSuccessCallback, {lowThreshold : 0.2});
- </pre>
+tizen.systeminfo.addPropertyValueChangeListener("CPU", onSuccessCallback, {lowThreshold: 0.2});
+</pre>
 </div>
 </dd>
 <dt class="method" id="SystemInfo::addPropertyValueArrayChangeListener">
@@ -1124,16 +1156,20 @@ parameters contain an invalid value.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var id = null;
- function onSuccessCallback(cpu) {
-    console.log("New value for CPU load is " + cpu.load);
-    if (id != null) { // After receiving the first notification, we clear it
-        tizen.systeminfo.removePropertyValueChangeListener(id);
-    }
- }
-
- id = tizen.systeminfo.addPropertyValueChangeListener("CPU", onSuccessCallback);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var id = null;
+function onSuccessCallback(cpu)
+{
+&nbsp;&nbsp;&nbsp;console.log("New value for CPU load is " + cpu.load);
+&nbsp;&nbsp;&nbsp;if (id != null)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* After receiving the first notification, clear it */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tizen.systeminfo.removePropertyValueChangeListener(id);
+&nbsp;&nbsp;&nbsp;}
+}
+
+id = tizen.systeminfo.addPropertyValueChangeListener("CPU", onSuccessCallback);
+</pre>
 </div>
 </dd>
 </dl>
@@ -3399,15 +3435,15 @@ identify a mobile phone operator/carrier using the GSM, CDMA, iDEN, TETRA and UM
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> tizen.systeminfo.getPropertyValue("CAMERA_FLASH",
-    function (flash) {
-        console.log("Flash brightness is set to: " + (flash.brightness * 100).toFixed(0) + "%");
-    },
-    function (error) {
-        console.log("Error, name: " + error.name + ", message: " + error.message);
-    }
- );
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+tizen.systeminfo.getPropertyValue("CAMERA_FLASH", function(flash)
+{
+&nbsp;&nbsp;&nbsp;console.log("Flash brightness is set to: " + (flash.brightness * 100).toFixed(0) + "%");
+}, function(error)
+{
+&nbsp;&nbsp;&nbsp;console.log("Error, name: " + error.name + ", message: " + error.message);
+});
+</pre>
 </div>
 </li>
 <li class="attribute" id="SystemInfoCameraFlash::camera">
@@ -3518,19 +3554,22 @@ If the specified brightness value is not supported by the device, the brightness
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> tizen.systeminfo.getPropertyValue("CAMERA_FLASH",
-    function (flash) {
-        try {
-            flash.setBrightness(1);
-        } catch (error) {
-            console.log("Setting flash brightness failed: " + error.message);
-        }
-    },
-    function (error) {
-        console.log("Error, name: " + error.name + ", message: " + error.message);
-    }
- );
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+tizen.systeminfo.getPropertyValue("CAMERA_FLASH", function(flash)
+{
+&nbsp;&nbsp;&nbsp;try
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;flash.setBrightness(1);
+&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;catch (error)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("Setting flash brightness failed: " + error.message);
+&nbsp;&nbsp;&nbsp;}
+}, function(error)
+{
+&nbsp;&nbsp;&nbsp;console.log("Error, name: " + error.name + ", message: " + error.message);
+});
+</pre>
 </div>
 </dd>
 </dl>
index 1bfe50c..2468ba8 100644 (file)
@@ -238,37 +238,45 @@ UnknownError - If any other error occurs              </li>
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Checks whether SystemSetting API is supported.
- var systemsetting_api_supported = tizen.systeminfo.getCapability("http://tizen.org/feature/systemsetting");
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Checks whether SystemSetting API is supported */
+var systemsetting_api_supported = tizen.systeminfo.getCapability("http://tizen.org/feature/systemsetting");
 
- // Checks whether the picture on home screen can be changed or retrieved through SystemSetting API.
- var home_screen_system_setting = tizen.systeminfo.getCapability("http://tizen.org/feature/systemsetting.home_screen");
+/* Checks whether the picture on home screen can be changed or retrieved through SystemSetting API */
+var home_screen_system_setting = tizen.systeminfo.getCapability("http://tizen.org/feature/systemsetting.home_screen");
 
- // Defines the success callback.
- function successCallback() {
-     console.log("Succeeded in changing the property");
- }
+/* Defines the success callback */
+function successCallback()
+{
+&nbsp;&nbsp;&nbsp;console.log("Succeeded in changing the property");
+}
 
- // Defines the error callback.
- function errorCallback(error) {
-   console.log("Failed to change the property. Error : " + error.message);
- }
+/* Defines the error callback */
+function errorCallback(error)
+{
+&nbsp;&nbsp;&nbsp;console.log("Failed to change the property. Error: " + error.message);
+}
 
- if (systemsetting_api_supported === true) {
-     // tizen.systemsetting will be available.
-     if (home_screen_system_setting === true) {
-         // Sets the home screen image.
-         // The newHomeScreenImagePath variable should hold the path of the image to be set as home screen background
-         tizen.systemsetting.setProperty("HOME_SCREEN", newHomeScreenImagePath, successCallback, errorCallback);
-     } else {
-         // if tizen.systemsetting.setProperty("HOME_SCREEN", ..) is invoked, NotSupportedError would be returned through ErrorCallback.
-     }
- } else {
-     // tizen.systemsetting will be 'undefined'.
-     console.log("SystemSetting API is not supported on the device.");
- }
-
- </pre>
+if (systemsetting_api_supported === true)
+{
+&nbsp;&nbsp;&nbsp;/* tizen.systemsetting will be available */
+&nbsp;&nbsp;&nbsp;if (home_screen_system_setting === true)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Sets the home screen image */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* newHomeScreenImagePath variable should hold the path of the image to be set as home screen background */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tizen.systemsetting.setProperty("HOME_SCREEN", newHomeScreenImagePath, successCallback, errorCallback);
+&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;else
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* if tizen.systemsetting.setProperty("HOME_SCREEN", ..) is invoked, NotSupportedError is returned through ErrorCallback */
+&nbsp;&nbsp;&nbsp;}
+}
+else
+{
+&nbsp;&nbsp;&nbsp;/* tizen.systemsetting will be 'undefined' */
+&nbsp;&nbsp;&nbsp;console.log("SystemSetting API is not supported on the device.");
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="SystemSettingManager::getProperty">
@@ -337,21 +345,23 @@ UnknownError - If any other error occurs               </li>
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Defines the success callback
- function getPropertySuccessCallback(value) {
-     // the case : tizen.systeminfo.getCapability("http://tizen.org/feature/systemsetting.home_screen") returns 'true'.
-     console.log("Succeeded in retrieving the property. The value is " + value);
- }
-
- // Defines the error callback.
- function errorCallback(error) {
-     console.log("Failed to get the property. Error : " + error.message);
-     // If the device does not support to get the image on home screen, NotSupportedError would be thrown.
- }
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Defines the success callback */
+function getPropertySuccessCallback(value)
+{
+&nbsp;&nbsp;&nbsp;/* Case: tizen.systeminfo.getCapability("http://tizen.org/feature/systemsetting.home_screen") returns 'true' */
+&nbsp;&nbsp;&nbsp;console.log("Succeeded in retrieving the property. The value is " + value);
+}
 
- tizen.systemsetting.getProperty("HOME_SCREEN", getPropertySuccessCallback, errorCallback);
+/* Defines the error callback */
+function errorCallback(error)
+{
+&nbsp;&nbsp;&nbsp;console.log("Failed to get the property. Error: " + error.message);
+&nbsp;&nbsp;&nbsp;/* If the device does not support to get the image on home screen, NotSupportedError is thrown */
+}
 
- </pre>
+tizen.systemsetting.getProperty("HOME_SCREEN", getPropertySuccessCallback, errorCallback);
+</pre>
 </div>
 </dd>
 </dl>
index d69e785..e43b540 100644 (file)
@@ -273,9 +273,10 @@ Get timezones using getLocalTimezone() and getAvailableTimezones().            <
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var current_dt = tizen.time.getCurrentDateTime();
- console.log("current date/time is " + current_dt.toLocaleString());
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var current_dt = tizen.time.getCurrentDateTime();
+console.log("current date/time is " + current_dt.toLocaleString());
+</pre>
 </div>
 </dd>
 <dt class="method" id="TimeUtil::getLocalTimezone">
@@ -303,8 +304,9 @@ Get timezones using getLocalTimezone() and getAvailableTimezones().            <
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> console.log("The local time zone is " + tizen.time.getLocalTimezone());
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+console.log("The local time zone is " + tizen.time.getLocalTimezone());
+</pre>
 </div>
 </dd>
 <dt class="method" id="TimeUtil::getAvailableTimezones">
@@ -339,9 +341,10 @@ with the most general descriptor first and the most specific one last. For examp
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var tzids = tizen.time.getAvailableTimezones();
- console.log("The device supports " + tzids.length + " time zones.");
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var tzids = tizen.time.getAvailableTimezones();
+console.log("The device supports " + tzids.length + " time zones.");
+</pre>
 </div>
 </dd>
 <dt class="method" id="TimeUtil::getDateFormat">
@@ -486,12 +489,14 @@ parameters contain an invalid value.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var current_dt = tizen.time.getCurrentDateTime();
- var is_leap = tizen.time.isLeapYear(current_dt.getFullYear());
- if (is_leap) {
-   console.log("This year is a leap year.");
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var current_dt = tizen.time.getCurrentDateTime();
+var is_leap = tizen.time.isLeapYear(current_dt.getFullYear());
+if (is_leap)
+{
+&nbsp;&nbsp;&nbsp;console.log("This year is a leap year.");
+}
+</pre>
 </div>
 </dd>
 <dt class="method" id="TimeUtil::setDateTimeChangeListener">
@@ -533,19 +538,22 @@ Listener set with <em>setTimezoneChangeListener()</em> method is called when dev
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var changedCallback = function() {
-     try {
-         var current_dt = tizen.time.getCurrentDateTime();
-         console.log("current date/time is " + current_dt.toLocaleString());
-
-     } catch (err) {
-         console.log (err.name + ": " + err.message);
-     }
- };
-
- tizen.time.setDateTimeChangeListener(changedCallback);
-
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var changedCallback = function()
+{
+&nbsp;&nbsp;&nbsp;try
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var current_dt = tizen.time.getCurrentDateTime();
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("current date/time is " + current_dt.toLocaleString());
+&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;catch (err)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+&nbsp;&nbsp;&nbsp;}
+};
+
+tizen.time.setDateTimeChangeListener(changedCallback);
+</pre>
 </div>
 </dd>
 <dt class="method" id="TimeUtil::unsetDateTimeChangeListener">
@@ -569,19 +577,23 @@ Listener set with <em>setTimezoneChangeListener()</em> method is called when dev
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var changedCallback = function() {
-     try {
-         var current_dt = tizen.time.getCurrentDateTime();
-         console.log("current date/time is " + current_dt.toLocaleString());
-         tizen.time.unsetDateTimeChangeListener();
-     } catch (err) {
-         console.log (err.name + ": " + err.message);
-     }
- };
-
- tizen.time.setDateTimeChangeListener(changedCallback);
-
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var changedCallback = function()
+{
+&nbsp;&nbsp;&nbsp;try
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var current_dt = tizen.time.getCurrentDateTime();
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("current date/time is " + current_dt.toLocaleString());
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tizen.time.unsetDateTimeChangeListener();
+&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;catch (err)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+&nbsp;&nbsp;&nbsp;}
+};
+
+tizen.time.setDateTimeChangeListener(changedCallback);
+</pre>
 </div>
 </dd>
 <dt class="method" id="TimeUtil::setTimezoneChangeListener">
@@ -625,19 +637,23 @@ is not compatible with the expected type for that parameter.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var changedCallback = function() {
-     try {
-         // The new time zone can be retrieved through tizen.time.getLocalTimezone()
-         var zone = tizen.time.getLocalTimezone();
-         console.log("current time zone is " + zone);
-     } catch (err) {
-         console.log (err.name + ": " + err.message);
-     }
- };
-
- tizen.time.setTimezoneChangeListener(changedCallback);
-
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var changedCallback = function()
+{
+&nbsp;&nbsp;&nbsp;try
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* New time zone can be retrieved through tizen.time.getLocalTimezone() */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var zone = tizen.time.getLocalTimezone();
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("current time zone is " + zone);
+&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;catch (err)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+&nbsp;&nbsp;&nbsp;}
+};
+
+tizen.time.setTimezoneChangeListener(changedCallback);
+</pre>
 </div>
 </dd>
 <dt class="method" id="TimeUtil::unsetTimezoneChangeListener">
@@ -661,18 +677,23 @@ is not compatible with the expected type for that parameter.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var changedCallback = function() {
-     try {
-         var zone = tizen.time.getLocalTimezone();
-         console.log("current time zone is " + zone);
-         tizen.time.unsetTimezoneChangeListener();
-     } catch (err) {
-         console.log (err.name + ": " + err.message);
-     }
- };
-
- tizen.time.setTimezoneChangeListener(changedCallback);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var changedCallback = function()
+{
+&nbsp;&nbsp;&nbsp;try
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var zone = tizen.time.getLocalTimezone();
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("current time zone is " + zone);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tizen.time.unsetTimezoneChangeListener();
+&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;catch (err)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(err.name + ": " + err.message);
+&nbsp;&nbsp;&nbsp;}
+};
+
+tizen.time.setTimezoneChangeListener(changedCallback);
+</pre>
 </div>
 </dd>
 </dl>
@@ -1869,9 +1890,10 @@ is not compatible with the expected type for that parameter.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var now = tizen.time.getCurrentDateTime();
- var in_one_week = now.addDuration(new tizen.TimeDuration(7, "DAYS"));
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var now = tizen.time.getCurrentDateTime();
+var in_one_week = now.addDuration(new tizen.TimeDuration(7, "DAYS"));
+</pre>
 </div>
 </dd>
 <dt class="method" id="TZDate::toLocaleDateString">
@@ -2047,11 +2069,12 @@ savings if it is in the timezone. For example, if time zone is GMT+8, it will re
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var offset = tizen.time.getCurrentDateTime().secondsFromUTC();
- var myDate = new Date();
- var exp_offset = myDate.getTimezoneOffset()*60;
- //offset is equals to exp_offset.
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var offset = tizen.time.getCurrentDateTime().secondsFromUTC();
+var myDate = new Date();
+var exp_offset = myDate.getTimezoneOffset() * 60;
+/* offset is equal to exp_offset */
+</pre>
 </div>
 </dd>
 <dt class="method" id="TZDate::isDST">
@@ -2163,9 +2186,10 @@ identified by the TZDate object.
  1.0
           </p>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var now = tizen.time.getCurrentDateTime();
- var tomorrow = now.addDuration(new tizen.TimeDuration(1, "DAYS")); // Becomes tomorrow, same time.
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var now = tizen.time.getCurrentDateTime();
+var tomorrow = now.addDuration(new tizen.TimeDuration(1, "DAYS")); /* Becomes tomorrow, same time */
+</pre>
 </div>
 <div class="constructors">
 <h4 id="TimeDuration::constructor">Constructors</h4>
@@ -2257,16 +2281,17 @@ is not compatible with the expected type for that parameter.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // Assume that event1 and event2 are tizen.CalendarEvent objects.
- // Computes event1.duration - event2.duration
- var diff = event1.duration.difference(event2.duration);
- if (diff.length &gt; 0)
-   console.log("The event1 is longer than event2.");
- else if (diff.length == 0)
-   console.log("The duration of two events is same.");
- else
-   console.log("The event1 is shorter than the event2.");
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Assume that event1 and event2 are tizen.CalendarEvent objects */
+/* Computes event1.duration - event2.duration */
+var diff = event1.duration.difference(event2.duration);
+if (diff.length &gt; 0)
+&nbsp;&nbsp;&nbsp;console.log("The event1 is longer than event2.");
+else if (diff.length == 0)
+&nbsp;&nbsp;&nbsp;console.log("The duration of two events is same.");
+else
+&nbsp;&nbsp;&nbsp;console.log("The event1 is shorter than the event2.");
+</pre>
 </div>
 </dd>
 <dt class="method" id="TimeDuration::equalsTo">
@@ -2315,10 +2340,11 @@ is not compatible with the expected type for that parameter.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var d1 = new tizen.TimeDuration(60, "MINS"); // 60 minutes
- var d2 = new tizen.TimeDuration(1, "HOURS"); // 1 hour
- var ret = d1.equalsTo(d2); // Returns true
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var d1 = new tizen.TimeDuration(60, "MINS"); /* 60 minutes */
+var d2 = new tizen.TimeDuration(1, "HOURS"); /* 1 hour */
+var ret = d1.equalsTo(d2); /* Returns true */
+</pre>
 </div>
 </dd>
 <dt class="method" id="TimeDuration::lessThan">
@@ -2364,10 +2390,11 @@ This method takes the units into consideration when doing the comparison.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var d1 = new tizen.TimeDuration(1, "HOURS"); // 1 hour
- var d2 = new tizen.TimeDuration(120, "MINS"); // 120 minutes
- var ret = d1.lessThan(d2); // Returns true
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var d1 = new tizen.TimeDuration(1, "HOURS"); /* 1 hour */
+var d2 = new tizen.TimeDuration(120, "MINS"); /* 120 minutes */
+var ret = d1.lessThan(d2); /* Returns true */
+</pre>
 </div>
 </dd>
 <dt class="method" id="TimeDuration::greaterThan">
@@ -2414,10 +2441,11 @@ is not compatible with the expected type for that parameter.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var d1 = new tizen.TimeDuration(120, "MINS"); // 120 minutes
- var d2 = new tizen.TimeDuration(1, "HOURS"); // 1 hour
- var ret = d1.greaterThan(d2); // Returns true
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var d1 = new tizen.TimeDuration(120, "MINS"); /* 120 minutes */
+var d2 = new tizen.TimeDuration(1, "HOURS"); /* 1 hour */
+var ret = d1.greaterThan(d2); /* Returns true */
+</pre>
 </div>
 </dd>
 </dl>
index d27795e..6605d9d 100644 (file)
@@ -295,21 +295,24 @@ the specified value.
           </p>
          </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // The following example retrieves all songs from the album "The Joshua Tree".
- var count = 100;
- var offset = 0;
- var albumFilter = new tizen.AttributeFilter("album", "EXACTLY", "The Joshua Tree");
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Following example retrieves all songs from the album "The Joshua Tree" */
+var count = 100;
+var offset = 0;
+var albumFilter = new tizen.AttributeFilter("album", "EXACTLY", "The Joshua Tree");
 
- function errorCB(err) {
-     console.log( 'The following error occurred: ' +  err.name);
- }
+function errorCB(err)
+{
+&nbsp;&nbsp;&nbsp;console.log('The following error occurred: ' +  err.name);
+}
 
- function findCB(contents) {
-     console.log('The Joshua Tree :' + contents.length);
- }
+function findCB(contents)
+{
+&nbsp;&nbsp;&nbsp;console.log('The Joshua Tree:' + contents.length);
+}
 
- tizen.content.find(findCB, errorCB, null, albumFilter, null, count, offset);
- </pre>
+tizen.content.find(findCB, errorCB, null, albumFilter, null, count, offset);
+</pre>
 </div>
         
       <div class="constructors">
@@ -398,25 +401,30 @@ Range filters, where only one boundary is set, are available.
           </p>
          </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var count = 100;
- var offset = 0;
- // Use the modifiedDate attribute with a range that starts today and ends in 1 day
- // (meaning that you search for all contents modified today)
- var today = new Date();
- var today_begin = new Date(today.getFullYear(), today.getMonth(),today.getDate());
- var today_end = new Date(today.getFullYear(), today.getMonth(),today.getDate()+1);
- var dateRangeFilter = new tizen.AttributeRangeFilter("modifiedDate", today_begin, today_end);
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+var count = 100;
+var offset = 0;
+/*
+   Use the modifiedDate attribute with a range that starts today and ends in 1 day
+   (meaning that you search for all contents modified today)
+*/
+var today = new Date();
+var today_begin = new Date(today.getFullYear(), today.getMonth(), today.getDate());
+var today_end = new Date(today.getFullYear(), today.getMonth(), today.getDate()+1);
+var dateRangeFilter = new tizen.AttributeRangeFilter("modifiedDate", today_begin, today_end);
 
- function errorCB(err) {
-     console.log( 'The following error occurred: ' +  err.name);
- }
+function errorCB(err)
+{
+&nbsp;&nbsp;&nbsp;console.log('The following error occurred: ' +  err.name);
+}
 
- function findCB(contents) {
-     console.log('The contents modified today :' + contents.length);
- }
+function findCB(contents)
+{
+&nbsp;&nbsp;&nbsp;console.log('The contents modified today:' + contents.length);
+}
 
- tizen.content.find(findCB, errorCB, null, dateRangeFilter, null, count, offset);
- </pre>
+tizen.content.find(findCB, errorCB, null, dateRangeFilter, null, count, offset);
+</pre>
 </div>
         
       <div class="constructors">
@@ -504,23 +512,26 @@ The intersection - used to filter objects that match all the filters it includes
           </ul>
          </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // The following example retrieves all songs from the album "The Joshua Tree", by artist "U2".
- var count = 100;
- var offset = 0;
- var artistFilter = new tizen.AttributeFilter("artists", "EXACTLY", "U2");
- var albumFilter = new tizen.AttributeFilter("album", "EXACTLY", "The Joshua Tree");
- var filter = new tizen.CompositeFilter("INTERSECTION", [albumFilter, artistFilter]);
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Following example retrieves all songs from the album "The Joshua Tree", by artist "U2" */
+var count = 100;
+var offset = 0;
+var artistFilter = new tizen.AttributeFilter("artists", "EXACTLY", "U2");
+var albumFilter = new tizen.AttributeFilter("album", "EXACTLY", "The Joshua Tree");
+var filter = new tizen.CompositeFilter("INTERSECTION", [albumFilter, artistFilter]);
 
- function errorCB(err) {
-     console.log( 'The following error occurred: ' +  err.name);
- }
+function errorCB(err)
+{
+&nbsp;&nbsp;&nbsp;console.log('The following error occurred: ' +  err.name);
+}
 
- function findCB(contents) {
-     console.log('The Joshua Tree by U2:' + contents.length);
- }
+function findCB(contents)
+{
+&nbsp;&nbsp;&nbsp;console.log('The Joshua Tree by U2:' + contents.length);
+}
 
- tizen.content.find(findCB, errorCB, null, filter, null, count, offset);
- </pre>
+tizen.content.find(findCB, errorCB, null, filter, null, count, offset);
+</pre>
 </div>
         
       <div class="constructors">
@@ -573,34 +584,40 @@ Note that the sorting result of list type attributes is not determined.
           </p>
          </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> // The following example retrieves all songs from the album "The Joshua Tree", by artist "U2", ordered by the track number.
- var count = 100;
- var offset = 0;
- var sortMode = new tizen.SortMode("trackNumber", "ASC");
- var artistFilter = new tizen.AttributeFilter("artists", "EXACTLY", "U2");
- var albumFilter = new tizen.AttributeFilter("album", "EXACTLY", "The Joshua Tree");
- var filter = new tizen.CompositeFilter("INTERSECTION", [albumFilter, artistFilter]);
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Following example retrieves all songs from the album "The Joshua Tree", by artist "U2", ordered by the track number */
+var count = 100;
+var offset = 0;
+var sortMode = new tizen.SortMode("trackNumber", "ASC");
+var artistFilter = new tizen.AttributeFilter("artists", "EXACTLY", "U2");
+var albumFilter = new tizen.AttributeFilter("album", "EXACTLY", "The Joshua Tree");
+var filter = new tizen.CompositeFilter("INTERSECTION", [albumFilter, artistFilter]);
 
- function errorCB(err) {
-     console.log( 'The following error occurred: ' +  err.name);
- }
+function errorCB(err)
+{
+&nbsp;&nbsp;&nbsp;console.log('The following error occurred: ' +  err.name);
+}
 
- function printContent(content, index, contents) {
-     console.log('Track: ' + content.trackNumber + ' Title: ' + content.title + 'Duration: ' + content.duration + 'URL: ' + content.contentURI + 'MIME: ' + content.mimeType);
- }
+function printContent(content, index, contents)
+{
+&nbsp;&nbsp;&nbsp;console.log('Track: ' + content.trackNumber + ' Title: ' + content.title + 'Duration: ' + content.duration + 
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'URL: ' + content.contentURI + 'MIME: ' + content.mimeType);
+}
 
- function findCB(contents) {
-     console.log('The Joshua Tree by U2:');
-     contents.forEach(printContent);
-     // Increase the offset as much as the count and then find content again.
-     if (contents.length == count) {
-         offset += count;
-         tizen.content.find(findCB, errorCB, null, filter, sortMode, count, offset);
-     }
- }
+function findCB(contents)
+{
+&nbsp;&nbsp;&nbsp;console.log('The Joshua Tree by U2:');
+&nbsp;&nbsp;&nbsp;contents.forEach(printContent);
+&nbsp;&nbsp;&nbsp;/* Increase the offset as much as the count and then find content again */
+&nbsp;&nbsp;&nbsp;if (contents.length == count)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;offset += count;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tizen.content.find(findCB, errorCB, null, filter, sortMode, count, offset);
+&nbsp;&nbsp;&nbsp;}
+}
 
- tizen.content.find(findCB, errorCB, null, filter, sortMode, count, offset);
- </pre>
+tizen.content.find(findCB, errorCB, null, filter, sortMode, count, offset);
+</pre>
 </div>
 <div class="constructors">
 <h4 id="SortMode::constructor">Constructors</h4>
@@ -1157,11 +1174,13 @@ In case of successful execution of an asynchronous call, <em>SuccessCallback</em
           </p>
          </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">     function onSuccess() {
-         console.log("Application launched successfully");
-     }
-     tizen.application.launch('0pnxz8hbsr.MyFiles', onSuccess);
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+function onSuccess()
+{
+&nbsp;&nbsp;&nbsp;console.log("Application launched successfully");
+}
+tizen.application.launch('0pnxz8hbsr.MyFiles', onSuccess);
+</pre>
 </div>
 <div class="methods">
 <h4>Methods</h4>
@@ -1204,16 +1223,20 @@ it silently fails and there is no further action.
           </p>
          </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">  // Define the error callback.
-  function onerror(error) {
-    console.log(error.message);
-  }
-  function onsuccess() {
-      console.log("The application has launched successfully");
-  }
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Define the error callback */
+function onerror(error)
+{
+&nbsp;&nbsp;&nbsp;console.log(error.message);
+}
 
-  tizen.application.launch("targetApp0.main", onsuccess, onerror);
- </pre>
+function onsuccess()
+{
+&nbsp;&nbsp;&nbsp;console.log("The application has launched successfully");
+}
+
+tizen.application.launch("targetApp0.main", onsuccess, onerror);
+</pre>
 </div>
 <div class="methods">
 <h4>Methods</h4>
index 3c74d81..4aaea7d 100644 (file)
@@ -428,19 +428,23 @@ The <em>tizen.widgetservice</em> object provides access to the Widget service AP
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> //variable id should contain valid id of the installed widget
- var id = "org.tizen.gallery.widget";
- try {
-   var myWidget = tizen.widgetservice.getWidget(id);
-   console.log("Widget id is " + myWidget.id);
-   console.log("Widget details:");
-   console.log("Main application id: " + myWidget.applicationId);
-   console.log("Package id: " + myWidget.packageId);
-   console.log("Is hidden in the list of widgets: " + myWidget.noDisplay);
- } catch (error) {
-   console.log("Error: " + error.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Variable id should contain valid id of the installed widget */
+var id = "org.tizen.gallery.widget";
+try
+{
+&nbsp;&nbsp;&nbsp;var myWidget = tizen.widgetservice.getWidget(id);
+&nbsp;&nbsp;&nbsp;console.log("Widget id is " + myWidget.id);
+&nbsp;&nbsp;&nbsp;console.log("Widget details:");
+&nbsp;&nbsp;&nbsp;console.log("Main application id: " + myWidget.applicationId);
+&nbsp;&nbsp;&nbsp;console.log("Package id: " + myWidget.packageId);
+&nbsp;&nbsp;&nbsp;console.log("Is hidden in the list of widgets: " + myWidget.noDisplay);
+}
+catch (error)
+{
+&nbsp;&nbsp;&nbsp;console.log("Error: " + error.message);
+}
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre> Widget id is org.tizen.gallery.widget
@@ -515,12 +519,15 @@ NotFoundError - If the device has no widgets or if a widget with the given id do
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> tizen.widgetservice.getWidgets(function (widgets) {
-   console.log("There are " + widgets.length + " available widgets");
- }, function (error) {
-    console.log("Error: " + error.message);
- });
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+tizen.widgetservice.getWidgets(function(widgets)
+{
+&nbsp;&nbsp;&nbsp;console.log("There are " + widgets.length + " available widgets");
+}, function(error)
+{
+&nbsp;&nbsp;&nbsp;console.log("Error: " + error.message);
+});
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre> There are 3 available widgets
@@ -580,15 +587,19 @@ NotFoundError - If the device has no widgets or if a widget with the given id do
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> //variable id should contain valid id of the application or package.
- var id = "org.tizen.gallery";
- try {
-   var widgetId = tizen.widgetservice.getPrimaryWidgetId(id);
-   console.log("Widget id is " + widgetId);
- } catch (error) {
-   console.log("Error: " + error.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Variable id should contain valid id of the application or package */
+var id = "org.tizen.gallery";
+try
+{
+&nbsp;&nbsp;&nbsp;var widgetId = tizen.widgetservice.getPrimaryWidgetId(id);
+&nbsp;&nbsp;&nbsp;console.log("Widget id is " + widgetId);
+}
+catch (error)
+{
+&nbsp;&nbsp;&nbsp;console.log("Error: " + error.message);
+}
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre> Widget id is org.tizen.gallery.widget
@@ -600,7 +611,7 @@ NotFoundError - If the device has no widgets or if a widget with the given id do
 </dt>
 <dd>
 <div class="brief">
- Returns the size coresponding to the given sizeType.
+ Returns the size corresponding to the given sizeType.
             </div>
 <div class="synopsis"><pre class="signature prettyprint"><a href="#WidgetSize">WidgetSize</a> getSize(<a href="#WidgetSizeType">WidgetSizeType</a> sizeType);
              </pre></div>
@@ -629,15 +640,19 @@ NotFoundError - If the device has no widgets or if a widget with the given id do
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> //variable sizeType should contain supported size type
- var sizeType = "4x4";
- try {
-   var widgetSize = tizen.widgetservice.getSize(sizeType);
-   console.log("Widget size width: " + widgetSize.width + ", height: " + widgetSize.height);
- } catch (error) {
-   console.log("Error: " + error.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Variable sizeType should contain supported size type */
+var sizeType = "4x4";
+try
+{
+&nbsp;&nbsp;&nbsp;var widgetSize = tizen.widgetservice.getSize(sizeType);
+&nbsp;&nbsp;&nbsp;console.log("Widget size width: " + widgetSize.width + ", height: " + widgetSize.height);
+}
+catch (error)
+{
+&nbsp;&nbsp;&nbsp;console.log("Error: " + error.message);
+}
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre> Widget size width: 712, height: 712
@@ -775,17 +790,21 @@ Precondition: Widget tag in the config.xml file includes the "nodisplay" attribu
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> //variable id should contain valid id of the installed widget
- var id = "org.tizen.gallery.widget";
-
- try {
-   var myWidget = tizen.widgetservice.getWidget(id);
-   var name = myWidget.getName("en-us");
-   console.log("Widget name is " + name);
- } catch (error) {
-   console.log("Error: " + error.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Variable id should contain valid id of the installed widget */
+var id = "org.tizen.gallery.widget";
+
+try
+{
+&nbsp;&nbsp;&nbsp;var myWidget = tizen.widgetservice.getWidget(id);
+&nbsp;&nbsp;&nbsp;var name = myWidget.getName("en-us");
+&nbsp;&nbsp;&nbsp;console.log("Widget name is " + name);
+}
+catch (error)
+{
+&nbsp;&nbsp;&nbsp;console.log("Error: " + error.message);
+}
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre> Widget name is Gallery
@@ -842,24 +861,30 @@ SecurityError - If the widget does not belong to the package of the web applicat
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> widgetSuccessCb = function(instances) {
-   console.log("Instances array size: " + instances.length);
- }
-
- widgetErrorCb = function(error) {
-   console.log("Error occurred: " + error.name + ": " + error.message);
- }
-
- //variable id should contain valid id of the installed widget
- var id = "org.tizen.gallery.widget";
-
- try {
-   var myWidget = tizen.widgetservice.getWidget(id);
-   myWidget.getInstances(widgetSuccessCb, widgetErrorCb);
- } catch (error) {
-   console.log("Error: " + error.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+widgetSuccessCb = function(instances)
+{
+&nbsp;&nbsp;&nbsp;console.log("Instances array size: " + instances.length);
+}
+
+widgetErrorCb = function(error)
+{
+&nbsp;&nbsp;&nbsp;console.log("Error occurred: " + error.name + ": " + error.message);
+}
+
+/* Variable id should contain valid id of the installed widget */
+var id = "org.tizen.gallery.widget";
+
+try
+{
+&nbsp;&nbsp;&nbsp;var myWidget = tizen.widgetservice.getWidget(id);
+&nbsp;&nbsp;&nbsp;myWidget.getInstances(widgetSuccessCb, widgetErrorCb);
+}
+catch (error)
+{
+&nbsp;&nbsp;&nbsp;console.log("Error: " + error.message);
+}
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre> Instances array size: 3
@@ -905,17 +930,21 @@ SecurityError - If the widget does not belong to the package of the web applicat
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> //variable id should contain valid id of the installed widget
- var id = "org.tizen.gallery.widget";
-
- try {
-   var myWidget = tizen.widgetservice.getWidget(id);
-   var variant = myWidget.getVariant("4x4");
-   console.log("Variant preview image path is " + variant.previewImagePath);
- } catch (error) {
-   console.log("Error: " + error.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Variable id should contain valid id of the installed widget */
+var id = "org.tizen.gallery.widget";
+
+try
+{
+&nbsp;&nbsp;&nbsp;var myWidget = tizen.widgetservice.getWidget(id);
+&nbsp;&nbsp;&nbsp;var variant = myWidget.getVariant("4x4");
+&nbsp;&nbsp;&nbsp;console.log("Variant preview image path is " + variant.previewImagePath);
+}
+catch (error)
+{
+&nbsp;&nbsp;&nbsp;console.log("Error: " + error.message);
+}
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre> Variant preview image path is /usr/share/icons/default/small/preview_gallery_4x4.png
@@ -965,24 +994,30 @@ AbortError - If the operation cannot be finished properly.              </li>
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> widgetSuccessCb = function(variants) {
-   console.log("Variants array size: " + variants.length);
- }
-
- widgetErrorCb = function(error) {
-   console.log("Error occurred: " + error.name + ": " + error.message);
- }
-
- //variable id should contain valid id of the installed widget
- var id = "org.tizen.gallery.widget";
-
- try {
-   var myWidget = tizen.widgetservice.getWidget(id);
-   myWidget.getVariants(widgetSuccessCb, widgetErrorCb);
- } catch (error) {
-   console.log("Error: " + error.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+widgetSuccessCb = function(variants)
+{
+&nbsp;&nbsp;&nbsp;console.log("Variants array size: " + variants.length);
+}
+
+widgetErrorCb = function(error)
+{
+&nbsp;&nbsp;&nbsp;console.log("Error occurred: " + error.name + ": " + error.message);
+}
+
+/* Variable id should contain valid id of the installed widget */
+var id = "org.tizen.gallery.widget";
+
+try
+{
+&nbsp;&nbsp;&nbsp;var myWidget = tizen.widgetservice.getWidget(id);
+&nbsp;&nbsp;&nbsp;myWidget.getVariants(widgetSuccessCb, widgetErrorCb);
+}
+catch (error)
+{
+&nbsp;&nbsp;&nbsp;console.log("Error: " + error.message);
+}
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre> Variants array size: 4
@@ -1028,21 +1063,26 @@ AbortError - If the operation cannot be finished properly.              </li>
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> widgetChangeCb = function(instance, event) {
-   console.log("Instance " + instance.id + " is " + event);
- }
-
- //variable id should contain valid id of the installed widget
- var id = "org.tizen.music-player.widget";
-
- try {
-   var myWidget = tizen.widgetservice.getWidget(id);
-   var watchId = myWidget.addStateChangeListener(widgetChangeCb);
-   console.log("Listener with id " + watchId + " has been added");
- } catch (error) {
-   console.log("Error: " + error.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+widgetChangeCb = function(instance, event)
+{
+&nbsp;&nbsp;&nbsp;console.log("Instance " + instance.id + " is " + event);
+}
+
+/* Variable id should contain valid id of the installed widget */
+var id = "org.tizen.music-player.widget";
+
+try
+{
+&nbsp;&nbsp;&nbsp;var myWidget = tizen.widgetservice.getWidget(id);
+&nbsp;&nbsp;&nbsp;var watchId = myWidget.addStateChangeListener(widgetChangeCb);
+&nbsp;&nbsp;&nbsp;console.log("Listener with id " + watchId + " has been added");
+}
+catch (error)
+{
+&nbsp;&nbsp;&nbsp;console.log("Error: " + error.message);
+}
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre> Listener with id 1 has been added.
@@ -1080,23 +1120,28 @@ AbortError - If the operation cannot be finished properly.              </li>
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> widgetChangeCb = function(instance, event) {
-   console.log("Instance " + instance.id + " is " + event);
-   myWidget.removeStateChangeListener(watchId);
-   console.log("Listener with id " + watchId + " has been removed");
- }
-
- //variable id should contain valid id of the installed widget
- var id = "org.tizen.music-player.widget";
- var watchId;
-
- try {
-   var myWidget = tizen.widgetservice.getWidget(id);
-   watchId = myWidget.addStateChangeListener(widgetChangeCb);
- } catch (error) {
-   console.log("Error: " + error.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+widgetChangeCb = function(instance, event)
+{
+&nbsp;&nbsp;&nbsp;console.log("Instance " + instance.id + " is " + event);
+&nbsp;&nbsp;&nbsp;myWidget.removeStateChangeListener(watchId);
+&nbsp;&nbsp;&nbsp;console.log("Listener with id " + watchId + " has been removed");
+}
+
+/* Variable id should contain valid id of the installed widget */
+var id = "org.tizen.music-player.widget";
+var watchId;
+
+try
+{
+&nbsp;&nbsp;&nbsp;var myWidget = tizen.widgetservice.getWidget(id);
+&nbsp;&nbsp;&nbsp;watchId = myWidget.addStateChangeListener(widgetChangeCb);
+}
+catch (error)
+{
+&nbsp;&nbsp;&nbsp;console.log("Error: " + error.message);
+}
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre> Listener with id 1 has been removed.
@@ -1336,17 +1381,21 @@ Every visual widget element added to the home screen is a single instance of som
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> //variable instance should contain valid WidgetInstance object obtained by getInstances() method.
- var instance;
- var period = 2;
-
- try {
-   instance.changeUpdatePeriod(period);
-   console.log("Update period has been set to " + period + " seconds");
- } catch (error) {
-   console.log("Error: " + error.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Variable instance should contain valid WidgetInstance object obtained by getInstances() method */
+var instance;
+var period = 2;
+
+try
+{
+&nbsp;&nbsp;&nbsp;instance.changeUpdatePeriod(period);
+&nbsp;&nbsp;&nbsp;console.log("Update period has been set to " + period + " seconds");
+}
+catch (error)
+{
+&nbsp;&nbsp;&nbsp;console.log("Error: " + error.message);
+}
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre> Update period has been set to 2 seconds.
@@ -1400,21 +1449,26 @@ This function does not wait for a confirmation that the data was updated.
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> //variable instance should contain valid WidgetInstance object obtained by getInstances() method.
- var instance;
-
- var data = {
-  data1 : 'test1',
-  data2 : 'test2'
- };
-
- try {
-   instance.sendContent(data, true);
-   console.log("Data has been successfully sent");
- } catch (error) {
-   console.log("Error: " + error.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Variable instance should contain valid WidgetInstance object obtained by getInstances() method */
+var instance;
+
+var data =
+{
+&nbsp;&nbsp;&nbsp;data1: 'test1',
+&nbsp;&nbsp;&nbsp;data2: 'test2'
+};
+
+try
+{
+&nbsp;&nbsp;&nbsp;instance.sendContent(data, true);
+&nbsp;&nbsp;&nbsp;console.log("Data has been successfully sent");
+}
+catch (error)
+{
+&nbsp;&nbsp;&nbsp;console.log("Error: " + error.message);
+}
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre> Data has been successfully sent
@@ -1466,31 +1520,38 @@ AbortError - If the operation cannot be finished properly.              </li>
 </li></ul>
         </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> //variable instance should contain valid WidgetInstance object obtained by getInstances() method.
- var instance;
-
- contentSuccessCb = function(data) {
-  console.log("Data has been obtained successfully");
-  for (var prop in data) {
-    console.log(prop + " : " + data[prop]);
-  }
- }
-
- contentErrorCb = function(error) {
-  console.log("Error occurred: " + error.name + ":" + error.message);
- }
-
- try {
-   instance.getContent(contentSuccessCb, contentErrorCb);
- } catch (error) {
-   console.log("Error: " + error.message);
- }
- </pre>
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+/* Variable instance should contain valid WidgetInstance object obtained by getInstances() method */
+var instance;
+
+contentSuccessCb = function(data)
+{
+&nbsp;&nbsp;&nbsp;console.log("Data has been obtained successfully");
+&nbsp;&nbsp;&nbsp;for (var prop in data)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(prop + ": " + data[prop]);
+&nbsp;&nbsp;&nbsp;}
+}
+
+contentErrorCb = function(error)
+{
+&nbsp;&nbsp;&nbsp;console.log("Error occurred: " + error.name + ":" + error.message);
+}
+
+try
+{
+&nbsp;&nbsp;&nbsp;instance.getContent(contentSuccessCb, contentErrorCb);
+}
+catch (error)
+{
+&nbsp;&nbsp;&nbsp;console.log("Error: " + error.message);
+}
+</pre>
 </div>
 <div class="output">
 <span class="title"><p>Output example:</p></span><pre> Data has been obtained successfully
- data1 : test1
- data2 : test2
+ data1: test1
+ data2: test2
  </pre>
 </div>
 </dd>
index ae5abe8..2981dee 100644 (file)
@@ -56,7 +56,7 @@
 
     <tr>
         <td>
-            <pre class="intable prettyprint"><a href="#method-stop">stop</a> (  ) </pre>
+            <pre class="intable prettyprint"><a href="#method-stop">stop</a>() </pre>
         </td>
         <td><p>Stops animation or group animations.</p></td>
     </tr>
@@ -65,7 +65,7 @@
 
     <tr>
         <td>
-            <pre class="intable prettyprint"><a href="#method-transform">transform</a> (  ) </pre>
+            <pre class="intable prettyprint"><a href="#method-transform">transform</a>() </pre>
         </td>
         <td><p>Sets transform property of target.</p></td>
     </tr>
 
     <tr>
         <td>
-            <pre class="intable prettyprint"><a href="#method-tween">tween</a> (  ) </pre>
+            <pre class="intable prettyprint"><a href="#method-tween">tween</a>() </pre>
         </td>
         <td><p>Adds tween animation with animation information and target is animated.</p></td>
     </tr>
 
     <tr>
         <td>
-            <pre class="intable prettyprint">Target <a href="#method-target">target</a> ( String str ) </pre>
+            <pre class="intable prettyprint">Target <a href="#method-target">target</a>(String str) </pre>
         </td>
         <td><p>Returns animation target object</p></td>
     </tr>
@@ -99,7 +99,7 @@
             <p>Stops animation or group animations.</p>
         </div>
         <div class="synopsis">
-            <pre class="signature prettyprint">stop ( ) </pre>
+            <pre class="signature prettyprint">stop()</pre>
         </div>
 
         <div class="description">
             <p>Sets transform property of target.</p>
         </div>
         <div class="synopsis">
-            <pre class="signature prettyprint">transform ( ) </pre>
+            <pre class="signature prettyprint">transform()</pre>
         </div>
 
         <div class="description">
             <p>Adds tween animation with animation information and target is animated.</p>
         </div>
         <div class="synopsis">
-            <pre class="signature prettyprint">tween ( ) </pre>
+            <pre class="signature prettyprint">tween()</pre>
         </div>
 
         <div class="description">
             <p>Returns animation target object</p>
         </div>
         <div class="synopsis">
-            <pre class="signature prettyprint">Target target ( String str) </pre>
+            <pre class="signature prettyprint">Target target(String str)</pre>
         </div>
 
         <div class="description">
index bde0295..c7a0a5f 100644 (file)
 
 <pre class="prettyprint"><pre class="prettyprint lang-html" style="border:0px; margin:0px">&lt;!--HTML code--&gt;
 &lt;div id=&quot;1btnPopup&quot; class=&quot;ui-popup&quot;&gt;
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;div class=&quot;ui-popup-header&quot;&gt;Power saving mode&lt;/div&gt;
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;div class=&quot;ui-popup-content&quot;&gt;
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/div&gt;
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;div class=&quot;ui-popup-footer&quot;&gt;
+&nbsp;&nbsp;&nbsp;&lt;div class=&quot;ui-popup-header&quot;&gt;Power saving mode&lt;/div&gt;
+&nbsp;&nbsp;&nbsp;&lt;div class=&quot;ui-popup-content&quot;&gt;&lt;/div&gt;
+&nbsp;&nbsp;&nbsp;&lt;div class=&quot;ui-popup-footer&quot;&gt;
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;button id=&quot;1btnPopup-cancel&quot; class=&quot;ui-btn&quot;&gt;Cancel&lt;/button&gt;
 &nbsp;&nbsp;&nbsp;&lt;/div&gt;
 &lt;/div&gt;</pre><pre class="prettyprint lang-js" style="border:0px; margin:0px">/* JavaScript code */
 
 <pre class="prettyprint"><pre class="prettyprint lang-html" style="border:0px; margin:0px">&lt;!--Popup html code--&gt;
 &lt;div id=&quot;popup&quot; class=&quot;ui-popup&quot;&gt;
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;div class=&quot;ui-popup-header&quot;&gt;&lt;/div&gt;
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;div class=&quot;ui-popup-content&quot;&gt;&lt;/div&gt;
-&nbsp;&nbsp;&nbsp;&lt;/div&gt;
-&lt;/div&gt;</pre><pre class="prettyprint lang-js" style="border:0px; margin:0px">/* JavaScript code */
+&nbsp;&nbsp;&nbsp;&lt;div class=&quot;ui-popup-header&quot;&gt;&lt;/div&gt;
+&nbsp;&nbsp;&nbsp;&lt;div class=&quot;ui-popup-content&quot;&gt;&lt;/div&gt;
+&lt;/div&gt;
+</pre><pre class="prettyprint lang-js" style="border:0px; margin:0px">/* JavaScript code */
 &lt;script&gt;
 &nbsp;&nbsp;&nbsp;/* Use popup events */
 &nbsp;&nbsp;&nbsp;var popup = document.getElementById(&quot;popup&quot;);
index e157ed3..1714aad 100755 (executable)
 
 <pre class="prettyprint">
 &lt;div class=&quot;ui-page ui-page-active&quot; id=&quot;pageDrag&quot;&gt;
-       &lt;header class=&quot;ui-header&quot;&gt;
-               &lt;h2 class=&quot;ui-title&quot;&gt;Drag Event&lt;/h2&gt;
-       &lt;/header&gt;
-       &lt;div id=&quot;content&quot; class=&quot;ui-content content-padding&quot;&gt;&lt;/div&gt;
+&nbsp;&nbsp;&nbsp;&lt;header class=&quot;ui-header&quot;&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;h2 class=&quot;ui-title&quot;&gt;Drag Event&lt;/h2&gt;
+&nbsp;&nbsp;&nbsp;&lt;/header&gt;
+&nbsp;&nbsp;&nbsp;&lt;div id=&quot;content&quot; class=&quot;ui-content content-padding&quot;&gt;&lt;/div&gt;
 &lt;/div&gt;
 </pre>
 
 <h3>Javascript</h3>
 
 <pre class="prettyprint">
-(function() {
-       var page = document.getElementById("pageDrag");
-       page.addEventListener("pagebeforeshow", function() {
-               var content = document.getElementById("content");
-               tau.event.enableGesture(content, new tau.event.gesture.Drag({
-                       blockVertical: true
-               }));
-
-               content.addEventListener("dragstart", function(e) {
-                       console.log("drag start");
-               });
-
-               content.addEventListener("drag", function(e) {
-                       console.log("direction = " + e.detail.direction);
-               });
-
-               content.addEventListener("dragend", function(e) {
-                       console.log("drag end");
-               });
-       });
+(function()
+{
+&nbsp;&nbsp;&nbsp;var page = document.getElementById("pageDrag");
+&nbsp;&nbsp;&nbsp;page.addEventListener("pagebeforeshow", function()
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var content = document.getElementById("content");
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tau.event.enableGesture(content, new tau.event.gesture.Drag(
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;blockVertical: true
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}));
+
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;content.addEventListener("dragstart", function(e)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("drag start");
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;});
+
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;content.addEventListener("drag", function(e)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("direction = " + e.detail.direction);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;});
+
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;content.addEventListener("dragend", function(e)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("drag end");
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;});
+&nbsp;&nbsp;&nbsp;});
 }());
 </pre>
 
index f2c0af0..e3845ab 100755 (executable)
 <pre class="prettyprint">
 /* element is your event target element */
 tau.event.enableGesture(element, new tau.event.gesture.Drag(), new tau.event.gesture.Swipe());
-element.addEventListener(&quot;drag&quot;, function(e) {
-       console.log(&quot;drag event fired&quot;);
+element.addEventListener(&quot;drag&quot;, function(e)
+{
+&nbsp;&nbsp;&nbsp;console.log(&quot;drag event fired&quot;);
 });
-element.addEventListener(&quot;swipe&quot;, function(e) {
-       console.log(&quot;swipe event fired&quot;);
+element.addEventListener(&quot;swipe&quot;, function(e)
+{
+&nbsp;&nbsp;&nbsp;console.log(&quot;swipe event fired&quot;);
 });
 </pre>
 
index b07eec2..49657fb 100755 (executable)
 
 <pre class="prettyprint">
 &lt;div class=&quot;ui-page ui-page-active&quot; id=&quot;pageSwipe&quot;&gt;
-       &lt;header class=&quot;ui-header&quot;&gt;
-               &lt;h2 class=&quot;ui-title&quot;&gt;Swipe Event&lt;/h2&gt;
-       &lt;/header&gt;
-       &lt;div id=&quot;content&quot; class=&quot;ui-content content-padding&quot;&gt;&lt;/div&gt;
+&nbsp;&nbsp;&nbsp;&lt;header class=&quot;ui-header&quot;&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;h2 class=&quot;ui-title&quot;&gt;Swipe Event&lt;/h2&gt;
+&nbsp;&nbsp;&nbsp;&lt;/header&gt;
+&nbsp;&nbsp;&nbsp;&lt;div id=&quot;content&quot; class=&quot;ui-content content-padding&quot;&gt;&lt;/div&gt;
 &lt;/div&gt;
 </pre>
 
 <h3>Javascript</h3>
 
 <pre class="prettyprint">
-(function() {
-       var page = document.getElementById("pageSwipe");
-       page.addEventListener("pagebeforeshow", function() {
-               var content = document.getElementById("content");
-               tau.event.enableGesture(content, new tau.event.gesture.Swipe( {
-                  orientation: "horizontal"
-               }));
+(function()
+{
+&nbsp;&nbsp;&nbsp;var page = document.getElementById("pageSwipe");
+&nbsp;&nbsp;&nbsp;page.addEventListener("pagebeforeshow", function()
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var content = document.getElementById("content");
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tau.event.enableGesture(content, new tau.event.gesture.Swipe(
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;orientation: "horizontal"
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}));
 
-               content.addEventListener("swipe", function(e) {
-                  console.log("swipe direction = " + e.detail.direction);
-               });
-       });
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;content.addEventListener("swipe", function(e)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("swipe direction = " + e.detail.direction);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;});
+&nbsp;&nbsp;&nbsp;});
 }());
 </pre>
 
index 6b7afee..0f4c5db 100644 (file)
@@ -57,7 +57,7 @@
 
     <tr>
         <td>
-            <pre class="intable prettyprint">Object <a href="#method-getCalendar">getCalendar</a> (  ) </pre>
+            <pre class="intable prettyprint">Object <a href="#method-getCalendar">getCalendar</a>()</pre>
         </td>
         <td><p>Get gregorian calendar.</p></td>
     </tr>
@@ -66,7 +66,7 @@
 
     <tr>
         <td>
-            <pre class="intable prettyprint">string <a href="#method-getLocale">getLocale</a> (  ) </pre>
+            <pre class="intable prettyprint">string <a href="#method-getLocale">getLocale</a>()</pre>
         </td>
         <td><p>Get Locale.</p></td>
     </tr>
@@ -75,7 +75,7 @@
 
     <tr>
         <td>
-            <pre class="intable prettyprint"><a href="#method-importModule">importModule</a> ( string fileName ) </pre>
+            <pre class="intable prettyprint"><a href="#method-importModule">importModule</a>(string fileName) </pre>
         </td>
         <td><p>Put the module into module array of core.util.globalize</p></td>
     </tr>
@@ -84,9 +84,9 @@
 
     <tr>
         <td>
-            <pre class="intable prettyprint">Deferred <a href="#method-setLocale">setLocale</a> ( string localeId ) </pre>
+            <pre class="intable prettyprint">Deferred <a href="#method-setLocale">setLocale</a>(string localeId) </pre>
         </td>
-        <td><p>Set Locale. This API is Async API.<br />Please use deferred callback functions which are returned.done(), .then() .etc)</p></td>
+        <td><p>Set Locale. This API is Async API.<br />Please use deferred callback functions which are returned (.done(), .then() .etc)</p></td>
     </tr>
 
 
             <p>Get gregorian calendar.</p>
         </div>
         <div class="synopsis">
-            <pre class="signature prettyprint">Object getCalendar ( ) </pre>
+            <pre class="signature prettyprint">Object getCalendar() </pre>
         </div>
 
         <div class="description">
             <p>Get Locale.</p>
         </div>
         <div class="synopsis">
-            <pre class="signature prettyprint">string getLocale ( ) </pre>
+            <pre class="signature prettyprint">string getLocale() </pre>
         </div>
 
         <div class="description">
             <p>Put the module into module array of core.util.globalize</p>
         </div>
         <div class="synopsis">
-            <pre class="signature prettyprint">importModule ( string fileName) </pre>
+            <pre class="signature prettyprint">importModule(string fileName) </pre>
         </div>
 
         <div class="description">
                                                        id="method-setLocale">setLocale</span></b></code></dt>
     <dd>
         <div class="brief">
-            <p>Set Locale. This API is Async API.<br />Please use deferred callback functions which are returned.done(), .then() .etc)</p>
+            <p>Set Locale. This API is Async API.<br />Please use deferred callback functions which are returned (.done(), .then() .etc)</p>
         </div>
         <div class="synopsis">
-            <pre class="signature prettyprint">Deferred setLocale ( string localeId) </pre>
+            <pre class="signature prettyprint">Deferred setLocale(string localeId) </pre>
         </div>
 
         <div class="description">
index 9a68511..b7ce33e 100644 (file)
@@ -45,7 +45,7 @@ To support Backward compatibility, please import tau.support-2.3.js.</td>
 
 <p>To create a checkbox radio component:</p>
 
-<pre class="prettyprint">&lt;input type=&quot;checkbox&quot; name=&quot;checkbox-yes&quot; id=&quot;checkbox-yes&quot; /&gt;
+<pre class="prettyprint">&lt;input type=&quot;checkbox&quot; name=&quot;checkbox-yes&quot; id=&quot;checkbox-yes&quot;/&gt;
 &lt;label for=&quot;checkbox-yes&quot;&gt;Yes&lt;/label&gt;
 </pre>
 
@@ -67,7 +67,7 @@ To support Backward compatibility, please import tau.support-2.3.js.</td>
 
                                <tr>
                                        <td>
-                                               <pre class="intable prettyprint"><a href="#method-disable">disable</a> (  ) </pre>
+                                               <pre class="intable prettyprint"><a href="#method-disable">disable</a>() </pre>
                                        </td>
                                        <td><p>Disables the component.</p></td>
                                </tr>
@@ -76,14 +76,14 @@ To support Backward compatibility, please import tau.support-2.3.js.</td>
                        
                                <tr>
                                        <td>
-                                               <pre class="intable prettyprint"><a href="#method-enable">enable</a> (  ) </pre>
+                                               <pre class="intable prettyprint"><a href="#method-enable">enable</a>() </pre>
                                        </td>
                                        <td><p>Enables the component.</p></td>
                                </tr>
                        
                                <tr>
                                        <td>
-                                               <pre class="intable prettyprint"><a href="#method-getCheckedElement">getCheckedElement</a> (  ) </pre>
+                                               <pre class="intable prettyprint"><a href="#method-getCheckedElement">getCheckedElement</a>() </pre>
                                        </td>
                                        <td><p>Returns a checked checkbox radio element.</p></td>
                                </tr>   
@@ -124,7 +124,7 @@ To support Backward compatibility, please import tau.support-2.3.js.</td>
                                                <p>Disables the component.</p>
                                        </div>
                                        <div class="synopsis">
-                                               <pre class="signature prettyprint">disable ( ) </pre>
+                                               <pre class="signature prettyprint">disable() </pre>
                                        </div>
                                        
                                        <div class="description">
@@ -158,7 +158,8 @@ To support Backward compatibility, please import tau.support-2.3.js.</td>
                                                                example:</p><p></p></span>
                                                        <pre name="code" class="examplecode
                                                        prettyprint">
-&lt;input type=&quot;checkbox&quot; name=&quot;checkbox-1&quot; id=&quot;checkbox-1&quot;/&gt;&lt;label for=&quot;checkbox-1&quot;&gt;Normal&lt;/label&gt;
+&lt;input type=&quot;checkbox&quot; name=&quot;checkbox-1&quot; id=&quot;checkbox-1&quot;/&gt;
+&lt;label for=&quot;checkbox-1&quot;&gt;Normal&lt;/label&gt;
 &lt;script&gt;
 &nbsp;&nbsp;&nbsp;var element = document.getElementById(&quot;checkbox-1&quot;),
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;checkboxWidget = tau.widget.Checkboxradio(element);
@@ -179,7 +180,7 @@ To support Backward compatibility, please import tau.support-2.3.js.</td>
                                                <p>Enables the component.</p>
                                        </div>
                                        <div class="synopsis">
-                                               <pre class="signature prettyprint">enable ( ) </pre>
+                                               <pre class="signature prettyprint">enable() </pre>
                                        </div>
                                        
                                        <div class="description">
@@ -213,7 +214,8 @@ To support Backward compatibility, please import tau.support-2.3.js.</td>
                                                                example:</p><p></p></span>
                                                        <pre name="code" class="examplecode
                                                        prettyprint">
-&lt;input type=&quot;checkbox&quot; name=&quot;checkbox-1&quot; id=&quot;checkbox-1&quot;/&gt;&lt;label for=&quot;checkbox-1&quot;&gt;Normal&lt;/label&gt;
+&lt;input type=&quot;checkbox&quot; name=&quot;checkbox-1&quot; id=&quot;checkbox-1&quot;/&gt;
+&lt;label for=&quot;checkbox-1&quot;&gt;Normal&lt;/label&gt;
 &lt;script&gt;
 &nbsp;&nbsp;&nbsp;var element = document.getElementById(&quot;checkbox-1&quot;),
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;checkboxWidget = tau.widget.Checkboxradio(element);
@@ -233,7 +235,7 @@ To support Backward compatibility, please import tau.support-2.3.js.</td>
                                                <p>Returns a checked checkbox radio element.</p>
                                        </div>
                                        <div class="synopsis">
-                                               <pre class="signature prettyprint">HTMLElement getCheckedElement ( ) </pre>
+                                               <pre class="signature prettyprint">HTMLElement getCheckedElement() </pre>
                                        </div>
                                        
                                        <div class="description">
@@ -267,12 +269,13 @@ To support Backward compatibility, please import tau.support-2.3.js.</td>
                                                                example:</p><p></p></span>
                                                        <pre name="code" class="examplecode
                                                        prettyprint">
-&lt;input type=&quot;checkbox&quot; name=&quot;checkbox-1&quot; id=&quot;checkbox-1&quot;/&gt;&lt;label for=&quot;checkbox-1&quot;&gt;Normal&lt;/label&gt;
+&lt;input type=&quot;checkbox&quot; name=&quot;checkbox-1&quot; id=&quot;checkbox-1&quot;/&gt;
+&lt;label for=&quot;checkbox-1&quot;&gt;Normal&lt;/label&gt;
 &lt;script&gt;
 &nbsp;&nbsp;&nbsp;var element = document.getElementById(&quot;checkbox-1&quot;),
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;checkboxWidget = tau.widget.Checkboxradio(element);
 &nbsp;&nbsp;&nbsp;checkboxWidget.getCheckedElement();
-&nbsp;&nbsp;&nbsp;// Returns checked checkbox element
+&nbsp;&nbsp;&nbsp;/* Returns checked checkbox element */
 &lt;/script&gt;
 </pre>
                                                </div>
index 9b29f93..ab6f056 100644 (file)
@@ -248,7 +248,7 @@ collapsible.methodName(methodArgument1, methodArgument2, ...);
 
                 <tr>
                     <td>
-                        <pre class="intable prettyprint"><a href="#method-disable">disable</a> (  ) </pre>
+                        <pre class="intable prettyprint"><a href="#method-disable">disable</a>() </pre>
                     </td>
                     <td><p>Disables the collapsible component.</p></td>
                 </tr>
@@ -257,7 +257,7 @@ collapsible.methodName(methodArgument1, methodArgument2, ...);
 
                 <tr>
                     <td>
-                        <pre class="intable prettyprint"><a href="#method-enable">enable</a> (  ) </pre>
+                        <pre class="intable prettyprint"><a href="#method-enable">enable</a>() </pre>
                     </td>
                     <td><p>Enables the collapsible component.</p></td>
                 </tr>
@@ -266,7 +266,7 @@ collapsible.methodName(methodArgument1, methodArgument2, ...);
 
                 <tr>
                     <td>
-                        <pre class="intable prettyprint"><a href="#method-refresh">refresh</a> (  ) </pre>
+                        <pre class="intable prettyprint"><a href="#method-refresh">refresh</a>() </pre>
                     </td>
                     <td><p>Refreshes the collapsible component.</p></td>
                 </tr>
@@ -315,7 +315,7 @@ collapsible.methodName(methodArgument1, methodArgument2, ...);
                         <p>Disables the collapsible component.</p>
                     </div>
                     <div class="synopsis">
-                        <pre class="signature prettyprint">Collapsible disable ( ) </pre>
+                        <pre class="signature prettyprint">Collapsible disable() </pre>
                     </div>
 
                     <div class="description">
@@ -390,7 +390,7 @@ collapsible.methodName(methodArgument1, methodArgument2, ...);
                         <p>Enables the collapsible component.</p>
                     </div>
                     <div class="synopsis">
-                        <pre class="signature prettyprint">Collapsible enable ( ) </pre>
+                        <pre class="signature prettyprint">Collapsible enable() </pre>
                     </div>
 
                     <div class="description">
@@ -462,7 +462,7 @@ collapsible.methodName(methodArgument1, methodArgument2, ...);
                         <p>Refreshes the collapsible component.</p>
                     </div>
                     <div class="synopsis">
-                        <pre class="signature prettyprint">Collapsible refresh ( ) </pre>
+                        <pre class="signature prettyprint">Collapsible refresh() </pre>
                     </div>
 
                     <div class="description">
index cef2c6b..4a5a885 100644 (file)
@@ -170,7 +170,7 @@ To support Backward compatibility, please import tau.support-2.3.js.</td>
                <tbody>
                                <tr>
                                        <td>
-                                               <pre class="intable prettyprint"><a href="#method-destroy">destroy</a> (  ) </pre>
+                                               <pre class="intable prettyprint"><a href="#method-destroy">destroy</a>() </pre>
                                        </td>
                                        <td><p>Destroys the component.</p></td>
                                </tr>
@@ -180,7 +180,7 @@ To support Backward compatibility, please import tau.support-2.3.js.</td>
                        
                                <tr>
                                        <td>
-                                               <pre class="intable prettyprint">string <a href="#method-indexString">indexString</a> ( string? indexAlphabet ) </pre>
+                                               <pre class="intable prettyprint">string <a href="#method-indexString">indexString</a>(string? indexAlphabet) </pre>
                                        </td>
                                        <td><p>Gets or sets an index string.</p></td>
                                </tr>
@@ -190,7 +190,7 @@ To support Backward compatibility, please import tau.support-2.3.js.</td>
                        
                                <tr>
                                        <td>
-                                               <pre class="intable prettyprint"><a href="#method-refresh">refresh</a> (  ) </pre>
+                                               <pre class="intable prettyprint"><a href="#method-refresh">refresh</a>() </pre>
                                        </td>
                                        <td><p>Refreshes the component.</p></td>
                                </tr>
@@ -204,7 +204,7 @@ To support Backward compatibility, please import tau.support-2.3.js.</td>
                                                <p>Destroys the component.</p>
                                        </div>
                                        <div class="synopsis">
-                                               <pre class="signature prettyprint">destroy ( )</pre>
+                                               <pre class="signature prettyprint">destroy()</pre>
                                        </div>
 
                                                <p><span class="version">Since: </span>
@@ -289,7 +289,7 @@ To support Backward compatibility, please import tau.support-2.3.js.</td>
                                                <p>Gets or sets an index string.</p>
                                        </div>
                                        <div class="synopsis">
-                                               <pre class="signature prettyprint">?string indexString ( string? indexAlphabet) </pre>
+                                               <pre class="signature prettyprint">?string indexString(string? indexAlphabet) </pre>
                                        </div>
                                        
                                                <p><span class="version">Since: </span>
@@ -367,12 +367,12 @@ To support Backward compatibility, please import tau.support-2.3.js.</td>
 &nbsp;&nbsp;&nbsp;&lt;/div&gt;
 &lt;/div&gt;
 &lt;script&gt;
-&nbsp;&nbsp;&nbsp;// Get index string
+&nbsp;&nbsp;&nbsp;/* Get index string */
 &nbsp;&nbsp;&nbsp;var element = document.getElementById(&quot;fastscroll&quot;),
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;fastscroll = tau.widget.FastScroll(element, {fastscroll: true});
 &nbsp;&nbsp;&nbsp;fastscroll.indexString();
 
-&nbsp;&nbsp;&nbsp;// Set index string
+&nbsp;&nbsp;&nbsp;/* Set index string */
 &nbsp;&nbsp;&nbsp;fastscroll.indexString(&quot;A,D,J,P,W,Z&quot;);
 &lt;/script&gt;
 </pre>
@@ -410,7 +410,7 @@ To support Backward compatibility, please import tau.support-2.3.js.</td>
                                                <p>Refreshes the component.</p>
                                        </div>
                                        <div class="synopsis">
-                                               <pre class="signature prettyprint">refresh ( ) </pre>
+                                               <pre class="signature prettyprint">refresh() </pre>
                                        </div>
                                        
                                                <p><span class="version">Since: </span>
index 87469b7..287cdb6 100644 (file)
@@ -117,54 +117,54 @@ To support Backward compatibility, please import tau.support-2.3.js.</td>
                <tbody>         
                        <tr>
                                        <td>
-                                               <pre class="intable prettyprint"><a href="#method-add">add</a> ( string file ) </pre>
+                                               <pre class="intable prettyprint"><a href="#method-add">add</a>(string file) </pre>
                                        </td>
                                        <td><p>Adds an image to the gallery.</p></td>
                                </tr>
                        
                                <tr>
                                        <td>
-                                               <pre class="intable prettyprint"><a href="#method-empty">empty</a> (  ) </pre>
+                                               <pre class="intable prettyprint"><a href="#method-empty">empty</a>() </pre>
                                        </td>
                                        <td><p>Removes all images from the gallery.</p></td>
                                </tr>
                        
                                <tr>
                                        <td>
-                                               <pre class="intable prettyprint"><a href="#method-hide">hide</a> (  ) </pre>
+                                               <pre class="intable prettyprint"><a href="#method-hide">hide</a>() </pre>
                                        </td>
                                        <td><p>Hides the gallery.</p></td>
                                </tr>
                        <tr>
                                        <td>
-                                               <pre class="intable prettyprint">number <a href="#method-length">length</a> (  ) </pre>
+                                               <pre class="intable prettyprint">number <a href="#method-length">length</a>() </pre>
                                        </td>
                                        <td><p>Gets the number of images.</p></td>
                                </tr>
 
                                <tr>
                                        <td>
-                                               <pre class="intable prettyprint">?number <a href="#method-refresh">refresh</a> ( number? startIndex ) </pre>
+                                               <pre class="intable prettyprint">?number <a href="#method-refresh">refresh</a>(number? startIndex) </pre>
                                        </td>
                                        <td><p>Refreshes the gallery.</p></td>
                                </tr>
 
                                <tr>
                                        <td>
-                                               <pre class="intable prettyprint"><a href="#method-remove">remove</a> ( number? index ) </pre>
+                                               <pre class="intable prettyprint"><a href="#method-remove">remove</a>(number? index) </pre>
                                        </td>
                                        <td><p>Deletes a specific image from the gallery.<br />If no parameter is defined, the current image is deleted.</p></td>
                                </tr>
                
                                <tr>
                                        <td>
-                                               <pre class="intable prettyprint"><a href="#method-show">show</a> (  ) </pre>
+                                               <pre class="intable prettyprint"><a href="#method-show">show</a>() </pre>
                                        </td>
                                        <td><p>Displays the gallery.</p></td>
                                </tr>
                        <tr>
                                        <td>
-                                               <pre class="intable prettyprint">?number <a href="#method-value">value</a> ( number index ) </pre>
+                                               <pre class="intable prettyprint">?number <a href="#method-value">value</a>(number index) </pre>
                                        </td>
                                        <td><p>Gets or sets the current index of the gallery.</p></td>
                                </tr>
@@ -179,7 +179,7 @@ To support Backward compatibility, please import tau.support-2.3.js.</td>
                                                <p>Adds an image to the gallery.</p>
                                        </div>
                                        <div class="synopsis">
-                                               <pre class="signature prettyprint">add ( string file) </pre>
+                                               <pre class="signature prettyprint">add(string file) </pre>
                                        </div>
                                        
                                        <div class="description">
@@ -227,7 +227,7 @@ To support Backward compatibility, please import tau.support-2.3.js.</td>
                                                        prettyprint">
 var galleryWidget = tau.widget.Gallery(document.getElementById(&quot;gallery&quot;));
 
-galleryWidget.add(&quot;./images/01.jpg&quot;); // Image with attribute src=&quot;./images/01.jpg&quot; is added
+galleryWidget.add(&quot;./images/01.jpg&quot;); /* Image with attribute src=&quot;./images/01.jpg&quot; is added */
 galleryWidget.refresh();
 </pre>
                                                </div>                                  
@@ -238,7 +238,7 @@ galleryWidget.refresh();
                                                        prettyprint">
 $(&quot;#gallery&quot;).gallery(&quot;add&quot;, &quot;./images/01.jpg&quot;);
 $(&quot;#gallery&quot;).gallery(&quot;add&quot;, &quot;./images/02.jpg&quot;);
-$(&quot;#gallery&quot;).gallery(&quot;refresh&quot;); // To see changes, &quot;refresh&quot; method must be called
+$(&quot;#gallery&quot;).gallery(&quot;refresh&quot;); /* To see changes, &quot;refresh&quot; method must be called */
 </pre>
                                                </div>
                                        
@@ -253,7 +253,7 @@ $(&quot;#gallery&quot;).gallery(&quot;refresh&quot;); // To see changes, &quot;r
 Removes all images from the gallery.</p>
                                        </div>
                                        <div class="synopsis">
-                                               <pre class="signature prettyprint">empty ( ) </pre>
+                                               <pre class="signature prettyprint">empty() </pre>
                                        </div>
                                        
                                        <div class="description">
@@ -275,7 +275,7 @@ Removes all images from the gallery.</p>
                                                        prettyprint">
 var galleryWidget = tau.widget.Gallery(document.getElementById(&quot;gallery&quot;));
 
-galleryWidget.empty(); // All images are deleted
+galleryWidget.empty(); /* All images are deleted */
 </pre>
                                                </div>                                  
                                                <div class="example">
@@ -296,7 +296,7 @@ $(&quot;#gallery&quot;).gallery(&quot;empty&quot;);
                                                <p>Hides the gallery.</p>
                                        </div>
                                        <div class="synopsis">
-                                               <pre class="signature prettyprint">hide ( ) </pre>
+                                               <pre class="signature prettyprint">hide() </pre>
                                        </div>
                                        
                                        <div class="description">
@@ -319,7 +319,7 @@ $(&quot;#gallery&quot;).gallery(&quot;empty&quot;);
                                                        prettyprint">
 var galleryWidget = tau.widget.Gallery(document.getElementById(&quot;gallery&quot;));
 
-galleryWidget.hide(); // Gallery is hidden
+galleryWidget.hide(); /* Gallery is hidden */
 </pre>
                                                </div>                                  
                                                <div class="example">
@@ -340,7 +340,7 @@ $(&quot;#gallery&quot;).gallery(&quot;hide&quot;);
                                                <p>Gets the number of images.</p>
                                        </div>
                                        <div class="synopsis">
-                                               <pre class="signature prettyprint">number length ( ) </pre>
+                                               <pre class="signature prettyprint">number length() </pre>
                                        </div>
                                        
                                        <div class="description">
@@ -374,7 +374,7 @@ $(&quot;#gallery&quot;).gallery(&quot;hide&quot;);
 var galleryWidget = tau.widget.Gallery(document.getElementById(&quot;gallery&quot;)),
 &nbsp;&nbsp;&nbsp;&nbsp;imagesItems;
 
-imagesLength = galleryWidget.length(); // Number of images
+imagesLength = galleryWidget.length(); /* Number of images */
 </pre>
                                                </div>                                  
                                                <div class="example">
@@ -395,7 +395,7 @@ imagesLength = $(&quot;#gallery&quot;).gallery(&quot;length&quot;);
                                                <p>Refreshes the gallery.</p>
                                        </div>
                                        <div class="synopsis">
-                                               <pre class="signature prettyprint">?number refresh ( number? startIndex) </pre>
+                                               <pre class="signature prettyprint">?number refresh(number? startIndex) </pre>
                                        </div>
                                        
                                        <div class="description">
@@ -457,7 +457,7 @@ imagesLength = $(&quot;#gallery&quot;).gallery(&quot;length&quot;);
 var galleryWidget = tau.widget.Gallery(document.getElementById(&quot;gallery&quot;));
 galleryWidget.refresh();
 
-// Called automatically during option changing (option method) or value setting (value method)
+/* Called automatically during option changing (option method) or value setting (value method) */
 
 galleryWidget.option(&quot;flicking&quot;, true);
 galleryWidget.value(0);
@@ -470,7 +470,7 @@ galleryWidget.value(0);
                                                        prettyprint">
 $(&quot;#gallery&quot;).gallery(&quot;refresh&quot;);
 
-// Called automatically during option changing (option method) or value setting (value method)
+/* Called automatically during option changing (option method) or value setting (value method) */
 
 galleryWidget.option(&quot;flicking&quot;, true);
 galleryWidget.value(0);
@@ -486,7 +486,7 @@ galleryWidget.value(0);
                                                <p>Deletes a specific image from the gallery.<br />If no parameter is defined, the current image is deleted.</p>
                                        </div>
                                        <div class="synopsis">
-                                               <pre class="signature prettyprint">remove ( number? index) </pre>
+                                               <pre class="signature prettyprint">remove(number? index) </pre>
                                        </div>
                                        
                                        <div class="description">
@@ -533,7 +533,7 @@ galleryWidget.value(0);
                                                        prettyprint">
 var galleryWidget = tau.widget.Gallery(document.getElementById(&quot;gallery&quot;));
 
-galleryWidget.remove(0); // First image is removed
+galleryWidget.remove(0); /* First image is removed */
 </pre>
                                                </div>                                  
                                                <div class="example">
@@ -554,7 +554,7 @@ $(&quot;#gallery&quot;).gallery(&quot;remove&quot;, 0);
                                                <p>Displays the gallery.</p>
                                        </div>
                                        <div class="synopsis">
-                                               <pre class="signature prettyprint">show ( ) </pre>
+                                               <pre class="signature prettyprint">show() </pre>
                                        </div>
                                        
                                        <div class="description">
@@ -598,7 +598,7 @@ $(&quot;#gallery&quot;).gallery(&quot;show&quot;);
                                                <p>Gets or sets the current index of the gallery.</p>
                                        </div>
                                        <div class="synopsis">
-                                               <pre class="signature prettyprint">?number value ( number index) </pre>
+                                               <pre class="signature prettyprint">?number value(number index) </pre>
                                        </div>
                                        
                                        <div class="description">
@@ -658,9 +658,9 @@ $(&quot;#gallery&quot;).gallery(&quot;show&quot;);
                                                        <pre name="code" class="examplecode
                                                        prettyprint">
 var galleryWidget = tau.widget.Gallery(document.getElementById(&quot;gallery&quot;)),
-&nbsp;&nbsp;&nbsp;&nbsp;value = galleryWidget.value(); // Value contains the index of the current image
+&nbsp;&nbsp;&nbsp;&nbsp;value = galleryWidget.value(); /* Value contains the index of the current image */
 
-galleryWidget.value(0); // First image is displayed
+galleryWidget.value(0); /* First image is displayed */
 </pre>
                                                </div>                                  
                                                <div class="example">
@@ -668,9 +668,9 @@ galleryWidget.value(0); // First image is displayed
                                                                example (jQuery API <strong>support for backward compatibility</strong>):</p><p></p></span>
                                                        <pre name="code" class="examplecode
                                                        prettyprint">
-value = $(&quot;#gallery&quot;).gallery(&quot;value&quot;); // Value contains the index of the current image
+value = $(&quot;#gallery&quot;).gallery(&quot;value&quot;); /* Value contains the index of the current image */
 
-$(&quot;#gallery&quot;).gallery(&quot;value&quot;,  0); // First image is displayed
+$(&quot;#gallery&quot;).gallery(&quot;value&quot;, 0); /* First image is displayed */
 </pre>
                                                </div>
                                        
index c51884b..8098049 100644 (file)
@@ -44,7 +44,7 @@
 <pre class="prettyprint">
 &lt;div data-role=&quot;content&quot;&gt;
 &nbsp;&nbsp;&nbsp;&lt;video data-controls=&quot;true&quot; style=&quot;width:100%;&quot; controls&gt;
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;source src=&quot;Color_short_version.mp4&quot; type=&quot;video/mp4&quot; /&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;source src=&quot;Color_short_version.mp4&quot; type=&quot;video/mp4&quot;/&gt;
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;p&gt;Your browser does not support the video tag.&lt;/p&gt;
 &nbsp;&nbsp;&nbsp;&lt;/video&gt;
 &lt;/div&gt;
@@ -54,7 +54,7 @@
 <pre class="prettyprint">
 &lt;div data-role=&quot;content&quot;&gt;
 &nbsp;&nbsp;&nbsp;&lt;audio data-controls=&quot;true&quot; style=&quot;width:100%;&quot; controls&gt;
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;source src=&quot;Color_short_version.mp3&quot; type=&quot;audio/mpeg&quot; /&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;source src=&quot;Color_short_version.mp3&quot; type=&quot;audio/mpeg&quot;/&gt;
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;p&gt;Your browser does not support the audio tag.&lt;/p&gt;
 &nbsp;&nbsp;&nbsp;&lt;/audio&gt;
 &lt;/div&gt;
index 3a8b157..b3356ca 100644 (file)
@@ -89,10 +89,10 @@ To support Backward compatibility, please import tau.support-2.3.js.</td>
 &nbsp;&nbsp;&nbsp;&lt;p&gt;Line of message&lt;/p&gt;
 &lt;/div&gt;
 &lt;script&gt;
-&nbsp;&nbsp;&nbsp;// Get component instance or create new instance if component does not exist
+&nbsp;&nbsp;&nbsp;/* Get component instance or create new instance if component does not exist */
 &nbsp;&nbsp;&nbsp;var notification = tau.widget.Notification(document.getElementById(&quot;notification&quot;));
 
-&nbsp;&nbsp;&nbsp;// Open notification
+&nbsp;&nbsp;&nbsp;/* Open notification */
 &nbsp;&nbsp;&nbsp;notification.open();
 &lt;/script&gt;
 </pre>
@@ -108,7 +108,7 @@ To support Backward compatibility, please import tau.support-2.3.js.</td>
 &nbsp;&nbsp;&nbsp;&lt;p&gt;Line of message&lt;/p&gt;
 &lt;/div&gt;
 &lt;script&gt;
-&nbsp;&nbsp;&nbsp;// Open component using jQuery notation
+&nbsp;&nbsp;&nbsp;/* Open component using jQuery notation */
 &nbsp;&nbsp;&nbsp;$(&quot;#notification&quot;).notification(&quot;open&quot;)
 &lt;/script&gt;
 </pre>
@@ -142,10 +142,10 @@ To support Backward compatibility, please import tau.support-2.3.js.</td>
 &nbsp;&nbsp;&nbsp;&lt;p&gt;Second line of message&lt;/p&gt;
 &lt;/div&gt;
 &lt;script&gt;
-&nbsp;&nbsp;&nbsp;// Get component instance or create new instance if component does not exist
+&nbsp;&nbsp;&nbsp;/* Get component instance or create new instance if component does not exist */
 &nbsp;&nbsp;&nbsp;var notification = tau.widget.Notification(document.getElementById(&quot;notification&quot;));
 
-&nbsp;&nbsp;&nbsp;// Open notification
+&nbsp;&nbsp;&nbsp;/* Open notification */
 &nbsp;&nbsp;&nbsp;notification.open();
 &lt;/script&gt;
 </pre>
@@ -161,7 +161,7 @@ To support Backward compatibility, please import tau.support-2.3.js.</td>
 &nbsp;&nbsp;&nbsp;&lt;p&gt;Second line of message&lt;/p&gt;
 &lt;/div&gt;
 &lt;script&gt;
-&nbsp;&nbsp;&nbsp;// Open component using jQuery notation
+&nbsp;&nbsp;&nbsp;/* Open component using jQuery notation */
 &nbsp;&nbsp;&nbsp;$(&quot;#notification&quot;).notification(&quot;open&quot;)
 &lt;/script&gt;
 </pre>
@@ -173,12 +173,12 @@ To support Backward compatibility, please import tau.support-2.3.js.</td>
 <p>To create a ticker notification with an icon using the TAU API (<strong>RECOMMENDED</strong>):</p>
 
 <pre class="prettyprint">&lt;div data-role=&quot;notification&quot; id=&quot;notification&quot; data-type=&quot;ticker&quot;&gt;
-&nbsp;&nbsp;&nbsp;&lt;img src=&quot;icon.png&quot;&gt;
+&nbsp;&nbsp;&nbsp;&lt;img src=&quot;icon.png&quot;/&gt;
 &nbsp;&nbsp;&nbsp;&lt;p&gt;First line of message&lt;/p&gt;
 &nbsp;&nbsp;&nbsp;&lt;p&gt;Second line of message&lt;/p&gt;
 &lt;/div&gt;
 &lt;script&gt;
-&nbsp;&nbsp;&nbsp;// Open notification
+&nbsp;&nbsp;&nbsp;/* Open notification */
 &nbsp;&nbsp;&nbsp;notification.open();
 &lt;/script&gt;
 </pre>
@@ -190,12 +190,12 @@ To support Backward compatibility, please import tau.support-2.3.js.</td>
 <p>To create a ticker notification with an icon using the jQuery API (<strong>support for backward compatibility</strong>):</p>
 
 <pre class="prettyprint">&lt;div data-role=&quot;notification&quot; id=&quot;notification&quot; data-type=&quot;ticker&quot;&gt;
-&nbsp;&nbsp;&nbsp;&lt;img src=&quot;icon.png&quot;&gt;
+&nbsp;&nbsp;&nbsp;&lt;img src=&quot;icon.png&quot;/&gt;
 &nbsp;&nbsp;&nbsp;&lt;p&gt;First line of message&lt;/p&gt;
 &nbsp;&nbsp;&nbsp;&lt;p&gt;Second line of message&lt;/p&gt;
 &lt;/div&gt;
 &lt;script&gt;
-&nbsp;&nbsp;&nbsp;// Open component using jQuery notation
+&nbsp;&nbsp;&nbsp;/* Open component using jQuery notation */
 &nbsp;&nbsp;&nbsp;$(&quot;#notification&quot;).notification(&quot;open&quot;)
 &lt;/script&gt;
 </pre>
@@ -217,15 +217,15 @@ To support Backward compatibility, please import tau.support-2.3.js.</td>
 <p>To create a notification with an interval using the TAU API (<strong>RECOMMENDED</strong>):</p>
 
 <pre class="prettyprint">&lt;div data-role=&quot;notification&quot; id=&quot;notification&quot; data-type=&quot;ticker&quot; data-interval=&quot;4000&quot;&gt;
-&nbsp;&nbsp;&nbsp;&lt;img src=&quot;icon.png&quot;&gt;
+&nbsp;&nbsp;&nbsp;&lt;img src=&quot;icon.png&quot;/&gt;
 &nbsp;&nbsp;&nbsp;&lt;p&gt;I will close in 4* seconds!&lt;/p&gt;
 &nbsp;&nbsp;&nbsp;&lt;p&gt;* starts counting from component opening&lt;/p&gt;
 &lt;/div&gt;
 &lt;script&gt;
-&nbsp;&nbsp;&nbsp;// Get component instance or create new instance if component does not exist
+&nbsp;&nbsp;&nbsp;/* Get component instance or create new instance if component does not exist */
 &nbsp;&nbsp;&nbsp;var notification = tau.widget.Notification(document.getElementById(&quot;notification&quot;));
 
-&nbsp;&nbsp;&nbsp;// Open notification
+&nbsp;&nbsp;&nbsp;/* Open notification */
 &nbsp;&nbsp;&nbsp;notification.open();
 &lt;/script&gt;
 </pre>
@@ -237,12 +237,12 @@ To support Backward compatibility, please import tau.support-2.3.js.</td>
 <p>To create a notification with an interval using the jQuery API (<strong>support for backward compatibility</strong>):</p>
 
 <pre class="prettyprint">&lt;div data-role=&quot;notification&quot; id=&quot;notification&quot; data-type=&quot;ticker&quot; data-interval=&quot;4000&quot;&gt;
-&nbsp;&nbsp;&nbsp;&lt;img src=&quot;icon.png&quot;&gt;
+&nbsp;&nbsp;&nbsp;&lt;img src=&quot;icon.png&quot;/&gt;
 &nbsp;&nbsp;&nbsp;&lt;p&gt;I will close in 4* seconds!&lt;/p&gt;
 &nbsp;&nbsp;&nbsp;&lt;p&gt;* starts counting from component opening&lt;/p&gt;
 &lt;/div&gt;
 &lt;script&gt;
-&nbsp;&nbsp;&nbsp;// Open component using jQuery notation
+&nbsp;&nbsp;&nbsp;/* Open component using jQuery notation */
 &nbsp;&nbsp;&nbsp;$(&quot;#notification&quot;).notification(&quot;open&quot;)
 &lt;/script&gt;
 </pre>
@@ -297,7 +297,7 @@ To support Backward compatibility, please import tau.support-2.3.js.</td>
 
                                <tr>
                                        <td>
-                                               <pre class="intable prettyprint"><a href="#method-close">close</a> (  ) </pre>
+                                               <pre class="intable prettyprint"><a href="#method-close">close</a>() </pre>
                                        </td>
                                        <td><p>Closes the notification on the screen.</p></td>
                                </tr>
@@ -306,7 +306,7 @@ To support Backward compatibility, please import tau.support-2.3.js.</td>
                        
                                <tr>
                                        <td>
-                                               <pre class="intable prettyprint"><a href="#method-destroy">destroy</a> (  ) </pre>
+                                               <pre class="intable prettyprint"><a href="#method-destroy">destroy</a>() </pre>
                                        </td>
                                        <td><p>Removes the component.</p></td>
                                </tr>
@@ -315,7 +315,7 @@ To support Backward compatibility, please import tau.support-2.3.js.</td>
                        
                                <tr>
                                        <td>
-                                               <pre class="intable prettyprint"><a href="#method-disable">disable</a> (  ) </pre>
+                                               <pre class="intable prettyprint"><a href="#method-disable">disable</a>() </pre>
                                        </td>
                                        <td><p>Disables the component.</p></td>
                                </tr>
@@ -324,7 +324,7 @@ To support Backward compatibility, please import tau.support-2.3.js.</td>
                        
                                <tr>
                                        <td>
-                                               <pre class="intable prettyprint"><a href="#method-enable">enable</a> (  ) </pre>
+                                               <pre class="intable prettyprint"><a href="#method-enable">enable</a>() </pre>
                                        </td>
                                        <td><p>Enables the component.</p></td>
                                </tr>
@@ -333,7 +333,7 @@ To support Backward compatibility, please import tau.support-2.3.js.</td>
                        
                                <tr>
                                        <td>
-                                               <pre class="intable prettyprint"><a href="#method-icon">icon</a> ( string src ) </pre>
+                                               <pre class="intable prettyprint"><a href="#method-icon">icon</a>(string src) </pre>
                                        </td>
                                        <td><p>Creates an icon or changes an existing icon to a new one.</p></td>
                                </tr>
@@ -342,7 +342,7 @@ To support Backward compatibility, please import tau.support-2.3.js.</td>
                        
                                <tr>
                                        <td>
-                                               <pre class="intable prettyprint"><a href="#method-open">open</a> (  ) </pre>
+                                               <pre class="intable prettyprint"><a href="#method-open">open</a>() </pre>
                                        </td>
                                        <td><p>Displays the notification on the screen.</p></td>
                                </tr>
@@ -351,7 +351,7 @@ To support Backward compatibility, please import tau.support-2.3.js.</td>
                        
                                <tr>
                                        <td>
-                                               <pre class="intable prettyprint">Notification <a href="#method-refresh">refresh</a> (  ) </pre>
+                                               <pre class="intable prettyprint">Notification <a href="#method-refresh">refresh</a>() </pre>
                                        </td>
                                        <td><p>Refreshes the notification and resets its interval, if specified.</p></td>
                                </tr>
@@ -360,7 +360,7 @@ To support Backward compatibility, please import tau.support-2.3.js.</td>
                        
                                <tr>
                                        <td>
-                                               <pre class="intable prettyprint">Array <a href="#method-text">text</a> ( string text0, string text1 ) </pre>
+                                               <pre class="intable prettyprint">Array <a href="#method-text">text</a>(string text0, string text1) </pre>
                                        </td>
                                        <td><p>Gets or sets the notification text.</p></td>
                                </tr>
@@ -377,7 +377,7 @@ To support Backward compatibility, please import tau.support-2.3.js.</td>
                                                <p>Closes the notification on the screen.</p>
                                        </div>
                                        <div class="synopsis">
-                                               <pre class="signature prettyprint">close ( ) </pre>
+                                               <pre class="signature prettyprint">close() </pre>
                                        </div>
                                        
                                        <div class="description">
@@ -438,7 +438,7 @@ To support Backward compatibility, please import tau.support-2.3.js.</td>
                                                <p>Removes the component.</p>
                                        </div>
                                        <div class="synopsis">
-                                               <pre class="signature prettyprint">destroy ( ) </pre>
+                                               <pre class="signature prettyprint">destroy() </pre>
                                        </div>
                                        
                                        <div class="description">
@@ -489,7 +489,7 @@ To support Backward compatibility, please import tau.support-2.3.js.</td>
                                                <p>Disables the component.</p>
                                        </div>
                                        <div class="synopsis">
-                                               <pre class="signature prettyprint">disable ( ) </pre>
+                                               <pre class="signature prettyprint">disable() </pre>
                                        </div>
                                        
                                        <div class="description">
@@ -515,10 +515,10 @@ To support Backward compatibility, please import tau.support-2.3.js.</td>
 &nbsp;&nbsp;&nbsp;&lt;p&gt;Line of message&lt;/p&gt;
 &lt;/div&gt;
 &lt;script&gt;
-&nbsp;&nbsp;&nbsp;// Get component instance or create new instance if component does not exist
+&nbsp;&nbsp;&nbsp;/* Get component instance or create new instance if component does not exist */
 &nbsp;&nbsp;&nbsp;var notification = tau.widget.Notification(document.getElementById(&quot;notification&quot;));
 
-&nbsp;&nbsp;&nbsp;// Disable component
+&nbsp;&nbsp;&nbsp;/* Disable component */
 &nbsp;&nbsp;&nbsp;notification.disable();
 &lt;/script&gt;
 </pre>
@@ -533,7 +533,7 @@ To support Backward compatibility, please import tau.support-2.3.js.</td>
 &nbsp;&nbsp;&nbsp;&lt;p&gt;Line of message&lt;/p&gt;
 &lt;/div&gt;
 &lt;script&gt;
-&nbsp;&nbsp;&nbsp;// Disable component
+&nbsp;&nbsp;&nbsp;/* Disable component */
 &nbsp;&nbsp;&nbsp;$(&quot;#notification&quot;).notification(&quot;disable&quot;);
 &lt;/script&gt;
 </pre>
@@ -550,7 +550,7 @@ To support Backward compatibility, please import tau.support-2.3.js.</td>
                                                <p>Enables the component.</p>
                                        </div>
                                        <div class="synopsis">
-                                               <pre class="signature prettyprint">enable ( ) </pre>
+                                               <pre class="signature prettyprint">enable() </pre>
                                        </div>
                                        
                                        <div class="description">
@@ -576,10 +576,10 @@ To support Backward compatibility, please import tau.support-2.3.js.</td>
 &nbsp;&nbsp;&nbsp;&lt;p&gt;Line of message&lt;/p&gt;
 &lt;/div&gt;
 &lt;script&gt;
-&nbsp;&nbsp;&nbsp;// Get component instance or create new instance if component does not exist
+&nbsp;&nbsp;&nbsp;/* Get component instance or create new instance if component does not exist */
 &nbsp;&nbsp;&nbsp;var notification = tau.widget.Notification(document.getElementById(&quot;notification&quot;));
 
-&nbsp;&nbsp;&nbsp;// Enable component
+&nbsp;&nbsp;&nbsp;/* Enable component */
 &nbsp;&nbsp;&nbsp;notification.enable();
 &lt;/script&gt;
 </pre>
@@ -594,7 +594,7 @@ To support Backward compatibility, please import tau.support-2.3.js.</td>
 &nbsp;&nbsp;&nbsp;&lt;p&gt;Line of message&lt;/p&gt;
 &lt;/div&gt;
 &lt;script&gt;
-&nbsp;&nbsp;&nbsp;// Enable component
+&nbsp;&nbsp;&nbsp;/* Enable component */
 &nbsp;&nbsp;&nbsp;$(&quot;#notification&quot;).notification(&quot;enable&quot;);
 &lt;/script&gt;
 </pre>
@@ -611,7 +611,7 @@ To support Backward compatibility, please import tau.support-2.3.js.</td>
                                                <p>Creates an icon or changes an existing icon to a new one.</p>
                                        </div>
                                        <div class="synopsis">
-                                               <pre class="signature prettyprint">icon ( string src) </pre>
+                                               <pre class="signature prettyprint">icon(string src) </pre>
                                        </div>
                                        
                                        <div class="description">
@@ -692,7 +692,7 @@ To support Backward compatibility, please import tau.support-2.3.js.</td>
                                                <p>Displays the notification on the screen.</p>
                                        </div>
                                        <div class="synopsis">
-                                               <pre class="signature prettyprint">open ( ) </pre>
+                                               <pre class="signature prettyprint">open() </pre>
                                        </div>
                                        
                                        <div class="description">
@@ -753,7 +753,7 @@ To support Backward compatibility, please import tau.support-2.3.js.</td>
                                                <p>Refreshes the notification and resets its interval, if specified.</p>
                                        </div>
                                        <div class="synopsis">
-                                               <pre class="signature prettyprint">Notification refresh ( ) </pre>
+                                               <pre class="signature prettyprint">Notification refresh() </pre>
                                        </div>
                                        
                                        <div class="description">
@@ -825,7 +825,7 @@ To support Backward compatibility, please import tau.support-2.3.js.</td>
                                                <p>Gets or sets the notification text.</p>
                                        </div>
                                        <div class="synopsis">
-                                               <pre class="signature prettyprint">Array text ( string text0, string text1) </pre>
+                                               <pre class="signature prettyprint">Array text(string text0, string text1) </pre>
                                        </div>
                                        
                                        <div class="description">
@@ -899,7 +899,7 @@ To support Backward compatibility, please import tau.support-2.3.js.</td>
 &nbsp;&nbsp;&nbsp;var widgetText = notification.text();
 
 &nbsp;&nbsp;&nbsp;alert(widgetText);
-&nbsp;&nbsp;&nbsp;// Alert &quot;Line of message,Second line of message&quot;
+&nbsp;&nbsp;&nbsp;/* Alert &quot;Line of message,Second line of message&quot; */
 &lt;/script&gt;
 </pre>
                                                </div>
@@ -917,7 +917,7 @@ To support Backward compatibility, please import tau.support-2.3.js.</td>
 &nbsp;&nbsp;&nbsp;var widgetText = $(&quot;#notificationSelector&quot;).notification(&quot;text&quot;);
 
 &nbsp;&nbsp;&nbsp;alert(widgetText);
-&nbsp;&nbsp;&nbsp;// Alert &quot;Line of message,Second line of message&quot;
+&nbsp;&nbsp;&nbsp;/* Alert &quot;Line of message,Second line of message&quot; */
 &lt;/script&gt;
 </pre>
                                                </div>
index bff30cd..e252794 100644 (file)
@@ -197,7 +197,7 @@ To support Backward compatibility, please import tau.support-2.3.js.</td>
                        
                                <tr>
                                        <td>
-                                               <pre class="intable prettyprint">ProgressBar <a href="#method-refresh">refresh</a> (  ) </pre>
+                                               <pre class="intable prettyprint">ProgressBar <a href="#method-refresh">refresh</a>() </pre>
                                        </td>
                                        <td><p>Refreshes a progress bar.</p></td>
                                </tr>
@@ -208,7 +208,7 @@ To support Backward compatibility, please import tau.support-2.3.js.</td>
                        
                                <tr>
                                        <td>
-                                               <pre class="intable prettyprint">number <a href="#method-value">value</a> ( number? value ) </pre>
+                                               <pre class="intable prettyprint">number <a href="#method-value">value</a>(number? value) </pre>
                                        </td>
                                        <td><p>Gets or sets a value.</p></td>
                                </tr>
@@ -225,7 +225,7 @@ To support Backward compatibility, please import tau.support-2.3.js.</td>
                                                <p>Refreshes a progress bar.</p>
                                        </div>
                                        <div class="synopsis">
-                                               <pre class="signature prettyprint">ProgressBar refresh ( ) </pre>
+                                               <pre class="signature prettyprint">ProgressBar refresh() </pre>
                                        </div>
                                        
                                        <div class="description">
@@ -298,7 +298,7 @@ To support Backward compatibility, please import tau.support-2.3.js.</td>
                                                <p>Gets or sets a value.</p>
                                        </div>
                                        <div class="synopsis">
-                                               <pre class="signature prettyprint">number value ( number? value) </pre>
+                                               <pre class="signature prettyprint">number value(number? value) </pre>
                                        </div>
                                        
                                                <p><span class="version">Since: </span>
@@ -366,10 +366,10 @@ To support Backward compatibility, please import tau.support-2.3.js.</td>
 &lt;script&gt;
 &nbsp;&nbsp;&nbsp;var element = document.getElementById(&quot;progress-bar&quot;),
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;progressBarWidget = tau.widget.ProgressBar(element),
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// Returns current value
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Returns current value */
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;value = progressBarWidget.value();
 
-&nbsp;&nbsp;&nbsp;progressBarWidget.value(30); // Sets new value to 30
+&nbsp;&nbsp;&nbsp;progressBarWidget.value(30); /* Sets new value to 30 */
 &lt;/script&gt;
 </pre>
                                                </div>                                  
@@ -381,10 +381,10 @@ To support Backward compatibility, please import tau.support-2.3.js.</td>
 &lt;div id=&quot;progress-bar&quot;&gt;&lt;/div&gt;
 &lt;script&gt;
 &nbsp;&nbsp;&nbsp;$(&quot;#progress-bar&quot;).progressbar();
-&nbsp;&nbsp;&nbsp;// Returns current value
+&nbsp;&nbsp;&nbsp;/* Returns current value */
 &nbsp;&nbsp;&nbsp;$(&quot;#progress-bar&quot;).progressbar(&quot;value&quot;);
 
-&nbsp;&nbsp;&nbsp;// Sets new value to 30
+&nbsp;&nbsp;&nbsp;/* Sets new value to 30 */
 &nbsp;&nbsp;&nbsp;$(&quot;#progress-bar&quot;).progressbar(&quot;value&quot;, 30);
 &lt;/script&gt;
 </pre>
index f0e357c..1bb41bf 100644 (file)
@@ -339,7 +339,7 @@ To support Backward compatibility, please import tau.support-2.3.js.</td>
 
                                <tr>
                                        <td>
-                                               <pre class="intable prettyprint">boolean <a href="#method-enableHandler">enableHandler</a> ( boolean enable ) </pre>
+                                               <pre class="intable prettyprint">boolean <a href="#method-enableHandler">enableHandler</a>(boolean enable) </pre>
                                        </td>
                                        <td><p>Enables or disables the handler.</p></td>
                                </tr>
@@ -357,7 +357,7 @@ To support Backward compatibility, please import tau.support-2.3.js.</td>
                                                <p>Enables or disables the handler.</p>
                                        </div>
                                        <div class="synopsis">
-                                               <pre class="signature prettyprint">boolean enableHandler ( boolean enable) </pre>
+                                               <pre class="signature prettyprint">boolean enableHandler(boolean enable) </pre>
                                        </div>
                                        
                                        <div class="description">
index c575bc3..ed4a01d 100644 (file)
@@ -81,7 +81,7 @@ To support Backward compatibility, please import tau.support-2.3.js.</td>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/ul&gt;
 &nbsp;&nbsp;&nbsp;&lt;/div&gt;
 &nbsp;&nbsp;&nbsp;&lt;script&gt;
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(function (document) 
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(function(document) 
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var inputElement = document.getElementById(&quot;search-bar&quot;),
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;contentElement = document.getElementById(&quot;search-bar-content&quot;),
@@ -145,7 +145,7 @@ To support Backward compatibility, please import tau.support-2.3.js.</td>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/ul&gt;
 &nbsp;&nbsp;&nbsp;&lt;/div&gt;
 &nbsp;&nbsp;&nbsp;&lt;script&gt;
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(function (document) 
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(function(document) 
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var inputElement = document.getElementById(&quot;search-bar&quot;),
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;contentElement = document.getElementById(&quot;search-bar-content&quot;),
@@ -206,7 +206,7 @@ To support Backward compatibility, please import tau.support-2.3.js.</td>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/ul&gt;
 &nbsp;&nbsp;&nbsp;&lt;/div&gt;
 &nbsp;&nbsp;&nbsp;&lt;script&gt;
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(function (document) 
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(function(document) 
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var inputElement = document.getElementById(&quot;search-bar&quot;),
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;contentElement = document.getElementById(&quot;search-bar-content&quot;),
@@ -307,7 +307,7 @@ To support Backward compatibility, please import tau.support-2.3.js.</td>
                        
                                <tr>
                                        <td>
-                                               <pre class="intable prettyprint">SearchBar <a href="#method-disable">disable</a> (  ) </pre>
+                                               <pre class="intable prettyprint">SearchBar <a href="#method-disable">disable</a>() </pre>
                                        </td>
                                        <td><p>Disables the search bar.</p></td>
                                </tr>
@@ -316,7 +316,7 @@ To support Backward compatibility, please import tau.support-2.3.js.</td>
                        
                                <tr>
                                        <td>
-                                               <pre class="intable prettyprint">SearchBar <a href="#method-enable">enable</a> (  ) </pre>
+                                               <pre class="intable prettyprint">SearchBar <a href="#method-enable">enable</a>() </pre>
                                        </td>
                                        <td><p>Enables the search bar.</p></td>
                                </tr>
@@ -329,7 +329,7 @@ To support Backward compatibility, please import tau.support-2.3.js.</td>
                        
                                <tr>
                                        <td>
-                                               <pre class="intable prettyprint">string <a href="#method-value">value</a> ( string? value ) </pre>
+                                               <pre class="intable prettyprint">string <a href="#method-value">value</a>(string? value) </pre>
                                        </td>
                                        <td><p>Gets or sets an input text value.</p></td>
                                </tr>
@@ -347,7 +347,7 @@ To support Backward compatibility, please import tau.support-2.3.js.</td>
                                                <p>Disables the search bar.</p>
                                        </div>
                                        <div class="synopsis">
-                                               <pre class="signature prettyprint">SearchBar disable ( ) </pre>
+                                               <pre class="signature prettyprint">SearchBar disable() </pre>
                                        </div>
                                        
                                        <div class="description">
@@ -412,7 +412,7 @@ To support Backward compatibility, please import tau.support-2.3.js.</td>
                                                <p>Enables the search bar.</p>
                                        </div>
                                        <div class="synopsis">
-                                               <pre class="signature prettyprint">SearchBar enable ( ) </pre>
+                                               <pre class="signature prettyprint">SearchBar enable() </pre>
                                        </div>
                                        
                                        <div class="description">
@@ -482,7 +482,7 @@ To support Backward compatibility, please import tau.support-2.3.js.</td>
                                                <p>Gets or sets an input text value.</p>
                                        </div>
                                        <div class="synopsis">
-                                               <pre class="signature prettyprint">string value ( string? value) </pre>
+                                               <pre class="signature prettyprint">string value(string? value) </pre>
                                        </div>
                                        
                                                <p><span class="version">Since: </span>
@@ -556,10 +556,10 @@ var searchBarElement = document.getElementById(&quot;searchbar&quot;),
                                                                example (jQuery API <strong>support for backward compatibility</strong>):</p><p></p></span>
                                                        <pre name="code" class="examplecode
                                                        prettyprint">
-// Value contains the input text
+/* Value contains the input text */
 $(&quot;#searchbar&quot;).searchbar(&quot;value&quot;);
     
-// &quot;New text&quot; is the new input value
+/* &quot;New text&quot; is the new input value */
 $(&quot;#searchbar&quot;).searchbar(&quot;value&quot;, &quot;New text&quot;);   
 </pre>
                                                </div>
index 3e49623..6041d51 100644 (file)
@@ -193,7 +193,7 @@ widget.methodName(methodArgument1, methodArgument2, ...);
                        
                                <tr>
                                        <td>
-                                               <pre class="intable prettyprint"><a href="#method-open">open</a> (  ) </pre>
+                                               <pre class="intable prettyprint"><a href="#method-open">open</a>() </pre>
                                        </td>
                                        <td><p>Opens the select menu.</p></td>
                                </tr>
@@ -202,7 +202,7 @@ widget.methodName(methodArgument1, methodArgument2, ...);
                        
                                <tr>
                                        <td>
-                                               <pre class="intable prettyprint"><a href="#method-close">close</a> (  ) </pre>
+                                               <pre class="intable prettyprint"><a href="#method-close">close</a>() </pre>
                                        </td>
                                        <td><p>Closes the select menu.</p></td>
                                </tr>
@@ -220,7 +220,7 @@ widget.methodName(methodArgument1, methodArgument2, ...);
                                                <p>Opens the select menu.</p>
                                        </div>
                                        <div class="synopsis">
-                                               <pre class="signature prettyprint">open ( ) </pre>
+                                               <pre class="signature prettyprint">open() </pre>
                                        </div>
                                        
                                        <div class="description">
@@ -267,7 +267,7 @@ widget.methodName(methodArgument1, methodArgument2, ...);
                                                <p>Closes the select menu.</p>
                                        </div>
                                        <div class="synopsis">
-                                               <pre class="signature prettyprint">close ( ) </pre>
+                                               <pre class="signature prettyprint">close() </pre>
                                        </div>
                                        
                                        <div class="description">
index 60bac25..ec1ca2d 100644 (file)
@@ -129,7 +129,7 @@ $(&quot;.selector&quot;).swipe(&quot;methodName&quot;, methodArgument1, methodAr
                        
                                <tr>
                                        <td>
-                                               <pre class="intable prettyprint"><a href="#method-open">open</a> (  ) </pre>
+                                               <pre class="intable prettyprint"><a href="#method-open">open</a>() </pre>
                                        </td>
                                        <td><p>Runs opening animations.</p></td>
                                </tr>
@@ -138,7 +138,7 @@ $(&quot;.selector&quot;).swipe(&quot;methodName&quot;, methodArgument1, methodAr
                        
                                <tr>
                                        <td>
-                                               <pre class="intable prettyprint">boolean <a href="#method-opened">opened</a> (  ) </pre>
+                                               <pre class="intable prettyprint">boolean <a href="#method-opened">opened</a>() </pre>
                                        </td>
                                        <td><p>Checks whether a swipe element is opened.</p></td>
                                </tr>
@@ -147,7 +147,7 @@ $(&quot;.selector&quot;).swipe(&quot;methodName&quot;, methodArgument1, methodAr
                        
                                <tr>
                                        <td>
-                                               <pre class="intable prettyprint"><a href="#method-close">close</a> (  ) </pre>
+                                               <pre class="intable prettyprint"><a href="#method-close">close</a>() </pre>
                                        </td>
                                        <td><p>Runs closing animations.</p></td>
                                </tr>
@@ -168,7 +168,7 @@ $(&quot;.selector&quot;).swipe(&quot;methodName&quot;, methodArgument1, methodAr
                                                <p>Runs opening animations.</p>
                                        </div>
                                        <div class="synopsis">
-                                               <pre class="signature prettyprint">open ( ) </pre>
+                                               <pre class="signature prettyprint">open() </pre>
                                        </div>
                                                                                
                                        
@@ -207,7 +207,7 @@ $(&quot;.selector&quot;).swipe(&quot;methodName&quot;, methodArgument1, methodAr
                                                                example (jQuery API <strong>support for backward compatibility</strong>):</p><p></p></span>
                                                        <pre name="code" class="examplecode
                                                        prettyprint">
-&lt;div  id=&quot;swipe&quot; data-role=&quot;swipe&quot;&gt;
+&lt;div id=&quot;swipe&quot; data-role=&quot;swipe&quot;&gt;
 &nbsp;&nbsp;&nbsp;&lt;div data-role=&quot;swipe-item-cover&quot;&gt;
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Swipe
 &nbsp;&nbsp;&nbsp;&lt;/div&gt;
@@ -233,7 +233,7 @@ $(&quot;.selector&quot;).swipe(&quot;methodName&quot;, methodArgument1, methodAr
                                                <p>Checks whether a swipe element is opened.</p>
                                        </div>
                                        <div class="synopsis">
-                                               <pre class="signature prettyprint">boolean opened ( ) </pre>
+                                               <pre class="signature prettyprint">boolean opened() </pre>
                                        </div>
 
                                        <div class="returntype">
@@ -281,7 +281,7 @@ $(&quot;.selector&quot;).swipe(&quot;methodName&quot;, methodArgument1, methodAr
                                                                example (jQuery API <strong>support for backward compatibility</strong>):</p><p></p></span>
                                                        <pre name="code" class="examplecode
                                                        prettyprint">
-&lt;div  id=&quot;swipe&quot; data-role=&quot;swipe&quot;&gt;
+&lt;div id=&quot;swipe&quot; data-role=&quot;swipe&quot;&gt;
 &nbsp;&nbsp;&nbsp;&lt;div data-role=&quot;swipe-item-cover&quot;&gt;
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Swipe
 &nbsp;&nbsp;&nbsp;&lt;/div&gt;
@@ -307,7 +307,7 @@ $(&quot;.selector&quot;).swipe(&quot;methodName&quot;, methodArgument1, methodAr
                                                <p>Runs closing animations.</p>
                                        </div>
                                        <div class="synopsis">
-                                               <pre class="signature prettyprint">close ( ) </pre>
+                                               <pre class="signature prettyprint">close() </pre>
                                        </div>
 
                                        <div class="returntype">
@@ -395,7 +395,7 @@ $(&quot;.selector&quot;).swipe(&quot;methodName&quot;, methodArgument1, methodAr
 &lt;/div&gt;
 &lt;script&gt;
 &nbsp;&nbsp;&nbsp;var swipeWidget = tau.widget.Swipe(document.getElementById(&quot;swipe&quot;));
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;swipeWidget.open();
+&nbsp;&nbsp;&nbsp;swipeWidget.open();
 &lt;script&gt;
 </pre></li>
 
index 1c2fa6a..daf6496 100644 (file)
@@ -80,7 +80,7 @@ To support Backward compatibility, please import tau.support-2.3.js.</td>
 &nbsp;&nbsp;&nbsp;&lt;/div&gt;
 &lt;/div&gt;
 &lt;script&gt;
-&nbsp;&nbsp;&nbsp;(function (document) 
+&nbsp;&nbsp;&nbsp;(function(document) 
 &nbsp;&nbsp;&nbsp;{
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var pageElement = document.getElementById(&quot;tab-bar-page&quot;),
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tabBarElement = document.getElementById(&quot;ready-for-tab-bar&quot;),
@@ -115,7 +115,7 @@ To support Backward compatibility, please import tau.support-2.3.js.</td>
 &nbsp;&nbsp;&nbsp;&lt;/div&gt;
 &lt;/div&gt;
 &lt;script&gt;
-&nbsp;&nbsp;&nbsp;(function (document) 
+&nbsp;&nbsp;&nbsp;(function(document) 
 &nbsp;&nbsp;&nbsp;{
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;function createPageHandle() 
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
index a8e8d7e..ccd4dcd 100644 (file)
@@ -154,22 +154,22 @@ To support Backward compatibility, please import tau.support-2.3.js.</td>
 &nbsp;&nbsp;&nbsp;var elementToken = document.getElementById(&quot;ns-tokentextarea&quot;),
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tokentextarea = tau.widget.TokenTextarea(elementToken);
 
-&nbsp;&nbsp;&nbsp;// Get the label
+&nbsp;&nbsp;&nbsp;/* Get the label */
 &nbsp;&nbsp;&nbsp;tokentextarea.option(&quot;label&quot;);
 
-&nbsp;&nbsp;&nbsp;// Set the label
+&nbsp;&nbsp;&nbsp;/* Set the label */
 &nbsp;&nbsp;&nbsp;tokentextarea.option(&quot;label&quot;, &quot;e-mail To:&quot;);
 
-&nbsp;&nbsp;&nbsp;// Get the link            
+&nbsp;&nbsp;&nbsp;/* Get the link */         
 &nbsp;&nbsp;&nbsp;tokentextarea.option(&quot;link&quot;);
 
-&nbsp;&nbsp;&nbsp;// Set the link
+&nbsp;&nbsp;&nbsp;/* Set the link */
 &nbsp;&nbsp;&nbsp;tokentextarea.option(&quot;link&quot;, &quot;favorites.html&quot;);
 
-&nbsp;&nbsp;&nbsp;// Get the message format
+&nbsp;&nbsp;&nbsp;/* Get the message format */
 &nbsp;&nbsp;&nbsp;tokentextarea.option(&quot;description&quot;);
 
-&nbsp;&nbsp;&nbsp;// Set the message format
+&nbsp;&nbsp;&nbsp;/* Set the message format */
 &nbsp;&nbsp;&nbsp;tokentextarea.option(&quot;description&quot;, &quot;bar + {0}&quot;);
 &lt;/script&gt;
 </pre>
@@ -206,7 +206,7 @@ tokentextarea.methodName(methodArgument1, methodArgument2, ...);
                        
                                <tr>
                                        <td>
-                                               <pre class="intable prettyprint"><a href="#method-add">add</a> ( string messages, number blockIndex ) </pre>
+                                               <pre class="intable prettyprint"><a href="#method-add">add</a>(string messages, number blockIndex) </pre>
                                        </td>
                                        <td><p>Adds a new token text area component button with specified text in the place of the index.</p></td>
                                </tr>
@@ -214,7 +214,7 @@ tokentextarea.methodName(methodArgument1, methodArgument2, ...);
        
                                <tr>
                                        <td>
-                                               <pre class="intable prettyprint">Tokentextarea <a href="#method-disable">disable</a> (  ) </pre>
+                                               <pre class="intable prettyprint">Tokentextarea <a href="#method-disable">disable</a>() </pre>
                                        </td>
                                        <td><p>Disables the token text area.</p></td>
                                </tr>
@@ -222,14 +222,14 @@ tokentextarea.methodName(methodArgument1, methodArgument2, ...);
                
                                <tr>
                                        <td>
-                                               <pre class="intable prettyprint">Tokentextarea <a href="#method-enable">enable</a> (  ) </pre>
+                                               <pre class="intable prettyprint">Tokentextarea <a href="#method-enable">enable</a>() </pre>
                                        </td>
                                        <td><p>Enables the token text area.</p></td>
                                </tr>           
                        
                                <tr>
                                        <td>
-                                               <pre class="intable prettyprint"><a href="#method-focusIn">focusIn</a> (  ) </pre>
+                                               <pre class="intable prettyprint"><a href="#method-focusIn">focusIn</a>() </pre>
                                        </td>
                                        <td><p>Ungroups the elements and sets a focus to the input.</p></td>
                                </tr>
@@ -238,7 +238,7 @@ tokentextarea.methodName(methodArgument1, methodArgument2, ...);
                        
                                <tr>
                                        <td>
-                                               <pre class="intable prettyprint"><a href="#method-focusOut">focusOut</a> (  ) </pre>
+                                               <pre class="intable prettyprint"><a href="#method-focusOut">focusOut</a>() </pre>
                                        </td>
                                        <td><p>Groups elements and hides the input.</p></td>
                                </tr>
@@ -251,7 +251,7 @@ tokentextarea.methodName(methodArgument1, methodArgument2, ...);
                        
                                <tr>
                                        <td>
-                                               <pre class="intable prettyprint">string <a href="#method-inputText">inputText</a> ( string text ) </pre>
+                                               <pre class="intable prettyprint">string <a href="#method-inputText">inputText</a>(string text) </pre>
                                        </td>
                                        <td><p>Manages the component input box text.</p></td>
                                </tr>
@@ -264,7 +264,7 @@ tokentextarea.methodName(methodArgument1, methodArgument2, ...);
                        
                                <tr>
                                        <td>
-                                               <pre class="intable prettyprint">number <a href="#method-length">length</a> (  ) </pre>
+                                               <pre class="intable prettyprint">number <a href="#method-length">length</a>() </pre>
                                        </td>
                                        <td><p>Returns the block count.</p></td>
                                </tr>
@@ -272,14 +272,14 @@ tokentextarea.methodName(methodArgument1, methodArgument2, ...);
 
                                <tr>
                                        <td>
-                                               <pre class="intable prettyprint"><a href="#method-remove">remove</a> ( number blockIndex ) </pre>
+                                               <pre class="intable prettyprint"><a href="#method-remove">remove</a>(number blockIndex) </pre>
                                        </td>
                                        <td><p>Deletes a token text area component button at the specified index position. If no parameter is defined, all token text area component buttons are deleted.</p></td>
                                </tr>                   
 
                                <tr>
                                        <td>
-                                               <pre class="intable prettyprint">?string <a href="#method-select">select</a> ( number blockIndex ) </pre>
+                                               <pre class="intable prettyprint">?string <a href="#method-select">select</a>(number blockIndex) </pre>
                                        </td>
                                        <td><p>Selects the token text area button based on its index value.<br />If a parameter is set, the token text area button matching the index value is selected.<br />If a token text area button is selected and the parameter is not set, the method returns the string of the selected button. If no button is selected, the method returns <code>null</code>.</p></td>
                                </tr>
@@ -297,7 +297,7 @@ tokentextarea.methodName(methodArgument1, methodArgument2, ...);
                                                <p>Adds a new token text area component button with specified text in the place of the index.</p>
                                        </div>
                                        <div class="synopsis">
-                                               <pre class="signature prettyprint">add ( string messages, number blockIndex) </pre>
+                                               <pre class="signature prettyprint">add(string messages, number blockIndex) </pre>
                                        </div>
                                        
                                        <div class="description">
@@ -387,7 +387,7 @@ tokentextarea.methodName(methodArgument1, methodArgument2, ...);
                                                <p>Disables the token text area.</p>
                                        </div>
                                        <div class="synopsis">
-                                               <pre class="signature prettyprint">Tokentextarea disable ( ) </pre>
+                                               <pre class="signature prettyprint">Tokentextarea disable() </pre>
                                        </div>
                                        
                                        <div class="description">
@@ -437,7 +437,7 @@ tokentextarea.methodName(methodArgument1, methodArgument2, ...);
                                                <p>Enables the token text area.</p>
                                        </div>
                                        <div class="synopsis">
-                                               <pre class="signature prettyprint">Tokentextarea enable ( ) </pre>
+                                               <pre class="signature prettyprint">Tokentextarea enable() </pre>
                                        </div>
                                        
                                        <div class="description">
@@ -485,7 +485,7 @@ tokentextarea.methodName(methodArgument1, methodArgument2, ...);
                                                <p>Ungroups the elements and sets a focus to the input.</p>
                                        </div>
                                        <div class="synopsis">
-                                               <pre class="signature prettyprint">focusIn ( ) </pre>
+                                               <pre class="signature prettyprint">focusIn() </pre>
                                        </div>
                                        
                                        <div class="description">
@@ -544,7 +544,7 @@ tokentextarea.methodName(methodArgument1, methodArgument2, ...);
                                                <p>Groups elements and hides the input.</p>
                                        </div>
                                        <div class="synopsis">
-                                               <pre class="signature prettyprint">focusOut ( ) </pre>
+                                               <pre class="signature prettyprint">focusOut() </pre>
                                        </div>
                                        
                                        <div class="description">
@@ -607,7 +607,7 @@ tokentextarea.methodName(methodArgument1, methodArgument2, ...);
                                                <p>Manages the component input box text.</p>
                                        </div>
                                        <div class="synopsis">
-                                               <pre class="signature prettyprint">string inputText ( string text) </pre>
+                                               <pre class="signature prettyprint">string inputText(string text) </pre>
                                        </div>
                                        
                                        <div class="description">
@@ -671,10 +671,10 @@ tokentextarea.methodName(methodArgument1, methodArgument2, ...);
 &lt;script&gt;
 &nbsp;&nbsp;&nbsp;var tokenWidget = tau.widget.TokenTextarea(document.getElementById(&quot;ns-tokentext&quot;));
 
-&nbsp;&nbsp;&nbsp;// Set the text in the input box
+&nbsp;&nbsp;&nbsp;/* Set the text in the input box */
 &nbsp;&nbsp;&nbsp;tokenWidget.inputText(&quot;foobar&quot;);
 
-&nbsp;&nbsp;&nbsp;// Get the input box text
+&nbsp;&nbsp;&nbsp;/* Get the input box text */
 &nbsp;&nbsp;&nbsp;tokenWidget.inputText();
 &lt;/script&gt;
 </pre>
@@ -686,10 +686,10 @@ tokentextarea.methodName(methodArgument1, methodArgument2, ...);
                                                        prettyprint">
 &lt;div data-role=&quot;tokentextarea&quot; id=&quot;ns-tokentext&quot;&gt;&lt;/div&gt;
 &lt;script&gt;
-&nbsp;&nbsp;&nbsp;// Set the text in the input box
+&nbsp;&nbsp;&nbsp;/* Set the text in the input box */
 &nbsp;&nbsp;&nbsp;$(&quot;#ns-tokentext&quot;).tokentextarea(&quot;inputText&quot;, &quot;foobar&quot;);
 
-&nbsp;&nbsp;&nbsp;// Get the input box text
+&nbsp;&nbsp;&nbsp;/* Get the input box text */
 &nbsp;&nbsp;&nbsp;$(&quot;#ns-tokentext&quot;).tokentextarea(&quot;inputText&quot;);
 &lt;/script&gt;
 </pre>
@@ -710,7 +710,7 @@ tokentextarea.methodName(methodArgument1, methodArgument2, ...);
                                                <p>Returns the block count.</p>
                                        </div>
                                        <div class="synopsis">
-                                               <pre class="signature prettyprint">number length ( ) </pre>
+                                               <pre class="signature prettyprint">number length() </pre>
                                        </div>
                                        
                                        <div class="description">
@@ -777,7 +777,7 @@ tokentextarea.methodName(methodArgument1, methodArgument2, ...);
                                                <p>Deletes a token text area component button at the specified index position. If no parameter is defined, all token text area component buttons are deleted.</p>
                                        </div>
                                        <div class="synopsis">
-                                               <pre class="signature prettyprint">remove ( number blockIndex) </pre>
+                                               <pre class="signature prettyprint">remove(number blockIndex) </pre>
                                        </div>
                                        
                                        
@@ -855,7 +855,7 @@ tokentextarea.methodName(methodArgument1, methodArgument2, ...);
                                                <p>Selects the token text area button based on its index value.<br />If a parameter is set, the token text area button matching the index value is selected.<br />If a token text area button is selected and the parameter is not set, the method returns the string of the selected button. If no button is selected, the method returns null.</p>
                                        </div>
                                        <div class="synopsis">
-                                               <pre class="signature prettyprint">?string select ( number blockIndex) </pre>
+                                               <pre class="signature prettyprint">?string select(number blockIndex) </pre>
                                        </div>
                                        
                                        <div class="description">
@@ -915,13 +915,13 @@ tokentextarea.methodName(methodArgument1, methodArgument2, ...);
                                                        prettyprint">
 &lt;div data-role=&quot;tokentextarea&quot; id=&quot;ns-tokentext&quot;&gt;&lt;/div&gt;
 &lt;script&gt;
-&nbsp;&nbsp;&nbsp;// Select first block
+&nbsp;&nbsp;&nbsp;/* Select first block */
 &nbsp;&nbsp;&nbsp;var tokenWidget = tau.widget.TokenTextarea(document.getElementById(&quot;ns-tokentext&quot;));
 &nbsp;&nbsp;&nbsp;tokenWidget.add(&quot;text 1&quot;);
 &nbsp;&nbsp;&nbsp;tokenWidget.add(&quot;text 2&quot;);
 &nbsp;&nbsp;&nbsp;tokenWidget.select(0);
 
-&nbsp;&nbsp;&nbsp;// Get string from selected block
+&nbsp;&nbsp;&nbsp;/* Get string from selected block */
 &nbsp;&nbsp;&nbsp;tokenWidget.select();
 &lt;/script&gt;
 </pre>
@@ -933,12 +933,12 @@ tokentextarea.methodName(methodArgument1, methodArgument2, ...);
                                                        prettyprint">
 &lt;div data-role=&quot;tokentextarea&quot; id=&quot;ns-tokentext&quot;&gt;&lt;/div&gt;
 &lt;script&gt;
-&nbsp;&nbsp;&nbsp;// Select first block
+&nbsp;&nbsp;&nbsp;/* Select first block */
 &nbsp;&nbsp;&nbsp;$(&quot;#ns-tokentext&quot;).tokentextarea(&quot;add&quot;, &quot;text 1&quot;);
 &nbsp;&nbsp;&nbsp;$(&quot;#ns-tokentext&quot;).tokentextarea(&quot;add&quot;, &quot;text 2&quot;);
 &nbsp;&nbsp;&nbsp;$(&quot;#ns-tokentext&quot;).tokentextarea(&quot;select&quot;, &quot;0&quot;);
 
-&nbsp;&nbsp;&nbsp;// Get string from selected block
+&nbsp;&nbsp;&nbsp;/* Get string from selected block */
 &nbsp;&nbsp;&nbsp;$(&quot;#ns-tokentext&quot;).tokentextarea(&quot;select&quot;);
 &lt;/script&gt;
 </pre>
index 2bcaed4..46cd1f0 100644 (file)
@@ -177,8 +177,10 @@ In addition, all elements with the <code>class=&quot;ui-btn&quot;</code> and <co
 &nbsp;&nbsp;&nbsp;var buttonElement = document.getElementById(&quot;button&quot;),
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;button = tau.widget.Button(buttonElement);
 
-&nbsp;&nbsp;&nbsp;// button.methodName(methodArgument1, methodArgument2, ...);
-&nbsp;&nbsp;&nbsp;// For example:
+&nbsp;&nbsp;&nbsp;/* 
+&nbsp;&nbsp;&nbsp;   button.methodName(methodArgument1, methodArgument2, ...);
+&nbsp;&nbsp;&nbsp;   For example:
+&nbsp;&nbsp;&nbsp;*/
 &nbsp;&nbsp;&nbsp;button.value(&quot;text&quot;);
 &lt;/script&gt;
 </pre>
@@ -196,7 +198,7 @@ In addition, all elements with the <code>class=&quot;ui-btn&quot;</code> and <co
                        
                                <tr>
                                        <td>
-                                               <pre class="intable prettyprint">Button <a href="#method-disable">disable</a> (  ) </pre>
+                                               <pre class="intable prettyprint">Button <a href="#method-disable">disable</a>() </pre>
                                        </td>
                                        <td><p>Disables the button.</p></td>
                                </tr>
@@ -205,7 +207,7 @@ In addition, all elements with the <code>class=&quot;ui-btn&quot;</code> and <co
                        
                                <tr>
                                        <td>
-                                               <pre class="intable prettyprint">Button <a href="#method-enable">enable</a> (  ) </pre>
+                                               <pre class="intable prettyprint">Button <a href="#method-enable">enable</a>() </pre>
                                        </td>
                                        <td><p>Enables the button.</p></td>
                                </tr>
@@ -214,7 +216,7 @@ In addition, all elements with the <code>class=&quot;ui-btn&quot;</code> and <co
                        
                                <tr>
                                        <td>
-                                               <pre class="intable prettyprint">Button <a href="#method-refresh">refresh</a> (  ) </pre>
+                                               <pre class="intable prettyprint">Button <a href="#method-refresh">refresh</a>() </pre>
                                        </td>
                                        <td><p>Refreshes a button markup.</p></td>
                                </tr>
@@ -224,7 +226,7 @@ In addition, all elements with the <code>class=&quot;ui-btn&quot;</code> and <co
                        
                                <tr>
                                        <td>
-                                               <pre class="intable prettyprint">string <a href="#method-value">value</a> ( string? value ) </pre>
+                                               <pre class="intable prettyprint">string <a href="#method-value">value</a>(string? value) </pre>
                                        </td>
                                        <td><p>Gets or sets a value.</p></td>
                                </tr>
@@ -243,7 +245,7 @@ In addition, all elements with the <code>class=&quot;ui-btn&quot;</code> and <co
                                                <p>Disables the button.</p>
                                        </div>
                                        <div class="synopsis">
-                                               <pre class="signature prettyprint">Button disable ( ) </pre>
+                                               <pre class="signature prettyprint">Button disable() </pre>
                                        </div>
                                        
                                        <div class="description">
@@ -300,7 +302,7 @@ In addition, all elements with the <code>class=&quot;ui-btn&quot;</code> and <co
                                                <p>Enables the button.</p>
                                        </div>
                                        <div class="synopsis">
-                                               <pre class="signature prettyprint">Button enable ( ) </pre>
+                                               <pre class="signature prettyprint">Button enable() </pre>
                                        </div>
                                        
                                        <div class="description">
@@ -358,7 +360,7 @@ In addition, all elements with the <code>class=&quot;ui-btn&quot;</code> and <co
                                                <p>Refreshes a button markup.</p>
                                        </div>
                                        <div class="synopsis">
-                                               <pre class="signature prettyprint">Button refresh ( ) </pre>
+                                               <pre class="signature prettyprint">Button refresh() </pre>
                                        </div>
                                        
                                        <div class="description">
@@ -419,7 +421,7 @@ In addition, all elements with the <code>class=&quot;ui-btn&quot;</code> and <co
                                                <p>Gets or sets a value.</p>
                                        </div>
                                        <div class="synopsis">
-                                               <pre class="signature prettyprint">string value ( string? value) </pre>
+                                               <pre class="signature prettyprint">string value(string? value) </pre>
                                        </div>
                                        
                                                <p><span class="version">Since: </span>
@@ -488,10 +490,10 @@ In addition, all elements with the <code>class=&quot;ui-btn&quot;</code> and <co
 &lt;script&gt;
 &nbsp;&nbsp;&nbsp;var element = document.getElementById(&quot;button&quot;),
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;buttonWidget = tau.widget.Button(element),
-&nbsp;&nbsp;&nbsp;// Value contains inner text of button
-&nbsp;&nbsp;&nbsp;value = buttonWidget.value();
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Value contains inner text of button */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;value = buttonWidget.value();
 
-&nbsp;&nbsp;&nbsp;// &quot;New text&quot; will be text of button
+&nbsp;&nbsp;&nbsp;/* &quot;New text&quot; will be text of button */
 &nbsp;&nbsp;&nbsp;buttonWidget.value(&quot;New text&quot;);
 &lt;/script&gt;
 </pre>
index 56cf3c1..c4757ea 100644 (file)
@@ -64,7 +64,7 @@
 
        <tr>
                <td>
-                       <pre class="intable prettyprint"><a href="#method-disable">disable</a> (  ) </pre>
+                       <pre class="intable prettyprint"><a href="#method-disable">disable</a>() </pre>
                </td>
                <td><p>Disables the component.</p></td>
        </tr>
 
        <tr>
                <td>
-                       <pre class="intable prettyprint"><a href="#method-enable">enable</a> (  ) </pre>
+                       <pre class="intable prettyprint"><a href="#method-enable">enable</a>() </pre>
                </td>
                <td><p>Enables the component.</p></td>
        </tr>
 
        <tr>
                <td>
-                       <pre class="intable prettyprint"><a href="#method-value">value</a> ( ) </pre>
+                       <pre class="intable prettyprint"><a href="#method-value">value</a>() </pre>
                </td>
                <td><p>Set/Return a value from checkbox element.</p></td>
        </tr>
@@ -97,7 +97,7 @@
                        <p>Disables the component.</p>
                </div>
                <div class="synopsis">
-                       <pre class="signature prettyprint">disable ( ) </pre>
+                       <pre class="signature prettyprint">disable() </pre>
                </div>
 
                <div class="description">
                                                                example:</p><p></p></span>
                                                        <pre name="code" class="examplecode
                                                        prettyprint">
-&lt;input type=&quot;checkbox&quot; name=&quot;checkbox-1&quot; id=&quot;checkbox-1&quot;/&gt;&lt;label for=&quot;checkbox-1&quot;&gt;Normal&lt;/label&gt;
+&lt;input type=&quot;checkbox&quot; name=&quot;checkbox-1&quot; id=&quot;checkbox-1&quot;/&gt;
+&lt;label for=&quot;checkbox-1&quot;&gt;Normal&lt;/label&gt;
 &lt;script&gt;
 &nbsp;&nbsp;&nbsp;var element = document.getElementById(&quot;checkbox-1&quot;),
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;checkboxWidget = tau.widget.Checkbox(element);
                        <p>Enables the component.</p>
                </div>
                <div class="synopsis">
-                       <pre class="signature prettyprint">enable ( ) </pre>
+                       <pre class="signature prettyprint">enable() </pre>
                </div>
 
                <div class="description">
                                                                example:</p><p></p></span>
                                                        <pre name="code" class="examplecode
                                                        prettyprint">
-&lt;input type=&quot;checkbox&quot; name=&quot;checkbox-1&quot; id=&quot;checkbox-1&quot;/&gt;&lt;label for=&quot;checkbox-1&quot;&gt;Normal&lt;/label&gt;
+&lt;input type=&quot;checkbox&quot; name=&quot;checkbox-1&quot; id=&quot;checkbox-1&quot;/&gt;
+&lt;label for=&quot;checkbox-1&quot;&gt;Normal&lt;/label&gt;
 &lt;script&gt;
 &nbsp;&nbsp;&nbsp;var element = document.getElementById(&quot;checkbox-1&quot;),
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;checkboxWidget = tau.widget.Checkbox(element);
                        <p>Set/Return a value from checkbox element.</p>
                </div>
                <div class="synopsis">
-                       <pre class="signature prettyprint">{ string | number } value ( ) </pre>
+                       <pre class="signature prettyprint">{string | number} value() </pre>
                </div>
 
                <div class="description">
                                                                example:</p><p></p></span>
                                                        <pre name="code" class="examplecode
                                                        prettyprint">
-&lt;input type=&quot;checkbox&quot; name=&quot;checkbox-1&quot; id=&quot;checkbox-1&quot;/&gt;&lt;label for=&quot;checkbox-1&quot;&gt;Normal&lt;/label&gt;
+&lt;input type=&quot;checkbox&quot; name=&quot;checkbox-1&quot; id=&quot;checkbox-1&quot;/&gt;
+&lt;label for=&quot;checkbox-1&quot;&gt;Normal&lt;/label&gt;
 &lt;script&gt;
 &nbsp;&nbsp;&nbsp;var element = document.getElementById(&quot;checkbox-1&quot;),
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;checkboxWidget = tau.widget.Checkbox(element);
 
-&nbsp;&nbsp;&nbsp;// Set value to checkbox element
+&nbsp;&nbsp;&nbsp;/* Set value to checkbox element */
 &nbsp;&nbsp;&nbsp;checkboxWidget.value("checkbox-value");
-&nbsp;&nbsp;&nbsp;// Returns checked checkbox element
+&nbsp;&nbsp;&nbsp;/* Return checked checkbox element */
 &nbsp;&nbsp;&nbsp;console.log(checkboxWidget.value());
 &lt;/script&gt;
 </pre>
index 4563f41..0fc33b3 100644 (file)
@@ -40,7 +40,7 @@
 &lt;/ul&gt;
 &lt;script&gt;
 &nbsp;&nbsp;&nbsp;var elColoredList = document.getElementById(&quot;coloredlist&quot;),
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;coloredList = tau.widget.ColoredListview(elColoredList);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;coloredList = tau.widget.ColoredListview(elColoredList);
 &lt;/script&gt;
 </pre>
 
index a9b6452..20520bc 100644 (file)
                        
                                <tr>
                                        <td>
-                                               <pre class="intable prettyprint"><a href="#method-close">close</a> (  ) </pre>
+                                               <pre class="intable prettyprint"><a href="#method-close">close</a>() </pre>
                                        </td>
                                        <td><p>Closes the drawer.</p></td>
                                </tr>
                        
                                <tr>
                                        <td>
-                                               <pre class="intable prettyprint"><a href="#method-isOpen">isOpen</a> (  ) </pre>
+                                               <pre class="intable prettyprint"><a href="#method-isOpen">isOpen</a>() </pre>
                                        </td>
                                        <td><p>Checks the drawer status.</p></td>
                                </tr>
 
                                <tr>
                                        <td>
-                                               <pre class="intable prettyprint"><a href="#method-open">open</a> (  ) </pre>
+                                               <pre class="intable prettyprint"><a href="#method-open">open</a>() </pre>
                                        </td>
                                        <td><p>Opens the drawer.</p></td>
                                </tr>
                                                <p>Closes the drawer.</p>
                                        </div>
                                        <div class="synopsis">
-                                               <pre class="signature prettyprint">close ( ) </pre>
+                                               <pre class="signature prettyprint">close() </pre>
                                        </div>
                                        
                                        <div class="description">
                                                <p>Checks the drawer status.</p>
                                        </div>
                                        <div class="synopsis">
-                                               <pre class="signature prettyprint">isOpen ( ) </pre>
+                                               <pre class="signature prettyprint">isOpen() </pre>
                                        </div>
                                        
                                        <div class="description">
                                                <p>Opens the drawer.</p>
                                        </div>
                                        <div class="synopsis">
-                                               <pre class="signature prettyprint">open ( ) </pre>
+                                               <pre class="signature prettyprint">open() </pre>
                                        </div>
                                        
                                        <div class="description">
index 8d2139b..090e620 100644 (file)
@@ -40,27 +40,29 @@ DropdownMenu component allows you to create the component in the form of a drop-
 
 <p>For manual creation of DropdownMenu component you can use constructor of component.</p>
 
-<pre class="prettyprint">    &lt;select id="dropdownmenu" data-native-menu="false"&gt;
-        &lt;option value="1"&gt;Item1&lt;/option&gt;
-        &lt;option value="2"&gt;Item2&lt;/option&gt;
-        &lt;option value="3"&gt;Item3&lt;/option&gt;
-        &lt;option value="4"&gt;Item4&lt;/option&gt;
-    &lt;/select&gt;
-    &lt;script&gt;
-        var element = document.getElementById("dropdownmenu"),
-            widget = tau.widget.DropdownMenu(element);
-    &lt;/script&gt;
+<pre class="prettyprint">
+&lt;select id="dropdownmenu" data-native-menu="false"&gt;
+&nbsp;&nbsp;&nbsp;&lt;option value="1"&gt;Item1&lt;/option&gt;
+&nbsp;&nbsp;&nbsp;&lt;option value="2"&gt;Item2&lt;/option&gt;
+&nbsp;&nbsp;&nbsp;&lt;option value="3"&gt;Item3&lt;/option&gt;
+&nbsp;&nbsp;&nbsp;&lt;option value="4"&gt;Item4&lt;/option&gt;
+&lt;/select&gt;
+&lt;script&gt;
+&nbsp;&nbsp;&nbsp;var element = document.getElementById("dropdownmenu"),
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;widget = tau.widget.DropdownMenu(element);
+&lt;/script&gt;
 </pre>
 
 <h2><a id='html-examples0.1808658204972744'></a>HTML Examples</h2>
 
 <h3><a id='create-dropdownmenu0.4046689202077687'></a>Basic</h3>
 
-<pre class="prettyprint">&lt;select data-native-menu="false"&gt;
-       &lt;option value="1"&gt;Item1&lt;/option&gt;
-       &lt;option value="2"&gt;Item2&lt;/option&gt;
-       &lt;option value="3"&gt;Item3&lt;/option&gt;
-       &lt;option value="4"&gt;Item4&lt;/option&gt;
+<pre class="prettyprint">
+&lt;select data-native-menu="false"&gt;
+&nbsp;&nbsp;&nbsp;&lt;option value="1"&gt;Item1&lt;/option&gt;
+&nbsp;&nbsp;&nbsp;&lt;option value="2"&gt;Item2&lt;/option&gt;
+&nbsp;&nbsp;&nbsp;&lt;option value="3"&gt;Item3&lt;/option&gt;
+&nbsp;&nbsp;&nbsp;&lt;option value="4"&gt;Item4&lt;/option&gt;
 &lt;/select&gt;
 </pre>
 
@@ -69,23 +71,25 @@ DropdownMenu component allows you to create the component in the form of a drop-
 
 <p>When data-inline attribute is set to true, width of the DropdownMenu is determined by its text.</p>
 
-<pre class="prettyprint">&lt;select id="dropdownmenu" data-native-menu="false" data-inline="true"&gt;
-       &lt;option value="1"&gt;Item1&lt;/option&gt;
-       &lt;option value="2"&gt;Item2&lt;/option&gt;
-       &lt;option value="3"&gt;Item3&lt;/option&gt;
-       &lt;option value="4"&gt;Item4&lt;/option&gt;
+<pre class="prettyprint">
+&lt;select id="dropdownmenu" data-native-menu="false" data-inline="true"&gt;
+&nbsp;&nbsp;&nbsp;&lt;option value="1"&gt;Item1&lt;/option&gt;
+&nbsp;&nbsp;&nbsp;&lt;option value="2"&gt;Item2&lt;/option&gt;
+&nbsp;&nbsp;&nbsp;&lt;option value="3"&gt;Item3&lt;/option&gt;
+&nbsp;&nbsp;&nbsp;&lt;option value="4"&gt;Item4&lt;/option&gt;
 &lt;/select&gt;
 </pre>
 
 <h3><a id='placeholder-options0.16344462637789547'></a>With Placeholder</h3>
 
 <p>If you use <code>&lt;option&gt;</code> with data-placeholder="true" attribute, you can make a default placeholder. </p>
-<pre class="prettyprint">&lt;select id="dropdownmenu" data-native-menu="false" data-hide-placeholder-menu-items="false"&gt;
-       &lt;option value="choose-one" data-placeholder="true"&gt;Choose an option&lt;/option&gt;
-       &lt;option value="1"&gt;Item1&lt;/option&gt;
-       &lt;option value="2"&gt;Item2&lt;/option&gt;
-       &lt;option value="3"&gt;Item3&lt;/option&gt;
-       &lt;option value="4"&gt;Item4&lt;/option&gt;
+<pre class="prettyprint">
+&lt;select id="dropdownmenu" data-native-menu="false" data-hide-placeholder-menu-items="false"&gt;
+&nbsp;&nbsp;&nbsp;&lt;option value="choose-one" data-placeholder="true"&gt;Choose an option&lt;/option&gt;
+&nbsp;&nbsp;&nbsp;&lt;option value="1"&gt;Item1&lt;/option&gt;
+&nbsp;&nbsp;&nbsp;&lt;option value="2"&gt;Item2&lt;/option&gt;
+&nbsp;&nbsp;&nbsp;&lt;option value="3"&gt;Item3&lt;/option&gt;
+&nbsp;&nbsp;&nbsp;&lt;option value="4"&gt;Item4&lt;/option&gt;
 &lt;/select&gt;
 </pre>
 
@@ -148,7 +152,7 @@ widget.methodName(methodArgument1, methodArgument2, ...);
        <tbody>
        <tr>
                <td>
-                       <pre class="intable prettyprint"><a href="#method-open">open</a> (  ) </pre>
+                       <pre class="intable prettyprint"><a href="#method-open">open</a>() </pre>
                </td>
                <td><p>Open DropdownMenu</p></td>
        </tr>
@@ -157,7 +161,7 @@ widget.methodName(methodArgument1, methodArgument2, ...);
 
        <tr>
                <td>
-                       <pre class="intable prettyprint"><a href="#method-close">close</a> (  ) </pre>
+                       <pre class="intable prettyprint"><a href="#method-close">close</a>() </pre>
                </td>
                <td><p>Close DropdownMenu</p></td>
        </tr>
@@ -165,7 +169,7 @@ widget.methodName(methodArgument1, methodArgument2, ...);
 
        <tr>
                <td>
-                       <pre class="intable prettyprint"><a href="#method-_enable">enable</a> (  ) </pre>
+                       <pre class="intable prettyprint"><a href="#method-_enable">enable</a>() </pre>
                </td>
                <td><p>Enable DropdownMenu</p></td>
        </tr>
@@ -174,7 +178,7 @@ widget.methodName(methodArgument1, methodArgument2, ...);
 
        <tr>
                <td>
-                       <pre class="intable prettyprint"><a href="#method-_disable">disable</a> (  ) </pre>
+                       <pre class="intable prettyprint"><a href="#method-_disable">disable</a>() </pre>
                </td>
                <td><p>Disable DropdownMenu</p></td>
        </tr>
@@ -192,7 +196,7 @@ widget.methodName(methodArgument1, methodArgument2, ...);
                        <p>Open DropdownMenu</p>
                </div>
                <div class="synopsis">
-                       <pre class="signature prettyprint">open ( ) </pre>
+                       <pre class="signature prettyprint">open() </pre>
                </div>
 
                <div class="description">
@@ -217,16 +221,16 @@ widget.methodName(methodArgument1, methodArgument2, ...);
                             <pre name="code" class="examplecode
                             prettyprint">
 &lt;select id=&quot;dropdownmenu&quot; data-native-menu=&quot;false&quot;&gt;
-       &lt;option value=&quot;1&quot;&gt;Item1&lt;/option&gt;
-       &lt;option value=&quot;2&quot;&gt;Item2&lt;/option&gt;
-       &lt;option value=&quot;3&quot;&gt;Item3&lt;/option&gt;
-       &lt;option value=&quot;4&quot;&gt;Item4&lt;/option&gt;
+&nbsp;&nbsp;&nbsp;&lt;option value=&quot;1&quot;&gt;Item1&lt;/option&gt;
+&nbsp;&nbsp;&nbsp;&lt;option value=&quot;2&quot;&gt;Item2&lt;/option&gt;
+&nbsp;&nbsp;&nbsp;&lt;option value=&quot;3&quot;&gt;Item3&lt;/option&gt;
+&nbsp;&nbsp;&nbsp;&lt;option value=&quot;4&quot;&gt;Item4&lt;/option&gt;
 &lt;/select&gt;
 &lt;script&gt;
-var elDropdownMenu = document.getElementById("dropdownmenu"),
-    widget = tau.widget.DropdownMenu(elDropdownMenu);
+&nbsp;&nbsp;&nbsp;var elDropdownMenu = document.getElementById("dropdownmenu"),
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;widget = tau.widget.DropdownMenu(elDropdownMenu);
 
-widget.open();
+&nbsp;&nbsp;&nbsp;widget.open();
 &lt;/script&gt;
 </pre>
                </div>
@@ -241,7 +245,7 @@ widget.open();
                        <p>Close DropdownMenu</p>
                </div>
                <div class="synopsis">
-                       <pre class="signature prettyprint">close ( ) </pre>
+                       <pre class="signature prettyprint">close() </pre>
                </div>
 
                <div class="description">
@@ -266,16 +270,16 @@ widget.open();
                             <pre name="code" class="examplecode
                             prettyprint">
 &lt;select id=&quot;dropdownmenu&quot; data-native-menu=&quot;false&quot;&gt;
-       &lt;option value=&quot;1&quot;&gt;Item1&lt;/option&gt;
-       &lt;option value=&quot;2&quot;&gt;Item2&lt;/option&gt;
-       &lt;option value=&quot;3&quot;&gt;Item3&lt;/option&gt;
-       &lt;option value=&quot;4&quot;&gt;Item4&lt;/option&gt;
+&nbsp;&nbsp;&nbsp;&lt;option value=&quot;1&quot;&gt;Item1&lt;/option&gt;
+&nbsp;&nbsp;&nbsp;&lt;option value=&quot;2&quot;&gt;Item2&lt;/option&gt;
+&nbsp;&nbsp;&nbsp;&lt;option value=&quot;3&quot;&gt;Item3&lt;/option&gt;
+&nbsp;&nbsp;&nbsp;&lt;option value=&quot;4&quot;&gt;Item4&lt;/option&gt;
 &lt;/select&gt;
 &lt;script&gt;
-var elDropdownMenu = document.getElementById("dropdownmenu"),
-    widget = tau.widget.DropdownMenu(elDropdownMenu);
+&nbsp;&nbsp;&nbsp;var elDropdownMenu = document.getElementById("dropdownmenu"),
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;widget = tau.widget.DropdownMenu(elDropdownMenu);
 
-widget.close();
+&nbsp;&nbsp;&nbsp;widget.close();
 &lt;/script&gt;
 </pre>
                </div>
@@ -290,7 +294,7 @@ widget.close();
                        <p>Enable DropdownMenu</p>
                </div>
                <div class="synopsis">
-                       <pre class="signature prettyprint">enable ( ) </pre>
+                       <pre class="signature prettyprint">enable() </pre>
                </div>
 
                <div class="description">
@@ -329,16 +333,16 @@ widget.close();
                             <pre name="code" class="examplecode
                             prettyprint">
 &lt;select id=&quot;dropdownmenu&quot; data-native-menu=&quot;false&quot;&gt;
-       &lt;option value=&quot;1&quot;&gt;Item1&lt;/option&gt;
-       &lt;option value=&quot;2&quot;&gt;Item2&lt;/option&gt;
-       &lt;option value=&quot;3&quot;&gt;Item3&lt;/option&gt;
-       &lt;option value=&quot;4&quot;&gt;Item4&lt;/option&gt;
+&nbsp;&nbsp;&nbsp;&lt;option value=&quot;1&quot;&gt;Item1&lt;/option&gt;
+&nbsp;&nbsp;&nbsp;&lt;option value=&quot;2&quot;&gt;Item2&lt;/option&gt;
+&nbsp;&nbsp;&nbsp;&lt;option value=&quot;3&quot;&gt;Item3&lt;/option&gt;
+&nbsp;&nbsp;&nbsp;&lt;option value=&quot;4&quot;&gt;Item4&lt;/option&gt;
 &lt;/select&gt;
 &lt;script&gt;
-var elDropdownMenu = document.getElementById("dropdownmenu"),
-    widget = tau.widget.DropdownMenu(elDropdownMenu);
+&nbsp;&nbsp;&nbsp;var elDropdownMenu = document.getElementById("dropdownmenu"),
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;widget = tau.widget.DropdownMenu(elDropdownMenu);
 
-widget.enable();
+&nbsp;&nbsp;&nbsp;widget.enable();
 &lt;/script&gt;
 </pre>
                </div>
@@ -355,7 +359,7 @@ widget.enable();
                        <p>Disable DropdownMenu</p>
                </div>
                <div class="synopsis">
-                       <pre class="signature prettyprint">disable ( ) </pre>
+                       <pre class="signature prettyprint">disable() </pre>
                </div>
 
                <div class="description">
@@ -394,16 +398,16 @@ widget.enable();
                             <pre name="code" class="examplecode
                             prettyprint">
 &lt;select id=&quot;dropdownmenu&quot; data-native-menu=&quot;false&quot;&gt;
-       &lt;option value=&quot;1&quot;&gt;Item1&lt;/option&gt;
-       &lt;option value=&quot;2&quot;&gt;Item2&lt;/option&gt;
-       &lt;option value=&quot;3&quot;&gt;Item3&lt;/option&gt;
-       &lt;option value=&quot;4&quot;&gt;Item4&lt;/option&gt;
+&nbsp;&nbsp;&nbsp;&lt;option value=&quot;1&quot;&gt;Item1&lt;/option&gt;
+&nbsp;&nbsp;&nbsp;&lt;option value=&quot;2&quot;&gt;Item2&lt;/option&gt;
+&nbsp;&nbsp;&nbsp;&lt;option value=&quot;3&quot;&gt;Item3&lt;/option&gt;
+&nbsp;&nbsp;&nbsp;&lt;option value=&quot;4&quot;&gt;Item4&lt;/option&gt;
 &lt;/select&gt;
 &lt;script&gt;
-var elDropdownMenu = document.getElementById("dropdownmenu"),
-    widget = tau.widget.DropdownMenu(elDropdownMenu);
+&nbsp;&nbsp;&nbsp;var elDropdownMenu = document.getElementById("dropdownmenu"),
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;widget = tau.widget.DropdownMenu(elDropdownMenu);
 
-widget.disable();
+&nbsp;&nbsp;&nbsp;widget.disable();
 &lt;/script&gt;
 </pre>
                </div>
index 9d1d7d6..730a694 100644 (file)
@@ -152,7 +152,7 @@ expandableWidget.methodName(methodArgument1, methodArgument2, ...);
 
                 <tr>
                     <td>
-                        <pre class="intable prettyprint"><a href="#method-disable">disable</a> (  ) </pre>
+                        <pre class="intable prettyprint"><a href="#method-disable">disable</a>() </pre>
                     </td>
                     <td><p>Disables the expandable component.</p></td>
                 </tr>
@@ -161,7 +161,7 @@ expandableWidget.methodName(methodArgument1, methodArgument2, ...);
 
                 <tr>
                     <td>
-                        <pre class="intable prettyprint"><a href="#method-enable">enable</a> (  ) </pre>
+                        <pre class="intable prettyprint"><a href="#method-enable">enable</a>() </pre>
                     </td>
                     <td><p>Enables the expandable component.</p></td>
                 </tr>
@@ -179,7 +179,7 @@ expandableWidget.methodName(methodArgument1, methodArgument2, ...);
                         <p>Disables the expandable component.</p>
                     </div>
                     <div class="synopsis">
-                        <pre class="signature prettyprint">disable ( ) </pre>
+                        <pre class="signature prettyprint">disable() </pre>
                     </div>
 
                     <div class="description">
@@ -240,7 +240,7 @@ expandableWidget.methodName(methodArgument1, methodArgument2, ...);
                         <p>Enables the expandable component.</p>
                     </div>
                     <div class="synopsis">
-                        <pre class="signature prettyprint">enable ( ) </pre>
+                        <pre class="signature prettyprint">enable() </pre>
                     </div>
 
                     <div class="description">
index 486741c..69e35d5 100644 (file)
 <pre class="prettyprint">
 &lt;ul id=&quot;gridview&quot; class=&quot;ui-gridview&quot;&gt;
 &nbsp;&nbsp;&nbsp;&lt;li class=&quot;ui-gridview-item&quot;&gt;
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;img class=&quot;ui-gridview-image&quot; src=&quot;images/1.jpg&quot;&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;img class=&quot;ui-gridview-image&quot; src=&quot;images/1.jpg&quot;/&gt;
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;div class=&quot;ui-gridview-handler&quot;&gt;&lt;/div&gt;
 &nbsp;&nbsp;&nbsp;&lt;/li&gt;
 &nbsp;&nbsp;&nbsp;&lt;li class=&quot;ui-gridview-item&quot;&gt;
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;img class=&quot;ui-gridview-image&quot; src=&quot;images/2.jpg&quot;&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;img class=&quot;ui-gridview-image&quot; src=&quot;images/2.jpg&quot;/&gt;
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;div class=&quot;ui-gridview-handler&quot;&gt;&lt;/div&gt;
 &nbsp;&nbsp;&nbsp;&lt;/li&gt;
 &nbsp;&nbsp;&nbsp;&lt;li class=&quot;ui-gridview-item&quot;&gt;
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;img class=&quot;ui-gridview-image&quot; src=&quot;images/3.jpg&quot;&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;img class=&quot;ui-gridview-image&quot; src=&quot;images/3.jpg&quot;/&gt;
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;div class=&quot;ui-gridview-handler&quot;&gt;&lt;/div&gt;
 &nbsp;&nbsp;&nbsp;&lt;/li&gt;
 &nbsp;&nbsp;&nbsp;&lt;li class=&quot;ui-gridview-item&quot;&gt;
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;img class=&quot;ui-gridview-image&quot; src=&quot;images/4.jpg&quot;&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;img class=&quot;ui-gridview-image&quot; src=&quot;images/4.jpg&quot;/&gt;
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;div class=&quot;ui-gridview-handler&quot;&gt;&lt;/div&gt;
 &nbsp;&nbsp;&nbsp;&lt;/li&gt;
 &lt;/ul&gt;
@@ -139,7 +139,7 @@ gridView.methodName(methodArgument1, methodArgument2, ...);
        <tbody>
        <tr>
                <td>
-                       <pre class="intable prettyprint"><a href="#method-add">addItem</a> (  ) </pre>
+                       <pre class="intable prettyprint"><a href="#method-add">addItem</a>() </pre>
                </td>
                <td><p>Add an item to grid view</p></td>
        </tr>
@@ -148,7 +148,7 @@ gridView.methodName(methodArgument1, methodArgument2, ...);
 
        <tr>
                <td>
-                       <pre class="intable prettyprint"><a href="#method-remove">removeItem</a> (  ) </pre>
+                       <pre class="intable prettyprint"><a href="#method-remove">removeItem</a>() </pre>
                </td>
                <td><p>Remove an item from grid view</p></td>
        </tr>
@@ -166,7 +166,7 @@ gridView.methodName(methodArgument1, methodArgument2, ...);
                        <p>Add an item to grid view</p>
                </div>
                <div class="synopsis">
-                       <pre class="signature prettyprint">addItem (HTMLElement item) </pre>
+                       <pre class="signature prettyprint">addItem(HTMLElement item) </pre>
                </div>
 
                <div class="parameters">
@@ -207,11 +207,11 @@ gridView.methodName(methodArgument1, methodArgument2, ...);
                             <pre name="code" class="examplecode
                             prettyprint">
 &lt;script&gt;
-var elGridView = document.getElementById("gridview"),
-    gridView = tau.widget.GridView(elGridView),
-    item;
+&nbsp;&nbsp;&nbsp;var elGridView = document.getElementById("gridview"),
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;gridView = tau.widget.GridView(elGridView),
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;item;
 
-gridView.addItem(item);
+&nbsp;&nbsp;&nbsp;gridView.addItem(item);
 &lt;/script&gt;
 </pre>
                </div>
@@ -225,7 +225,7 @@ gridView.addItem(item);
                        <p>Remove an item from grid view</p>
                </div>
                <div class="synopsis">
-                       <pre class="signature prettyprint">removeItem (HTMLElement item) </pre>
+                       <pre class="signature prettyprint">removeItem(HTMLElement item) </pre>
                </div>
 
                <div class="parameters">
@@ -266,11 +266,11 @@ gridView.addItem(item);
                             <pre name="code" class="examplecode
                             prettyprint">
 &lt;script&gt;
-var elGridView = document.getElementById("gridview"),
-    gridView = tau.widget.GridView(elGridView),
-    item;
+&nbsp;&nbsp;&nbsp;var elGridView = document.getElementById("gridview"),
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;gridView = tau.widget.GridView(elGridView),
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;item;
 
-gridView.removeItem(item);
+&nbsp;&nbsp;&nbsp;gridView.removeItem(item);
 &lt;/script&gt;
 </pre>
                </div>
index 68f70fe..8944c67 100644 (file)
@@ -82,7 +82,7 @@
 &nbsp;&nbsp;&nbsp;&lt;script&nbsp;src=&quot;./panel.js&quot;&gt;&lt;/script&gt;
 &lt;/div&gt;
 
-&lt;!--&nbsp;in&nbsp;panel.html&nbsp;--&gt;
+&lt;!--panel.html--&gt;
 &lt;div&nbsp;id=&quot;panel2&quot;&nbsp;class=&quot;ui-panel&quot;&gt;
 &nbsp;&nbsp;&nbsp;&lt;div&nbsp;class=&quot;ui-content&quot;&gt;
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;ul&nbsp;class=&quot;ui-listview&quot;&gt;
 &lt;/div&gt;
 </pre>
 <h4>JS example with PanelChanger</h4>
-<pre class="prettyprint">&lt;!--&nbsp;in&nbsp;panel.js&nbsp;--&gt;
-(function()&nbsp;{
+<pre class="prettyprint">
+/* panel.js */
+(function()
+{
 &nbsp;&nbsp;&nbsp;var&nbsp;page&nbsp;=&nbsp;document.querySelector(&quot;#panelPage&quot;),
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;panelChanger&nbsp;=&nbsp;page.querySelector(&quot;#panelChanger&quot;),
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;panelChangerComponent,
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;navigation&nbsp;=&nbsp;page.querySelector(&quot;#navigation&quot;),
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;navigationComponent,
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;navigated&nbsp;=&nbsp;false;
-
-&nbsp;&nbsp;&nbsp;page.addEventListener(&quot;pagebeforeshow&quot;,&nbsp;function(){
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;panelChanger&nbsp;=&nbsp;page.querySelector(&quot;#panelChanger&quot;),
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;panelChangerComponent,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;navigation&nbsp;=&nbsp;page.querySelector(&quot;#navigation&quot;),
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;navigationComponent,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;navigated&nbsp;=&nbsp;false;
+
+&nbsp;&nbsp;&nbsp;page.addEventListener(&quot;pagebeforeshow&quot;,&nbsp;function()
+&nbsp;&nbsp;&nbsp;{
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var&nbsp;activePanel&nbsp;=&nbsp;page.querySelector(&quot;.ui-panel-active&quot;);
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;panelChangerComponent&nbsp;=&nbsp;tau.widget.PanelChanger(panelChanger);
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;navigationComponent&nbsp;=&nbsp;tau.widget.Navigation(navigation);
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;navigationComponent.push(activePanel.id);
 &nbsp;&nbsp;&nbsp;});
-&nbsp;&nbsp;&nbsp;panelChanger.addEventListener(&quot;panelchange&quot;,&nbsp;function(event)&nbsp;{
+&nbsp;&nbsp;&nbsp;panelChanger.addEventListener(&quot;panelchange&quot;,&nbsp;function(event)
+&nbsp;&nbsp;&nbsp;{
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var&nbsp;toPanel&nbsp;=&nbsp;event.detail.toPanel,
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;direction&nbsp;=&nbsp;event.detail.direction,
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;id&nbsp;=&nbsp;toPanel.id;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;direction&nbsp;=&nbsp;event.detail.direction,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;id&nbsp;=&nbsp;toPanel.id;
 
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;(id)&nbsp;{
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;(direction&nbsp;===&nbsp;&quot;forward&quot;)&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;(id)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;(direction&nbsp;===&nbsp;&quot;forward&quot;)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;navigationComponent.push(id);
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;else&nbsp;{
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;(navigated&nbsp;===&nbsp;false)&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;else
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;(navigated&nbsp;===&nbsp;false)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;navigationComponent.pop();
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;else&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;else
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;navigated&nbsp;=&nbsp;false;
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;else&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;else
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.warn(&quot;You&nbsp;should&nbsp;insert&nbsp;id&nbsp;value&nbsp;in&nbsp;the&nbsp;each&nbsp;panels&quot;)
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
 &nbsp;&nbsp;&nbsp;});
-&nbsp;&nbsp;&nbsp;navigation.addEventListener(&quot;navigate&quot;,&nbsp;function(event)&nbsp;{
+&nbsp;&nbsp;&nbsp;navigation.addEventListener(&quot;navigate&quot;,&nbsp;function(event)
+&nbsp;&nbsp;&nbsp;{
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var&nbsp;id&nbsp;=&nbsp;event.detail.id;
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;navigated&nbsp;=&nbsp;true;
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;panelChangerComponent.changePanel(&quot;#&quot;&nbsp;+&nbsp;id,&nbsp;&quot;slide-reverse&quot;,&nbsp;&quot;back&quot;);
 &nbsp;&nbsp;&nbsp;});
 })();
-    </pre>
+</pre>
 
 
 
                        
                                <tr>
                                        <td>
-                                               <pre class="intable prettyprint"><a href="#method-create">create</a> ( ) </pre>
+                                               <pre class="intable prettyprint"><a href="#method-create">create</a>() </pre>
                                        </td>
                                        <td><p>Initiates the making of the navigation.</p></td>
                                </tr>
                 <tr>
                     <td>
-                        <pre class="intable prettyprint"><a href="#method-push">push</a> ( String targetId ) </pre>
+                        <pre class="intable prettyprint"><a href="#method-push">push</a>(String targetId) </pre>
                     </td>
                     <td><p>Add navigation item only one at a time.</p></td>
                 </tr>
                 <tr>
                     <td>
-                        <pre class="intable prettyprint"><a href="#method-pop">pop</a> ( ) </pre>
+                        <pre class="intable prettyprint"><a href="#method-pop">pop</a>() </pre>
                     </td>
                     <td><p>Pop last child of navigation.</p></td>
                 </tr>
                                                <p>Initiates the making of the navigation.</p>
                                        </div>
                                        <div class="synopsis">
-                                               <pre class="signature prettyprint">create ( ) </pre>
+                                               <pre class="signature prettyprint">create() </pre>
                                        </div>
                                        
                                        <div class="description">
                 <p>Add navigation item only one at a time.</p>
             </div>
             <div class="synopsis">
-                <pre class="signature prettyprint">push ( String targetId ) </pre>
+                <pre class="signature prettyprint">push(String targetId) </pre>
             </div>
 
             <div class="parameters">
 &lt;/div&gt;
 &lt;script&gt;
 &nbsp;&nbsp;&nbsp;var&nbsp;navigation&nbsp;=&nbsp;page.querySelector(&quot;#navigation&quot;),
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;activePanel&nbsp;=&nbsp;page.querySelector(&quot;.ui-panel-active&quot;),
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;navigationComponent&nbsp;=&nbsp;tau.widget.Navigation(navigation);
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;navigationComponent.push(activePanel.id);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;activePanel&nbsp;=&nbsp;page.querySelector(&quot;.ui-panel-active&quot;),
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;navigationComponent&nbsp;=&nbsp;tau.widget.Navigation(navigation);
+&nbsp;&nbsp;&nbsp;navigationComponent.push(activePanel.id);
 &lt;/script&gt;</pre>
             </div>
 
                 <p>Pop last child of navigation.</p>
             </div>
             <div class="synopsis">
-                <pre class="signature prettyprint">pop ( ) </pre>
+                <pre class="signature prettyprint">pop() </pre>
             </div>
 
 
 &lt;/div&gt;
 &lt;script&gt;
 &nbsp;&nbsp;&nbsp;var&nbsp;navigation&nbsp;=&nbsp;page.querySelector(&quot;#navigation&quot;),
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;navigationComponent&nbsp;=&nbsp;tau.widget.Navigation(navigation);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;navigationComponent&nbsp;=&nbsp;tau.widget.Navigation(navigation);
 &nbsp;&nbsp;&nbsp;
 &nbsp;&nbsp;&nbsp;navigationComponent.pop();
 &lt;/script&gt;
index a81aea6..411fbed 100755 (executable)
@@ -75,7 +75,7 @@ var elPageIndicator = document.getElementById(&quot;pageIndicator&quot;),
 &lt;div class=&quot;ui-content&quot;&gt;
 &nbsp;&nbsp;&nbsp;&lt;div class=&quot;ui-page-indicator&quot; id=&quot;pageIndicator&quot; data-number-of-pages=&quot;4&quot; style=&quot;bottom: 0;&quot;&gt;&lt;/div&gt;
 &nbsp;&nbsp;&nbsp;&lt;div id=&quot;hsectionchanger&quot; class=&quot;ui-section-changer&quot;&gt;
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;!-- section changer has only one child. --&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;!--Section changer has only one child--&gt;
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;div&gt;
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;section class=&quot;ui-section-active&quot;&gt;
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;ul class=&quot;ui-listview&quot;&gt;
@@ -102,10 +102,13 @@ var elPageIndicator = document.getElementById(&quot;pageIndicator&quot;),
 &lt;/div&gt;
 &lt;script&gt;
 &nbsp;&nbsp;&nbsp;var sectionChanger = document.getElementById(&quot;hsectionchanger&quot;),
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;elPageIndicator = document.getElementById(&quot;pageIndicator&quot;),
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pageIndicator;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;elPageIndicator = document.getElementById(&quot;pageIndicator&quot;),
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pageIndicator;
 &nbsp;&nbsp;&nbsp;pageIndicator = tau.widget.PageIndicator(elPageIndicator);
-&nbsp;&nbsp;&nbsp;sectionChanger.addEventListener(&quot;sectionchange&quot;, function(e) { pageIndicator.setActive(e.detail.active); }, false);
+&nbsp;&nbsp;&nbsp;sectionChanger.addEventListener(&quot;sectionchange&quot;, function(e)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pageIndicator.setActive(e.detail.active);
+&nbsp;&nbsp;&nbsp;}, false);
 &lt;/script&gt;
 </pre>
 </li></ul>
@@ -139,24 +142,24 @@ var elPageIndicator = document.getElementById(&quot;pageIndicator&quot;),
        </table>
 <br>
 <p>
-Take an example : the situation that the value of data-number-of-pages is "5"(5 pages in all), and the value of data-max-page is "3"(3 dots).<br>
+Take an example : the situation that the value of data-number-of-pages is "5" (5 pages in all), and the value of data-max-page is "3" (3 dots).<br>
 <pre class="prettyprint">
 &lt;div id=&quot;pageIndicator&quot; class=&quot;ui-page-indicator&quot; data-number-of-pages=&quot;5&quot; data-max-page=&quot;3&quot;&gt;&lt;/div&gt;
 </pre>
 <br>
-When you scroll the page(or section) horizontally,  the number of exceeding pages( in this case, it is 2 pages, which is the result of 5 - 3 )<br>
+When you scroll the page (or section) horizontally,  the number of exceeding pages (in this case, it is 2 pages, which is the result of 5 - 3)<br>
 would be indicated by the central dot, from middle of the pages.<br>
 <br>
-So, the first dot is for the first page, and the last dot is for the fifththe last) page.<br>
+So, the first dot is for the first page, and the last dot is for the fifth (the last) page.<br>
 And the middle dot is shared by 2nd, 3rd and 4th page while scrolling pages.<br>
 <br>
-In the case of even value of data-max-pagethe number of dots on the screen), the next order of half of the data-max-page value would work as middle dot.<br>
-For example, in the situation that the value of data-number-of-pages is "6", and the value of data-max-page is "4", the 3rd dotthe result of 4 / 2 + 1) would indicate
+In the case of even value of data-max-page (the number of dots on the screen), the next order of half of the data-max-page value would work as middle dot.<br>
+For example, in the situation that the value of data-number-of-pages is "6", and the value of data-max-page is "4", the 3rd dot (the result of 4 / 2 + 1) would indicate
 3rd, 4th and 5th pages as middle dot.<br>
 <br>
 Of course, the value of data-number-of-pages should meet the number of the pages you have added to HTML.<br>
 <br>
-And if the the value of data-max-page(dots) exceeds the value of data-number-of-pages, indicator dots will be displayed as the value of data-number-of-pages.<br>
+And if the the value of data-max-page (dots) exceeds the value of data-number-of-pages, indicator dots will be displayed as the value of data-number-of-pages.<br>
 For example, in the situation that the value of numberOfPages is "6", and the value of maxPage is "100",there would be still 6 dots on the screen.
 </P>
 
@@ -176,7 +179,7 @@ For example, in the situation that the value of numberOfPages is "6", and the va
 
                                <tr>
                                        <td>
-                                               <pre class="intable prettyprint"><a href="#method-setActive">setActive</a> ( number index ) </pre>
+                                               <pre class="intable prettyprint"><a href="#method-setActive">setActive</a>(number index) </pre>
                                        </td>
                                        <td><p>This method sets a dot to active state.</p></td>
                                </tr>
@@ -194,7 +197,7 @@ For example, in the situation that the value of numberOfPages is "6", and the va
                                                <p>This method sets a dot to active state.</p>
                                        </div>
                                        <div class="synopsis">
-                                               <pre class="signature prettyprint">setActive ( number index) </pre>
+                                               <pre class="signature prettyprint">setActive(number index) </pre>
                                        </div>
 
                                        <div class="description">
index 7d00dcb..7058f7d 100644 (file)
@@ -47,7 +47,7 @@ Panel changer component controls lifecycle of the panels.</p>
 
 <pre class="prettyprint">
 var elPanelChanger = document.getElementById(&quot;panelchanger&quot;),
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;panelChanger = tau.widget.PanelChanger(elPanelChanger);
+&nbsp;&nbsp;&nbsp;&nbsp;panelChanger = tau.widget.PanelChanger(elPanelChanger);
 </pre>
 
 <h2><a id="html-examples"></a>HTML Examples</h2>
@@ -175,7 +175,7 @@ var elPanelChanger = document.getElementById(&quot;panelchanger&quot;),
                
                        <tr>
                                <td>
-                                       <pre class="intable prettyprint"><a href="#method-changePanel">changePanel</a> ( String address, String animationType, String direction ) </pre>
+                                       <pre class="intable prettyprint"><a href="#method-changePanel">changePanel</a>(String address, String animationType, String direction) </pre>
                                </td>
                                <td><p>Change panel method</p></td>
                        </tr>
@@ -193,7 +193,7 @@ var elPanelChanger = document.getElementById(&quot;panelchanger&quot;),
                                <p>change panel</p>
                        </div>
                        <div class="synopsis">
-                               <pre class="signature prettyprint">changePanel ( String address, String animationType, String direction) </pre>
+                               <pre class="signature prettyprint">changePanel(String address, String animationType, String direction) </pre>
                        </div>
                        
                        <div class="description">
index a23fe5a..bd9a395 100644 (file)
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;div&nbsp;id=&quot;1btn_popup&quot;&nbsp;class=&quot;ui-popup&quot;&gt;
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;div&nbsp;class=&quot;ui-popup-header&quot;&gt;Popup&nbsp;Header&lt;/div&gt;
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;div&nbsp;class=&quot;ui-popup-content&nbsp;popup-content-padding&quot;&gt;
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Lorem&nbsp;ipsum&nbsp;dolor&nbsp;sit&nbsp;amet,
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;consectetur&nbsp;adiptiscing&nbsp;elit,&nbsp;sed
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;doei&nbsp;usmod&nbsp;tempore&nbsp;sit&nbsp;ipsum
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Lorem&nbsp;ipsum&nbsp;dolor&nbsp;sit&nbsp;amet,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;consectetur&nbsp;adiptiscing&nbsp;elit,&nbsp;sed
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;doei&nbsp;usmod&nbsp;tempore&nbsp;sit&nbsp;ipsum
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/div&gt;
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;div&nbsp;class=&quot;ui-popup-footer&quot;&gt;
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;a&nbsp;class=&quot;ui-btn&quot;&nbsp;data-rel=&quot;back&quot;&nbsp;data-inline=&quot;true&quot;&gt;Cancel&lt;/a&gt;
@@ -215,11 +215,11 @@ In mobile profile, default value is &quot;origin&quot; and if popup has no optio
 &nbsp;&nbsp;&nbsp;&lt;p&gt;This is a completely basic popup, no options set.&lt;/p&gt;
 &lt;/div&gt;
 &lt;script&gt;
-&nbsp;&nbsp;&nbsp;// Use popup events
+&nbsp;&nbsp;&nbsp;/* Use popup events */
 &nbsp;&nbsp;&nbsp;var popup = document.getElementById(&quot;popup&quot;);
 &nbsp;&nbsp;&nbsp;popup.addEventListener(&quot;popupafteropen&quot;, function() 
 &nbsp;&nbsp;&nbsp;{
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// Implement code for popupafteropen event
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Implement code for popupafteropen event */
 &nbsp;&nbsp;&nbsp;});
 &lt;/script&gt;
 </pre>
@@ -324,8 +324,8 @@ The selector, which causes closing on click, can be changed by setting the <code
 &lt;script&gt;
 &nbsp;&nbsp;&nbsp;var popupElement = document.getElementById(&quot;popup&quot;),
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;popup = tau.widget.Popup(popupElement);
-&nbsp;&nbsp;&nbsp;// Close popup after opening
-&nbsp;&nbsp;&nbsp;popupElement.addEventListener(&quot;popupafteropen&quot;, function () 
+&nbsp;&nbsp;&nbsp;/* Close popup after opening */
+&nbsp;&nbsp;&nbsp;popupElement.addEventListener(&quot;popupafteropen&quot;, function() 
 &nbsp;&nbsp;&nbsp;{
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;popup.close();
 &nbsp;&nbsp;&nbsp;});
index 117d35c..2b8ef1e 100644 (file)
 &nbsp;&nbsp;&nbsp;var element = document.getElementById(&quot;progress&quot;),
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;progress = tau.widget.Progress(element);
 
-&nbsp;&nbsp;&nbsp;// progress.methodName(argument1, argument2, ...);
-&nbsp;&nbsp;&nbsp;// For example
+&nbsp;&nbsp;&nbsp;/*
+&nbsp;&nbsp;&nbsp;   progress.methodName(argument1, argument2, ...);
+&nbsp;&nbsp;&nbsp;   For example:
+&nbsp;&nbsp;&nbsp;*/
 &nbsp;&nbsp;&nbsp;progress.refresh();
 &lt;/script&gt;
 </pre>
 
                                <tr>
                                        <td>
-                                               <pre class="intable prettyprint"><a href="#method-value">value</a> (  ) </pre>
+                                               <pre class="intable prettyprint"><a href="#method-value">value</a>() </pre>
                                        </td>
                                        <td><p>Sets or gets value of Progress component.</p></td>
                                </tr>
 
                                <tr>
                                        <td>
-                                               <pre class="intable prettyprint"><a href="#method-option">option</a> (  ) </pre>
+                                               <pre class="intable prettyprint"><a href="#method-option">option</a>() </pre>
                                        </td>
                                        <td><p>Sets or gets options of Progress component.</p></td>
                                </tr>
 
                                <tr>
                                        <td>
-                                               <pre class="intable prettyprint"><a href="#method-refresh">refresh</a> (  ) </pre>
+                                               <pre class="intable prettyprint"><a href="#method-refresh">refresh</a>() </pre>
                                        </td>
                                        <td><p>Refreshes the Progress DOM.</p></td>
                                </tr>
                                <p>Sets or gets value of Progress component.</p>
                        </div>
                        <div class="synopsis">
-                               <pre class="signature prettyprint">value ( Number value ) </pre>
+                               <pre class="signature prettyprint">value(Number value) </pre>
                        </div>
                        <div class="description">
                                <br>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;progress&nbsp;=&nbsp;tau.widget.Progress(element),
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;originValue;
 
-&nbsp;&nbsp;&nbsp;// Get the origin value of progress
+&nbsp;&nbsp;&nbsp;/* Get the origin value of progress */
 &nbsp;&nbsp;&nbsp;originValue = progress.value();
 &nbsp;&nbsp;&nbsp;console.log(originValue);
 
-&nbsp;&nbsp;&nbsp;// sets the value of progress to 70
+&nbsp;&nbsp;&nbsp;/* Set the value of progress to 70 */
 &nbsp;&nbsp;&nbsp;progress.value(70);
 &lt;/script&gt;
 </pre>
                                <p>Sets or gets options of Progress component.</p>
                        </div>
                        <div class="synopsis">
-                               <pre class="signature prettyprint">option ( ) </pre>
+                               <pre class="signature prettyprint">option() </pre>
                        </div>
                        <div class="description">
                                <p>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;type;
 
 &nbsp;&nbsp;&nbsp;progress.option("value", 50);
-&nbsp;&nbsp;&nbsp;// After change option, please call refresh method.
+&nbsp;&nbsp;&nbsp;/* After change option, call refresh method */
 &nbsp;&nbsp;&nbsp;progress.refresh();
 
-&nbsp;&nbsp;&nbsp;// Gets type option value
+&nbsp;&nbsp;&nbsp;/* Get type option value */
 &nbsp;&nbsp;&nbsp;type = progress.option("type");
 &nbsp;&nbsp;&nbsp;console.log(type);
 &lt;/script&gt;
                                <p>Refresh Progress DOM.</p>
                        </div>
                        <div class="synopsis">
-                               <pre class="signature prettyprint">refresh ( ) </pre>
+                               <pre class="signature prettyprint">refresh() </pre>
                        </div>
                        <div class="description">
                                <p>
 &nbsp;&nbsp;&nbsp;var&nbsp;element&nbsp;=&nbsp;document.getElementById(&quot;progress&quot;),
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;progress&nbsp;=&nbsp;tau.widget.Progress(element);
 
-&nbsp;&nbsp;&nbsp;// Change DOM dynamically or change option
+&nbsp;&nbsp;&nbsp;/* Change DOM dynamically or change option */
 &nbsp;&nbsp;&nbsp;progress.refresh();
 &lt;/script&gt;
 </pre>
index 4172811..cfb9057 100644 (file)
@@ -43,9 +43,9 @@
 
 <p>To create a radio component, please refer following example:</p>
 
-<pre class="prettyprint">&lt;input type=&quot;radio&quot; name=&quot;radio-choice&quot; id=&quot;radio-choice-1&quot; value=&quot;choice-1&quot; checked=&quot;checked&quot; /&gt;
+<pre class="prettyprint">&lt;input type=&quot;radio&quot; name=&quot;radio-choice&quot; id=&quot;radio-choice-1&quot; value=&quot;choice-1&quot; checked=&quot;checked&quot;/&gt;
 &lt;label for=&quot;radio-choice-1&quot;&gt;Cat&lt;/label&gt;
-&lt;input type=&quot;radio&quot; name=&quot;radio-choice&quot; id=&quot;radio-choice-2&quot; value=&quot;choice-2&quot;  /&gt;
+&lt;input type=&quot;radio&quot; name=&quot;radio-choice&quot; id=&quot;radio-choice-2&quot; value=&quot;choice-2&quot;/&gt;
 &lt;label for=&quot;radio-choice-2&quot;&gt;Dog&lt;/label&gt;
 </pre>
 
@@ -64,7 +64,7 @@
 
        <tr>
                <td>
-                       <pre class="intable prettyprint"><a href="#method-disable">disable</a> (  ) </pre>
+                       <pre class="intable prettyprint"><a href="#method-disable">disable</a>() </pre>
                </td>
                <td><p>Disables the component.</p></td>
        </tr>
 
        <tr>
                <td>
-                       <pre class="intable prettyprint"><a href="#method-enable">enable</a> (  ) </pre>
+                       <pre class="intable prettyprint"><a href="#method-enable">enable</a>() </pre>
                </td>
                <td><p>Enables the component.</p></td>
        </tr>
 
        <tr>
                <td>
-                       <pre class="intable prettyprint"><a href="#method-value">value</a> ( ) </pre>
+                       <pre class="intable prettyprint"><a href="#method-value">value</a>() </pre>
                </td>
                <td><p>Set/Return a value from radio element.</p></td>
        </tr>
@@ -97,7 +97,7 @@
                        <p>Disables the component.</p>
                </div>
                <div class="synopsis">
-                       <pre class="signature prettyprint">disable ( ) </pre>
+                       <pre class="signature prettyprint">disable() </pre>
                </div>
 
                <div class="description">
                                                                example:</p><p></p></span>
                                                        <pre name="code" class="examplecode
                                                        prettyprint">
-&lt;input type=&quot;radio&quot; name=&quot;radio-1&quot; id=&quot;radio-1&quot;/&gt;&lt;label for=&quot;radio-1&quot;&gt;Normal&lt;/label&gt;
+&lt;input type=&quot;radio&quot; name=&quot;radio-1&quot; id=&quot;radio-1&quot;/&gt;
+&lt;label for=&quot;radio-1&quot;&gt;Normal&lt;/label&gt;
 &lt;script&gt;
 &nbsp;&nbsp;&nbsp;var element = document.getElementById(&quot;radio-1&quot;),
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;radioWidget = tau.widget.Radio(element);
                        <p>Enables the component.</p>
                </div>
                <div class="synopsis">
-                       <pre class="signature prettyprint">enable ( ) </pre>
+                       <pre class="signature prettyprint">enable() </pre>
                </div>
 
                <div class="description">
                                                                example:</p><p></p></span>
                                                        <pre name="code" class="examplecode
                                                        prettyprint">
-&lt;input type=&quot;radio&quot; name=&quot;radio-1&quot; id=&quot;radio-1&quot;/&gt;&lt;label for=&quot;radio-1&quot;&gt;Normal&lt;/label&gt;
+&lt;input type=&quot;radio&quot; name=&quot;radio-1&quot; id=&quot;radio-1&quot;/&gt;
+&lt;label for=&quot;radio-1&quot;&gt;Normal&lt;/label&gt;
 &lt;script&gt;
 &nbsp;&nbsp;&nbsp;var element = document.getElementById(&quot;radio-1&quot;),
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;radioWidget = tau.widget.Radio(element);
                        <p>Set/Return a value from radio element.</p>
                </div>
                <div class="synopsis">
-                       <pre class="signature prettyprint">{ string | number } value ( ) </pre>
+                       <pre class="signature prettyprint">{string | number} value() </pre>
                </div>
 
                <div class="description">
                                                                example:</p><p></p></span>
                                                        <pre name="code" class="examplecode
                                                        prettyprint">
-&lt;input type=&quot;radio&quot; name=&quot;radio-1&quot; id=&quot;radio-1&quot;/&gt;&lt;label for=&quot;radio-1&quot;&gt;Normal&lt;/label&gt;
+&lt;input type=&quot;radio&quot; name=&quot;radio-1&quot; id=&quot;radio-1&quot;/&gt;
+&lt;label for=&quot;radio-1&quot;&gt;Normal&lt;/label&gt;
 &lt;script&gt;
 &nbsp;&nbsp;&nbsp;var element = document.getElementById(&quot;radio-1&quot;),
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;radioWidget = tau.widget.Radio(element);
 
-&nbsp;&nbsp;&nbsp;// Set value to radio element
+&nbsp;&nbsp;&nbsp;/* Set value to radio element */
 &nbsp;&nbsp;&nbsp;radioWidget.value("radio-value");
-&nbsp;&nbsp;&nbsp;// Returns checked radio element
+&nbsp;&nbsp;&nbsp;/* Return checked radio element */
 &nbsp;&nbsp;&nbsp;console.log(radioWidget.value());
 &lt;/script&gt;
 </pre>
index ad28a6f..a13ef7b 100644 (file)
 <p>To manually create a SearchInput component, use the component constructor from the <code>tau</code> namespace.</p>
 
 <pre class="prettyprint">
-&lt;input type=&quot;search&quot; id=&quot;search-test&quot; /&gt;
+&lt;input type=&quot;search&quot; id=&quot;search-test&quot;/&gt;
 &lt;script&gt;
 var searchEl = document.getElementById(&quot;search-test&quot;),
-       searchWidget = tau.widget.SearchInput(searchEl);
+&nbsp;&nbsp;&nbsp;&nbsp;searchWidget = tau.widget.SearchInput(searchEl);
 &lt;/script&gt;
 </pre>
 
@@ -85,14 +85,14 @@ var searchEl = document.getElementById(&quot;search-test&quot;),
                <tbody>
                                <tr>
                                        <td>
-                                               <pre class="intable prettyprint"><a href="#method-disable">disable</a> (  ) </pre>
+                                               <pre class="intable prettyprint"><a href="#method-disable">disable</a>() </pre>
                                        </td>
                                        <td><p>Disable the SearchInput.</p></td>
                                </tr>
 
                                <tr>
                                        <td>
-                                               <pre class="intable prettyprint"><a href="#method-enable">enable</a> (  ) </pre>
+                                               <pre class="intable prettyprint"><a href="#method-enable">enable</a>() </pre>
                                        </td>
                                        <td><p>Enable the SearchInput.</p></td>
                                </tr>
@@ -108,7 +108,7 @@ var searchEl = document.getElementById(&quot;search-test&quot;),
                                                <p>Disable the SearchInput.</p>
                                        </div>
                                        <div class="synopsis">
-                                               <pre class="signature prettyprint">disable ( ) </pre>
+                                               <pre class="signature prettyprint">disable() </pre>
                                        </div>
                                        
                                        <div class="description">
@@ -158,7 +158,7 @@ var searchEl = document.getElementById(&quot;search-test&quot;),
                                                <p>Enable the SearchInput.</p>
                                        </div>
                                        <div class="synopsis">
-                                               <pre class="signature prettyprint">enable ( ) </pre>
+                                               <pre class="signature prettyprint">enable() </pre>
                                        </div>
 
                                        <div class="description">
index d749054..e94d1c6 100755 (executable)
@@ -191,21 +191,21 @@ var sectionChangerEl = document.getElementById(&quot;sectionchanger&quot;),
 
                                <tr>
                                        <td>
-                                               <pre class="intable prettyprint"><a href="#method-setActive">setActiveSection</a> ( number index ) </pre>
+                                               <pre class="intable prettyprint"><a href="#method-setActive">setActiveSection</a>(number index) </pre>
                                        </td>
                                        <td><p>Changes the currently active section element (index).
                <br>For smooth scrolling, the <span style="font-family: Courier New,Courier,monospace">duration</span> parameter must be in milliseconds.</p></td>
                                </tr>
                                <tr>
                                        <td>
-                                               <pre class="intable prettyprint"><a href="#method-getActiveSectionIndex">getActiveSectionIndex</a> () </pre>
+                                               <pre class="intable prettyprint"><a href="#method-getActiveSectionIndex">getActiveSectionIndex</a>() </pre>
                                        </td>
                                        <td><p>Gets the currently active section element&#39;s index.
                <br>The return value is a number (<span style="font-family: Courier New,Courier,monospace">activeIndex</span>).</p></td>
                                </tr>
                                <tr>
                                        <td>
-                                               <pre class="intable prettyprint"><a href="#method-refresh">refresh</a> () </pre>
+                                               <pre class="intable prettyprint"><a href="#method-refresh">refresh</a>() </pre>
                                        </td>
                                        <td><p>Updates the section changer form.
                <br>When you add new section dynamically through JavaScript, you must call the <span style="font-family: Courier New,Courier,monospace">refresh()</span> method to update section information.</p></td>
@@ -225,7 +225,7 @@ var sectionChangerEl = document.getElementById(&quot;sectionchanger&quot;),
                <br>For smooth scrolling, the <span style="font-family: Courier New,Courier,monospace">duration</span> parameter must be in milliseconds.</p>
                                        </div>
                                        <div class="synopsis">
-                                               <pre class="signature prettyprint">setActiveSection ( number index) </pre>
+                                               <pre class="signature prettyprint">setActiveSection(number index) </pre>
                                        </div>
 
                                        <div class="description">
@@ -296,7 +296,7 @@ var sectionChangerEl = document.getElementById(&quot;sectionchanger&quot;),
                <br>The return value is a number (<span style="font-family: Courier New,Courier,monospace">activeIndex</span>).</p>
                                        </div>
                                        <div class="synopsis">
-                                               <pre class="signature prettyprint">getActiveSectionIndex () </pre>
+                                               <pre class="signature prettyprint">getActiveSectionIndex() </pre>
                                        </div>
 
                                        <div class="description">
@@ -350,7 +350,7 @@ var sectionChangerEl = document.getElementById(&quot;sectionchanger&quot;),
                <br>When you add new section dynamically through JavaScript, you must call the <span style="font-family: Courier New,Courier,monospace">refresh()</span> method to update section information.</p>
                                        </div>
                                        <div class="synopsis">
-                                               <pre class="signature prettyprint">refresh () </pre>
+                                               <pre class="signature prettyprint">refresh() </pre>
                                        </div>
 
                                        <div class="description">
index a9ae396..3d7fd60 100644 (file)
@@ -48,7 +48,7 @@
 
 <p>To manually create a slider component, use the component constructor from the <code>tau</code> namespace</p>
 
-<pre class="prettyprint">&lt;input id=&quot;slider&quot; /&gt;
+<pre class="prettyprint">&lt;input id=&quot;slider&quot;/&gt;
 &lt;script&gt;
 &nbsp;&nbsp;&nbsp;var sliderElement = document.getElementById(&quot;slider&quot;),
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;slider = tau.widget.Slider(sliderElement);
@@ -61,7 +61,7 @@
 
 <p>To create slider input:</p>
 
-<pre class="prettyprint">&lt;input type=&quot;range&quot; name=&quot;slider-1&quot; id=&quot;slider&quot; value=&quot;60&quot; min=&quot;0&quot; max=&quot;100&quot; /&gt;
+<pre class="prettyprint">&lt;input type=&quot;range&quot; name=&quot;slider-1&quot; id=&quot;slider&quot; value=&quot;60&quot; min=&quot;0&quot; max=&quot;100&quot;/&gt;
 </pre>
 
        <h2><a id="options-list"></a>Options</h2>
 
 <p>To call a method on the component, use one of the existing APIs:</p>
 
-<pre class="prettyprint">&lt;input id=&quot;slider&quot; type=&quot;range&quot; name=&quot;slider&quot;&nbsp;value=&quot;60&quot; min=&quot;0&quot; max=&quot;100&quot; /&gt;
+<pre class="prettyprint">&lt;input id=&quot;slider&quot; type=&quot;range&quot; name=&quot;slider&quot;&nbsp;value=&quot;60&quot; min=&quot;0&quot; max=&quot;100&quot;/&gt;
 &lt;script&gt;
 &nbsp;&nbsp;&nbsp;var slider = document.getElementById(&quot;slider&quot;),
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;slider = tau.widget.Slider(slider);
 
-&nbsp;&nbsp;&nbsp;// slider.methodName(methodArgument1, methodArgument2, ...);
-&nbsp;&nbsp;&nbsp;// For example
+&nbsp;&nbsp;&nbsp;/*
+&nbsp;&nbsp;&nbsp;   slider.methodName(methodArgument1, methodArgument2, ...);
+&nbsp;&nbsp;&nbsp;   For example:
+&nbsp;&nbsp;&nbsp;*/
 &nbsp;&nbsp;&nbsp;var value = slider.value(5);
 &lt;/script&gt;
 </pre>
        
                                <tr>
                                        <td>
-                                               <pre class="intable prettyprint">Slider <a href="#method-disable">disable</a> (  ) </pre>
+                                               <pre class="intable prettyprint">Slider <a href="#method-disable">disable</a>() </pre>
                                        </td>
                                        <td><p>Disables the slider.</p></td>
                                </tr>
                        
                                <tr>
                                        <td>
-                                               <pre class="intable prettyprint">Slider <a href="#method-enable">enable</a> (  ) </pre>
+                                               <pre class="intable prettyprint">Slider <a href="#method-enable">enable</a>() </pre>
                                        </td>
                                        <td><p>Enables the slider.</p></td>
                                </tr>
 
                                <tr>
                                        <td>
-                                               <pre class="intable prettyprint">Slider <a href="#method-refresh">refresh</a> (  ) </pre>
+                                               <pre class="intable prettyprint">Slider <a href="#method-refresh">refresh</a>() </pre>
                                        </td>
                                        <td><p>Refreshes a slider markup.</p></td>
                                </tr>
                        
                                <tr>
                                        <td>
-                                               <pre class="intable prettyprint">string <a href="#method-value">value</a> (  ) </pre>
+                                               <pre class="intable prettyprint">string <a href="#method-value">value</a>() </pre>
                                        </td>
                                        <td><p>Gets or sets a value.</p></td>
                                </tr>
                                                <p>Disables the slider.</p>
                                        </div>
                                        <div class="synopsis">
-                                               <pre class="signature prettyprint">Slider disable ( ) </pre>
+                                               <pre class="signature prettyprint">Slider disable() </pre>
                                        </div>
                                        
                                        <div class="description">
                                                                example:</p><p></p></span>
                                                        <pre name="code" class="examplecode
                                                        prettyprint">
-&lt;input id=&quot;mySlider1&quot; name=&quot;mySlider1&quot; data-popup=&#39;false&#39; type=&quot;range&quot; value=&quot;5&quot; min=&quot;0&quot; max=&quot;10&quot; /&gt;
+&lt;input id=&quot;mySlider1&quot; name=&quot;mySlider1&quot; data-popup=&#39;false&#39; type=&quot;range&quot; value=&quot;5&quot; min=&quot;0&quot; max=&quot;10&quot;/&gt;
 &lt;script&gt;
 &nbsp;&nbsp;&nbsp;var slider = document.getElementById(&quot;mySlider1&quot;),
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sliderWidget = tau.widget.Slider(slider);
                                                <p>Enables the slider.</p>
                                        </div>
                                        <div class="synopsis">
-                                               <pre class="signature prettyprint">Slider enable ( ) </pre>
+                                               <pre class="signature prettyprint">Slider enable() </pre>
                                        </div>
                                        
                                        <div class="description">
                                                                example :</p><p></p></span>
                                                        <pre name="code" class="examplecode
                                                        prettyprint">
-&lt;input id=&quot;mySlider1&quot; name=&quot;mySlider1&quot; data-popup=&#39;false&#39; type=&quot;range&quot; value=&quot;5&quot; min=&quot;0&quot; max=&quot;10&quot; /&gt;
+&lt;input id=&quot;mySlider1&quot; name=&quot;mySlider1&quot; data-popup=&#39;false&#39; type=&quot;range&quot; value=&quot;5&quot; min=&quot;0&quot; max=&quot;10&quot;/&gt;
 &lt;script&gt;
 &nbsp;&nbsp;&nbsp;var slider = document.getElementById(&quot;mySlider1&quot;),
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sliderWidget = tau.widget.Slider(slider);
                                                <p>Refreshes a slider markup.</p>
                                        </div>
                                        <div class="synopsis">
-                                               <pre class="signature prettyprint">Slider refresh ( ) </pre>
+                                               <pre class="signature prettyprint">Slider refresh() </pre>
                                        </div>
                                        
                                        <div class="description">
                                                                example :</p><p></p></span>
                                                        <pre name="code" class="examplecode
                                                        prettyprint">
-&lt;input id=&quot;mySlider1&quot; name=&quot;mySlider1&quot; data-popup=&#39;false&#39; type=&quot;range&quot; value=&quot;5&quot; min=&quot;0&quot; max=&quot;10&quot; /&gt;
+&lt;input id=&quot;mySlider1&quot; name=&quot;mySlider1&quot; data-popup=&#39;false&#39; type=&quot;range&quot; value=&quot;5&quot; min=&quot;0&quot; max=&quot;10&quot;/&gt;
 &lt;script&gt;
 &nbsp;&nbsp;&nbsp;var slider = document.getElementById(&quot;mySlider1&quot;),
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sliderWidget = tau.widget.Slider(slider);
                                                <p>Gets or sets a value.</p>
                                        </div>
                                        <div class="synopsis">
-                                               <pre class="signature prettyprint">string value ( ) </pre>
+                                               <pre class="signature prettyprint">string value() </pre>
                                        </div>
                                        
                                                <p><span class="version">Since: </span>
                                                                example :</p><p></p></span>
                                                        <pre name="code" class="examplecode
                                                        prettyprint">
-&lt;input id=&quot;mySlider1&quot; name=&quot;mySlider1&quot; data-popup=&#39;false&#39; type=&quot;range&quot; value=&quot;5&quot; min=&quot;0&quot; max=&quot;10&quot; /&gt;
+&lt;input id=&quot;mySlider1&quot; name=&quot;mySlider1&quot; data-popup=&#39;false&#39; type=&quot;range&quot; value=&quot;5&quot; min=&quot;0&quot; max=&quot;10&quot;/&gt;
 &lt;script&gt;
 &nbsp;&nbsp;&nbsp;var slider = document.getElementById(&quot;mySlider1&quot;),
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sliderWidget = tau.widget.Slider(slider);
-&nbsp;&nbsp;&nbsp;// Value contains index of select tag
+&nbsp;&nbsp;&nbsp;/* Value contains index of select tag */
 &nbsp;&nbsp;&nbsp;value = sliderWidget.value();
-&nbsp;&nbsp;&nbsp;// Sets the index for the slider
+&nbsp;&nbsp;&nbsp;/* Sets the index for the slider */
 &nbsp;&nbsp;&nbsp;sliderWidget.value(&quot;1&quot;);
 &lt;/script&gt;
 </pre>
index 62b075e..cdddfd5 100644 (file)
@@ -89,11 +89,12 @@ When define tabbar in HTML, just add <code>class=&quot;ui-tabbar&quot;</code>. P
 
 <p>For manual creation of tabs widget you can use constructor of widget</p>
 
-<pre class="prettyprint"> &lt;script&gt;
-     var tabsElement = document.getElementById("tabs"),
-           tabs;
-     tabs = tau.widget.Tabs(tabsElement);
- &lt;/script&gt;
+<pre class="prettyprint">
+&lt;script&gt;
+&nbsp;&nbsp;&nbsp;var tabsElement = document.getElementById("tabs"),
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tabs;
+&nbsp;&nbsp;&nbsp;tabs = tau.widget.Tabs(tabsElement);
+&lt;/script&gt;
 </pre>
 
 <h2><a id="methods-list"></a>Methods list</h2>
@@ -108,13 +109,13 @@ When define tabbar in HTML, just add <code>class=&quot;ui-tabbar&quot;</code>. P
        <tbody>
                <tr>
                        <td>
-                               <pre class="intable prettyprint"><a href="#method-setIndex">setIndex</a> ( number index ) </pre>
+                               <pre class="intable prettyprint"><a href="#method-setIndex">setIndex</a>(number index) </pre>
                        </td>
                        <td><p>Set the active tab index</p></td>
                </tr>
                <tr>
                        <td>
-                               <pre class="intable prettyprint">number <a href="#method-getIndex">getIndex</a> (  ) </pre>
+                               <pre class="intable prettyprint">number <a href="#method-getIndex">getIndex</a>() </pre>
                        </td>
                        <td><p>Get the active tab index</p></td>
                </tr>
@@ -127,7 +128,7 @@ When define tabbar in HTML, just add <code>class=&quot;ui-tabbar&quot;</code>. P
                        <p>Set the active tab index</p>
                </div>
                <div class="synopsis">
-                       <pre class="signature prettyprint">setIndex ( number index) </pre>
+                       <pre class="signature prettyprint">setIndex(number index) </pre>
                </div>
                <div class="description">
                        <p>
@@ -165,7 +166,7 @@ When define tabbar in HTML, just add <code>class=&quot;ui-tabbar&quot;</code>. P
                        <p>Get the active tab index</p>
                </div>
                <div class="synopsis">
-                       <pre class="signature prettyprint">number getIndex ( ) </pre>
+                       <pre class="signature prettyprint">number getIndex() </pre>
                </div>
                <div class="description">
                        <p>
index 23ab8d3..d49981e 100644 (file)
@@ -75,9 +75,10 @@ If you want to delete word block, you should press the backspace key. If you foc
 
 <p>To manually create a TextEnveloper component, use the component constructor from the tau namespace.</p>
 
-<pre class="prettyprint">&lt;script&gt;
-var textEnveloperElement = document.getElementById("textenveloper"),
-    textEnveloper = tau.component.TextEnveloper(textEnveloperElement);
+<pre class="prettyprint">
+&lt;script&gt;
+&nbsp;&nbsp;&nbsp;var textEnveloperElement = document.getElementById("textenveloper"),
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;textEnveloper = tau.component.TextEnveloper(textEnveloperElement);
 &lt;/script&gt;
 </pre>
 
@@ -112,8 +113,9 @@ var textEnveloperElement = document.getElementById("textenveloper"),
 
 <p>To call method on component, please refer the following code:</p>
 
-<pre class="prettyprint">var textEnveloperElement = document.getElementById("textenveloper"),
-   textEnveloper = tau.component.TextEnveloper(textEnveloperElement);
+<pre class="prettyprint">
+var textEnveloperElement = document.getElementById("textenveloper"),
+&nbsp;&nbsp;&nbsp;&nbsp;textEnveloper = tau.component.TextEnveloper(textEnveloperElement);
 
 textEnveloper.methodName(methodArgument1, methodArgument2, ...);
 </pre>
@@ -131,7 +133,7 @@ textEnveloper.methodName(methodArgument1, methodArgument2, ...);
 
        <tr>
                <td>
-                       <pre class="intable prettyprint"><a href="#method-add">add</a> ( string messages ) </pre>
+                       <pre class="intable prettyprint"><a href="#method-add">add</a>(string messages) </pre>
                </td>
                <td><p>Add message token to textenveloper.</p></td>
        </tr>
@@ -140,7 +142,7 @@ textEnveloper.methodName(methodArgument1, methodArgument2, ...);
 
        <tr>
                <td>
-                       <pre class="intable prettyprint"><a href="#method-remove">remove</a> ( number index ) </pre>
+                       <pre class="intable prettyprint"><a href="#method-remove">remove</a>(number index) </pre>
                </td>
                <td><p>Delete token matched index.</p></td>
        </tr>
@@ -149,7 +151,7 @@ textEnveloper.methodName(methodArgument1, methodArgument2, ...);
 
        <tr>
                <td>
-                       <pre class="intable prettyprint">number <a href="#method-length">length</a> (  ) </pre>
+                       <pre class="intable prettyprint">number <a href="#method-length">length</a>() </pre>
                </td>
                <td><p>Return count number of tokens.</p></td>
        </tr>
@@ -167,7 +169,7 @@ textEnveloper.methodName(methodArgument1, methodArgument2, ...);
                        <p>Add message token to textenveloper.</p>
                </div>
                <div class="synopsis">
-                       <pre class="signature prettyprint">add ( string messages ) </pre>
+                       <pre class="signature prettyprint">add(string messages) </pre>
                </div>
 
                <div class="description">
@@ -215,11 +217,12 @@ textEnveloper.methodName(methodArgument1, methodArgument2, ...);
                                                        <span class="example"><p>Code
                                                                example:</p><p></p></span>
                                                        <pre name="code" class="examplecode
-                                                       prettyprint">&lt;script&gt;
-var textEnveloperElement = document.getElementById(&quot;textenveloper&quot;),
-    textEnveloper = tau.component.TextEnveloper(textEnveloperElement);
+                                                       prettyprint">
+&lt;script&gt;
+&nbsp;&nbsp;&nbsp;var textEnveloperElement = document.getElementById(&quot;textenveloper&quot;),
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;textEnveloper = tau.component.TextEnveloper(textEnveloperElement);
 
-textEnveloper.add("hello");
+&nbsp;&nbsp;&nbsp;textEnveloper.add("hello");
 &lt;/script&gt;
 </pre>
                </div>
@@ -235,7 +238,7 @@ textEnveloper.add("hello");
                        <p>Delete token matched index.</p>
                </div>
                <div class="synopsis">
-                       <pre class="signature prettyprint">remove ( number index ) </pre>
+                       <pre class="signature prettyprint">remove(number index) </pre>
                </div>
 
                <div class="description">
@@ -281,11 +284,12 @@ textEnveloper.add("hello");
                                                        <span class="example"><p>Code
                                                                example:</p><p></p></span>
                                                        <pre name="code" class="examplecode
-                                                       prettyprint">&lt;script&gt;
-var textEnveloperElement = document.getElementById(&quot;textenveloper&quot;),
-    textEnveloper = tau.component.TextEnveloper(textEnveloperElement);
+                                                       prettyprint">
+&lt;script&gt;
+&nbsp;&nbsp;&nbsp;var textEnveloperElement = document.getElementById(&quot;textenveloper&quot;),
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;textEnveloper = tau.component.TextEnveloper(textEnveloperElement);
 
-textEnveloper.remove(1);
+&nbsp;&nbsp;&nbsp;textEnveloper.remove(1);
 &lt;/script&gt;
 </pre>
                </div>
@@ -301,7 +305,7 @@ textEnveloper.remove(1);
                        <p>Return count number of tokens.</p>
                </div>
                <div class="synopsis">
-                       <pre class="signature prettyprint">number length ( ) </pre>
+                       <pre class="signature prettyprint">number length() </pre>
                </div>
 
                <div class="description">
@@ -337,15 +341,16 @@ textEnveloper.remove(1);
                                                        <span class="example"><p>Code
                                                                example:</p><p></p></span>
                                                        <pre name="code" class="examplecode
-                                                       prettyprint">&lt;script&gt;
-var textEnveloperElement = document.getElementById(&quot;textenveloper&quot;),
-    textEnveloper = tau.component.TextEnveloper(textEnveloperElement),
-    textTokenLength;
-
-textEnveloper.add("hello1");
-textEnveloper.add("hello2");
-//textTokenLength will be 2
-textTokenLength = textEnveloper.length();
+                                                       prettyprint">
+&lt;script&gt;
+&nbsp;&nbsp;&nbsp;var textEnveloperElement = document.getElementById(&quot;textenveloper&quot;),
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;textEnveloper = tau.component.TextEnveloper(textEnveloperElement),
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;textTokenLength;
+
+&nbsp;&nbsp;&nbsp;textEnveloper.add("hello1");
+&nbsp;&nbsp;&nbsp;textEnveloper.add("hello2");
+&nbsp;&nbsp;&nbsp;/* textTokenLength will be 2 */
+&nbsp;&nbsp;&nbsp;textTokenLength = textEnveloper.length();
 &lt;/script&gt;
 </pre>
                </div>
index 795aa56..5f42a76 100644 (file)
@@ -96,7 +96,7 @@ TextInput component is decorator for input elements.
                        
                                <tr>
                                        <td>
-                                               <pre class="intable prettyprint">TextInput <a href="#method-enable">enable</a> (  ) </pre>
+                                               <pre class="intable prettyprint">TextInput <a href="#method-enable">enable</a>() </pre>
                                        </td>
                                        <td><p>Enables the TextInput</p></td>
                                </tr>
@@ -105,7 +105,7 @@ TextInput component is decorator for input elements.
                        
                                <tr>
                                        <td>
-                                               <pre class="intable prettyprint">TextInput <a href="#method-disable">disable</a> (  ) </pre>
+                                               <pre class="intable prettyprint">TextInput <a href="#method-disable">disable</a>() </pre>
                                        </td>
                                        <td><p>Disables the TextInput</p></td>
                                </tr>
@@ -123,7 +123,7 @@ TextInput component is decorator for input elements.
                                                <p>Enables the TextInput</p>
                                        </div>
                                        <div class="synopsis">
-                                               <pre class="signature prettyprint">TextInput enable ( ) </pre>
+                                               <pre class="signature prettyprint">TextInput enable() </pre>
                                        </div>
                                        
                                        <div class="description">
@@ -159,10 +159,10 @@ TextInput component is decorator for input elements.
                                                        <span class="example"><p>Code
                                                                example:</p><p></p></span>
                                                        <pre name="code" class="examplecode
-                                                       prettyprint">&lt;input&nbsp;type=&quot;text&quot;&nbsp;name=&quot;texttype&quot;&nbsp;id=&quot;texttype&quot;&nbsp;/&gt;
+                                                       prettyprint">&lt;input&nbsp;type=&quot;text&quot;&nbsp;name=&quot;texttype&quot;&nbsp;id=&quot;texttype&quot;/&gt;
 &lt;script&gt;
 &nbsp;&nbsp;&nbsp;var&nbsp;inputElement&nbsp;=&nbsp;document.getElementById(&quot;texttype&quot;),
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;textInputWidget&nbsp;=&nbsp;tau.widget.TextInput();
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;textInputWidget&nbsp;=&nbsp;tau.widget.TextInput();
 
 &nbsp;&nbsp;&nbsp;textInputWidget.enable();
 &lt;/script&gt;
@@ -180,7 +180,7 @@ TextInput component is decorator for input elements.
                                                <p>Disables the TextInput</p>
                                        </div>
                                        <div class="synopsis">
-                                               <pre class="signature prettyprint">TextInput disable ( ) </pre>
+                                               <pre class="signature prettyprint">TextInput disable() </pre>
                                        </div>
                                        
                                        <div class="description">
@@ -216,10 +216,10 @@ TextInput component is decorator for input elements.
                                                        <span class="example"><p>Code
                                                                example:</p><p></p></span>
                                                        <pre name="code" class="examplecode
-                                                       prettyprint">&lt;input&nbsp;type=&quot;text&quot;&nbsp;name=&quot;texttype&quot;&nbsp;id=&quot;texttype&quot;&nbsp;/&gt;
+                                                       prettyprint">&lt;input&nbsp;type=&quot;text&quot;&nbsp;name=&quot;texttype&quot;&nbsp;id=&quot;texttype&quot;/&gt;
 &lt;script&gt;
 &nbsp;&nbsp;&nbsp;var&nbsp;inputElement&nbsp;=&nbsp;document.getElementById(&quot;texttype&quot;),
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;textInputWidget&nbsp;=&nbsp;tau.widget.TextInput();
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;textInputWidget&nbsp;=&nbsp;tau.widget.TextInput();
 
 &nbsp;&nbsp;&nbsp;textInputWidget.disable();
 &lt;/script&gt;
index 60ddada..3bc2f37 100644 (file)
@@ -63,8 +63,8 @@
 <pre class="prettyprint">
 &lt;input&nbsp;type=&quot;checkbox&quot;&nbsp;name=&quot;toggle-1&quot;&nbsp;id=&quot;toggle-1&quot;&nbsp;class=&quot;ui-toggleswitch&quot;/&gt;
 
-&lt;!--&nbsp;disabled&nbsp;toggle&nbsp;switch&nbsp;--&gt;
-&lt;input&nbsp;type=&quot;checkbox&quot;&nbsp;name=&quot;toggle-2&quot;&nbsp;id=&quot;toggle-2&quot;&nbsp;class=&quot;ui-toggleswitch&quot;&nbsp;disabled/&gt;
+&lt;!--Disabled&nbsp;toggle&nbsp;switch--&gt;
+&lt;input&nbsp;type=&quot;checkbox&quot;&nbsp;name=&quot;toggle-2&quot;&nbsp;id=&quot;toggle-2&quot;&nbsp;class=&quot;ui-toggleswitch&quot;&nbsp;disabled /&gt;
 </pre>
 <h4>ToggleSwitch with select tag</h4>
 <pre class="prettyprint">
                        
                                <tr>
                                        <td>
-                                               <pre class="intable prettyprint"><a href="#method-disable">disable</a> (  ) </pre>
+                                               <pre class="intable prettyprint"><a href="#method-disable">disable</a>() </pre>
                                        </td>
                                        <td><p>Disables the toggle switch.</p></td>
                                </tr>           
                                
                                <tr>
                                        <td>
-                                               <pre class="intable prettyprint"><a href="#method-enable">enable</a> (  ) </pre>
+                                               <pre class="intable prettyprint"><a href="#method-enable">enable</a>() </pre>
                                        </td>
                                        <td><p>Enables the toggle switch.</p></td>
                                </tr>
 
                                <tr>
                                        <td>
-                                               <pre class="intable prettyprint"><a href="#method-value">value</a> (  ) </pre>
+                                               <pre class="intable prettyprint"><a href="#method-value">value</a>() </pre>
                                        </td>
                                        <td><p>Gets toggleswitch state value.</p></td>
                                </tr>                   
                                                <p>Disables the toggle switch.</p>
                                        </div>
                                        <div class="synopsis">
-                                               <pre class="signature prettyprint">ToggleSwitch disable ( ) </pre>
+                                               <pre class="signature prettyprint">ToggleSwitch disable() </pre>
                                        </div>
                                        
                                        <div class="description">
 &lt;/select&gt;
 &lt;script&gt;
 &nbsp;&nbsp;&nbsp;var toggle = document.getElementById(&quot;flip-11&quot;),
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;toggleWidget = tau.widget.ToggleSwitch(toggle),
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;toggleWidget = tau.widget.ToggleSwitch(toggle);
 &nbsp;&nbsp;&nbsp;toggleWidget.disable();
 &lt;/script&gt;
 </pre>
                                                <p>Enables the toggle switch.</p>
                                        </div>
                                        <div class="synopsis">
-                                               <pre class="signature prettyprint">ToggleSwitch enable ( ) </pre>
+                                               <pre class="signature prettyprint">ToggleSwitch enable() </pre>
                                        </div>
                                        
                                        <div class="description">
 &lt;/select&gt;
 &lt;script&gt;
 &nbsp;&nbsp;&nbsp;var toggle = document.getElementById(&quot;flip-11&quot;),
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;toggleWidget = tau.widget.ToggleSwitch(toggle),
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;toggleWidget = tau.widget.ToggleSwitch(toggle);
 &nbsp;&nbsp;&nbsp;toggleWidget.enable();
 &lt;/script&gt;
 </pre>
                                                <p>Gets a value of toggle switch.</p>
                                        </div>
                                        <div class="synopsis">
-                                               <pre class="signature prettyprint">Number value ( ) </pre>
+                                               <pre class="signature prettyprint">Number value() </pre>
                                        </div>
                                        
                                                <p><span class="version">Since: </span>
index 99ad5a3..419ea8f 100755 (executable)
@@ -55,10 +55,10 @@ And it is highly recomeneded to add these button in the content area and footer
 <pre class="prettyprint">
 &lt;button type=&quot;button&quot; class=&quot;ui-btn&quot;&gt;Button&lt;/button&gt;
 &lt;a href=&quot;#&quot; class=&quot;ui-btn&quot;&gt;Button&lt;/a&gt;
-&lt;input type=&quot;button&quot; class=&quot;ui-btn&quot; value=&quot;Button&quot; /&gt;
+&lt;input type=&quot;button&quot; class=&quot;ui-btn&quot; value=&quot;Button&quot;/&gt;
 
 &lt;!--Inline button--&gt;
-&lt;input type=&quot;button&quot; class=&quot;ui-btn ui-inline&quot; value=&quot;Button&quot; /&gt;
+&lt;input type=&quot;button&quot; class=&quot;ui-btn ui-inline&quot; value=&quot;Button&quot;/&gt;
 
 &lt;!--Multi-line text button--&gt;
 &lt;a href=&quot;#&quot; class=&quot;ui-btn ui-multiline ui-inline&quot;&gt;A Button&lt;br/&gt;Icon&lt;/a&gt;
@@ -134,8 +134,8 @@ And it is highly recomeneded to add these button in the content area and footer
 <pre class="prettyprint">
 &lt;div class=&quot;ui-grid-col-3&quot; style=&quot;height:76px&quot;&gt;
 &nbsp;&nbsp;&nbsp;&lt;button type=&quot;button&quot; class=&quot;ui-btn&quot;&gt;Button Circle&lt;/button&gt;
-&nbsp;&nbsp;&nbsp;&lt;a href=&quot;#&quot; class=&quot;ui-btn ui-color-red&quot; &gt;A Button Circle&lt;/a&gt;
-&nbsp;&nbsp;&nbsp;&lt;input type=&quot;button&quot; class=&quot;ui-btn ui-color-orange&quot; value=&quot;Input Button Circle&quot; /&gt;
+&nbsp;&nbsp;&nbsp;&lt;a href=&quot;#&quot; class=&quot;ui-btn ui-color-red&quot;&gt;A Button Circle&lt;/a&gt;
+&nbsp;&nbsp;&nbsp;&lt;input type=&quot;button&quot; class=&quot;ui-btn ui-color-orange&quot; value=&quot;Input Button Circle&quot;/&gt;
 &lt;/div&gt;
 </pre></li>
 
@@ -143,8 +143,8 @@ And it is highly recomeneded to add these button in the content area and footer
 <pre class="prettyprint">
 &lt;div class=&quot;ui-grid-row&quot;&gt;
 &nbsp;&nbsp;&nbsp;&lt;button type=&quot;button&quot; class=&quot;ui-btn&quot;&gt;Button Circle&lt;/button&gt;
-&nbsp;&nbsp;&nbsp;&lt;a href=&quot;#&quot; class=&quot;ui-btn ui-color-red&quot; &gt;A Button Circle&lt;/a&gt;
-&nbsp;&nbsp;&nbsp;&lt;input type=&quot;button&quot; class=&quot;ui-btn ui-color-orange&quot; value=&quot;Input Button Circle&quot; /&gt;
+&nbsp;&nbsp;&nbsp;&lt;a href=&quot;#&quot; class=&quot;ui-btn ui-color-red&quot;&gt;A Button Circle&lt;/a&gt;
+&nbsp;&nbsp;&nbsp;&lt;input type=&quot;button&quot; class=&quot;ui-btn ui-color-orange&quot; value=&quot;Input Button Circle&quot;/&gt;
 &lt;/div&gt;
 </pre></li></ul>
 
index bae85d0..a6475ee 100755 (executable)
@@ -48,7 +48,7 @@
 <p>The radio button component shows a list of options on the screen where only 1 option can be selected. To add a radio button component to the application, use the following code:</p>
 
 <pre class="prettyprint">
-&lt;input type=&quot;radio&quot; name=&quot;radioset&quot; id=&quot;radio-1&quot; /&gt;
+&lt;input type=&quot;radio&quot; name=&quot;radioset&quot; id=&quot;radio-1&quot;/&gt;
 &lt;label for=&quot;radio-1&quot;&gt;Radio&lt;/label&gt;
 </pre>
 
 <p>To add a checkbox or radio button to a list, use the following code:</p>
 <pre class="prettyprint">
 &lt;ul class=&quot;ui-listview&quot;&gt;
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;li class=&quot;li-has-radio&quot;&gt;
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;label&gt;
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Radio checked
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;input type=&quot;radio&quot; name=&quot;radioset&quot; checked=&quot;checked&quot; /&gt;
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/label&gt;
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/li&gt;
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;li class=&quot;li-has-radio&quot;&gt;
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;label&gt;
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Radio button
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;input type=&quot;radio&quot; name=&quot;radioset&quot; /&gt;
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/label&gt;
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/li&gt;
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/label&gt;
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/li&gt;
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;li class=&quot;li-has-radio disabled&quot;&gt;
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;label&gt;
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Radio disabled
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;input type=&quot;radio&quot; name=&quot;radioset&quot; disabled=&quot;disabled&quot;/&gt;
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/label&gt;
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/li&gt;
+&nbsp;&nbsp;&nbsp;&lt;li class=&quot;li-has-radio&quot;&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;label&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Radio checked
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;input type=&quot;radio&quot; name=&quot;radioset&quot; checked=&quot;checked&quot;/&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/label&gt;
+&nbsp;&nbsp;&nbsp;&lt;/li&gt;
+&nbsp;&nbsp;&nbsp;&lt;li class=&quot;li-has-radio&quot;&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;label&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Radio button
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;input type=&quot;radio&quot; name=&quot;radioset&quot;/&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/label&gt;
+&nbsp;&nbsp;&nbsp;&lt;/li&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/label&gt;
+&nbsp;&nbsp;&nbsp;&lt;/li&gt;
+&nbsp;&nbsp;&nbsp;&lt;li class=&quot;li-has-radio disabled&quot;&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;label&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Radio disabled
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;input type=&quot;radio&quot; name=&quot;radioset&quot; disabled=&quot;disabled&quot;/&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/label&gt;
+&nbsp;&nbsp;&nbsp;&lt;/li&gt;
 &lt;/ul&gt;
 </pre>
 
index 44fde12..4df590b 100755 (executable)
 <p>If you don't make any &quot;circleprogress&quot; with &lt;progress&gt; element, you can show default progress style.<br>
 To add a CircleProgressBar component to the application, use the following code:</p>
 
-<pre class="prettyprint">&lt;div class="ui-page" id="pageCircleProgressBar"&gt;
-    &lt;header class="ui-header"&gt;&lt;/header&gt;
-    &lt;div class="ui-content"&gt;
-               &lt;progress class="ui-circle-progress" id="circleprogress" max="20" value="2"&gt;&lt;/progress&gt;
-       &lt;/div&gt;
+<pre class="prettyprint">
+&lt;div class="ui-page" id="pageCircleProgressBar"&gt;
+&nbsp;&nbsp;&nbsp;&lt;header class="ui-header"&gt;&lt;/header&gt;
+&nbsp;&nbsp;&nbsp;&lt;div class="ui-content"&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;progress class="ui-circle-progress" id="circleprogress" max="20" value="2"&gt;&lt;/progress&gt;
+&nbsp;&nbsp;&nbsp;&lt;/div&gt;
 &lt;/div&gt;
 &lt;script&gt;
-    (function(){
-
-        var page = document.getElementById( "pageCircleProgressBar" ),
-            progressBar = document.getElementById("circleprogress"),
-            progressBarWidget;
-
-        page.addEventListener( "pageshow", function() {
-            // make Circle Progressbar object
-            progressBarWidget = new tau.widget.CircleProgressBar(progressBar);
-
-            });
-
-            page.addEventListener( "pagehide", function() {
-            // release object
-            progressBarWidget.destroy();
-        });
-         }());
+&nbsp;&nbsp;&nbsp;(function()
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var page = document.getElementById("pageCircleProgressBar"),
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;progressBar = document.getElementById("circleprogress"),
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;progressBarWidget;
+
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;page.addEventListener("pageshow", function()
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Make Circle Progressbar object */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;progressBarWidget = new tau.widget.CircleProgressBar(progressBar);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;});
+
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;page.addEventListener("pagehide", function()
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Release object */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;progressBarWidget.destroy();
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;});
+&nbsp;&nbsp;&nbsp;}());
 &lt;/script&gt;
 </pre>
 
@@ -78,29 +80,31 @@ To add a CircleProgressBar component to the application, use the following code:
        <br> And in your javascript code, you have to add option &quot;size: full&quot;.
        <br> Be sure to place the &lt;progress&gt; element outside of content element.
 </p>
-<pre class="prettyprint">&lt;div class="ui-page" id="pageCircleProgressBar"&gt;
-    &lt;header class="ui-header"&gt;&lt;/header&gt;
-    &lt;div class="ui-content"&gt;&lt;/div&gt;
-    &lt;progress class="ui-circle-progress" id="circleprogress" max="20" value="2"&gt;&lt;/progress&gt;
+<pre class="prettyprint">
+&lt;div class="ui-page" id="pageCircleProgressBar"&gt;
+&nbsp;&nbsp;&nbsp;&lt;header class="ui-header"&gt;&lt;/header&gt;
+&nbsp;&nbsp;&nbsp;&lt;div class="ui-content"&gt;&lt;/div&gt;
+&nbsp;&nbsp;&nbsp;&lt;progress class="ui-circle-progress" id="circleprogress" max="20" value="2"&gt;&lt;/progress&gt;
 &lt;/div&gt;
 &lt;script&gt;
-    (function(){
-
-        var page = document.getElementById( "pageCircleProgressBar" ),
-            progressBar = document.getElementById("circleprogress"),
-            progressBarWidget;
-
-        page.addEventListener( "pageshow", function() {
-            // make Circle Progressbar object
-            progressBarWidget = new tau.widget.CircleProgressBar(progressBar, {size: "full"});
-
-            });
-
-            page.addEventListener( "pagehide", function() {
-            // release object
-            progressBarWidget.destroy();
-        });
-         }());
+&nbsp;&nbsp;&nbsp;(function()
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var page = document.getElementById("pageCircleProgressBar"),
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;progressBar = document.getElementById("circleprogress"),
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;progressBarWidget;
+
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;page.addEventListener("pageshow", function()
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Make Circle Progressbar object */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;progressBarWidget = new tau.widget.CircleProgressBar(progressBar, {size: "full"});
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;});
+
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;page.addEventListener("pagehide", function()
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Release object */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;progressBarWidget.destroy();
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;});
+&nbsp;&nbsp;&nbsp;}());
 &lt;/script&gt;
 </pre>
 
@@ -110,9 +114,10 @@ To add a CircleProgressBar component to the application, use the following code:
 The following shows how to use "progresschange" event.
 
 <pre class="prettyprint">
-progressBar.addEventListener("progresschange", function() {
-       // do something when the value of progress changes
-       console.log(progressBarWidget.value());
+progressBar.addEventListener("progresschange", function()
+{
+&nbsp;&nbsp;&nbsp;/* Do something when the value of progress changes */
+&nbsp;&nbsp;&nbsp;console.log(progressBarWidget.value());
 });
 </pre>
 
@@ -187,7 +192,7 @@ progressBar.addEventListener("progresschange", function() {
                        
                                <tr>
                                        <td>
-                                               <pre class="intable prettyprint">string <a href="#method-value">value</a> (  ) </pre>
+                                               <pre class="intable prettyprint">string <a href="#method-value">value</a>() </pre>
                                        </td>
                                        <td><p>Get or Set value of the widget</p></td>
                                </tr>
@@ -205,7 +210,7 @@ progressBar.addEventListener("progresschange", function() {
                                                <p>Get or Set value of the widget</p>
                                        </div>
                                        <div class="synopsis">
-                                               <pre class="signature prettyprint">string value ( ) </pre>
+                                               <pre class="signature prettyprint">string value() </pre>
                                        </div>
                                        
                                                <p><span class="version">Since: </span>
@@ -244,29 +249,29 @@ progressBar.addEventListener("progresschange", function() {
                                                <div class="example">
                                                        <span class="example"><p>Code
                                                                example:</p><p></p></span>
-                                                       <pre name="code" class="examplecode
-                                                       prettyprint">    
-    &lt;div class="ui-page" id="pageCircleProgressBar"&gt;
-        &lt;header class="ui-header"&gt;
-            &lt;h2 class=&quot;ui-title&quot;&gt;Circle Progress Bar&lt;/h2&gt;
-        &lt;/header&gt;
-        &lt;div class="ui-content content-padding"&gt; Circle Progress Bar
-            &lt;progress class="ui-circle-progress" id="circleprogress" max="20" value="2"&gt;&lt;/progress&gt;
-        &lt;/div&gt;
-    &lt;/div&gt;
-
-    &lt;script&gt;
-        var page = document.getElementById( "pageCircleProgressBar" );
-
-        page.addEventListener( "pageshow", function() {
-          var progressbar = document.getElementById("circleprogress"),
-              progressbarWidget = tau.widget.CircleProgressBar(progressbar),
-          // return value in progress tag
-          value = progressbarWidget.value();
-          // sets the value for the progress
-          progressbarWidget.value("15");
-        });
-    &lt;/script&gt;
+<pre name="code" class="examplecode prettyprint">
+&lt;div class="ui-page" id="pageCircleProgressBar"&gt;
+&nbsp;&nbsp;&nbsp;&lt;header class="ui-header"&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;h2 class=&quot;ui-title&quot;&gt;Circle Progress Bar&lt;/h2&gt;
+&nbsp;&nbsp;&nbsp;&lt;/header&gt;
+&nbsp;&nbsp;&nbsp;&lt;div class="ui-content content-padding"&gt;Circle Progress Bar
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;progress class="ui-circle-progress" id="circleprogress" max="20" value="2"&gt;&lt;/progress&gt;
+&nbsp;&nbsp;&nbsp;&lt;/div&gt;
+&lt;/div&gt;
+
+&lt;script&gt;
+&nbsp;&nbsp;&nbsp;var page = document.getElementById("pageCircleProgressBar");
+
+&nbsp;&nbsp;&nbsp;page.addEventListener("pageshow", function()
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var progressbar = document.getElementById("circleprogress"),
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;progressbarWidget = tau.widget.CircleProgressBar(progressbar),
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Return value in progress tag */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;value = progressbarWidget.value();
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Set the value for the progress */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;progressbarWidget.value("15");
+&nbsp;&nbsp;&nbsp;});
+&lt;/script&gt;
 </pre>
                                                </div>
                                        
index 570b1df..1bdcb30 100755 (executable)
@@ -66,7 +66,7 @@
 <p>For manual creation of circular index scroll bar, you can use constructor from <strong>tau</strong> namespace:</p>
 
 <pre class="prettyprint">var circularindexElement = document.getElementById('circularindexscrollbar'),
-    circularindexscrollbar = tau.widget.CircularIndexScrollbar(circularindexElement, {index: "A,B,C"});
+&nbsp;&nbsp;&nbsp;&nbsp;circularindexscrollbar = tau.widget.CircularIndexScrollbar(circularindexElement, {index: "A,B,C"});
 </pre>
 
 <p>Constructor has one require parameter <strong>element</strong> which are base <strong>HTMLElement</strong> to create component. We recommend get this element by method <em>document.getElementById</em>.</p>
 
 <p>To add a circular index scroll bar component to the application, use the following code:</p>
 
-<pre class="prettyprint"> &lt;div id="indexscrollbar" class="ui-circularindexscrollbar" data-index="A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z"&gt;&lt;/div&gt;
- &lt;script&gt;
-     (function() {
-         var elem = document.getElementById("indexscrollbar");
-         tau.widget.CircularIndexScrollbar(elem);
-         elem.addEventListener("select", function( event ) {
-             var index = event.detail.index;
-             // Print selected index
-             console.log(index);
-         });
-     }());
- &lt;/script&gt;
+<pre class="prettyprint">
+&lt;div id="indexscrollbar" class="ui-circularindexscrollbar"
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;data-index="A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z"&gt;&lt;/div&gt;
+&lt;script&gt;
+&nbsp;&nbsp;&nbsp;(function()
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var elem = document.getElementById("indexscrollbar");
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tau.widget.CircularIndexScrollbar(elem);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;elem.addEventListener("select", function(event)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var index = event.detail.index;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Print selected index */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(index);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;});
+&nbsp;&nbsp;&nbsp;}());
+&lt;/script&gt;
 </pre>
 
 <p>The index value can be retrieved by accessing event.detail.index property.</p>
 <p>In the following example, the list scrolls to the position of the list item defined using the li-divider class which is selected by the circular index scroll bar:</p>
 
 <pre class="prettyprint">
- &lt;div id="pageIndexScrollbar" class="ui-page"&gt;
-       &lt;header class="ui-header"&gt;
-               &lt;h2 class="ui-title"&gt;CircularIndexScrollbar&lt;/h2&gt;
-       &lt;/header&gt;
-       &lt;div id="indexscrollbar" class="ui-circularindexscrollbar"&gt;&lt;/div&gt;
-       &lt;section class="ui-content"&gt;
-               &lt;ul class="ui-listview" id="list1"&gt;
-                       &lt;li class="li-divider"&gt;A&lt;/li&gt;
-                       &lt;li&gt;Anton&lt;/li&gt;
-                       &lt;li&gt;Arabella&lt;/li&gt;
-                       &lt;li&gt;Art&lt;/li&gt;
-                       &lt;li class="li-divider"&gt;B&lt;/li&gt;
-                       &lt;li&gt;Barry&lt;/li&gt;
-                       &lt;li&gt;Bibi&lt;/li&gt;
-                       &lt;li&gt;Billy&lt;/li&gt;
-                       &lt;li&gt;Bob&lt;/li&gt;
-                       &lt;li class="li-divider"&gt;D&lt;/li&gt;
-                       &lt;li&gt;Daisy&lt;/li&gt;
-                       &lt;li&gt;Derek&lt;/li&gt;
-                       &lt;li&gt;Desmond&lt;/li&gt;
-               &lt;/ul&gt;
-       &lt;/section&gt;
+&lt;div id="pageIndexScrollbar" class="ui-page"&gt;
+&nbsp;&nbsp;&nbsp;&lt;header class="ui-header"&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;h2 class="ui-title"&gt;CircularIndexScrollbar&lt;/h2&gt;
+&nbsp;&nbsp;&nbsp;&lt;/header&gt;
+&nbsp;&nbsp;&nbsp;&lt;div id="indexscrollbar" class="ui-circularindexscrollbar"&gt;&lt;/div&gt;
+&nbsp;&nbsp;&nbsp;&lt;section class="ui-content"&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;ul class="ui-listview" id="list1"&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;li class="li-divider"&gt;A&lt;/li&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;li&gt;Anton&lt;/li&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;li&gt;Arabella&lt;/li&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;li&gt;Art&lt;/li&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;li class="li-divider"&gt;B&lt;/li&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;li&gt;Barry&lt;/li&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;li&gt;Bibi&lt;/li&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;li&gt;Billy&lt;/li&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;li&gt;Bob&lt;/li&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;li class="li-divider"&gt;D&lt;/li&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;li&gt;Daisy&lt;/li&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;li&gt;Derek&lt;/li&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;li&gt;Desmond&lt;/li&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/ul&gt;
+&nbsp;&nbsp;&nbsp;&lt;/section&gt;
 &lt;/div&gt;
 &lt;script&gt;
-(function() {
-       var page = document.getElementById("pageIndexScrollbar"),
-               indexScrollbar;
-
-       page.addEventListener("pageshow", function(ev) {
-               var indexScrollbarElement = document.getElementById("indexscrollbar"),
-                       listviewElement = document.getElementById("list1"),     // list
-                       listDividers = listviewElement.getElementsByClassName("li-divider"),    // list dividers
-                       dividers = {},  // collection of list dividers
-                       indices = [],   // index list
-                       scroller,
-                       divider,
-                       i, idx;
-
-               // For all list dividers,
-               for(i = 0; i < listDividers.length; i++) {
-                       // Add the list divider elements to the collection
-                       divider = listDividers[i];
-                       idx = divider.innerText;
-                       dividers[idx] = divider;
-
-                       // Add the index to the index list
-                       indices.push(idx);
-               }
-
-               scroller = tau.util.selectors.getScrollableParent(listviewElement);
-
-               // Create CircularIndexScrollbar
-               indexScrollbar = new tau.widget.CircularIndexScrollbar(indexScrollbarElement, {index: indices});
-
-               // Add SnapListview item "selected" event handler.
-               // You should update the information for current index
-               listviewElement.addEventListener("selected", function (ev) {
-                       var indexValue = ev.target.textContent[0];
-                       indexScrollbar.value(indexValue);
-               });
-
-               // Add IndexScrollbar index "select" event handler.
-               indexScrollbarElement.addEventListener("select", function (ev) {
-                       var divider,
-                               idx = ev.detail.index;
-
-                       divider = dividers[idx];
-                       if(divider && scroller) {
-                               // Scroll to the li-divider element
-                               scroller.scrollTop = divider.offsetTop - scroller.offsetTop;
-                       }
-               });
-       });
-
-       page.addEventListener("pagehide", function(ev) {
-               indexScrollbar.destroy();
-       });
-} ());
+&nbsp;&nbsp;&nbsp;(function()
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var page = document.getElementById("pageIndexScrollbar"),
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;indexScrollbar;
+
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;page.addEventListener("pageshow", function(ev)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var indexScrollbarElement = document.getElementById("indexscrollbar"),
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;listviewElement = document.getElementById("list1"), /* List */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;listDividers = listviewElement.getElementsByClassName("li-divider"), /* List dividers */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dividers = {}, /* Collection of list dividers */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;indices = [], /* Index list */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;scroller,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;divider,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;i, idx;
+
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* For all list dividers, */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;for (i = 0; i &lt; listDividers.length; i++)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Add the list divider elements to the collection */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;divider = listDividers[i];
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;idx = divider.innerText;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dividers[idx] = divider;
+
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Add the index to the index list */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;indices.push(idx);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;scroller = tau.util.selectors.getScrollableParent(listviewElement);
+
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Create CircularIndexScrollbar */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;indexScrollbar = new tau.widget.CircularIndexScrollbar(indexScrollbarElement, {index: indices});
+
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Add SnapListview item "selected" event handler */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* You should update the information for current index */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;listviewElement.addEventListener("selected", function(ev)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var indexValue = ev.target.textContent[0];
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;indexScrollbar.value(indexValue);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;});
+
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Add IndexScrollbar index "select" event handler */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;indexScrollbarElement.addEventListener("select", function(ev)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var divider,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;idx = ev.detail.index;
+
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;divider = dividers[idx];
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (divider && scroller)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Scroll to the li-divider element */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;scroller.scrollTop = divider.offsetTop - scroller.offsetTop;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;});
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;});
+
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;page.addEventListener("pagehide", function(ev)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;indexScrollbar.destroy();
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;});
+&nbsp;&nbsp;&nbsp;}());
 &lt;/script&gt;
 </pre>
 
 
                                <tr>
                                        <td>
-                                               <pre class="intable prettyprint">string <a href="#method-value">value</a> (  ) </pre>
+                                               <pre class="intable prettyprint">string <a href="#method-value">value</a>() </pre>
                                        </td>
                                        <td><p>Get or Set index of the circular index scroll bar</p></td>
                                </tr>
                                                <p>Get or Set index of the circular index scroll bar</p>
                                        </div>
                                        <div class="synopsis">
-                                               <pre class="signature prettyprint">string value ( ) </pre>
+                                               <pre class="signature prettyprint">string value() </pre>
                                        </div>
 
                                        <div class="description">
                                                                example:</p><p></p></span>
                                                        <pre name="code" class="examplecode
                                                        prettyprint">
-    &lt;div id="circularindexscrollbar"&gt;&lt;/div&gt;
-    &lt;script&gt;
-        var circularindexElement = document.getElementById("circularindexscrollbar"),
-            circularIndexScrollbar = tau.widget.CircularIndexScrollbar(circularindexElement),
-        // return current index value
-        value = circularIndexScrollbar.value();
-        // sets the index value
-        circularIndexScrollbar.value("C");
-    &lt;/script&gt;
+&lt;div id="circularindexscrollbar"&gt;&lt;/div&gt;
+&lt;script&gt;
+&nbsp;&nbsp;&nbsp;var circularindexElement = document.getElementById("circularindexscrollbar"),
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;circularIndexScrollbar = tau.widget.CircularIndexScrollbar(circularindexElement),
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Return current index value */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;value = circularIndexScrollbar.value();
+&nbsp;&nbsp;&nbsp;/* Set the index value */
+&nbsp;&nbsp;&nbsp;circularIndexScrollbar.value("C");
+&lt;/script&gt;
 </pre>
                                                </div>
 
index 83b4013..063587f 100755 (executable)
@@ -92,84 +92,91 @@ If you used the drawer handler, you must implement style code of handler. We don
 </table>
 
 <h3>HTML</h3>
-<pre class="prettyprint">   &lt;div id="moreoptionsPage" class="ui-page"&gt;
-     &lt;header class="ui-header ui-has-more"&gt;
-         &lt;h2 class="ui-title"&gt;Drawer&lt;/h2&gt;
-         &lt;button class="ui-more ui-icon-overflow"&gt;Drawer&lt;/button&gt;
-     &lt;/header&gt;
-     &lt;div class="ui-content content-padding"&gt;
-       Drawer
-     &lt;/div&gt;
-
-     &lt;!-- Circle Profile --&gt;
-     &lt;div id="moreoptionsDrawer" class="ui-drawer" data-drawer-target="#moretionsPage" data-position="right" data-enable="true" data-drag-edge="1"&gt;
-         &lt;div id="moreoptionsSectionChanger" class="ui-section-changer"&gt;
-             &lt;div&gt;
-                &lt;seciont&gt;
-                    &lt;button class="option-button"&gt;1&lt;/button&gt; 
-                &lt;/seciont&gt;
-                &lt;seciont&gt;
-                    &lt;button class="option-button"&gt;2&lt;/button&gt; 
-                &lt;/seciont&gt;
-                &lt;seciont&gt;
-                    &lt;button class="option-button"&gt;3&lt;/button&gt; 
-                &lt;/seciont&gt;
-             &lt;/div&gt;
-         &lt;/div&gt;
-     &lt;/div&gt;
-   &lt;/div&gt;
+<pre class="prettyprint">
+&lt;div id="moreoptionsPage" class="ui-page"&gt;
+&nbsp;&nbsp;&nbsp;&lt;header class="ui-header ui-has-more"&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;h2 class="ui-title"&gt;Drawer&lt;/h2&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;button class="ui-more ui-icon-overflow"&gt;Drawer&lt;/button&gt;
+&nbsp;&nbsp;&nbsp;&lt;/header&gt;
+&nbsp;&nbsp;&nbsp;&lt;div class="ui-content content-padding"&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Drawer
+&nbsp;&nbsp;&nbsp;&lt;/div&gt;
+
+&nbsp;&nbsp;&nbsp;&lt;!--Circle Profile--&gt;
+&nbsp;&nbsp;&nbsp;&lt;div id="moreoptionsDrawer" class="ui-drawer" data-drawer-target="#moretionsPage" data-position="right"
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;data-enable="true" data-drag-edge="1"&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;div id="moreoptionsSectionChanger" class="ui-section-changer"&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;div&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;seciont&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;button class="option-button"&gt;1&lt;/button&gt; 
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/seciont&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;seciont&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;button class="option-button"&gt;2&lt;/button&gt; 
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/seciont&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;seciont&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;button class="option-button"&gt;3&lt;/button&gt; 
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/seciont&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/div&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/div&gt;
+&nbsp;&nbsp;&nbsp;&lt;/div&gt;
+&lt;/div&gt;
 </pre>
 
 <h3>JavaScript</h3>
-<pre class="prettyprint">(function(){
-        var page = document.querySelector("#moreoptionsPage"),
-            popup = page.querySelector("#moreoptionsPopup"),
-            drawer = page.querySelector("#moreoptionsDrawer"),
-            handler = page.querySelector(".ui-more");
-
-       page.addEventListener( "pagebeforeshow", function() {
-           var popupWidget;
-
-            
-           tau.helper.DrawerMoreStyle.create(drawer, {
-               handler: ".ui-more",
-           });            
-       }); 
-    })();</pre>
+<pre class="prettyprint">
+(function()
+{
+&nbsp;&nbsp;&nbsp;var page = document.querySelector("#moreoptionsPage"),
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;popup = page.querySelector("#moreoptionsPopup"),
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;drawer = page.querySelector("#moreoptionsDrawer"),
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;handler = page.querySelector(".ui-more");
+
+&nbsp;&nbsp;&nbsp;page.addEventListener("pagebeforeshow", function()
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var popupWidget;
+
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tau.helper.DrawerMoreStyle.create(drawer, {handler: ".ui-more",});            
+&nbsp;&nbsp;&nbsp;}); 
+})();</pre>
 
 <h3>CSS</h3>
 <pre class="prettyprint">
-#moreoptionsDrawer {
-    display: none;
+#moreoptionsDrawer
+{
+&nbsp;&nbsp;&nbsp;display: none;
 }
-@media all and (-tizen-geometric-shape: circle) {
-    #moreoptionsDrawer {
-        display: block;
-        background-color: rgba(255, 255, 255, 0.1);
-        border-radius: 100%;
-    } 
-
-    #moreoptionsPopup {
-        display: none;
-    }   
-    .sections,
-    .options {
-        text-align: center;
-    } 
-    .option-button {
-       width: 158px;
-        height: 158px;
-        background-color: #a4a4a4;
-        position: relative;
-        left: 50%;
-        transform: translate3d(-50%, -50%, 0); 
-        top: 50%;
-        border-radius: 50%;
-        border: none;
-        text-align: center;
-        line-height: 158px;
-        -webkit-appearance: none;
-    }   
+@media all and (-tizen-geometric-shape: circle)
+{
+&nbsp;&nbsp;&nbsp;#moreoptionsDrawer
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;display: block;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;background-color: rgba(255, 255, 255, 0.1);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;border-radius: 100%;
+&nbsp;&nbsp;&nbsp;} 
+&nbsp;&nbsp;&nbsp;#moreoptionsPopup
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;display: none;
+&nbsp;&nbsp;&nbsp;}   
+&nbsp;&nbsp;&nbsp;.sections,
+&nbsp;&nbsp;&nbsp;.options
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;text-align: center;
+&nbsp;&nbsp;&nbsp;} 
+&nbsp;&nbsp;&nbsp;.option-button
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;width: 158px;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;height: 158px;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;background-color: #a4a4a4;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;position: relative;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;left: 50%;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;transform: translate3d(-50%, -50%, 0); 
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;top: 50%;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;border-radius: 50%;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;border: none;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;text-align: center;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;line-height: 158px;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-webkit-appearance: none;
+&nbsp;&nbsp;&nbsp;}   
 }
 </pre>
 
@@ -229,27 +236,27 @@ If you used the drawer handler, you must implement style code of handler. We don
 <h3>Drawer positioning</h3>
 You can declare to 'position' option as below method.
 
-<pre class="prettyprint">   &lt;div class="ui-drawer" data-position="left" id="leftdrawer"&gt;
+<pre class="prettyprint">&lt;div class="ui-drawer" data-position="left" id="leftdrawer"&gt;
 </pre>
 
 <h3>Drawer targeting</h3>
 You can declare to 'drawerTarget' option as below method.
 
-<pre class="prettyprint">   &lt;div class="ui-drawer" data-drawer-target="#drawerPage"&gt;
+<pre class="prettyprint">&lt;div class="ui-drawer" data-drawer-target="#drawerPage"&gt;
 </pre>
 
 <h3>Drawer enable</h3>
 
 You can declare to 'enable' option as below method.
 
-<pre class="prettyprint">   &lt;div class="ui-drawer" data-enable="true"&gt;
+<pre class="prettyprint">&lt;div class="ui-drawer" data-enable="true"&gt;
 </pre>
 
 <h3>Drawer drag gesture starting area</h3>
 
 You can declare to 'enable' option as below method.
 
-<pre class="prettyprint">   &lt;div class="ui-drawer" data-drag-edge="1"&gt;
+<pre class="prettyprint">&lt;div class="ui-drawer" data-drag-edge="1"&gt;
 </pre>
 
 
@@ -284,7 +291,7 @@ You can declare to 'enable' option as below method.
                        
                                <tr>
                                        <td>
-                                               <pre class="intable prettyprint"><a href="#method-setDragHandler">setDragHandler</a> ( Element element ) </pre>
+                                               <pre class="intable prettyprint"><a href="#method-setDragHandler">setDragHandler</a>(Element element) </pre>
                                        </td>
                                        <td><p>Set Drawer drag handler.<br />If developer use handler, drag event is bound at handler only.</p></td>
                                </tr>
@@ -293,7 +300,7 @@ You can declare to 'enable' option as below method.
                        
                                <tr>
                                        <td>
-                                               <pre class="intable prettyprint"><a href="#method-transition">transition</a> ( Integer position ) </pre>
+                                               <pre class="intable prettyprint"><a href="#method-transition">transition</a>(Integer position) </pre>
                                        </td>
                                        <td><p>Transition Drawer.<br />This method use only positive integer number.</p></td>
                                </tr>
@@ -302,7 +309,7 @@ You can declare to 'enable' option as below method.
                        
                                <tr>
                                        <td>
-                                               <pre class="intable prettyprint"><a href="#method-open">open</a> (  ) </pre>
+                                               <pre class="intable prettyprint"><a href="#method-open">open</a>() </pre>
                                        </td>
                                        <td><p>Open Drawer.</p></td>
                                </tr>
@@ -311,7 +318,7 @@ You can declare to 'enable' option as below method.
                        
                                <tr>
                                        <td>
-                                               <pre class="intable prettyprint"><a href="#method-close">close</a> (  ) </pre>
+                                               <pre class="intable prettyprint"><a href="#method-close">close</a>() </pre>
                                        </td>
                                        <td><p>Close Drawer.</p></td>
                                </tr>
@@ -320,7 +327,7 @@ You can declare to 'enable' option as below method.
                        
                                <tr>
                                        <td>
-                                               <pre class="intable prettyprint">String <a href="#method-getState">getState</a> (  ) </pre>
+                                               <pre class="intable prettyprint">String <a href="#method-getState">getState</a>() </pre>
                                        </td>
                                        <td><p>Get state of Drawer.</p></td>
                                </tr>
@@ -338,7 +345,7 @@ You can declare to 'enable' option as below method.
                                                <p>Set Drawer drag handler.<br />If developer use handler, drag event is bound at handler only.</p>
                                        </div>
                                        <div class="synopsis">
-                                               <pre class="signature prettyprint">setDragHandler ( Element element) </pre>
+                                               <pre class="signature prettyprint">setDragHandler(Element element) </pre>
                                        </div>
                                        
                                        <div class="description">
@@ -346,21 +353,22 @@ You can declare to 'enable' option as below method.
                                                        <h5>Running example in pure JavaScript:</h5>
                                                </p>
                                                <pre class="prettyprint">
-&lt;!-- Drawer Handlers --&gt;
+&lt;!--Drawer handlers--&gt;
 &lt;a id=&quot;leftDrawerHandler&quot; href=&quot;#leftDrawer&quot; class=&quot;drawer-handler&quot;&gt;Left Handler&lt;/a&gt;
-&lt;div id=&quot;leftDrawer&quot; class=&quot;ui-drawer&quot; data-drawer-target=&quot;#drawerSinglePage&quot; data-position=&quot;left&quot; data-enable=&quot;true&quot; data-drag-edge=&quot;1&quot;&gt;
-       &lt;header class=&quot;ui-header&quot;&gt;
-               &lt;h2 class=&quot;ui-title&quot;&gt;Left Drawer&lt;/h2&gt;
-       &lt;/header&gt;
-       &lt;div id=&quot;leftClose&quot; class=&quot;ui-content&quot;&gt;
-               &lt;p&gt;Click Close&lt;/p&gt;
-       &lt;/div&gt;
+&lt;div id=&quot;leftDrawer&quot; class=&quot;ui-drawer&quot; data-drawer-target=&quot;#drawerSinglePage&quot; data-position=&quot;left&quot;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;data-enable=&quot;true&quot; data-drag-edge=&quot;1&quot;&gt;
+&nbsp;&nbsp;&nbsp;&lt;header class=&quot;ui-header&quot;&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;h2 class=&quot;ui-title&quot;&gt;Left Drawer&lt;/h2&gt;
+&nbsp;&nbsp;&nbsp;&lt;/header&gt;
+&nbsp;&nbsp;&nbsp;&lt;div id=&quot;leftClose&quot; class=&quot;ui-content&quot;&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;p&gt;Click Close&lt;/p&gt;
+&nbsp;&nbsp;&nbsp;&lt;/div&gt;
 &lt;/div&gt;
 &lt;script&gt;
-var handler = document.getElementById(&quot;leftDrawerHandler&quot;),
-       drawer = tau.widget.Drawer(document.querySelector(handler.getAttribute(&quot;href&quot;));
+&nbsp;&nbsp;&nbsp;var handler = document.getElementById(&quot;leftDrawerHandler&quot;),
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;drawer = tau.widget.Drawer(document.querySelector(handler.getAttribute(&quot;href&quot;));
 
-drawer.setDragHandler(handler);
+&nbsp;&nbsp;&nbsp;drawer.setDragHandler(handler);
 &lt;/script&gt;</pre>
                                        </div>
                                        
@@ -409,7 +417,7 @@ drawer.setDragHandler(handler);
                                                <p>Transition Drawer.<br />This method use only positive integer number.</p>
                                        </div>
                                        <div class="synopsis">
-                                               <pre class="signature prettyprint">transition ( Integer position) </pre>
+                                               <pre class="signature prettyprint">transition(Integer position) </pre>
                                        </div>
                                        
                                        <div class="description">
@@ -417,18 +425,19 @@ drawer.setDragHandler(handler);
                                                        <h5>Running example in pure JavaScript:</h5>
                                                        <pre class="prettyprint">
 &lt;a id=&quot;leftDrawerHandler&quot; href=&quot;#leftDrawer&quot; class=&quot;drawer-handler&quot;&gt;Left Handler&lt;/a&gt;
-&lt;div id=&quot;leftDrawer&quot; class=&quot;ui-drawer&quot; data-drawer-target=&quot;#drawerSinglePage&quot; data-position=&quot;left&quot; data-enable=&quot;true&quot; data-drag-edge=&quot;1&quot;&gt;
-       &lt;header class=&quot;ui-header&quot;&gt;
-               &lt;h2 class=&quot;ui-title&quot;&gt;Left Drawer&lt;/h2&gt;
-       &lt;/header&gt;
-       &lt;div id=&quot;leftClose&quot; class=&quot;ui-content&quot;&gt;
-               &lt;p&gt;Click Close&lt;/p&gt;
-       &lt;/div&gt;
+&lt;div id=&quot;leftDrawer&quot; class=&quot;ui-drawer&quot; data-drawer-target=&quot;#drawerSinglePage&quot; data-position=&quot;left&quot;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;data-enable=&quot;true&quot; data-drag-edge=&quot;1&quot;&gt;
+&nbsp;&nbsp;&nbsp;&lt;header class=&quot;ui-header&quot;&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;h2 class=&quot;ui-title&quot;&gt;Left Drawer&lt;/h2&gt;
+&nbsp;&nbsp;&nbsp;&lt;/header&gt;
+&nbsp;&nbsp;&nbsp;&lt;div id=&quot;leftClose&quot; class=&quot;ui-content&quot;&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;p&gt;Click Close&lt;/p&gt;
+&nbsp;&nbsp;&nbsp;&lt;/div&gt;
 &lt;/div&gt;
 &lt;script&gt;
-var handler = document.getElementById(&quot;leftDrawerHandler&quot;),
-       drawer = tau.widget.Drawer(document.querySelector(handler.getAttribute(&quot;href&quot;));
-drawer.Transition(60);
+&nbsp;&nbsp;&nbsp;var handler = document.getElementById(&quot;leftDrawerHandler&quot;),
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;drawer = tau.widget.Drawer(document.querySelector(handler.getAttribute(&quot;href&quot;));
+&nbsp;&nbsp;&nbsp;drawer.Transition(60);
 &lt;/script&gt;</pre>
 
                                                </p>
@@ -479,27 +488,28 @@ drawer.Transition(60);
                                                <p>Open Drawer.</p>
                                        </div>
                                        <div class="synopsis">
-                                               <pre class="signature prettyprint">open ( ) </pre>
+                                               <pre class="signature prettyprint">open() </pre>
                                        </div>
                                        
                                        <div class="description">
                                                <p>
                                                        <h5>Running example in pure JavaScript:</h5>
                                                <pre class="prettyprint">
-&lt;!-- Drawer Handlers --&gt;
-&lt;div id=&quot;leftDrawer&quot; class=&quot;ui-drawer&quot; data-drawer-target=&quot;#drawerSinglePage&quot; data-position=&quot;left&quot; data-enable=&quot;true&quot; data-drag-edge=&quot;1&quot;&gt;
-       &lt;header class=&quot;ui-header&quot;&gt;
-               &lt;h2 class=&quot;ui-title&quot;&gt;Left Drawer&lt;/h2&gt;
-       &lt;/header&gt;
-       &lt;div id=&quot;leftClose&quot; class=&quot;ui-content&quot;&gt;
-               &lt;p&gt;Click Close&lt;/p&gt;
-       &lt;/div&gt;
+&lt;!--Drawer handlers--&gt;
+&lt;div id=&quot;leftDrawer&quot; class=&quot;ui-drawer&quot; data-drawer-target=&quot;#drawerSinglePage&quot; data-position=&quot;left&quot;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;data-enable=&quot;true&quot; data-drag-edge=&quot;1&quot;&gt;
+&nbsp;&nbsp;&nbsp;&lt;header class=&quot;ui-header&quot;&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;h2 class=&quot;ui-title&quot;&gt;Left Drawer&lt;/h2&gt;
+&nbsp;&nbsp;&nbsp;&lt;/header&gt;
+&nbsp;&nbsp;&nbsp;&lt;div id=&quot;leftClose&quot; class=&quot;ui-content&quot;&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;p&gt;Click Close&lt;/p&gt;
+&nbsp;&nbsp;&nbsp;&lt;/div&gt;
 &lt;/div&gt;
 &lt;script&gt;
-       var handler = document.getElementById(&quot;leftDrawerHandler&quot;),
-               drawer = tau.widget.Drawer(document.querySelector(handler.getAttribute(&quot;href&quot;));
+&nbsp;&nbsp;&nbsp;var handler = document.getElementById(&quot;leftDrawerHandler&quot;),
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;drawer = tau.widget.Drawer(document.querySelector(handler.getAttribute(&quot;href&quot;));
 
-       drawer.open();
+&nbsp;&nbsp;&nbsp;drawer.open();
 &lt;/script&gt;</pre>
 
                                                </p>
@@ -526,27 +536,28 @@ drawer.Transition(60);
                                                <p>Close Drawer.</p>
                                        </div>
                                        <div class="synopsis">
-                                               <pre class="signature prettyprint">close ( ) </pre>
+                                               <pre class="signature prettyprint">close() </pre>
                                        </div>
                                        
                                        <div class="description">
                                                <p>
                                                <h5>Running example in pure JavaScript:</h5>
                                                <pre class="prettyprint">
-&lt;!-- Drawer Handlers --&gt;
-&lt;div id=&quot;leftDrawer&quot; class=&quot;ui-drawer&quot; data-drawer-target=&quot;#drawerSinglePage&quot; data-position=&quot;left&quot; data-enable=&quot;true&quot; data-drag-edge=&quot;1&quot;&gt;
-       &lt;header class=&quot;ui-header&quot;&gt;
-               &lt;h2 class=&quot;ui-title&quot;&gt;Left Drawer&lt;/h2&gt;
-       &lt;/header&gt;
-       &lt;div id=&quot;leftClose&quot; class=&quot;ui-content&quot;&gt;
-               &lt;p&gt;Click Close&lt;/p&gt;
-       &lt;/div&gt;
+&lt;!--Drawer handlers--&gt;
+&lt;div id=&quot;leftDrawer&quot; class=&quot;ui-drawer&quot; data-drawer-target=&quot;#drawerSinglePage&quot; data-position=&quot;left&quot;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;data-enable=&quot;true&quot; data-drag-edge=&quot;1&quot;&gt;
+&nbsp;&nbsp;&nbsp;&lt;header class=&quot;ui-header&quot;&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;h2 class=&quot;ui-title&quot;&gt;Left Drawer&lt;/h2&gt;
+&nbsp;&nbsp;&nbsp;&lt;/header&gt;
+&nbsp;&nbsp;&nbsp;&lt;div id=&quot;leftClose&quot; class=&quot;ui-content&quot;&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;p&gt;Click Close&lt;/p&gt;
+&nbsp;&nbsp;&nbsp;&lt;/div&gt;
 &lt;/div&gt;
 &lt;script&gt;
-       var handler = document.getElementById(&quot;leftDrawerHandler&quot;),
-               drawer = tau.widget.Drawer(document.querySelector(handler.getAttribute(&quot;href&quot;));
+&nbsp;&nbsp;&nbsp;var handler = document.getElementById(&quot;leftDrawerHandler&quot;),
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;drawer = tau.widget.Drawer(document.querySelector(handler.getAttribute(&quot;href&quot;));
 
-       drawer.close();
+&nbsp;&nbsp;&nbsp;drawer.close();
 &lt;/script&gt;</pre>
 
                                                </p>
@@ -573,28 +584,29 @@ drawer.Transition(60);
                                                <p>Get state of Drawer.</p>
                                        </div>
                                        <div class="synopsis">
-                                               <pre class="signature prettyprint">String getState ( ) </pre>
+                                               <pre class="signature prettyprint">String getState() </pre>
                                        </div>
                                        
                                        <div class="description">
                                                <p>
                                                <h5>Running example in pure JavaScript:</h5>
                                                <pre class="prettyprint">
-&lt;!-- Drawer Handlers --&gt;
-&lt;div id=&quot;leftDrawer&quot; class=&quot;ui-drawer&quot; data-drawer-target=&quot;#drawerSinglePage&quot; data-position=&quot;left&quot; data-enable=&quot;true&quot; data-drag-edge=&quot;1&quot;&gt;
-       &lt;header class=&quot;ui-header&quot;&gt;
-               &lt;h2 class=&quot;ui-title&quot;&gt;Left Drawer&lt;/h2&gt;
-       &lt;/header&gt;
-       &lt;div id=&quot;leftClose&quot; class=&quot;ui-content&quot;&gt;
-               &lt;p&gt;Click Close&lt;/p&gt;
-       &lt;/div&gt;
+&lt;!--Drawer handlers--&gt;
+&lt;div id=&quot;leftDrawer&quot; class=&quot;ui-drawer&quot; data-drawer-target=&quot;#drawerSinglePage&quot; data-position=&quot;left&quot;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;data-enable=&quot;true&quot; data-drag-edge=&quot;1&quot;&gt;
+&nbsp;&nbsp;&nbsp;&lt;header class=&quot;ui-header&quot;&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;h2 class=&quot;ui-title&quot;&gt;Left Drawer&lt;/h2&gt;
+&nbsp;&nbsp;&nbsp;&lt;/header&gt;
+&nbsp;&nbsp;&nbsp;&lt;div id=&quot;leftClose&quot; class=&quot;ui-content&quot;&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;p&gt;Click Close&lt;/p&gt;
+&nbsp;&nbsp;&nbsp;&lt;/div&gt;
 &lt;/div&gt;
 &lt;script&gt;
-       var handler = document.getElementById(&quot;leftDrawerHandler&quot;),
-               drawer = tau.widget.Drawer(document.querySelector(handler.getAttribute(&quot;href&quot;)),
-               state;
+&nbsp;&nbsp;&nbsp;var handler = document.getElementById(&quot;leftDrawerHandler&quot;),
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;drawer = tau.widget.Drawer(document.querySelector(handler.getAttribute(&quot;href&quot;)),
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;state;
 
-       state = drawer.getState();
+&nbsp;&nbsp;&nbsp;state = drawer.getState();
 &lt;/script&gt;</pre>
 
                                                </p>
index bbdaf66..d71d675 100755 (executable)
@@ -46,8 +46,9 @@
 <h2><a id='manual-constructor0.6990520032122731'></a>How to create index scroll bar</h2>
 
 <p>For manual creation of Index Scroll Bar, you can use constructor from <strong>tau</strong> namespace:</p>
-<pre class="prettyprint">var indexElement = document.getElementById('indexscrollbar'),
-    indexscrollbar = tau.widget.IndexScrollbar(indexElement);
+<pre class="prettyprint">
+var indexElement = document.getElementById('indexscrollbar'),
+&nbsp;&nbsp;&nbsp;&nbsp;indexscrollbar = tau.widget.IndexScrollbar(indexElement);
 </pre>
 <p>To add an index scroll bar component to the application, use the following code:</p>
 <pre class="prettyprint">
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;indices.push(idx);
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
 
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Change the data-index attribute to the index scroll bar element */
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* before initializing index scroll bar component */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/*
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;   Change the data-index attribute to the index scroll bar element
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;   before initializing index scroll bar component
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;elem.setAttribute(&quot;data-index&quot;, indices.join(&quot;,&quot;));
 
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Create index scroll bar */
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;elItems = elList.children, 
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;elScroller = elList.parentElement, /* Scroller (overflow-y:hidden) */
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;indexData = getIndexData(
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;array: elItems,
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;getTextValue: function(array, i) {return array[i].innerText;}
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;});
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;array: elItems,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;getTextValue: function(array, i) {return array[i].innerText;}
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;});
 
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;function getIndexData(options) 
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
index eb435bc..161828e 100755 (executable)
@@ -59,22 +59,23 @@ It makes &lt;div&gt; element (has some child nodes such as text and img) move ho
 
 <pre class="prettyprint">
 &lt;div class=&quot;ui-page ui-page-active&quot; id=&quot;marqueePage&quot; &gt;
-       &lt;header class=&quot;ui-header&quot;&gt;
-               &lt;h2 class=&quot;ui-title&quot;&gt;Marquee&lt;/h2&gt;
-       &lt;/header&gt;
-       &lt;div class="ui-content"&gt;
-               &lt;ul class="ui-listview"&gt;
-                       &lt;li&gt;&lt;div class="ui-marquee" id="marquee"&gt;Marquee code sample&lt;/div&gt;&lt;/li&gt;
-               &lt;/ul&gt;
-       &lt;/div&gt;
+&nbsp;&nbsp;&nbsp;&lt;header class=&quot;ui-header&quot;&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;h2 class=&quot;ui-title&quot;&gt;Marquee&lt;/h2&gt;
+&nbsp;&nbsp;&nbsp;&lt;/header&gt;
+&nbsp;&nbsp;&nbsp;&lt;div class="ui-content"&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;ul class="ui-listview"&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;li&gt;&lt;div class="ui-marquee" id="marquee"&gt;Marquee code sample&lt;/div&gt;&lt;/li&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/ul&gt;
+&nbsp;&nbsp;&nbsp;&lt;/div&gt;
 &lt;/div&gt;
 &lt;script&gt;
-       var page = document.querySelector(&quot;#marqueePage&quot;);
+&nbsp;&nbsp;&nbsp;var page = document.querySelector(&quot;#marqueePage&quot;);
 
-       page.addEventListener( &quot;pagebeforeshow&quot;, function() {
-               var marqueeEl = document.getElementById("marquee"),
-               marqueeWidget = new tau.widget.Marquee(marqueeEl, {marqueeStyle: "scroll", delay: "3"});
-       });
+&nbsp;&nbsp;&nbsp;page.addEventListener(&quot;pagebeforeshow&quot;, function()
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var marqueeEl = document.getElementById("marquee"),
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;marqueeWidget = new tau.widget.Marquee(marqueeEl, {marqueeStyle: "scroll", delay: "3"});
+&nbsp;&nbsp;&nbsp;});
 &lt;/script&gt;
 </pre>
 
@@ -184,19 +185,19 @@ It makes &lt;div&gt; element (has some child nodes such as text and img) move ho
                <tbody>
                        <tr>
                                <td>
-                                       <pre class="intable prettyprint"><a href="#method-start">start</a> (  ) </pre>
+                                       <pre class="intable prettyprint"><a href="#method-start">start</a>() </pre>
                                </td>
                                <td><p>Start Marquee animation</p></td>
                        </tr>
                        <tr>
                                <td>
-                                       <pre class="intable prettyprint"><a href="#method-stop">stop</a> (  ) </pre>
+                                       <pre class="intable prettyprint"><a href="#method-stop">stop</a>() </pre>
                                </td>
                                <td><p>Stop Marquee animation</p></td>
                        </tr>
                        <tr>
                                <td>
-                                       <pre class="intable prettyprint"><a href="#method-reset">reset</a> (  ) </pre>
+                                       <pre class="intable prettyprint"><a href="#method-reset">reset</a>() </pre>
                                </td>
                                <td><p>Reset Marquee animation</p></td>
                        </tr>
@@ -213,7 +214,7 @@ It makes &lt;div&gt; element (has some child nodes such as text and img) move ho
                                <p>Start Marquee animation</p>
                        </div>
                        <div class="synopsis">
-                               <pre class="signature prettyprint">start ( ) </pre>
+                               <pre class="signature prettyprint">start() </pre>
                        </div>
 
                        <div class="description">
@@ -238,11 +239,11 @@ It makes &lt;div&gt; element (has some child nodes such as text and img) move ho
                                                        <pre name="code" class="examplecode
                                                        prettyprint">
 &lt;div class="ui-marquee" id="marquee"&gt;
-    &lt;p&gt;MarqueeTEST TEST message TEST for marquee&lt;/p&gt;
+&nbsp;&nbsp;&nbsp;&lt;p&gt;MarqueeTEST TEST message TEST for marquee&lt;/p&gt;
 &lt;/div&gt;
 &lt;script&gt;
-    var marqueeWidget = tau.widget.Marquee(document.getElementById("marquee"));
-    marqueeWidget.start();
+&nbsp;&nbsp;&nbsp;var marqueeWidget = tau.widget.Marquee(document.getElementById("marquee"));
+&nbsp;&nbsp;&nbsp;marqueeWidget.start();
 &lt;/script&gt;
 </pre>
                        </div>
@@ -256,7 +257,7 @@ It makes &lt;div&gt; element (has some child nodes such as text and img) move ho
                                                <p>Stop Marquee animation</p>
                                        </div>
                                        <div class="synopsis">
-                                               <pre class="signature prettyprint">stop ( ) </pre>
+                                               <pre class="signature prettyprint">stop() </pre>
                                        </div>
                                        
                                        <div class="description">
@@ -281,11 +282,11 @@ It makes &lt;div&gt; element (has some child nodes such as text and img) move ho
                                                        <pre name="code" class="examplecode
                                                        prettyprint">
 &lt;div class="ui-marquee" id="marquee"&gt;
-    &lt;p&gt;MarqueeTEST TEST message TEST for marquee&lt;/p&gt;
+&nbsp;&nbsp;&nbsp;&lt;p&gt;MarqueeTEST TEST message TEST for marquee&lt;/p&gt;
 &lt;/div&gt;
 &lt;script&gt;
-    var marqueeWidget = tau.widget.Marquee(document.getElementById("marquee"));
-    marqueeWidget.stop();
+&nbsp;&nbsp;&nbsp;var marqueeWidget = tau.widget.Marquee(document.getElementById("marquee"));
+&nbsp;&nbsp;&nbsp;marqueeWidget.stop();
 &lt;/script&gt;
 </pre>
                                                </div>
@@ -301,7 +302,7 @@ It makes &lt;div&gt; element (has some child nodes such as text and img) move ho
                                                <p>Reset Marquee animation (reset and end)</p>
                                        </div>
                                        <div class="synopsis">
-                                               <pre class="signature prettyprint">reset ( ) </pre>
+                                               <pre class="signature prettyprint">reset() </pre>
                                        </div>
                                        
                                        <div class="description">
@@ -326,11 +327,11 @@ It makes &lt;div&gt; element (has some child nodes such as text and img) move ho
                                                        <pre name="code" class="examplecode
                                                        prettyprint">
 &lt;div class="ui-marquee" id="marquee"&gt;
-    &lt;p&gt;MarqueeTEST TEST message TEST for marquee&lt;/p&gt;
+&nbsp;&nbsp;&nbsp;&lt;p&gt;MarqueeTEST TEST message TEST for marquee&lt;/p&gt;
 &lt;/div&gt;
 &lt;script&gt;
-    var marqueeWidget = tau.widget.Marquee(document.getElementById("marquee"));
-    marqueeWidget.reset();
+&nbsp;&nbsp;&nbsp;var marqueeWidget = tau.widget.Marquee(document.getElementById("marquee"));
+&nbsp;&nbsp;&nbsp;marqueeWidget.reset();
 &lt;/script&gt;
 </pre>
                                                </div>
index ae13b96..f7d4bce 100755 (executable)
 
 <p>For manual creation of page indicator, you can use constructor from <strong>tau</strong> namespace:</p>
 
-<pre class="prettyprint">var elPageIndicator = document.getElementById("pageindicator"),
-    pageIndicator = tau.widget.PageIndicator(elPageIndicator, { numberOfPages : 5 });
+<pre class="prettyprint">
+var elPageIndicator = document.getElementById("pageindicator"),
+&nbsp;&nbsp;&nbsp;&nbsp;pageIndicator = tau.widget.PageIndicator(elPageIndicator, {numberOfPages : 5});
 </pre>
 
 <p>Constructor has two require parameter <strong>element</strong> which are base <strong>HTMLElement</strong> to create component. We recommend get this element by method <em>document.getElementById</em>. Second parameter is <strong>options</strong> and it is a object with options for component. numberOfPages means the number of pages to be linked and it is mandatory.</p>
 
 <p>To add an page indicator component to the application, use the following code:</p>
 
-<pre class="prettyprint"> &lt;div id=&quot;pageIndicator&quot; class=&quot;ui-page-indicator&quot;&gt;&lt;/div&gt;
- &lt;script&gt;
-       var elPageIndicator = document.getElementById(&quot;pageIndicator&quot;),
-               pageIndicator =  tau.widget.PageIndicator(elPageIndicator, { numberOfPages: 5 }),
-               index = 1;
-       pageIndicator.setActive(index);
+<pre class="prettyprint">
+&lt;div id=&quot;pageIndicator&quot; class=&quot;ui-page-indicator&quot;&gt;&lt;/div&gt;
+&lt;script&gt;
+&nbsp;&nbsp;&nbsp;var elPageIndicator = document.getElementById(&quot;pageIndicator&quot;),
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pageIndicator =  tau.widget.PageIndicator(elPageIndicator, {numberOfPages: 5}),
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;index = 1;
+&nbsp;&nbsp;&nbsp;pageIndicator.setActive(index);
 &lt;/script&gt;
 </pre>
 
 
 <pre class="prettyprint">
 &lt;div id=&quot;pageIndicatorPage&quot; class=&quot;ui-page&quot;&gt;
-       &lt;header class=&quot;ui-header&quot;&gt;
-               &lt;h2 class=&quot;ui-title&quot;&gt;Page Indicator&lt;/h2&gt;
-       &lt;/header&gt;
-       &lt;div id=&quot;pageIndicator&quot; class=&quot;ui-page-indicator&quot;&gt;&lt;/div&gt;
-       &lt;div id=&quot;hsectionchanger&quot; class=&quot;ui-content&quot;&gt;
-               &lt;div&gt;
-                       &lt;section class=&quot;ui-section-active&quot; style=&quot;text-align:center&quot; &gt;
-                               &lt;h3&gt; Page1 of 5&lt;/h3&gt;
-                       &lt;/section&gt;
-                       &lt;section style=&quot;text-align:center&quot;&gt;
-                               &lt;h3&gt; Page2 of 5&lt;/h3&gt;
-                       &lt;/section&gt;
-                       &lt;section style=&quot;text-align:center&quot;&gt;
-                               &lt;h3&gt; Page3 of 5&lt;/h3&gt;
-                       &lt;/section&gt;
-                       &lt;section style=&quot;text-align:center&quot;&gt;
-                               &lt;h3&gt; Page4 of 5 &lt;/h3&gt;
-                       &lt;/section&gt;
-                       &lt;section style=&quot;text-align:center&quot;&gt;
-                               &lt;h3&gt; Page5 of 5 &lt;/h3&gt;
-                       &lt;/section&gt;
-               &lt;/div&gt;
-       &lt;/div&gt;
-       &lt;script&gt;
-               (function() {
-                       var self = this,
-                               page = document.getElementById( &quot;pageIndicatorPage&quot; ),
-                               changer = document.getElementById( &quot;hsectionchanger&quot; ),
-                               sectionChanger,
-                               elPageIndicator = document.getElementById(&quot;pageIndicator&quot;),
-                               pageIndicator,
-                               pageIndicatorHandler;
-
-                       page.addEventListener( &quot;pagebeforeshow&quot;, function() {
-                               // Create PageIndicator
-                               pageIndicator =  tau.widget.PageIndicator(elPageIndicator, { numberOfPages: 5 });
-                               pageIndicator.setActive(0);
-
-                               sectionChanger = new tau.widget.SectionChanger(changer, {
-                                       circular: true,
-                                       orientation: &quot;horizontal&quot;,
-                                       useBouncingEffect: true
-                               });
-                       });
-
-                       page.addEventListener( &quot;pagehide&quot;, function() {
-                               sectionChanger.destroy();
-                               pageIndicator.destroy();
-                       });
-
-                       // Indicator setting handler
-                       pageIndicatorHandler = function (e) {
-                               pageIndicator.setActive(e.detail.active);
-                       };
-
-                       // Bind the callback
-                       changer.addEventListener(&quot;sectionchange&quot;, pageIndicatorHandler, false);
-               })();
-       &lt;/script&gt;
+&nbsp;&nbsp;&nbsp;&lt;header class=&quot;ui-header&quot;&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;h2 class=&quot;ui-title&quot;&gt;Page Indicator&lt;/h2&gt;
+&nbsp;&nbsp;&nbsp;&lt;/header&gt;
+&nbsp;&nbsp;&nbsp;&lt;div id=&quot;pageIndicator&quot; class=&quot;ui-page-indicator&quot;&gt;&lt;/div&gt;
+&nbsp;&nbsp;&nbsp;&lt;div id=&quot;hsectionchanger&quot; class=&quot;ui-content&quot;&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;div&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;section class=&quot;ui-section-active&quot; style=&quot;text-align:center&quot; &gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;h3&gt; Page1 of 5&lt;/h3&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/section&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;section style=&quot;text-align:center&quot;&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;h3&gt; Page2 of 5&lt;/h3&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/section&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;section style=&quot;text-align:center&quot;&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;h3&gt; Page3 of 5&lt;/h3&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/section&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;section style=&quot;text-align:center&quot;&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;h3&gt; Page4 of 5&lt;/h3&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/section&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;section style=&quot;text-align:center&quot;&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;h3&gt; Page5 of 5&lt;/h3&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/section&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/div&gt;
+&nbsp;&nbsp;&nbsp;&lt;/div&gt;
+&nbsp;&nbsp;&nbsp;&lt;script&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(function()
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var self = this,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;page = document.getElementById(&quot;pageIndicatorPage&quot;),
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;changer = document.getElementById(&quot;hsectionchanger&quot;),
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sectionChanger,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;elPageIndicator = document.getElementById(&quot;pageIndicator&quot;),
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pageIndicator,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pageIndicatorHandler;
+
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;page.addEventListener(&quot;pagebeforeshow&quot;, function()
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Create PageIndicator */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pageIndicator =  tau.widget.PageIndicator(elPageIndicator, {numberOfPages: 5});
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pageIndicator.setActive(0);
+
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sectionChanger = new tau.widget.SectionChanger(changer,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;circular: true,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;orientation: &quot;horizontal&quot;,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;useBouncingEffect: true
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;});
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;});
+
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;page.addEventListener(&quot;pagehide&quot;, function()
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sectionChanger.destroy();
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pageIndicator.destroy();
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;});
+
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Indicator setting handler */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pageIndicatorHandler = function(e)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pageIndicator.setActive(e.detail.active);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;};
+
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Bind the callback */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;changer.addEventListener(&quot;sectionchange&quot;, pageIndicatorHandler, false);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;})();
+&nbsp;&nbsp;&nbsp;&lt;/script&gt;
 &lt;/div&gt;
 </pre>
 
 <p>If you use the following statement when you create page indicator component, a central dot is assigned to multiple pages.</p>
 
 <pre class="prettyprint">
-pageIndicator =  tau.widget.PageIndicator(elPageIndicator, { numberOfPages: 5, maxPage: 3 });
+pageIndicator =  tau.widget.PageIndicator(elPageIndicator, {numberOfPages: 5, maxPage: 3});
 </pre>
 
        <h2><a id="options-list"></a>Options</h2>
@@ -188,20 +195,20 @@ pageIndicator =  tau.widget.PageIndicator(elPageIndicator, { numberOfPages: 5, m
        </table>
 <br>
 <p>
-Take an example : the situation that the value of numberOfPages is "5"(5 pages in all), and the value of maxPage is "3"(3 dots).<br>
-When you scroll the page(or section) horizontally,  the number of exceeding pages( in this case, it is 2 pages, which is the result of 5 - 3 )<br>
+Take an example : the situation that the value of numberOfPages is "5" (5 pages in all), and the value of maxPage is "3" (3 dots).<br>
+When you scroll the page (or section) horizontally,  the number of exceeding pages (in this case, it is 2 pages, which is the result of 5 - 3)<br>
 would be indicated by the central dot, from middle of the pages.<br>
 <br>
-So, the first dot is for the first page, and the last dot is for the fifththe last) page.<br>
+So, the first dot is for the first page, and the last dot is for the fifth (the last) page.<br>
 And the middle dot is shared by 2nd, 3rd and 4th page while scrolling pages.<br>
 <br>
-In the case of even value of maxPagethe number of dots on the screen), the next order of half of the maxPage value would work as middle dot.<br>
-For example, in the situation that the value of numberOfPages is "6", and the value of maxPage is "4", the 3rd dotthe result of 4 / 2 + 1) would indicate
+In the case of even value of maxPage (the number of dots on the screen), the next order of half of the maxPage value would work as middle dot.<br>
+For example, in the situation that the value of numberOfPages is "6", and the value of maxPage is "4", the 3rd dot (the result of 4 / 2 + 1) would indicate
 3rd, 4th and 5th pages as middle dot.<br>
 <br>
 Of course, the value of numberOfPages should meet the number of the pages you have added to HTML.<br>
 <br>
-And if the the value of maxPage(dots) exceeds the value of numberOfPages, the value of maxPage would be changed to the value of numberOfPages.<br>
+And if the the value of maxPage (dots) exceeds the value of numberOfPages, the value of maxPage would be changed to the value of numberOfPages.<br>
 For example, in the situation that the value of numberOfPages is "6", and the value of maxPage is "100",there would be still 6 dots on the screen.
 </P>
 
@@ -221,7 +228,7 @@ For example, in the situation that the value of numberOfPages is "6", and the va
 
                                <tr>
                                        <td>
-                                               <pre class="intable prettyprint"><a href="#method-setActive">setActive</a> ( number index ) </pre>
+                                               <pre class="intable prettyprint"><a href="#method-setActive">setActive</a>(number index) </pre>
                                        </td>
                                        <td><p>This method sets a dot to active state.</p></td>
                                </tr>
@@ -239,7 +246,7 @@ For example, in the situation that the value of numberOfPages is "6", and the va
                                                <p>This method sets a dot to active state.</p>
                                        </div>
                                        <div class="synopsis">
-                                               <pre class="signature prettyprint">setActive ( number index) </pre>
+                                               <pre class="signature prettyprint">setActive(number index) </pre>
                                        </div>
 
                                        <div class="description">
index c6f97b5..963b567 100755 (executable)
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;ul class=&quot;ui-listview&quot;&gt;
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;li&gt;
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;label for=&quot;check-1&quot; class=&quot;ui-popup-checkbox-label&quot;&gt;Yesterday&lt;/label&gt;
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;input type=&quot;checkbox&quot; name=&quot;checkset&quot; id=&quot;check-1&quot; /&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;input type=&quot;checkbox&quot; name=&quot;checkset&quot; id=&quot;check-1&quot;/&gt;
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/li&gt;
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;li&gt;
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;label for=&quot;check-2&quot; class=&quot;ui-popup-checkbox-label&quot;&gt;Today&lt;/label&gt;
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;input type=&quot;checkbox&quot; name=&quot;checkset&quot; id=&quot;check-2&quot; /&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;input type=&quot;checkbox&quot; name=&quot;checkset&quot; id=&quot;check-2&quot;/&gt;
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/li&gt;
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;li&gt;
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;label for=&quot;check-3&quot; class=&quot;ui-popup-checkbox-label&quot;&gt;Tomorrow&lt;/label&gt;
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;input type=&quot;checkbox&quot; name=&quot;checkset&quot; id=&quot;check-3&quot; /&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;input type=&quot;checkbox&quot; name=&quot;checkset&quot; id=&quot;check-3&quot;/&gt;
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/li&gt;
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/ul&gt;
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;ul class=&quot;ui-listview&quot;&gt;
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;li&gt;
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;label for=&quot;radio-1&quot; class=&quot;ui-popup-radio-label&quot;&gt;Mandatory&lt;/label&gt;
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;input type=&quot;radio&quot; name=&quot;radioset&quot; id=&quot;radio-1&quot; /&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;input type=&quot;radio&quot; name=&quot;radioset&quot; id=&quot;radio-1&quot;/&gt;
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/li&gt;
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;li&gt;
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;label for=&quot;radio-2&quot; class=&quot;ui-popup-radio-label&quot;&gt;Optional&lt;/label&gt;
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;input type=&quot;radio&quot; name=&quot;radioset&quot; id=&quot;radio-2&quot; /&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;input type=&quot;radio&quot; name=&quot;radioset&quot; id=&quot;radio-2&quot;/&gt;
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/li&gt;
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/ul&gt;
 &nbsp;&nbsp;&nbsp;&lt;/div&gt;
 
 <p>To bind the popup to a button, use the following code:</p>
 
-<pre class="prettyprint"><pre class="prettyprint lang-html" style="border:0px; margin:0px">&lt;!--HTML code--&gt;
+<pre class="prettyprint"><pre class="prettyprint lang-html" style="border:0px; margin:0px">
+&lt;!--HTML code--&gt;
 &lt;div id=&quot;1btnPopup&quot; class=&quot;ui-popup&quot;&gt;
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;div class=&quot;ui-popup-header&quot;&gt;Power saving mode&lt;/div&gt;
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;div class=&quot;ui-popup-content&quot;&gt;
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/div&gt;
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;div class=&quot;ui-popup-footer&quot;&gt;
+&nbsp;&nbsp;&nbsp;&lt;div class=&quot;ui-popup-header&quot;&gt;Power saving mode&lt;/div&gt;
+&nbsp;&nbsp;&nbsp;&lt;div class=&quot;ui-popup-content&quot;&gt;&lt;/div&gt;
+&nbsp;&nbsp;&nbsp;&lt;div class=&quot;ui-popup-footer&quot;&gt;
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;button id=&quot;1btnPopup-cancel&quot; class=&quot;ui-btn&quot;&gt;Cancel&lt;/button&gt;
 &nbsp;&nbsp;&nbsp;&lt;/div&gt;
 &lt;/div&gt;</pre><pre class="prettyprint lang-js" style="border:0px; margin:0px">/* JavaScript code */
 </table>
 <p>To use popup events, use the following code:</p>
 
-<pre class="prettyprint"><pre class="prettyprint lang-html" style="border:0px; margin:0px">&lt;!--Popup html code--&gt;
+<pre class="prettyprint"><pre class="prettyprint lang-html" style="border:0px; margin:0px">
+&lt;!--Popup HTML code--&gt;
 &lt;div id=&quot;popup&quot; class=&quot;ui-popup&quot;&gt;
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;div class=&quot;ui-popup-header&quot;&gt;&lt;/div&gt;
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;div class=&quot;ui-popup-content&quot;&gt;&lt;/div&gt;
-&nbsp;&nbsp;&nbsp;&lt;/div&gt;
+&nbsp;&nbsp;&nbsp;&lt;div class=&quot;ui-popup-header&quot;&gt;&lt;/div&gt;
+&nbsp;&nbsp;&nbsp;&lt;div class=&quot;ui-popup-content&quot;&gt;&lt;/div&gt;
 &lt;/div&gt;</pre><pre class="prettyprint lang-js" style="border:0px; margin:0px">/* JavaScript code */
 &lt;script&gt;
 &nbsp;&nbsp;&nbsp;/* Use popup events */
@@ -242,32 +242,36 @@ If popup is opened or closed by only openPopup() or closePopup() method,
 it might occur exceptional errors or bugs.<br>
 So it is highly recommended to handle the feature by using event.</p>
 
-<pre class="prettyprint"><pre class="prettyprint lang-html" style="border:0px; margin:0px">&lt;!--Popup html code--&gt;
+<pre class="prettyprint"><pre class="prettyprint lang-html" style="border:0px; margin:0px">
+&lt;!--Popup HTML code--&gt;
 &lt;div id=&quot;popup&quot; class=&quot;ui-popup&quot;&gt;
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;div class=&quot;ui-popup-content&quot;&gt;&lt;/div&gt;
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;div class=&quot;ui-popup-footer&quot;&gt;
+&nbsp;&nbsp;&nbsp;&lt;div class=&quot;ui-popup-content&quot;&gt;&lt;/div&gt;
+&nbsp;&nbsp;&nbsp;&lt;div class=&quot;ui-popup-footer&quot;&gt;
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;div class=&quot;ui-btn&quot; id=&quot;cancel-btn&quot;&gt;&lt;/div&gt;
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/div&gt;
 &nbsp;&nbsp;&nbsp;&lt;/div&gt;
 &lt;/div&gt;</pre><pre class="prettyprint lang-js" style="border:0px; margin:0px">/* JavaScript code */
 &lt;script&gt;
 &nbsp;&nbsp;&nbsp;/* Use popup events */
 &nbsp;&nbsp;&nbsp;var popup = document.getElementById(&quot;popup&quot;),
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cancel = document.getElementById(&quot;cancel-btn&quot;);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cancel = document.getElementById(&quot;cancel-btn&quot;);
 
-&nbsp;&nbsp;&nbsp;&nbsp;openButton.addEventListener(&quot;click&quot;, function() {
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tau.openPopup(&quot;#popup&quot;);
-&nbsp;&nbsp;&nbsp;&nbsp;});
-&nbsp;&nbsp;&nbsp;popup.addEventListener(&quot;popupshow&quot;, function(){
+&nbsp;&nbsp;&nbsp;openButton.addEventListener(&quot;click&quot;, function()
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tau.openPopup(&quot;#popup&quot;);
+&nbsp;&nbsp;&nbsp;});
+&nbsp;&nbsp;&nbsp;popup.addEventListener(&quot;popupshow&quot;, function()
+&nbsp;&nbsp;&nbsp;{
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(&quot;Implement code after popup show completely&quot;);
 &nbsp;&nbsp;&nbsp;});
 
-&nbsp;&nbsp;&nbsp;cancel.addEventListener(&quot;click&quot;, function() {
+&nbsp;&nbsp;&nbsp;cancel.addEventListener(&quot;click&quot;, function()
+&nbsp;&nbsp;&nbsp;{
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tau.closePopup();
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(window.getComputedStyle(popup).display);//block - not closed yet.
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(window.getComputedStyle(popup).display); /* Block - not closed yet */
 &nbsp;&nbsp;&nbsp;});
-&nbsp;&nbsp;&nbsp;popup.addEventListener(&quot;popuphide&quot;, function() {
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(window.getComputedStyle(popup).display); //none - closed completely.
+&nbsp;&nbsp;&nbsp;popup.addEventListener(&quot;popuphide&quot;, function()
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(window.getComputedStyle(popup).display); /* None - closed completely */
 &nbsp;&nbsp;&nbsp;});
 &lt;/script&gt;
 </pre></pre>
index 5500f8c..1228a3d 100755 (executable)
@@ -54,14 +54,15 @@ Please use the following code:</p>
        </tbody>
 </table>
 
-<pre class="prettyprint">&lt;div class=&quot;ui-page&quot;&gt;
-       &lt;header class=&quot;ui-header&quot;&gt;
-               &lt;h2 class=&quot;ui-title&quot;&gt;Processing&lt;/h2&gt;
-       &lt;/header&gt;
-       &lt;div class=&quot;ui-content content-padding&quot;&gt;
-               It was a real pleasure for me to finally get to meet you. My colleagues join me in sending you our holiday...
-       &lt;/div&gt;
-       &lt;div class=&quot;ui-processing ui-processing-full-size&quot;&gt;&lt;/div&gt;
+<pre class="prettyprint">
+&lt;div class=&quot;ui-page&quot;&gt;
+&nbsp;&nbsp;&nbsp;&lt;header class=&quot;ui-header&quot;&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;h2 class=&quot;ui-title&quot;&gt;Processing&lt;/h2&gt;
+&nbsp;&nbsp;&nbsp;&lt;/header&gt;
+&nbsp;&nbsp;&nbsp;&lt;div class=&quot;ui-content content-padding&quot;&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;It was a real pleasure for me to finally get to meet you. My colleagues join me in sending you our holiday...
+&nbsp;&nbsp;&nbsp;&lt;/div&gt;
+&nbsp;&nbsp;&nbsp;&lt;div class=&quot;ui-processing ui-processing-full-size&quot;&gt;&lt;/div&gt;
 &lt;/div&gt;
 </pre>
 
index 6e5dc2b..72e1a58 100755 (executable)
@@ -48,7 +48,8 @@ It gets to have a virtue of needlessness of changing page and the existance of s
 <h2 id="manual-constructor">How to Create Section Changer</h2>
 
 <p>To add a section changer component to the application, use the following code:</p>
-<pre class="prettyprint"><pre class="prettyprint lang-html" style="border:0px; margin:0px">&lt;div id=&quot;hasSectionchangerPage&quot; class=&quot;ui-page&quot;&gt;
+<pre class="prettyprint"><pre class="prettyprint lang-html" style="border:0px; margin:0px">
+&lt;div id=&quot;hasSectionchangerPage&quot; class=&quot;ui-page&quot;&gt;
 &nbsp;&nbsp;&nbsp;&lt;header class=&quot;ui-header&quot;&gt;
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;h2 class=&quot;ui-title&quot;&gt;SectionChanger&lt;/h2&gt;
 &nbsp;&nbsp;&nbsp;&lt;/header&gt;
@@ -69,19 +70,22 @@ It gets to have a virtue of needlessness of changing page and the existance of s
 &lt;/div&gt;</pre><pre class="prettyprint lang-js" style="border:0px; margin:0px">(function() 
 {
 &nbsp;&nbsp;&nbsp;var page = document.getElementById(&quot;hasSectionchangerPage&quot;),
-&nbsp;&nbsp;&nbsp;element = document.getElementById(&quot;sectionchanger&quot;),
-&nbsp;&nbsp;&nbsp;sectionChanger, idx=1;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;element = document.getElementById(&quot;sectionchanger&quot;),
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sectionChanger, idx=1;
 
-&nbsp;&nbsp;&nbsp;page.addEventListener(&quot;pageshow&quot;, function() {
+&nbsp;&nbsp;&nbsp;page.addEventListener(&quot;pageshow&quot;, function()
+&nbsp;&nbsp;&nbsp;{
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Create the SectionChanger object */
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sectionChanger = tau.widget.SectionChanger(element, {
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sectionChanger = tau.widget.SectionChanger(element,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;circular: true,
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;orientation: &quot;horizontal&quot;,
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;useBouncingEffect: true
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;});
 &nbsp;&nbsp;&nbsp;});
 
-&nbsp;&nbsp;&nbsp;page.addEventListener(&quot;pagehide&quot;, function() {
+&nbsp;&nbsp;&nbsp;page.addEventListener(&quot;pagehide&quot;, function()
+&nbsp;&nbsp;&nbsp;{
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Release the object */
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sectionChanger.destroy();
 &nbsp;&nbsp;&nbsp;});
@@ -187,21 +191,21 @@ It gets to have a virtue of needlessness of changing page and the existance of s
 
                                <tr>
                                        <td>
-                                               <pre class="intable prettyprint"><a href="#method-setActive">setActiveSection</a> ( number index ) </pre>
+                                               <pre class="intable prettyprint"><a href="#method-setActive">setActiveSection</a>(number index) </pre>
                                        </td>
                                        <td><p>Changes the currently active section element (index).
                <br>For smooth scrolling, the <span style="font-family: Courier New,Courier,monospace">duration</span> parameter must be in milliseconds.</p></td>
                                </tr>
                                <tr>
                                        <td>
-                                               <pre class="intable prettyprint"><a href="#method-getActiveSectionIndex">getActiveSectionIndex</a> () </pre>
+                                               <pre class="intable prettyprint"><a href="#method-getActiveSectionIndex">getActiveSectionIndex</a>() </pre>
                                        </td>
                                        <td><p>Gets the currently active section element&#39;s index.
                <br>The return value is a number (<span style="font-family: Courier New,Courier,monospace">activeIndex</span>).</p></td>
                                </tr>
                                <tr>
                                        <td>
-                                               <pre class="intable prettyprint"><a href="#method-refresh">refresh</a> () </pre>
+                                               <pre class="intable prettyprint"><a href="#method-refresh">refresh</a>() </pre>
                                        </td>
                                        <td><p>Updates the section changer form.
                <br>When you add new section dynamically through JavaScript, you must call the <span style="font-family: Courier New,Courier,monospace">refresh()</span> method to update section information.</p></td>
@@ -221,7 +225,7 @@ It gets to have a virtue of needlessness of changing page and the existance of s
                <br>For smooth scrolling, the <span style="font-family: Courier New,Courier,monospace">duration</span> parameter must be in milliseconds.</p>
                                        </div>
                                        <div class="synopsis">
-                                               <pre class="signature prettyprint">setActiveSection ( number index) </pre>
+                                               <pre class="signature prettyprint">setActiveSection(number index) </pre>
                                        </div>
 
                                        <div class="description">
@@ -278,7 +282,7 @@ It gets to have a virtue of needlessness of changing page and the existance of s
                <br>The return value is a number (<span style="font-family: Courier New,Courier,monospace">activeIndex</span>).</p>
                                        </div>
                                        <div class="synopsis">
-                                               <pre class="signature prettyprint">getActiveSectionIndex () </pre>
+                                               <pre class="signature prettyprint">getActiveSectionIndex() </pre>
                                        </div>
 
                                        <div class="description">
@@ -317,7 +321,7 @@ It gets to have a virtue of needlessness of changing page and the existance of s
                <br>When you add new section dynamically through JavaScript, you must call the <span style="font-family: Courier New,Courier,monospace">refresh()</span> method to update section information.</p>
                                        </div>
                                        <div class="synopsis">
-                                               <pre class="signature prettyprint">refresh () </pre>
+                                               <pre class="signature prettyprint">refresh() </pre>
                                        </div>
 
                                        <div class="description">
index 70a861e..7424d5d 100755 (executable)
@@ -55,43 +55,48 @@ Indicator arrow is special indicator style that has the arrow. It is used for pr
 <h2><a id='html-example0.9038220448419452'>How to Create Selector</a></h2>
 <h3>HTML example</h3>
 
-<pre class="prettyprint">         &lt;div class="ui-page ui-page-active" id="main"&gt;
-             &lt;div id="selector" class="ui-selector"&gt;
-                 &lt;div class="ui-item ui-show-icon" data-title="Show"&gt;&lt;/div&gt;
-                 &lt;div class="ui-item ui-human-icon" data-title="Human"&gt;&lt;/div&gt;
-                 &lt;div class="ui-item ui-delete-icon" data-title="Delete"&gt;&lt;/div&gt;
-                 &lt;div class="ui-item ui-show-icon" data-title="Show"&gt;&lt;/div&gt;
-                 &lt;div class="ui-item ui-human-icon" data-title="Human"&gt;&lt;/div&gt;
-                 &lt;div class="ui-item ui-delete-icon" data-title="Delete"&gt;&lt;/div&gt;
-                 &lt;div class="ui-item ui-x-icon" data-title="X Icon"&gt;&lt;/div&gt;
-                 &lt;div class="ui-item ui-fail-icon" data-title="Fail"&gt;&lt;/div&gt;
-                 &lt;div class="ui-item ui-show-icon" data-title="Show"&gt;&lt;/div&gt;
-                 &lt;div class="ui-item ui-human-icon" data-title="Human"&gt;&lt;/div&gt;
-                 &lt;div class="ui-item ui-delete-icon" data-title="Delete"&gt;&lt;/div&gt;
-             &lt;/div&gt;
-         &lt;/div&gt;
+<pre class="prettyprint">
+&lt;div class="ui-page ui-page-active" id="main"&gt;
+&nbsp;&nbsp;&nbsp;&lt;div id="selector" class="ui-selector"&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;div class="ui-item ui-show-icon" data-title="Show"&gt;&lt;/div&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;div class="ui-item ui-human-icon" data-title="Human"&gt;&lt;/div&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;div class="ui-item ui-delete-icon" data-title="Delete"&gt;&lt;/div&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;div class="ui-item ui-show-icon" data-title="Show"&gt;&lt;/div&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;div class="ui-item ui-human-icon" data-title="Human"&gt;&lt;/div&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;div class="ui-item ui-delete-icon" data-title="Delete"&gt;&lt;/div&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;div class="ui-item ui-x-icon" data-title="X Icon"&gt;&lt;/div&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;div class="ui-item ui-fail-icon" data-title="Fail"&gt;&lt;/div&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;div class="ui-item ui-show-icon" data-title="Show"&gt;&lt;/div&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;div class="ui-item ui-human-icon" data-title="Human"&gt;&lt;/div&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;div class="ui-item ui-delete-icon" data-title="Delete"&gt;&lt;/div&gt;
+&nbsp;&nbsp;&nbsp;&lt;/div&gt;
+&lt;/div&gt;
 </pre>
 
 <h3><a id='manual-constructor0.33475646935403347'></a>Manual constructor</h3>
 
 <pre class="prettyprint">
-(function() {
-       var page = document.getElementById("selectorPage"),
-               selector = document.getElementById("selector"),
-               clickBound;
+(function()
+{
+&nbsp;&nbsp;&nbsp;var page = document.getElementById("selectorPage"),
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;selector = document.getElementById("selector"),
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;clickBound;
 
-       function onClick(event) {
-               var activeItem = selector.querySelector(".ui-item-active");
-               //console.log(activeItem.getAttribute("data-title"));
-       }
-       page.addEventListener("pagebeforeshow", function() {
-               clickBound = onClick.bind(null);
-               tau.widget.Selector(selector);
-               selector.addEventListener("click", clickBound, false);
-       });
-       page.addEventListener("pagebeforehide", function() {
-               selector.removeEventListener("click", clickBound, false);
-       });
+&nbsp;&nbsp;&nbsp;function onClick(event)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var activeItem = selector.querySelector(".ui-item-active");
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* console.log(activeItem.getAttribute("data-title")); */
+&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;page.addEventListener("pagebeforeshow", function()
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;clickBound = onClick.bind(null);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tau.widget.Selector(selector);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;selector.addEventListener("click", clickBound, false);
+&nbsp;&nbsp;&nbsp;});
+&nbsp;&nbsp;&nbsp;page.addEventListener("pagebeforehide", function()
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;selector.removeEventListener("click", clickBound, false);
+&nbsp;&nbsp;&nbsp;});
 })();
 </pre>
 
@@ -192,19 +197,19 @@ Indicator arrow is special indicator style that has the arrow. It is used for pr
                <tbody>
                                <tr>
                                        <td>
-                                               <pre class="intable prettyprint"><a href="#method-changeItem">changeItem</a> ( Number index ) </pre>
+                                               <pre class="intable prettyprint"><a href="#method-changeItem">changeItem</a>(Number index) </pre>
                                        </td>
                                        <td><p>Change active item on active layer</p></td>
                                </tr>
                                <tr>
                                        <td>
-                                               <pre class="intable prettyprint"><a href="#method-addItem">addItem</a> ( HTMLElement item, Number index ) </pre>
+                                               <pre class="intable prettyprint"><a href="#method-addItem">addItem</a>(HTMLElement item, Number index) </pre>
                                        </td>
                                        <td><p>Add new item</p></td>
                                </tr>
                                <tr>
                                        <td>
-                                               <pre class="intable prettyprint"><a href="#method-removeItem">removeItem</a> ( Number index ) </pre>
+                                               <pre class="intable prettyprint"><a href="#method-removeItem">removeItem</a>(Number index) </pre>
                                        </td>
                                        <td><p>Remove item on specific layer</p></td>
                                </tr>
@@ -219,7 +224,7 @@ Indicator arrow is special indicator style that has the arrow. It is used for pr
                                                <p>Change active item on active layer</p>
                                        </div>
                                        <div class="synopsis">
-                                               <pre class="signature prettyprint">changeItem ( Number index) </pre>
+                                               <pre class="signature prettyprint">changeItem(Number index) </pre>
                                        </div>
                                        
                                        <div class="description">
@@ -273,7 +278,7 @@ Indicator arrow is special indicator style that has the arrow. It is used for pr
                                                <p>Add new item</p>
                                        </div>
                                        <div class="synopsis">
-                                               <pre class="signature prettyprint">addItem ( HTMLElement item, Number index) </pre>
+                                               <pre class="signature prettyprint">addItem(HTMLElement item, Number index) </pre>
                                        </div>
                                        
                                        <div class="description">
@@ -335,7 +340,7 @@ Indicator arrow is special indicator style that has the arrow. It is used for pr
                                                <p>Remove item on specific layer</p>
                                        </div>
                                        <div class="synopsis">
-                                               <pre class="signature prettyprint">removeItem ( Number index) </pre>
+                                               <pre class="signature prettyprint">removeItem(Number index) </pre>
                                        </div>
                                        
                                        <div class="description">
index c9b15ed..959cd1c 100755 (executable)
 
 <p>To add a slider component to the application, use the following code:</p>
 
-<pre class="prettyprint">&lt;div class=&quot;ui-page&quot;&gt;
-       &lt;header class=&quot;ui-header&quot;&gt;
-               &lt;h2 class=&quot;ui-title&quot;&gt;Slider&lt;/h2&gt;
-       &lt;/header&gt;
-       &lt;div class=&quot;ui-content content-padding&quot;&gt;
-               Slider length can be modified by the width style.
-        &lt;input type=&quot;range&quot; /&gt;
-       &lt;/div&gt;
+<pre class="prettyprint">
+&lt;div class=&quot;ui-page&quot;&gt;
+&nbsp;&nbsp;&nbsp;&lt;header class=&quot;ui-header&quot;&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;h2 class=&quot;ui-title&quot;&gt;Slider&lt;/h2&gt;
+&nbsp;&nbsp;&nbsp;&lt;/header&gt;
+&nbsp;&nbsp;&nbsp;&lt;div class=&quot;ui-content content-padding&quot;&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Slider length can be modified by the width style.
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;input type=&quot;range&quot;/&gt;
+&nbsp;&nbsp;&nbsp;&lt;/div&gt;
 &lt;/div&gt;
 </pre>
 <p>If you want to modify the width of the slider,please change the length with width style.</p>
index 4fec0bf..1cedb5b 100755 (executable)
@@ -53,19 +53,21 @@ When scroll ended, it triggers &quot;selected&quot; event and attach class to de
 
 <p>You can add a basic listview as follows:</p>
 
-<pre class="prettyprint">&lt;ul class="ui-listview ui-snap-listview" id="snapList"&gt;
-    &lt;li&gt;1line&lt;/li&gt;
-    &lt;li&gt;2line&lt;/li&gt;
-    &lt;li&gt;3line&lt;/li&gt;
-    &lt;li&gt;4line&lt;/li&gt;
-    &lt;li&gt;5line&lt;/li&gt;
+<pre class="prettyprint">
+&lt;ul class="ui-listview ui-snap-listview" id="snapList"&gt;
+&nbsp;&nbsp;&nbsp;&lt;li&gt;1line&lt;/li&gt;
+&nbsp;&nbsp;&nbsp;&lt;li&gt;2line&lt;/li&gt;
+&nbsp;&nbsp;&nbsp;&lt;li&gt;3line&lt;/li&gt;
+&nbsp;&nbsp;&nbsp;&lt;li&gt;4line&lt;/li&gt;
+&nbsp;&nbsp;&nbsp;&lt;li&gt;5line&lt;/li&gt;
 &lt;/ul&gt;
 </pre>
 
 <p>In javascript code, you can make your list as SnapListview component as follows:</p>
-<pre class="prettyprint">&lt;script&gt;
-var snapList = document.getElementById("snapList"),
-    snapListComponent = tau.widget.SnapListview(snapList);
+<pre class="prettyprint">
+&lt;script&gt;
+&nbsp;&nbsp;&nbsp;var snapList = document.getElementById("snapList"),
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;snapListComponent = tau.widget.SnapListview(snapList);
 &lt;/script&gt;
 </pre>
 
index d0ca3a2..bbf727c 100755 (executable)
@@ -78,18 +78,22 @@ You can set the details when swiping such as elements that appear, background co
 
 <h3>JavaScript</h3>
 <pre class="prettyprint">
-(function() {
+(function()
+{
 &nbsp;&nbsp;&nbsp;var page = document.getElementById(&quot;pageSwipeList&quot;),
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;listElement = page.getElementsByClassName(&quot;ui-swipelist-list&quot;)[0],
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;swipeList;
-&nbsp;&nbsp;&nbsp;page.addEventListener(&quot;pageshow&quot;, function() {
+&nbsp;&nbsp;&nbsp;page.addEventListener(&quot;pageshow&quot;, function()
+&nbsp;&nbsp;&nbsp;{
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Make swipe list object */
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;swipeList = new tau.widget.SwipeList(listElement, {
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;swipeList = new tau.widget.SwipeList(listElement,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;swipeTarget: &quot;li&quot;,
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;swipeElement: &quot;.ui-swipelist&quot;
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;});
 &nbsp;&nbsp;&nbsp;});
-&nbsp;&nbsp;&nbsp;page.addEventListener(&quot;pagehide&quot;, function() {
+&nbsp;&nbsp;&nbsp;page.addEventListener(&quot;pagehide&quot;, function()
+&nbsp;&nbsp;&nbsp;{
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Release object */
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;swipeList.destroy();
 &nbsp;&nbsp;&nbsp;});
index 38c81e7..b261528 100755 (executable)
 <p>
 To add a toggle switch, you must add the <span style="font-family: Courier New,Courier,monospace">ui-switch</span> class in the <span style="font-family: Courier New,Courier,monospace">&lt;div&gt;</span> element. Because toggle switch is dependent on the checkbox component, you must implement the <span style="font-family: Courier New,Courier,monospace">ui-switch-input</span> class in a checkbox <span style="font-family: Courier New,Courier,monospace">input</span> element.</p> 
 <p>To add a toggle switch component to the application, use the following code:</p>
-<pre class="prettyprint">&lt;div class=&quot;ui-switch&quot;&gt;
-    &lt;div class=&quot;ui-switch-text&quot;&gt;
-        Toggle Switch
-    &lt;/div&gt;
-    &lt;label class=&quot;ui-toggleswitch&quot;&gt;
-        &lt;input type=&quot;checkbox&quot; class=&quot;ui-switch-input&quot;&gt;
-        &lt;div class=&quot;ui-switch-activation&quot;&gt;
-            &lt;div class=&quot;ui-switch-inneroffset&quot;&gt;
-                &lt;div class=&quot;ui-switch-handler&quot;&gt;&lt;/div&gt;
-            &lt;/div&gt;
-        &lt;/div&gt;
-    &lt;/label&gt;
+<pre class="prettyprint">
+&lt;div class=&quot;ui-switch&quot;&gt;
+&nbsp;&nbsp;&nbsp;&lt;div class=&quot;ui-switch-text&quot;&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Toggle Switch
+&nbsp;&nbsp;&nbsp;&lt;/div&gt;
+&nbsp;&nbsp;&nbsp;&lt;label class=&quot;ui-toggleswitch&quot;&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;input type=&quot;checkbox&quot; class=&quot;ui-switch-input&quot;/&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;div class=&quot;ui-switch-activation&quot;&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;div class=&quot;ui-switch-inneroffset&quot;&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;div class=&quot;ui-switch-handler&quot;&gt;&lt;/div&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/div&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/div&gt;
+&nbsp;&nbsp;&nbsp;&lt;/label&gt;
 &lt;/div&gt;</pre>
 
 
 <h3>Toggle Switch in Listview</h3>
 <p>You can use toggle switch component in list as checkbox/radio. Please refer following code:</p>
-<pre class="prettyprint">&lt;ul class=&quot;ui-listview&quot;&gt;
-    &lt;li class=&quot;li-has-toggle&quot;&gt;
-        &lt;label&gt;
-           Toggle 1
-           &lt;div class=&quot;ui-toggleswitch&quot;&gt;
-               &lt;input type=&quot;checkbox&quot; class=&quot;ui-switch-input&quot;&gt;
-               &lt;div class=&quot;ui-switch-button&quot;&gt;&lt;/div&gt;
-           &lt;/div&gt;
-       &lt;/label&gt;
-    &lt;/li&gt;
+<pre class="prettyprint">
+&lt;ul class=&quot;ui-listview&quot;&gt;
+&nbsp;&nbsp;&nbsp;&lt;li class=&quot;li-has-toggle&quot;&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;label&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Toggle 1
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;div class=&quot;ui-toggleswitch&quot;&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;input type=&quot;checkbox&quot; class=&quot;ui-switch-input&quot;/&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;div class=&quot;ui-switch-button&quot;&gt;&lt;/div&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/div&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/label&gt;
+&nbsp;&nbsp;&nbsp;&lt;/li&gt;
 &lt;/ul&gt;</pre>
 
  <div id="footer"> 
index f6bc644..f3a3850 100755 (executable)
@@ -47,36 +47,37 @@ ViewSwitcher component controls each view elements which are changing position.T
 <h2><a id="how-to"></a>How to Create ViewSwitcher</h2>
        <h3>HTML Examples</h3>
 
-<pre class="prettyprint">&lt;div id=&quot;drawerPage&quot; class=&quot;ui-page&quot;&gt;
-    &lt;div id=&quot;moreoptionsDrawer&quot; class=&quot;ui-drawer&quot;&gt;
-       &lt;div id=&quot;pageIndicator&quot; class=&quot;ui-page-indicator&quot;&gt;&lt;/div&gt;
-       &lt;div id=&quot;viewSwitcher&quot; class=&quot;ui-view-switcher&quot;&gt;
-           &lt;div class=&quot;ui-view custom-view&quot;&gt;
-               &lt;button class=&quot;option-button&quot;&gt;1&lt;/button&gt;
-           &lt;/div&gt;
-           &lt;div class=&quot;ui-view custom-view ui-view-active&quot;&gt;
-               &lt;button class=&quot;option-button&quot;&gt;2&lt;/button&gt;
-           &lt;/div&gt;
-           &lt;div class=&quot;ui-view custom-view&quot;&gt;
-               &lt;button class=&quot;option-button&quot;&gt;3&lt;/button&gt;
-           &lt;/div&gt;
-           &lt;div class=&quot;ui-view custom-view&quot;&gt;
-               &lt;button class=&quot;option-button&quot;&gt;4&lt;/button&gt;
-           &lt;/div&gt;
-           &lt;div class=&quot;ui-view custom-view&quot;&gt;
-               &lt;button class=&quot;option-button&quot;&gt;5&lt;/button&gt;
-           &lt;/div&gt;
-       &lt;/div&gt;
-    &lt;/div&gt;
+<pre class="prettyprint">
+&lt;div id=&quot;drawerPage&quot; class=&quot;ui-page&quot;&gt;
+&nbsp;&nbsp;&nbsp;&lt;div id=&quot;moreoptionsDrawer&quot; class=&quot;ui-drawer&quot;&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;div id=&quot;pageIndicator&quot; class=&quot;ui-page-indicator&quot;&gt;&lt;/div&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;div id=&quot;viewSwitcher&quot; class=&quot;ui-view-switcher&quot;&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;div class=&quot;ui-view custom-view&quot;&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;button class=&quot;option-button&quot;&gt;1&lt;/button&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/div&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;div class=&quot;ui-view custom-view ui-view-active&quot;&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;button class=&quot;option-button&quot;&gt;2&lt;/button&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/div&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;div class=&quot;ui-view custom-view&quot;&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;button class=&quot;option-button&quot;&gt;3&lt;/button&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/div&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;div class=&quot;ui-view custom-view&quot;&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;button class=&quot;option-button&quot;&gt;4&lt;/button&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/div&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;div class=&quot;ui-view custom-view&quot;&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;button class=&quot;option-button&quot;&gt;5&lt;/button&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/div&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/div&gt;
+&nbsp;&nbsp;&nbsp;&lt;/div&gt;
 &lt;/div&gt;
-
 </pre>
 
        <h3>Manual Constructor</h3>
 <pre class="prettyprint">
-(function() {
-       var viewSwitcherElement = page.querySelector("#viewSwitcher"),
-               viewSwitcher = tau.widget.ViewSwitcher(viewSwitcherElement);
+(function()
+{
+&nbsp;&nbsp;&nbsp;var viewSwitcherElement = page.querySelector("#viewSwitcher"),
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;viewSwitcher = tau.widget.ViewSwitcher(viewSwitcherElement);
 })();
 </pre>
 
@@ -112,19 +113,22 @@ ViewSwitcher component controls each view elements which are changing position.T
 
        <h3>Event example</h3>
        <pre class="prettyprint">
-(function() {
-       var viewSwitcherElement = page.querySelector("#viewSwitcher"),
-               views = document.querySelectorAll(".ui-view"),
-               elPageIndicator = document.querySelector("#pageIndicator");
+(function()
+{
+&nbsp;&nbsp;&nbsp;var viewSwitcherElement = page.querySelector("#viewSwitcher"),
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;views = document.querySelectorAll(".ui-view"),
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;elPageIndicator = document.querySelector("#pageIndicator");
 
-       pageIndicator = tau.widget.PageIndicator(elPageIndicator, { numberOfPages: 5 }),
-       viewSwitcherElement.addEventListener("viewchange", function(event) {    
-               var index = event.detail.index;
-               if (index < 0 || index > views.length - 1) {
-                       return;
-               }
-               pageIndicator.setActive(index);
-       }, false);
+&nbsp;&nbsp;&nbsp;pageIndicator = tau.widget.PageIndicator(elPageIndicator, {numberOfPages: 5}),
+&nbsp;&nbsp;&nbsp;viewSwitcherElement.addEventListener("viewchange", function(event)
+&nbsp;&nbsp;&nbsp;{    
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var index = event.detail.index;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (index &lt; 0 || index &gt; views.length - 1)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pageIndicator.setActive(index);
+&nbsp;&nbsp;&nbsp;}, false);
 })();
        </pre>
        <h2><a id="methods-list"></a>Methods</h2>
@@ -143,7 +147,7 @@ ViewSwitcher component controls each view elements which are changing position.T
                        
                                <tr>
                                        <td>
-                                               <pre class="intable prettyprint"><a href="#method-setActiveIndex">setActiveIndex</a> ( index ) </pre>
+                                               <pre class="intable prettyprint"><a href="#method-setActiveIndex">setActiveIndex</a>(index) </pre>
                                        </td>
                                        <td><p>Set the active view with index value</p></td>
                                </tr>
@@ -152,7 +156,7 @@ ViewSwitcher component controls each view elements which are changing position.T
                        
                                <tr>
                                        <td>
-                                               <pre class="intable prettyprint"><a href="#method-getActiveIndex">getActiveIndex</a> (  ) </pre>
+                                               <pre class="intable prettyprint"><a href="#method-getActiveIndex">getActiveIndex</a>() </pre>
                                        </td>
                                        <td><p>Get the active view index</p></td>
                                </tr>
@@ -172,7 +176,7 @@ ViewSwitcher component controls each view elements which are changing position.T
                                                <p>Set the active view with index value</p>
                                        </div>
                                        <div class="synopsis">
-                                               <pre class="signature prettyprint">setActiveIndex ( index ) </pre>
+                                               <pre class="signature prettyprint">setActiveIndex(index) </pre>
                                        </div>
                                        
                                        <div class="description">
@@ -202,7 +206,7 @@ ViewSwitcher component controls each view elements which are changing position.T
                                                <p>Get the active view index</p>
                                        </div>
                                        <div class="synopsis">
-                                               <pre class="signature prettyprint">getActiveIndex ( ) </pre>
+                                               <pre class="signature prettyprint">getActiveIndex() </pre>
                                        </div>
                                        
                                        <div class="description">
index ebf68d7..77ea724 100755 (executable)
@@ -40,7 +40,8 @@
 </pre></li>
  
 <li>Insert a virtual list HTML and JSON (<span style="font-family: Courier New,Courier,monospace">virtuallist-db-demo.js</span>) code:
-<pre class="prettyprint"><pre class="prettyprint lang-html" style="border:0px; margin:0px">&lt;script type=&quot;text/javascript&quot; src=&quot;virtuallist-db-demo.js&quot;&gt;&lt;/script&gt;
+<pre class="prettyprint"><pre class="prettyprint lang-html" style="border:0px; margin:0px">
+&lt;script type=&quot;text/javascript&quot; src=&quot;virtuallist-db-demo.js&quot;&gt;&lt;/script&gt;
 &lt;script type=&quot;text/javascript&quot; src=&quot;app.js&quot;&gt;&lt;/script&gt;
 &lt;script type=&quot;text/javascript&quot; src=&quot;../../lib/tau/js/virtuallist.js&quot;&gt;&lt;/script&gt;</pre><pre class="prettyprint lang-js" style="border:0px; margin:0px">/* JSON DATA example in virtuallist-db-demo.js */
 var JSON_DATA = 
@@ -60,12 +61,14 @@ var JSON_DATA =
 /* Get HTML element reference */
 var elList = document.getElementById(&quot;vlist&quot;),
 &nbsp;&nbsp;&nbsp;&nbsp;/* All config options can be found in virtual list reference */
-&nbsp;&nbsp;&nbsp;&nbsp;vlist = tau.widget.VirtualListview(elList, {
+&nbsp;&nbsp;&nbsp;&nbsp;vlist = tau.widget.VirtualListview(elList,
+&nbsp;&nbsp;&nbsp;&nbsp;{
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dataLength: JSON_DATA.length,
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;bufferSize: 40
 &nbsp;&nbsp;&nbsp;&nbsp;});
 /* Update list items */
-vlist.setListItemUpdater(function(elListItem, newIndex) {
+vlist.setListItemUpdater(function(elListItem, newIndex)
+{
 &nbsp;&nbsp;&nbsp;var data = JSON_DATA[newIndex];
 &nbsp;&nbsp;&nbsp;elListItem.innerHTML = &#39;&lt;span class=&quot;ui-li-text-main&quot;>&#39; + data.NAME + &#39;&lt;/span&gt;&#39;;
 });
@@ -92,7 +95,8 @@ vlist.draw();
 
 <li>When you no longer need the component, destroy it using the <span style="font-family: Courier New,Courier,monospace">destroy()</span> method:</p>
 <pre class="prettyprint">
-page.addEventListener(&quot;pagehide&quot;, function() {
+page.addEventListener(&quot;pagehide&quot;, function()
+{
 &nbsp;&nbsp;&nbsp;vlist.destroy();
 });
 </pre></li>
index 31bc236..3cd6f4e 100644 (file)
@@ -231,31 +231,36 @@ For audio recording, use <em>http://tizen.org/privilege/audiorecorder</em> privi
         </ul>
 </div>
 <div class="example">
-<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> navigator.webkitGetUserMedia({video:true,audio:true}, gotStream, noStream);
-
- // For audio recording, use the API as following:
- // navigator.webkitGetUserMedia({video:false,audio:true}, gotStream, noStream);
-
- // WARNING :
- // Audio recording is not supported in initial target platform verison 2.2.1.
- // Please include following checking and guideline for end user.
- // if (tizen.systeminfo.getCapabilities().platformVersion === "2.2.1") {
- //     // Inform the user to upgrade his/her system OS to properly use this application.
- // }
-
- function gotStream(stream) {
-   navigator.tizCamera.createCameraControl(stream, gotCamera, noCamera);
- }
-
- function noStream() {
- }
-
- function gotCamera(cam) {//CameraControl
-   camera = cam;
- }
-
- function noCamera() {
- }
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+navigator.webkitGetUserMedia({video:true,audio:true}, gotStream, noStream);
+
+/*
+   For audio recording, use the API as following:
+   navigator.webkitGetUserMedia({video:false,audio:true}, gotStream, noStream);
+
+   WARNING :
+   Audio recording is not supported in initial target platform version 2.2.1
+   Include the following check and guideline for the end user:
+   if (tizen.systeminfo.getCapabilities().platformVersion === "2.2.1")
+   {
+      &lt;Inform the user to upgrade his/her system OS to properly use this application&gt;
+   }
+*/
+
+function gotStream(stream)
+{
+&nbsp;&nbsp;&nbsp;navigator.tizCamera.createCameraControl(stream, gotCamera, noCamera);
+}
+
+function noStream() {}
+
+function gotCamera(cam)
+{
+&nbsp;&nbsp;&nbsp;/* CameraControl */
+&nbsp;&nbsp;&nbsp;camera = cam;
+}
+
+function noCamera() {}
  </pre>
 </div>
 </dd>