Remove Non-public APIs
authorTaejin Woo <tt.woo@samsung.com>
Tue, 4 Aug 2015 07:38:43 +0000 (16:38 +0900)
committerTaejin Woo <tt.woo@samsung.com>
Tue, 4 Aug 2015 07:38:43 +0000 (16:38 +0900)
Change-Id: I4a128e7aa499457097d6be2a9c9662502c9304b8
Signed-off-by: Taejin Woo <tt.woo@samsung.com>
org.tizen.tutorials/html/native/network/bluetooth_tutorial_n.htm

index 3c524f4..6902971 100644 (file)
@@ -42,7 +42,6 @@
                        </li>
                        <li>Bluetooth LE 
                                <ul class="toc">
-                                       <li><a href="#le_adapter">Enabling the Bluetooth LE Adapter and Checking its State</a></li>
                                        <li><a href="#le_scan">Managing Bluetooth LE Scans</a></li>
                                        <li><a href="#add_adv_data">Adding Advertising Data to the LE Advertisement</a></li>
                                        <li><a href="#set_adv_conn">Setting the Advertising Connectable Mode</a></li>
@@ -97,8 +96,6 @@
                                <li>Bluetooth LE 
                                <ul>
                                        
-                                       <li><a href="#le_adapter">Enabling the Bluetooth LE Adapter and Checking its State</a>
-                                       <p>Ensure that the Bluetooth LE (BLE) adapter is enabled.</p></li>
                                        <li><a href="#le_scan">Managing Bluetooth LE Scans</a>
                                        <p>Start the scan, handle the scanning results, and stop the scan.</p></li>
                                        <li><a href="#add_adv_data">Adding Advertising Data to the LE Advertisement</a>
@@ -873,14 +870,10 @@ bool __bt_gatt_client_foreach_svc_cb(int total, int index, bt_gatt_h svc_handle,
 &nbsp;&nbsp;&nbsp;int test_id = (int)data;
 &nbsp;&nbsp;&nbsp;int ret;
 &nbsp;&nbsp;&nbsp;char *uuid = NULL;
-&nbsp;&nbsp;&nbsp;char *str = NULL;
 
 &nbsp;&nbsp;&nbsp;bt_gatt_get_uuid(svc_handle, &amp;uuid);
-&nbsp;&nbsp;&nbsp;bt_gatt_get_uuid_specification_name(uuid, &amp;str);
+&nbsp;&nbsp;&nbsp;dlog_print(DLOG_INFO, LOG_TAG, &quot;[%d / %d] uuid : (%s)&quot;, index, total, uuid);
 
-&nbsp;&nbsp;&nbsp;dlog_print(DLOG_INFO, LOG_TAG, &quot;[%d / %d] %s (%s)&quot;, index, total, str ? str : &quot;Unknown&quot;, uuid);
-
-&nbsp;&nbsp;&nbsp;g_free(str);
 &nbsp;&nbsp;&nbsp;g_free(uuid);
 
 &nbsp;&nbsp;&nbsp;if (test_id == BT_UNIT_TEST_FUNCTION_GATT_CLIENT_PRINT_ALL) 
@@ -904,15 +897,12 @@ bool __bt_gatt_client_foreach_chr_cb(int total, int index, bt_gatt_h chr_handle,
 {
 &nbsp;&nbsp;&nbsp;int ret;
 &nbsp;&nbsp;&nbsp;char *uuid = NULL;
-&nbsp;&nbsp;&nbsp;char *str = NULL;
 
 &nbsp;&nbsp;&nbsp;bt_gatt_get_uuid(chr_handle, &amp;uuid);
-&nbsp;&nbsp;&nbsp;bt_gatt_get_uuid_specification_name(uuid, &amp;str);
 
-&nbsp;&nbsp;&nbsp;dlog_print(DLOG_INFO, LOG_TAG, &quot;\t[%d / %d] %s (%s)&quot;, index, total, str ? str : &quot;Unknown&quot;, uuid);
+&nbsp;&nbsp;&nbsp;dlog_print(DLOG_INFO, LOG_TAG, &quot;\t[%d / %d] uuid : (%s)&quot;, index, total, uuid);
 &nbsp;&nbsp;&nbsp;__bt_gatt_client_print_value(chr_handle);
 
-&nbsp;&nbsp;&nbsp;g_free(str);
 &nbsp;&nbsp;&nbsp;g_free(uuid);
 
 &nbsp;&nbsp;&nbsp;ret = bt_gatt_characteristic_foreach_descriptors(chr_handle,
@@ -929,12 +919,10 @@ bool __bt_gatt_client_foreach_chr_cb(int total, int index, bt_gatt_h chr_handle,
 bool __bt_gatt_client_foreach_desc_cb(int total, int index, bt_gatt_h desc_handle, void *data)
 {
 &nbsp;&nbsp;&nbsp;char *uuid = NULL;
-&nbsp;&nbsp;&nbsp;char *str = NULL;
 
 &nbsp;&nbsp;&nbsp;bt_gatt_get_uuid(desc_handle, &amp;uuid);
-&nbsp;&nbsp;&nbsp;bt_gatt_get_uuid_specification_name(uuid, &amp;str);
 
-&nbsp;&nbsp;&nbsp;dlog_print(DLOG_INFO, LOG_TAG, &quot;\t\t[%d / %d] %s (%s)&quot;, index, total, str ? str : &quot;Unknown&quot;, uuid);
+&nbsp;&nbsp;&nbsp;dlog_print(DLOG_INFO, LOG_TAG, &quot;\t\t[%d / %d] uuid : (%s)&quot;, index, total, uuid);
 &nbsp;&nbsp;&nbsp;__bt_gatt_client_print_value(desc_handle);
 
 &nbsp;&nbsp;&nbsp;g_free(str);
@@ -1013,13 +1001,11 @@ bool __bt_gatt_client_foreach_desc_cb(int total, int index, bt_gatt_h desc_handl
 void __bt_gatt_client_read_complete_cb(int result, bt_gatt_h gatt_handle, void *data)
 {
 &nbsp;&nbsp;&nbsp;char *uuid = NULL;
-&nbsp;&nbsp;&nbsp;char *str = NULL;
 
 &nbsp;&nbsp;&nbsp;bt_gatt_get_uuid(gatt_handle, &amp;uuid);
-&nbsp;&nbsp;&nbsp;bt_gatt_get_uuid_specification_name(uuid, &amp;str);
 
-&nbsp;&nbsp;&nbsp;dlog_print(DLOG_INFO, LOG_TAG, &quot;Read %s for %s (%s)&quot;, 
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;result == BT_ERROR_NONE ? &quot;Success&quot; : &quot;Fail&quot;, str ? str : &quot;Unknown&quot;, uuid);
+&nbsp;&nbsp;&nbsp;dlog_print(DLOG_INFO, LOG_TAG, &quot;Read %s for uuid : (%s)&quot;,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;result == BT_ERROR_NONE ? &quot;Success&quot; : &quot;Fail&quot;, uuid);
 
 &nbsp;&nbsp;&nbsp;g_free(str);
 &nbsp;&nbsp;&nbsp;g_free(uuid);
@@ -1121,13 +1107,11 @@ void __bt_gatt_client_read_complete_cb(int result, bt_gatt_h gatt_handle, void *
 void __bt_gatt_client_write_complete_cb(int result, bt_gatt_h gatt_handle, void *data)
 {
 &nbsp;&nbsp;&nbsp;char *uuid = NULL;
-&nbsp;&nbsp;&nbsp;char *str = NULL;
 
 &nbsp;&nbsp;&nbsp;bt_gatt_get_uuid(gatt_handle, &amp;uuid);
-&nbsp;&nbsp;&nbsp;bt_gatt_get_uuid_specification_name(uuid, &amp;str);
 
-&nbsp;&nbsp;&nbsp;dlog_print(DLOG_INFO, LOG_TAG, &quot;Write %s for %s (%s)&quot;, 
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;result == BT_ERROR_NONE ? &quot;Success&quot; : &quot;Fail&quot;, str ? str : &quot;Unknown&quot;, uuid);
+&nbsp;&nbsp;&nbsp;dlog_print(DLOG_INFO, LOG_TAG, &quot;Write %s for uuid : (%s)&quot;,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;result == BT_ERROR_NONE ? &quot;Success&quot; : &quot;Fail&quot;, uuid);
 
 &nbsp;&nbsp;&nbsp;g_free(str);
 &nbsp;&nbsp;&nbsp;g_free(uuid);
@@ -1308,36 +1292,6 @@ if (ret != BLUETOOTH_ERROR_NONE)
 
        
        
-       <h2 id="le_adapter" name="le_adapter">Enabling the Bluetooth LE Adapter and Checking its State</h2>
-       
-       <p>In order to communicate with the remote device or to perform BLE (Bluetooth LE) operations on the local device, the LE adapter must be enabled. The device user can enable or disable BLE in the device with an ON/OFF button. The procedure applies to both basic rate and enhanced data rate (BR/EDR).</p>
-
-  <p class="figure">Figure: Bluetooth ON/OFF button</p> 
-  <p align="center"><img alt="Bluetooth ON/OFF button" src="../../images/bluetooth_onoff.png" /></p>   
-       
-       <p>To check whether the BLE adapter is enabled, retrieve the adapter state:</p>
-       
-<pre class="prettyprint">
-bt_adapter_le_state_e  le_adapter_state;
-// Check whether BLE is enabled
-ret = bt_adapter_get_le_state(&amp;le_adapter_state);
-
-if (ret != BT_ERROR_NONE)
-{
-&nbsp;&nbsp;&nbsp;dlog_print(DLOG_ERROR, LOG_TAG, &quot;[bt_adapter_le_get_state] Failed&quot;);
-
-&nbsp;&nbsp;&nbsp;return;
-}
-
-// If the Bluetooth service is disabled
-if (le_adapter_state == BT_ADAPTER_DISABLED) 
-{
-&nbsp;&nbsp;&nbsp;dlog_print(DLOG_ERROR, LOG_TAG, &quot;Bluetooth LE adapter is not enabled. You should enable Bluetooth!!&quot;);
-}
-</pre>
-<p>To monitor the changes in the LE adapter and BLE states, define and register the appropriate callback functions.</p>
-
-       
        <h2 id="le_scan" name="le_scan">Managing Bluetooth LE Scans</h2>
        
        <p>To discover nearby LE devices, perform a scan:</p>
@@ -1783,4 +1737,4 @@ var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga
 </script>
 
  </body>
-</html>
\ No newline at end of file
+</html>