From: Jiwon Park Date: Mon, 27 Apr 2015 10:12:17 +0000 (+0900) Subject: JIRA TNEF-1421 [Doc][Social] Contacts tutorial issues X-Git-Tag: tizen_3.0/TD_SYNC/20161201~854^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fe3d40f481c1c97260741318b4798988fb13d2a5;p=sdk%2Fonline-doc.git JIRA TNEF-1421 [Doc][Social] Contacts tutorial issues Change-Id: Ib0fb7e444a2b4e10d3f4bdca798be921ab8ff0e0 Signed-off-by: Jiwon Park --- diff --git a/org.tizen.tutorials/html/native/social/contact_tutorial_n.htm b/org.tizen.tutorials/html/native/social/contact_tutorial_n.htm index 51edc66..5de627c 100644 --- a/org.tizen.tutorials/html/native/social/contact_tutorial_n.htm +++ b/org.tizen.tutorials/html/native/social/contact_tutorial_n.htm @@ -157,8 +157,6 @@
  • Speed dials
  • Phone logs
      -
    • Initializing the Phone Log -

      Initialize the phone log for use.

    • Creating a Log

      Create a new log.

    • Setting Log Properties @@ -515,14 +511,13 @@ static contacts_gl_person_data_t* _create_gl_person_data(contacts_record_h recor

      You can get the associated contacts of a person by query. In this example, you get the associated contact records.

      static bool _get_associated_contacts(contacts_record_h record, contacts_list_h *associated_contacts)
       {
      -   int error_code;
      +   int error_code = CONTACTS_ERROR_NONE;
          int person_id;
          contacts_query_h query = NULL;
          contacts_filter_h filter = NULL;
       
          error_code = contacts_record_get_int(record, _contacts_person.id, &person_id);
       
      -   error_code = CONTACTS_ERROR_NONE;
          error_code += contacts_query_create(_contacts_contact._uri, &query);
          error_code += contacts_filter_create(_contacts_contact._uri, &filter);
          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);
       
    • To remove a contact from a group, call contacts_group_remove_contact(). -
      int contact_id = ... // Acquire contact ID
      -int group_id = ... // Acquire group ID
      -
      +
       error_code = contacts_group_remove_contact(group_id, contact_id);
       
    • To get a list of persons assigned to a specific group:
      1. Get the records of type _contacts_person_group_assigned: -
        int group_id = ... // Acquire group ID
        -
        +
         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
         }
      2. -
      3. -
        -

        Initializing the Speed Dial Feature

        -Hide -
        -
        -

        To start with the Contact Service:

        -
          -
        1. -

          To use the functions and data types of the Contacts API, include the <contacts.h> header file in your application:

          -
          -#include <contacts.h>
          -
        2. -
        3. Most API functions return error codes, therefore define the int type at the beginning of your code. The int type is used to store error codes. Each time when a function returns error codes, verify the result of the operation.
        4. -
        5. Call the contacts_connect() function, which connects your application to the Contact Service. Without this function, you cannot access the Contacts database. -
          -int error_code;
          -error_code = contacts_connect();
          -if (error_code != CONTACTS_ERROR_NONE)
          -   dlog_print(DLOG_ERROR, LOG_TAG, "contacts connect failed: %x", error_code);
          -
          -
        6. -
        7. When the Contacts APIs are not needed anymore, disconnect from the service using the contacts_disconnect() function: -
          -error_code = contacts_disconnect();
          -
          -
        8. -
        -
        -
      4. Creating a Speed Dial

        @@ -1937,40 +1899,7 @@ error_code = contacts_db_delete_record(_contacts_speeddial._uri, speeddial_numbe
      5. -
      6. -
        -

        Initializing the Phone Log

        -Hide -
        -
        -

        To start with the Contact Service:

        -
          -
        1. -

          To use the functions and data types of the Contacts API, include the <contacts.h> header file in your application:

          -
          -#include <contacts.h>
          -
        2. -
        3. Most of the API functions return error codes, therefore define at the beginning of your code the int type, which is used to store error codes. Each time when a function returns error codes, verify the result of the operation.
        4. -
        5. Call the contacts_connect() function, which connects your application with the Contact Service. Without this function, you cannot get access to the Contacts database. -
          -int error_code;
          -error_code = contacts_connect();
          -if (error_code != CONTACTS_ERROR_NONE)
          -   dlog_print(DLOG_ERROR, LOG_TAG, "contacts connect failed: %x", error_code);
          -
          -
        6. -
        7. When the Contacts APIs are not needed anymore, disconnect from the service using the contacts_disconnect() function: -
          -error_code = contacts_disconnect();
          -if (error_code != CONTACTS_ERROR_NONE)
          -   dlog_print(DLOG_ERROR, LOG_TAG, "contacts connect failed: %x", error_code);
          -
          -
        8. -
        - -
        -
      7. Creating a Log

        @@ -3476,4 +3405,4 @@ var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga - \ No newline at end of file +