[device] update tutorial for privilege information
authorTaeyoung Kim <ty317.kim@samsung.com>
Fri, 19 Feb 2016 08:38:52 +0000 (17:38 +0900)
committerTaeyoung Kim <ty317.kim@samsung.com>
Fri, 19 Feb 2016 08:39:27 +0000 (17:39 +0900)
- Privileges are necessary to use device apis. Thus
  tutorial is updated to notice the privilege information.

Change-Id: Iacacd15e2ce4363cf4ceec0cca1cb502eff5c266
Signed-off-by: Taeyoung Kim <ty317.kim@samsung.com>
org.tizen.tutorials/html/native/system/device_tutorial_n.htm

index f9306df..b5d8bcc 100644 (file)
@@ -121,7 +121,8 @@ error = device_battery_get_level_status(&amp;level);
 
                <li>To retrieve and set display properties:
                <ul>
-               <li>Get the number of display devices with the <span style="font-family: Courier New,Courier,monospace;">device_display_get_numbers()</span> function:
+               <li>Get the number of display devices with the <span style="font-family: Courier New,Courier,monospace;">device_display_get_numbers()</span> function.
+               <p>The function requires the <span style="font-family: Courier New,Courier,monospace;">http://tizen.org/privilege/display</span> privilege.</p>
 <pre class="prettyprint">
 int error, num;
 error = device_display_get_numbers(&amp;num);
@@ -130,6 +131,7 @@ error = device_display_get_numbers(&amp;num);
                
                <li>Get the maximum brightness with the <span style="font-family: Courier New,Courier,monospace;">device_display_get_max_brightness()</span> function.
                <p>The function returns the maximum brightness value that can be set.</p>
+               <p>The function requires the <span style="font-family: Courier New,Courier,monospace;">http://tizen.org/privilege/display</span> privilege.</p>
 
 <pre class="prettyprint">
 int error, max;
@@ -137,7 +139,8 @@ error = device_display_get_max_brightness(0, &amp;max);
 </pre>
                </li>
                        
-               <li>Get and set the display brightness with the <span style="font-family: Courier New,Courier,monospace;">device_display_get_brightness()</span> and <span style="font-family: Courier New,Courier,monospace;">device_display_set_brightness()</span> functions:
+               <li>Get and set the display brightness with the <span style="font-family: Courier New,Courier,monospace;">device_display_get_brightness()</span> and <span style="font-family: Courier New,Courier,monospace;">device_display_set_brightness()</span> functions.
+               <p>The functions require the <span style="font-family: Courier New,Courier,monospace;">http://tizen.org/privilege/display</span> privilege.</p>
 
 <pre class="prettyprint">
 int error, brt;
@@ -148,7 +151,8 @@ error = device_display_set_brightness(0, 100);
                </li>
 
                <li>Get and set the display state with the <span style="font-family: Courier New,Courier,monospace;">device_display_get_state()</span> and <span style="font-family: Courier New,Courier,monospace;">device_display_change_state()</span> functions.
-<p>The <span style="font-family: Courier New,Courier,monospace;">display_state_e</span> enumerator (in <a href="../../../../org.tizen.native.mobile.apireference/group__CAPI__SYSTEM__DEVICE__DISPLAY__MODULE.html#ga93a9434f07b3db52ec85fe58b79c529f">mobile</a> and <a href="../../../../org.tizen.native.wearable.apireference/group__CAPI__SYSTEM__DEVICE__DISPLAY__MODULE.html#ga93a9434f07b3db52ec85fe58b79c529f">wearable</a> applications) defines the available display states.</p>
+               <p>The <span style="font-family: Courier New,Courier,monospace;">display_state_e</span> enumerator (in <a href="../../../../org.tizen.native.mobile.apireference/group__CAPI__SYSTEM__DEVICE__DISPLAY__MODULE.html#ga93a9434f07b3db52ec85fe58b79c529f">mobile</a> and <a href="../../../../org.tizen.native.wearable.apireference/group__CAPI__SYSTEM__DEVICE__DISPLAY__MODULE.html#ga93a9434f07b3db52ec85fe58b79c529f">wearable</a> applications) defines the available display states.</p>
+               <p>The <span style="font-family: Courier New,Courier,monospace;">device_display_change_state()</span> function requires the <span style="font-family: Courier New,Courier,monospace;">http://tizen.org/privilege/display</span> privilege.</p>
 <pre class="prettyprint">
 int error;
 display_state_e state;
@@ -172,6 +176,7 @@ error = device_display_change_state(DISPLAY_STATE_NORMAL);
 </li>
 
 <li>Get the number of haptic devices with the <span style="font-family: Courier New,Courier,monospace;">device_haptic_get_count()</span> function.
+<p>The function requires the <span style="font-family: Courier New,Courier,monospace;">http://tizen.org/privilege/haptic</span> privilege.</p>
 
 <pre class="prettyprint">
 int error, num;
@@ -182,6 +187,7 @@ error = device_haptic_get_count(&amp;num);
 <ol type="a">
 <li>Initialize the haptic device with the <span style="font-family: Courier New,Courier,monospace;">device_haptic_open()</span> function.
 <p>The function opens a haptic-vibration device and returns the handle to it. It makes a connection to the vibrator.</p>
+<p>The function requires the <span style="font-family: Courier New,Courier,monospace;">http://tizen.org/privilege/haptic</span> privilege.</p>
 <pre class="prettyprint">
 int error;
 haptic_device_h handle;
@@ -191,6 +197,7 @@ error = device_haptic_open(0, &amp;handle);
 
 <li>Play and stop an effect on the device with the <span style="font-family: Courier New,Courier,monospace;">device_haptic_vibrate()</span> and <span style="font-family: Courier New,Courier,monospace;">device_haptic_stop()</span> functions.
 <p>The device vibrates during specified time with a constant intensity. The effect handle can be 0.</p>
+<p>The functions require the <span style="font-family: Courier New,Courier,monospace;">http://tizen.org/privilege/haptic</span> privilege.</p>
 <pre class="prettyprint">
 int error;
 haptic_effect_h effect_handle;
@@ -202,6 +209,7 @@ error = device_haptic_stop(handle, &amp;effect_handle);
 
 <li>When no longer needed, uninitialize the haptic device with the <span style="font-family: Courier New,Courier,monospace;">device_haptic_close()</span> function.
 <p>The function closes the haptic handle and disconnects the connection to the vibrator.</p>
+<p>The function requires the <span style="font-family: Courier New,Courier,monospace;">http://tizen.org/privilege/haptic</span> privilege.</p>
 
 <pre class="prettyprint">
 int error;
@@ -225,6 +233,7 @@ error = device_haptic_close(0, handle);
 <ul>
 <li>Get the maximum brightness value of a torch LED with the <span style="font-family: Courier New,Courier,monospace;">device_flash_get_max_brightness()</span> function.
 <p>The function returns the maximum brightness value of the torch LED located next to the camera.</p>
+<p>The function requires the <span style="font-family: Courier New,Courier,monospace;">http://tizen.org/privilege/led</span> privilege.</p>
 <pre class="prettyprint">
 int error, max;
 error = device_flash_get_max_brightness(&amp;max);
@@ -232,6 +241,7 @@ error = device_flash_get_max_brightness(&amp;max);
 </li>
 
 <li>Get and set the current brightness value of a torch LED with the <span style="font-family: Courier New,Courier,monospace;">device_flash_get_brightness()</span> and <span style="font-family: Courier New,Courier,monospace;">device_flash_set_brightness()</span> functions.
+<p>The functions require the <span style="font-family: Courier New,Courier,monospace;">http://tizen.org/privilege/led</span> privilege.</p>
 
 <pre class="prettyprint">
 int error, val;
@@ -244,6 +254,7 @@ error = device_flash_set_brightness(1);
 <li>Play and stop a custom effect of the service LED with the <span style="font-family: Courier New,Courier,monospace;">device_led_play_custom()</span> and <span style="font-family: Courier New,Courier,monospace;">device_led_stop_custom()</span> functions.
 <p>The <span style="font-family: Courier New,Courier,monospace;">led_custom_flags</span> enumerator (in <a href="../../../../org.tizen.native.mobile.apireference/group__CAPI__SYSTEM__DEVICE__LED__MODULE.html#ga2065bc82e5ecf7e2acba8629c0d75e3b">mobile</a> and <a href="../../../../org.tizen.native.wearable.apireference/group__CAPI__SYSTEM__DEVICE__LED__MODULE.html#ga2065bc82e5ecf7e2acba8629c0d75e3b">wearable</a> applications) defines the available custom effects.</p>
 <p>The custom effect plays on the service LED that is located on the front of the device.</p>
+<p>The functions require the <span style="font-family: Courier New,Courier,monospace;">http://tizen.org/privilege/led</span> privilege.</p>
 
 <pre class="prettyprint">
 int error;
@@ -271,6 +282,7 @@ error = device_led_stop_custom();
 <p>The function locks the specific lock type for a specified time. After the given timeout, the lock type is unlocked automatically. If the process is destroyed, every lock is removed.</p>
 
 <p>The <span style="font-family: Courier New,Courier,monospace;">power_lock_e</span> enumerator (in <a href="../../../../org.tizen.native.mobile.apireference/group__CAPI__SYSTEM__DEVICE__POWER__MODULE.html#gabc47c58cfcfdaaba177f6004d6395af2">mobile</a> and <a href="../../../../org.tizen.native.wearable.apireference/group__CAPI__SYSTEM__DEVICE__POWER__MODULE.html#gabc47c58cfcfdaaba177f6004d6395af2">wearable</a> applications) defines the available lock types.</p>
+<p>The function requires the <span style="font-family: Courier New,Courier,monospace;">http://tizen.org/privilege/display</span> privilege.</p>
 
 <pre class="prettyprint">
 int error;
@@ -280,6 +292,7 @@ error = device_power_request_lock(POWER_LOCK_CPU, 0);
 
 <li>Unlock the power state with the <span style="font-family: Courier New,Courier,monospace;">device_power_release_lock()</span> function.
 <p>The function releases the specific lock type locked before.</p>
+<p>The function requires the <span style="font-family: Courier New,Courier,monospace;">http://tizen.org/privilege/display</span> privilege.</p>
 <pre class="prettyprint">
 int error;
 error = device_power_release_lock(POWER_LOCK_CPU);