JIRA TNEF-1421 [Doc][Social] Contacts tutorial issues
authorJiwon Park <jiwon44.park@samsung.com>
Mon, 27 Apr 2015 10:12:17 +0000 (19:12 +0900)
committerJiwon Park <jiwon44.park@samsung.com>
Mon, 27 Apr 2015 10:12:31 +0000 (19:12 +0900)
Change-Id: Ib0fb7e444a2b4e10d3f4bdca798be921ab8ff0e0
Signed-off-by: Jiwon Park <jiwon44.park@samsung.com>
org.tizen.tutorials/html/native/social/contact_tutorial_n.htm

index 51edc66..5de627c 100644 (file)
                                </ul></li>
                        <li>Speed dials 
                                <ul>
-                               <li><a class="opensection" href="#sd_init">Initializing the Speed Dial Feature</a>
-                               <p>Initialize the speed dial feature for use.</p></li>
                                <li><a class="opensection" href="#sd_create">Creating a Speed Dial</a>
                                <p>Create a new speed dial.</p></li>
                                <li><a class="opensection" href="#sd_set">Setting Speed Dial Properties</a>
                                </ul></li>
                        <li>Phone logs  
                                <ul>
-                               <li><a class="opensection" href="#pl_init">Initializing the Phone Log</a>
-                               <p>Initialize the phone log for use.</p></li>
                                <li><a class="opensection" href="#pl_create">Creating a Log</a>
                                <p>Create a new log.</p></li>
                                <li><a class="opensection" href="#pl_set">Setting Log Properties</a>
@@ -515,14 +511,13 @@ static contacts_gl_person_data_t* _create_gl_person_data(contacts_record_h recor
 <p>You can get the associated contacts of a person by query. In this example, you get the associated contact records.</p>
 <pre class="prettyprint">static bool _get_associated_contacts(contacts_record_h record, contacts_list_h *associated_contacts)
 {
-&nbsp;&nbsp;&nbsp;int error_code;
+&nbsp;&nbsp;&nbsp;int error_code = CONTACTS_ERROR_NONE;
 &nbsp;&nbsp;&nbsp;int person_id;
 &nbsp;&nbsp;&nbsp;contacts_query_h query = NULL;
 &nbsp;&nbsp;&nbsp;contacts_filter_h filter = NULL;
 
 &nbsp;&nbsp;&nbsp;error_code = contacts_record_get_int(record, _contacts_person.id, &amp;person_id);
 
-&nbsp;&nbsp;&nbsp;error_code = CONTACTS_ERROR_NONE;
 &nbsp;&nbsp;&nbsp;error_code += contacts_query_create(_contacts_contact._uri, &amp;query);
 &nbsp;&nbsp;&nbsp;error_code += contacts_filter_create(_contacts_contact._uri, &amp;filter);
 &nbsp;&nbsp;&nbsp;error_code += contacts_filter_add_int(filter, _contacts_contact.person_id, CONTACTS_MATCH_EQUAL, person_id);
@@ -1317,16 +1312,13 @@ int group_id = ... // Acquire group ID
 error_code = contacts_group_add_contact(group_id, contact_id);
 </pre></li>
 <li>To remove a contact from a group, call <span style="font-family: Courier New,Courier,monospace">contacts_group_remove_contact()</span>.
-<pre class="prettyprint">int contact_id = ... // Acquire contact ID
-int group_id = ... // Acquire group ID
-
+<pre class="prettyprint">
 error_code = contacts_group_remove_contact(group_id, contact_id);
 </pre></li>
 
 <li>To get a list of persons assigned to a specific group:
 <ol><li>Get the records of type <span style="font-family: Courier New,Courier,monospace">_contacts_person_group_assigned</span>:
-<pre class="prettyprint">int group_id = ... // Acquire group ID
-
+<pre class="prettyprint">
 contacts_query_h query = NULL;
 contacts_filter_h filter = NULL;
 contacts_list_h list = NULL;
@@ -1471,37 +1463,7 @@ error_code = contacts_vcard_parse_to_contact_foreach(temp_path, // File path of
 }</pre>
        </div>
                </li>
-<li>
-                       <div class="devicespec-tit">
- <h2 id="sd_init" name="sd_init" class="items-tit-h2">Initializing the Speed Dial Feature</h2>
-<span class="fr"><a href="#" class="bt-arr"><em>Hide</em></a></span>
-  </div>
-                       <div class="devicespec-con"> 
-<p>To start with the Contact Service:</p>
-<ol>
-<li>                   
-<p>To use the functions and data types of the <a href="../../../../org.tizen.native.mobile.apireference/group__CAPI__SOCIAL__CONTACTS__SVC__MODULE.html">Contacts</a> API, include the <span style="font-family: Courier New,Courier,monospace">&lt;contacts.h&gt;</span> header file in your application:</p>
-<pre class="prettyprint">
-#include &lt;contacts.h&gt;
-</pre></li>    
-<li>Most API functions return error codes, therefore define the <span style="font-family: Courier New,Courier,monospace">int</span> type at the beginning of your code. The <span style="font-family: Courier New,Courier,monospace">int</span> type is used to store error codes. Each time when a function returns error codes, verify the result of the operation.</li>
-<li>Call the <span style="font-family: Courier New,Courier,monospace">contacts_connect()</span> function, which connects your application to the Contact Service. Without this function, you cannot access the Contacts database.
-<pre class="prettyprint">
-int error_code;
-error_code = contacts_connect();
-if (error_code != CONTACTS_ERROR_NONE)
-&nbsp;&nbsp;&nbsp;dlog_print(DLOG_ERROR, LOG_TAG, &quot;contacts connect failed: %x&quot;, error_code);
-</pre>
-</li>
 
-<li>When the Contacts APIs are not needed anymore, disconnect from the service using the <span style="font-family: Courier New,Courier,monospace">contacts_disconnect()</span> function: 
-<pre class="prettyprint">
-error_code = contacts_disconnect();
-</pre>
-</li>
-</ol>
-       </div>
-               </li>           
 <li>
                        <div class="devicespec-tit">
  <h2 id="sd_create" name="sd_create" class="items-tit-h2">Creating a Speed Dial</h2>
@@ -1937,40 +1899,7 @@ error_code = contacts_db_delete_record(_contacts_speeddial._uri, speeddial_numbe
 </pre>
        </div>
                </li>   
-<li>
-                       <div class="devicespec-tit">
- <h2 id="pl_init" name="pl_init" class="items-tit-h2">Initializing the Phone Log</h2>
-<span class="fr"><a href="#" class="bt-arr"><em>Hide</em></a></span>
-  </div>
-                       <div class="devicespec-con"> 
-<p>To start with the Contact Service:</p>
-<ol>
-<li>                   
-<p>To use the functions and data types of the <a href="../../../../org.tizen.native.mobile.apireference/group__CAPI__SOCIAL__CONTACTS__SVC__MODULE.html">Contacts</a> API, include the <span style="font-family: Courier New,Courier,monospace">&lt;contacts.h&gt;</span> header file in your application:</p>
-<pre class="prettyprint">
-#include &lt;contacts.h&gt;
-</pre></li>    
-<li>Most of the API functions return error codes, therefore define at the beginning of your code the <span style="font-family: Courier New,Courier,monospace">int</span> type, which is used to store error codes. Each time when a function returns error codes, verify the result of the operation.</li>
-<li>Call the <span style="font-family: Courier New,Courier,monospace">contacts_connect()</span> function, which connects your application with the Contact Service. Without this function, you cannot get access to the Contacts database.
-<pre class="prettyprint">
-int error_code;
-error_code = contacts_connect();
-if (error_code != CONTACTS_ERROR_NONE)
-&nbsp;&nbsp;&nbsp;dlog_print(DLOG_ERROR, LOG_TAG, &quot;contacts connect failed: %x&quot;, error_code);
-</pre>
-</li>
 
-<li>When the Contacts APIs are not needed anymore, disconnect from the service using the <span style="font-family: Courier New,Courier,monospace">contacts_disconnect()</span> function: 
-<pre class="prettyprint">
-error_code = contacts_disconnect();
-if (error_code != CONTACTS_ERROR_NONE)
-&nbsp;&nbsp;&nbsp;dlog_print(DLOG_ERROR, LOG_TAG, &quot;contacts connect failed: %x&quot;, error_code);
-</pre>
-</li>
-</ol>
-
-       </div>
-               </li>           
                <li>
                        <div class="devicespec-tit">
  <h2 id="pl_create" name="pl_create" class="items-tit-h2">Creating a Log</h2>
@@ -3476,4 +3405,4 @@ var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga
 </script>
 
 </body>
-</html>
\ No newline at end of file
+</html>