Apply coding rule phase2 58/64458/3
authorJeesun Kim <iamjs.kim@samsung.com>
Fri, 1 Apr 2016 08:45:46 +0000 (17:45 +0900)
committerJeesun Kim <iamjs.kim@samsung.com>
Fri, 1 Apr 2016 10:27:22 +0000 (19:27 +0900)
Change-Id: I09b3f11ee66590d60977a79f0778093a35cb2a09

12 files changed:
client/ctsvc_client_person_helper.c
common/ctsvc_internal.h
common/ctsvc_record.h
common/ctsvc_view.c
common/ctsvc_view.h
doc/contacts_doc.h
include/contacts_db.h
include/contacts_filter.h
include/contacts_person.h
include/contacts_types.h
server/db/ctsvc_db_plugin_sip_helper.c
server/db/ctsvc_db_sqlite.h

index 458d3fb..88ff1b2 100644 (file)
@@ -507,7 +507,7 @@ int ctsvc_client_person_get_aggregation_suggestions(contacts_h contact,
        pims_ipc_data_h outdata = NULL;
 
        RETV_IF(NULL == contact, CONTACTS_ERROR_INVALID_PARAMETER);
-       RETV_IF(person_id <= 0 ||NULL == out_list, CONTACTS_ERROR_INVALID_PARAMETER);
+       RETV_IF(person_id <= 0 || NULL == out_list, CONTACTS_ERROR_INVALID_PARAMETER);
 
        /* make indata */
        indata = pims_ipc_data_create(0);
index 1155bf6..9ef24a2 100644 (file)
@@ -84,8 +84,8 @@
                if (expr) { \
                        ERR("(%s)", #expr); \
                        return; \
-               }\
-       } while(0)
+               } \
+       } while (0)
 
 #define RETV_IF(expr, val) \
        do { \
index c304b13..f6e272f 100644 (file)
@@ -52,7 +52,7 @@ static inline int ctsvc_record_copy_base(ctsvc_record_s *dest, ctsvc_record_s *s
                (base)->property_max_count = 0;\
                (base)->properties_flags = NULL;\
                (base)->property_flag = 0;\
-       }\
+       } \
 } while (0)
 
 int ctsvc_record_set_property_flag(ctsvc_record_s *_record, int property_id, contacts_property_flag_e flag);
index 3215650..f079469 100644 (file)
@@ -646,7 +646,7 @@ API const _contacts_contact_activity_property_ids _contacts_contact_activity = {
        .account_id             = CTSVC_PROPERTY_ADDRESSBOOK_ACCOUNT_ID,
 };
 
-API const _contacts_sip_property_ids _contacts_sip= {
+API const _contacts_sip_property_ids _contacts_sip = {
        ._uri           = CTSVC_VIEW_URI_SIP,
        .id         = CTSVC_PROPERTY_SIP_ID,
        .contact_id     = CTSVC_PROPERTY_SIP_CONTACT_ID,
index eb41982..8519786 100644 (file)
@@ -74,8 +74,7 @@
 #define CTSVC_VIEW_URI_READ_ONLY_PHONELOG_STAT "tizen.contacts_view.phonelog_stat"
 
 
-typedef enum
-{
+typedef enum {
        CTSVC_PROPERTY_FLAG_PROJECTION = 0x00000001,
        CTSVC_PROPERTY_FLAG_DIRTY = 0x00000002,  /* for dirty bit */
 } contacts_property_flag_e;
@@ -89,7 +88,7 @@ typedef enum
 #define CTSVC_VIEW_DATA_TYPE_STR 0x00040000
 #define CTSVC_VIEW_DATA_TYPE_DOUBLE 0x00050000
 #define CTSVC_VIEW_DATA_TYPE_REC 0x00060000
-#define CTSVC_VIEW_CHECK_DATA_TYPE(property_id,data_type) \
+#define CTSVC_VIEW_CHECK_DATA_TYPE(property_id, data_type) \
        ((property_id&CTSVC_VIEW_DATA_TYPE_MASK) == data_type ? true : false)
 
 #define CTSVC_READ_WRITE_TYPE_MASK 0x0000F000
@@ -133,7 +132,7 @@ typedef enum
 #define CTSVC_PROPERTY_ACTIVITY_PHOTO 0x02100000
 #define CTSVC_PROPERTY_SIP 0x02200000
 
-#define CTSVC_PROPERTY_CHECK(property_id,data_type) \
+#define CTSVC_PROPERTY_CHECK(property_id, data_type) \
        ((property_id & CTSVC_PROPERTY_MASK) == data_type ? true : false)
 
 #define CTSVC_SEARCH_PROPERTY_MASK 0xF0000000
@@ -141,7 +140,7 @@ typedef enum
 #define CTSVC_SEARCH_PROPERTY_FILTER 0x20000000
 #define CTSVC_SEARCH_PROPERTY_PROJECTION 0x30000000
 #define CTSVC_SEARCH_PROPERTY_ALL 0x40000000
-#define CTSVC_SEARCH_PROPERTY_CHECK(property_id,data_type) \
+#define CTSVC_SEARCH_PROPERTY_CHECK(property_id, data_type) \
        ((property_id & CTSVC_SEARCH_PROPERTY_MASK) == data_type ? true : false)
 
 typedef enum {
index 7dc2fda..bf91911 100644 (file)
@@ -73,9 +73,9 @@
  * - Address book
  *   - Represents where contacts and groups should belong to
  *   - Created by one of contacts sources below
- *     - Local device, which has no account
- *     - Service providers such as Google or Yahoo, with account
- *     - Applications like ChatON, Joyn, Facebook, etc.
+ *      - Local device, which has no account
+ *      - Service providers such as Google or Yahoo, with account
+ *      - Applications like ChatON, Joyn, Facebook, etc.
  * - Group
  *   - Grouped contacts on a same address book
  *   - Groups and contacts have many-to-many relationship
index 9d5a0fc..4d8b5a1 100644 (file)
@@ -47,8 +47,7 @@ extern "C"
  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.4 @endif
  *
  */
-typedef enum
-{
+typedef enum {
        CONTACTS_CHANGE_INSERTED,       /**< Inserted */
        CONTACTS_CHANGE_UPDATED,        /**< Updated */
        CONTACTS_CHANGE_DELETED,        /**< Deleted */
index bc240ee..2b78f33 100644 (file)
@@ -48,8 +48,7 @@ extern "C"
  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.4 @endif
  *
  */
-typedef enum
-{
+typedef enum {
        CONTACTS_MATCH_EXACTLY,         /**< Full string, case-sensitive */
        CONTACTS_MATCH_FULLSTRING,      /**< Full string, case-insensitive */
        CONTACTS_MATCH_CONTAINS,        /**< Sub string, case-insensitive */
@@ -64,8 +63,7 @@ typedef enum
  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.4 @endif
  *
  */
-typedef enum
-{
+typedef enum {
        CONTACTS_MATCH_EQUAL,                   /**< '=' */
        CONTACTS_MATCH_GREATER_THAN,            /**< '>' */
        CONTACTS_MATCH_GREATER_THAN_OR_EQUAL,   /**< '>=' */
index b5f333a..fc325af 100644 (file)
@@ -200,8 +200,7 @@ typedef enum {
  *
  * @see  contacts_connect()
  */
-int contacts_person_set_default_property(contacts_person_property_e property,
-               int person_id,int id);
+int contacts_person_set_default_property(contacts_person_property_e property, int person_id, int id);
 
 /**
  * @brief Gets a default property for a record.
index ef31b40..b902974 100644 (file)
@@ -54,7 +54,7 @@ extern "C"
 
 #define _CONTACTS_END_READ_ONLY_VIEW(name) _CONTACTS_END_VIEW(name)
 
-#define _CONTACTS_HANDLE(A) typedef struct __##A{}* A;
+#define _CONTACTS_HANDLE(A) typedef struct __##A{} * A;
 
 _CONTACTS_HANDLE(contacts_record_h)
 _CONTACTS_HANDLE(contacts_filter_h)
@@ -101,7 +101,7 @@ typedef enum {
        CONTACTS_NUMBER_TYPE_RADIO = 1<<15,         /**< A radio phone number */
        CONTACTS_NUMBER_TYPE_MAIN = 1<<29,          /**< An additional type for main */
        CONTACTS_NUMBER_TYPE_ASSISTANT = 1<<30,     /**< An additional type for assistant */
-}contacts_number_type_e;
+} contacts_number_type_e;
 
 /**
  * @brief Enumeration for Contact email type.
@@ -115,7 +115,7 @@ typedef enum {
        CONTACTS_EMAIL_TYPE_HOME = 1<<1,    /**< An email address associated with a residence */
        CONTACTS_EMAIL_TYPE_WORK = 1<<2,    /**< An email address associated with a place of work */
        CONTACTS_EMAIL_TYPE_MOBILE = 1<<3,  /**< A mobile email address */
-}contacts_email_type_e;
+} contacts_email_type_e;
 
 /**
  * @brief Enumeration for Contact company type.
@@ -127,7 +127,7 @@ typedef enum {
        CONTACTS_COMPANY_TYPE_OTHER,            /**< Other company type */
        CONTACTS_COMPANY_TYPE_CUSTOM = 1<<0,    /**< Custom company type */
        CONTACTS_COMPANY_TYPE_WORK = 1<<1,      /**< Work company type */
-}contacts_company_type_e;
+} contacts_company_type_e;
 
 /**
  * @brief Enumeration for Contact address type.
@@ -144,7 +144,7 @@ typedef enum {
        CONTACTS_ADDRESS_TYPE_INTL = 1<<4,      /**< An international delivery address */
        CONTACTS_ADDRESS_TYPE_POSTAL = 1<<5,    /**< A postal delivery address */
        CONTACTS_ADDRESS_TYPE_PARCEL = 1<<6,    /**< A parcel delivery address */
-}contacts_address_type_e;
+} contacts_address_type_e;
 
 /**
  * @brief Enumeration for Contact URL type.
@@ -157,7 +157,7 @@ typedef enum {
        CONTACTS_URL_TYPE_CUSTOM,   /**< Custom URL type */
        CONTACTS_URL_TYPE_HOME,     /**< Home URL type */
        CONTACTS_URL_TYPE_WORK,     /**< Work URL type */
-}contacts_url_type_e;
+} contacts_url_type_e;
 
 /**
  * @brief Enumeration for Contact messenger type.
@@ -178,7 +178,7 @@ typedef enum {
        CONTACTS_MESSENGER_TYPE_JABBER,     /**< Jabber type */
        CONTACTS_MESSENGER_TYPE_SKYPE,      /**< Skype type */
        CONTACTS_MESSENGER_TYPE_IRC,        /**< IRC type */
-}contacts_messenger_type_e;
+} contacts_messenger_type_e;
 
 /**
  * @brief Enumeration for Call history type.
@@ -211,7 +211,7 @@ typedef enum {
        CONTACTS_PLOG_TYPE_EMAIL_RECEIVED = 201,        /**< Received email */
        CONTACTS_PLOG_TYPE_EMAIL_SENT = 202,            /**< Sent email */
 
-}contacts_phone_log_type_e;
+} contacts_phone_log_type_e;
 
 /**
  * @brief Enumeration for Contact event type.
@@ -224,7 +224,7 @@ typedef enum {
        CONTACTS_EVENT_TYPE_CUSTOM,         /**< Custom event type */
        CONTACTS_EVENT_TYPE_BIRTH,          /**< Birthday event type */
        CONTACTS_EVENT_TYPE_ANNIVERSARY     /**< Anniversary event type */
-}contacts_event_type_e;
+} contacts_event_type_e;
 
 /**
  * @brief Enumeration for Contact event calendar type.
@@ -233,9 +233,9 @@ typedef enum {
  *
  */
 typedef enum {
-       CONTACTS_EVENT_CALENDAR_TYPE_GREGORIAN,         /**< Gregorian calendar */
+       CONTACTS_EVENT_CALENDAR_TYPE_GREGORIAN,     /**< Gregorian calendar */
        CONTACTS_EVENT_CALENDAR_TYPE_CHINESE            /**< Chinese calenadr */
-}contacts_event_calendar_type_e;
+} contacts_event_calendar_type_e;
 
 /**
  * @brief Enumeration of Contact image type
@@ -246,7 +246,7 @@ typedef enum {
 typedef enum {
        CONTACTS_IMAGE_TYPE_OTHER,       /**< Other type */
        CONTACTS_IMAGE_TYPE_CUSTOM,      /**< Custom type */
-}contacts_image_type_e;
+} contacts_image_type_e;
 
 /**
  * @brief Enumeration for usage type.
@@ -266,7 +266,7 @@ typedef enum {
        CONTACTS_USAGE_STAT_TYPE_REJECTED_CALL, /**< Rejected call (Since 3.0) */
        CONTACTS_USAGE_STAT_TYPE_BLOCKED_CALL, /**< Blocked call (Since 3.0) */
        CONTACTS_USAGE_STAT_TYPE_BLOCKED_MSG /**< Blocked message (Since 3.0) */
-}contacts_usage_type_e;
+} contacts_usage_type_e;
 
 /**
  * @brief Enumeration for Contact display name source type.
@@ -281,7 +281,7 @@ typedef enum {
        CONTACTS_DISPLAY_NAME_SOURCE_TYPE_NICKNAME,     /**< Produced display name from nickname record */
        CONTACTS_DISPLAY_NAME_SOURCE_TYPE_COMPANY,      /**< Produced display name from company record */
        CONTACTS_DISPLAY_NAME_SOURCE_TYPE_NAME,         /**< Produced display name from name record */
-}contacts_display_name_source_type_e;
+} contacts_display_name_source_type_e;
 
 /**
  * @brief Enumeration for Address book mode.
@@ -292,7 +292,7 @@ typedef enum {
 typedef enum {
        CONTACTS_ADDRESS_BOOK_MODE_NONE,        /**< All module can read and write contacts of this address_book */
        CONTACTS_ADDRESS_BOOK_MODE_READONLY,    /**< All module can only read contacts of this address_book*/
-}contacts_address_book_mode_e;
+} contacts_address_book_mode_e;
 
 /**
  * @brief Enumeration for link mode when inserting contact.
@@ -303,7 +303,7 @@ typedef enum {
 typedef enum {
        CONTACTS_CONTACT_LINK_MODE_NONE,            /**< Auto link immediately */
        CONTACTS_CONTACT_LINK_MODE_IGNORE_ONCE,     /**< Do not auto link when the contact is inserted */
-}contacts_contact_link_mode_e;
+} contacts_contact_link_mode_e;
 
 /**
  * @brief Enumeration for Contact relationship type.
@@ -328,7 +328,7 @@ typedef enum {
        CONTACTS_RELATIONSHIP_TYPE_SISTER,              /**< Sister type */
        CONTACTS_RELATIONSHIP_TYPE_SPOUSE,              /**< Spouse type */
        CONTACTS_RELATIONSHIP_TYPE_CUSTOM,              /**< Custom type */
-}contacts_relationship_type_e;
+} contacts_relationship_type_e;
 
 /**
  * @brief Enumeration for Contact search range.
@@ -341,7 +341,7 @@ typedef enum {
        CONTACTS_SEARCH_RANGE_NUMBER = 0x00000002,  /**< Search record from name and number */
        CONTACTS_SEARCH_RANGE_DATA = 0x00000004,    /**< Search record from name,number and data */
        CONTACTS_SEARCH_RANGE_EMAIL = 0x00000008,   /**< Search record from name,number,data and email. Now, support only _contacts_person_email view_uri*/
-}contacts_search_range_e;
+} contacts_search_range_e;
 
 /**
  * @brief Enumeration for SIP(Session Intialion Protocol) type range
@@ -354,7 +354,7 @@ typedef enum {
        CONTACTS_SIP_TYPE_CUSTOM,           /**< Custom sip type */
        CONTACTS_SIP_TYPE_HOME,             /**< Home sip type */
        CONTACTS_SIP_TYPE_WORK,             /**< Work sip type */
-}contacts_sip_type_e;
+} contacts_sip_type_e;
 
 /**
  * @}
index fa99a95..16fe57b 100644 (file)
@@ -122,7 +122,7 @@ int ctsvc_db_sip_update(contacts_record_h record, bool is_my_profile)
        CTSVC_RECORD_RESET_PROPERTY_FLAGS((ctsvc_record_s *)record);
        free(set);
        if (bind_text) {
-               for (cursor=bind_text;cursor;cursor=cursor->next)
+               for (cursor = bind_text; cursor; cursor = cursor->next)
                        free(cursor->data);
                g_slist_free(bind_text);
        }
index 702cd8c..df4c263 100644 (file)
@@ -25,7 +25,7 @@
 #define CTS_SQL_MAX_LEN 2048 /* normal string length */
 #define CTS_SQL_MIN_LEN 1024 /* short sql string length */
 
-typedef sqlite3_stmt* cts_stmt;
+typedef sqlite3_stmt * cts_stmt;
 
 int ctsvc_db_open(void);
 int ctsvc_db_close(void);