rm useless (not used,set to readonly)functions 76/45676/1
authorGukhwan Cho <gh78.cho@samsung.com>
Thu, 9 Jul 2015 02:39:37 +0000 (11:39 +0900)
committerMyoungHoon Chae <mhoon.chae@samsung.com>
Mon, 10 Aug 2015 09:04:02 +0000 (18:04 +0900)
Change-Id: I3389d1a52a0aa76d5466c710f09dc2741ebac52c
Signed-off-by: Gukhwan Cho <gh78.cho@samsung.com>
common/ctsvc_inotify.c
common/ctsvc_inotify.h
common/ctsvc_record_contact.c
common/ctsvc_record_person.c
common/ctsvc_record_result.c
common/ctsvc_record_sdn.c
common/ctsvc_record_speeddial.c
common/ipc/ctsvc_ipc_marshal.c
common/ipc/ctsvc_ipc_marshal.h
common/ipc/ctsvc_ipc_result.c

index 7959f8c..8db2850 100644 (file)
@@ -49,21 +49,6 @@ static int __inoti_fd = -1;
 static guint __inoti_handler = 0;
 static GSList *__noti_list = NULL;
 
-void ctsvc_inotify_call_blocked_callback() {
-       noti_info *noti;
-       GSList *it = NULL;
-
-       for (it = __noti_list;it;it=it->next) {
-               noti = (noti_info *)it->data;
-
-               if (noti->cb && noti->blocked) {
-                       CTS_DBG("%s", noti->view_uri);
-                       noti->blocked = false;
-                       noti->cb(noti->view_uri, noti->cb_data);
-               }
-       }
-}
-
 static inline void __ctsvc_inotify_handle_callback(GSList *noti_list, int wd, uint32_t mask)
 {
        noti_info *noti;
index 85594d8..545ce0d 100644 (file)
@@ -27,6 +27,5 @@ int ctsvc_inotify_init(void);
 void ctsvc_inotify_close(void);
 int ctsvc_inotify_subscribe(const char *view_uri, contacts_db_changed_cb cb, void *data);
 int ctsvc_inotify_unsubscribe(const char *view_uri, contacts_db_changed_cb cb, void *user_data);
-void ctsvc_inotify_call_blocked_callback();
 
 #endif /* __TIZEN_SOCIAL_CTSVC_INOTIFY_H__ */
index e20ac29..efadad9 100644 (file)
@@ -108,10 +108,8 @@ static int __ctsvc_event_clone(contacts_record_h record, contacts_record_h *out_
 static int __ctsvc_event_get_int(contacts_record_h record, unsigned int property_id, int *out);
 static int __ctsvc_event_get_str(contacts_record_h record, unsigned int property_id, char** out_str);
 static int __ctsvc_event_get_str_p(contacts_record_h record, unsigned int property_id, char** out_str);
-static int __ctsvc_event_get_bool(contacts_record_h record, unsigned int property_id, bool *value);
 static int __ctsvc_event_set_int(contacts_record_h record, unsigned int property_id, int value);
 static int __ctsvc_event_set_str(contacts_record_h record, unsigned int property_id, const char* str);
-static int __ctsvc_event_set_bool(contacts_record_h record, unsigned int property_id, bool value);
 
 static int __ctsvc_extension_create(contacts_record_h *out_record);
 static int __ctsvc_extension_destroy(contacts_record_h record, bool delete_child);
@@ -129,7 +127,6 @@ static int __ctsvc_group_relation_get_int(contacts_record_h record, unsigned int
 static int __ctsvc_group_relation_get_str(contacts_record_h record, unsigned int property_id, char** out_str);
 static int __ctsvc_group_relation_get_str_p(contacts_record_h record, unsigned int property_id, char** out_str);
 static int __ctsvc_group_relation_set_int(contacts_record_h record, unsigned int property_id, int value);
-static int __ctsvc_group_relation_set_str(contacts_record_h record, unsigned int property_id, const char* str);
 
 static int __ctsvc_messenger_create(contacts_record_h *out_record);
 static int __ctsvc_messenger_destroy(contacts_record_h record, bool delete_child);
@@ -214,8 +211,6 @@ static int __ctsvc_simple_contact_get_bool(contacts_record_h record, unsigned in
 static int __ctsvc_simple_contact_get_int(contacts_record_h record, unsigned int property_id, int *out);
 static int __ctsvc_simple_contact_get_str(contacts_record_h record, unsigned int property_id, char** out_str);
 static int __ctsvc_simple_contact_get_str_p(contacts_record_h record, unsigned int property_id, char** out_str);
-static int __ctsvc_simple_contact_set_int(contacts_record_h record, unsigned int property_id, int value);
-static int __ctsvc_simple_contact_set_str(contacts_record_h record, unsigned int property_id, const char* str);
 
 static int __ctsvc_url_create(contacts_record_h *out_record);
 static int __ctsvc_url_destroy(contacts_record_h record, bool delete_child);
@@ -323,12 +318,12 @@ ctsvc_record_plugin_cb_s event_plugin_cbs = {
        .get_str = __ctsvc_event_get_str,
        .get_str_p = __ctsvc_event_get_str_p,
        .get_int = __ctsvc_event_get_int,
-       .get_bool = __ctsvc_event_get_bool,
+       .get_bool = NULL,
        .get_lli = NULL,
        .get_double = NULL,
        .set_str = __ctsvc_event_set_str,
        .set_int = __ctsvc_event_set_int,
-       .set_bool = __ctsvc_event_set_bool,
+       .set_bool = NULL,
        .set_lli = NULL,
        .set_double = NULL,
        .add_child_record = NULL,
@@ -458,7 +453,7 @@ ctsvc_record_plugin_cb_s group_relation_plugin_cbs = {
        .get_bool = NULL,
        .get_lli = NULL,
        .get_double = NULL,
-       .set_str = __ctsvc_group_relation_set_str,
+       .set_str = NULL,
        .set_int = __ctsvc_group_relation_set_int,
        .set_bool = NULL,
        .set_lli = NULL,
@@ -634,8 +629,8 @@ ctsvc_record_plugin_cb_s simple_contact_plugin_cbs = {
        .get_bool = __ctsvc_simple_contact_get_bool,
        .get_lli = NULL,
        .get_double = NULL,
-       .set_str = __ctsvc_simple_contact_set_str,
-       .set_int = __ctsvc_simple_contact_set_int,
+       .set_str = NULL,
+       .set_int = NULL,
        .set_bool = NULL,
        .set_lli = NULL,
        .set_double = NULL,
@@ -1868,32 +1863,6 @@ static int __ctsvc_contact_set_int(contacts_record_h record, unsigned int proper
        return CONTACTS_ERROR_NONE;
 }
 
-static int __ctsvc_simple_contact_set_int(contacts_record_h record, unsigned int property_id, int value)
-{
-       ctsvc_simple_contact_s *contact = (ctsvc_simple_contact_s *)record;
-
-       switch(property_id) {
-       case CTSVC_PROPERTY_CONTACT_ID:
-               contact->contact_id = value;
-               break;
-       case CTSVC_PROPERTY_CONTACT_DISPLAY_SOURCE_DATA_ID:
-               contact->display_source_type = value;
-               break;
-       case CTSVC_PROPERTY_CONTACT_PERSON_ID:
-               contact->person_id = value;
-               break;
-       case CTSVC_PROPERTY_CONTACT_ADDRESSBOOK_ID:
-               RETVM_IF(0 < contact->contact_id, CONTACTS_ERROR_INVALID_PARAMETER,
-                               "Invalide parameter : property_id(%d) is a read-only value (contact)", property_id);
-               contact->addressbook_id = value;
-               break;
-       default:
-               CTS_ERR("Invalid parameter : property_id(%d) is not supported in value(simple contact)", property_id);
-               return CONTACTS_ERROR_INVALID_PARAMETER;
-       }
-       return CONTACTS_ERROR_NONE;
-}
-
 static int __ctsvc_name_set_int(contacts_record_h record, unsigned int property_id, int value)
 {
        ctsvc_name_s *name = (ctsvc_name_s *)record;
@@ -3264,40 +3233,6 @@ static int __ctsvc_contact_set_str(contacts_record_h record, unsigned int proper
 }
 
 
-static int __ctsvc_simple_contact_set_str(contacts_record_h record, unsigned int property_id, const char* str)
-{
-       ctsvc_simple_contact_s *contact = (ctsvc_simple_contact_s *)record;
-
-       switch(property_id) {
-       case CTSVC_PROPERTY_CONTACT_DISPLAY_NAME:
-               FREEandSTRDUP(contact->display_name, str);
-               break;
-/*
-               CTS_ERR("Invalid parameter : property_id(%d) is a read-only value (contact)", property_id);
-               return CONTACTS_ERROR_INVALID_PARAMETER;
-*/
-       case CTSVC_PROPERTY_CONTACT_RINGTONE:
-               FREEandSTRDUP(contact->ringtone_path, str);
-               break;
-       case CTSVC_PROPERTY_CONTACT_IMAGE_THUMBNAIL:
-               FREEandSTRDUP(contact->image_thumbnail_path, str);
-               break;
-       case CTSVC_PROPERTY_CONTACT_UID:
-               FREEandSTRDUP(contact->uid, str);
-               break;
-       case CTSVC_PROPERTY_CONTACT_VIBRATION:
-               FREEandSTRDUP(contact->vibration, str);
-               break;
-       case CTSVC_PROPERTY_CONTACT_MESSAGE_ALERT:
-               FREEandSTRDUP(contact->message_alert, str);
-               break;
-       default :
-               CTS_ERR("Invalid parameter : property_id(%d) is not supported in value(simple_contact)", property_id);
-               return CONTACTS_ERROR_INVALID_PARAMETER;
-       }
-       return CONTACTS_ERROR_NONE;
-}
-
 static int __ctsvc_name_set_str(contacts_record_h record, unsigned int property_id, const char* str)
 {
        ctsvc_name_s *name = (ctsvc_name_s *)record;
@@ -3533,25 +3468,6 @@ static int __ctsvc_messenger_set_str(contacts_record_h record, unsigned int prop
        return CONTACTS_ERROR_NONE;
 }
 
-static int __ctsvc_group_relation_set_str(contacts_record_h record, unsigned int property_id, const char* str)
-{
-       ctsvc_group_relation_s *group_relation = (ctsvc_group_relation_s *)record;
-
-       switch(property_id) {
-       case CTSVC_PROPERTY_GROUP_RELATION_GROUP_NAME:
-               FREEandSTRDUP(group_relation->group_name, str);
-               break;
-/*
-               CTS_ERR("Invalid parameter : property_id(%d) is a read-only value (group_relation)", property_id);
-               return CONTACTS_ERROR_INVALID_PARAMETER;
-*/
-       default :
-               CTS_ERR("Invalid parameter : property_id(%d) is not supported in value(group_relation)", property_id);
-               return CONTACTS_ERROR_INVALID_PARAMETER;
-       }
-       return CONTACTS_ERROR_NONE;
-}
-
 static int __ctsvc_activity_set_str(contacts_record_h record, unsigned int property_id, const char* str)
 {
        ctsvc_activity_s *activity = (ctsvc_activity_s *)record;
@@ -3781,20 +3697,6 @@ static int __ctsvc_email_get_bool(contacts_record_h record, unsigned int propert
        return CONTACTS_ERROR_NONE;
 }
 
-static int __ctsvc_event_get_bool(contacts_record_h record, unsigned int property_id, bool *value)
-{
-       ctsvc_event_s *event = (ctsvc_event_s *)record;
-       switch (property_id) {
-       case CTSVC_PROPERTY_EVENT_IS_LEAP_MONTH: /* deprecated */
-               *value = event->is_leap_month;
-               break;
-       default:
-               CTS_ERR("Invalid parameter : property_id(0x%x) is not supported in value(event)", property_id);
-               return CONTACTS_ERROR_INVALID_PARAMETER;
-       }
-       return CONTACTS_ERROR_NONE;
-}
-
 static int __ctsvc_image_get_bool(contacts_record_h record, unsigned int property_id, bool *value)
 {
        ctsvc_image_s *image = (ctsvc_image_s *)record;
@@ -3878,21 +3780,6 @@ static int __ctsvc_email_set_bool(contacts_record_h record, unsigned int propert
        return CONTACTS_ERROR_NONE;
 }
 
-static int __ctsvc_event_set_bool(contacts_record_h record, unsigned int property_id, bool value)
-{
-       ctsvc_event_s *event = (ctsvc_event_s *)record;
-
-       switch(property_id) {
-       case CTSVC_PROPERTY_EVENT_IS_LEAP_MONTH: /* deprecated */
-               event->is_leap_month = value;
-               break;
-       default:
-               CTS_ERR("Invalid parameter : property_id(%d) is not supported in value(event)", property_id);
-               return CONTACTS_ERROR_INVALID_PARAMETER;
-       }
-       return CONTACTS_ERROR_NONE;
-}
-
 static int __ctsvc_image_set_bool(contacts_record_h record, unsigned int property_id, bool value)
 {
        ctsvc_image_s *image = (ctsvc_image_s *)record;
index f56f368..0e30445 100644 (file)
@@ -29,7 +29,6 @@ static int __ctsvc_person_get_int(contacts_record_h record, unsigned int propert
 static int __ctsvc_person_get_str_p(contacts_record_h record, unsigned int property_id, char** out_str);
 static int __ctsvc_person_get_str(contacts_record_h record, unsigned int property_id, char** out_str);
 static int __ctsvc_person_get_bool(contacts_record_h record, unsigned int property_id, bool *value);
-static int __ctsvc_person_set_int(contacts_record_h record, unsigned int property_id, int value);
 static int __ctsvc_person_set_str(contacts_record_h record, unsigned int property_id, const char* str);
 static int __ctsvc_person_set_bool(contacts_record_h record, unsigned int property_id, bool value);
 
@@ -45,7 +44,7 @@ ctsvc_record_plugin_cb_s person_plugin_cbs = {
        .get_lli = NULL,
        .get_double = NULL,
        .set_str = __ctsvc_person_set_str,
-       .set_int = __ctsvc_person_set_int,
+       .set_int = NULL,
        .set_bool = __ctsvc_person_set_bool,
        .set_lli = NULL,
        .set_double = NULL,
@@ -207,27 +206,6 @@ static int __ctsvc_person_get_bool(contacts_record_h record, unsigned int proper
        return CONTACTS_ERROR_NONE;
 }
 
-static int __ctsvc_person_set_int(contacts_record_h record, unsigned int property_id, int value)
-{
-       ctsvc_person_s *person = (ctsvc_person_s *)record;
-
-       switch(property_id) {
-       case CTSVC_PROPERTY_PERSON_DISPLAY_CONTACT_ID:
-               person->name_contact_id = value;
-               break;
-       case CTSVC_PROPERTY_PERSON_ID:
-               person->person_id = value;
-               break;
-       case CTSVC_PROPERTY_PERSON_LINK_COUNT:
-               person->link_count = value;
-               break;
-       default:
-               CTS_ERR("This field(0x%0x) is not supported in value(person)", property_id);
-               return CONTACTS_ERROR_INVALID_PARAMETER;
-       }
-       return CONTACTS_ERROR_NONE;
-}
-
 static int __ctsvc_person_set_str(contacts_record_h record, unsigned int property_id, const char* str)
 {
        ctsvc_person_s *person = (ctsvc_person_s *)record;
index 16e3474..06ee532 100644 (file)
@@ -33,14 +33,6 @@ static int __ctsvc_result_clone(contacts_record_h record, contacts_record_h *out
 static int __ctsvc_result_get_str_p(contacts_record_h record, unsigned int property_id, char** out_str);
 static int __ctsvc_result_get_str(contacts_record_h record, unsigned int property_id, char** out_str);
 static int __ctsvc_result_get_int(contacts_record_h record, unsigned int property_id, int* out_value);
-static int __ctsvc_result_get_lli(contacts_record_h record, unsigned int property_id, long long int* out_value);
-static int __ctsvc_result_get_bool(contacts_record_h record, unsigned int property_id, bool* out_value);
-static int __ctsvc_result_get_double(contacts_record_h record, unsigned int property_id, double* out_value);
-static int __ctsvc_result_set_int(contacts_record_h record, unsigned int property_id, int value);
-static int __ctsvc_result_set_lli(contacts_record_h record, unsigned int property_id, long long int value);
-static int __ctsvc_result_set_bool(contacts_record_h record, unsigned int property_id, bool value);
-static int __ctsvc_result_set_str(contacts_record_h record, unsigned int property_id, const char *str);
-static int __ctsvc_result_set_double(contacts_record_h record, unsigned int property_id, double value);
 
 ctsvc_record_plugin_cb_s result_plugin_cbs = {
        .create = __ctsvc_result_create,
@@ -49,14 +41,14 @@ ctsvc_record_plugin_cb_s result_plugin_cbs = {
        .get_str = __ctsvc_result_get_str,
        .get_str_p = __ctsvc_result_get_str_p,
        .get_int = __ctsvc_result_get_int,
-       .get_bool = __ctsvc_result_get_bool,
-       .get_lli = __ctsvc_result_get_lli,
-       .get_double = __ctsvc_result_get_double,
-       .set_str = __ctsvc_result_set_str,
-       .set_int = __ctsvc_result_set_int,
-       .set_bool = __ctsvc_result_set_bool,
-       .set_lli = __ctsvc_result_set_lli,
-       .set_double = __ctsvc_result_set_double,
+       .get_bool = NULL,
+       .get_lli = NULL,
+       .get_double = NULL,
+       .set_str = NULL,
+       .set_int = NULL,
+       .set_bool = NULL,
+       .set_lli = NULL,
+       .set_double = NULL,
        .add_child_record = NULL,
        .remove_child_record = NULL,
        .get_child_record_count = NULL,
@@ -208,279 +200,3 @@ static int __ctsvc_result_get_int(contacts_record_h record, unsigned int propert
        return CONTACTS_ERROR_NO_DATA;
 }
 
-static int __ctsvc_result_set_int(contacts_record_h record, unsigned int property_id, int value)
-{
-       ctsvc_result_s* result = (ctsvc_result_s *)record;
-       GSList *cursor;
-       ctsvc_result_value_s *data;
-
-       /* TODO: check the value type of property_id is int */
-       for (cursor = result->values;cursor;cursor=cursor->next) {
-               data = cursor->data;
-               if (data->property_id == property_id) {
-                       if (data->type == CTSVC_VIEW_DATA_TYPE_INT) {
-#ifdef _CONTACTS_IPC_SERVER
-                               if (property_id == CTSVC_PROPERTY_PHONELOG_SIM_SLOT_NO)
-                                       data->value.i = ctsvc_server_sim_get_sim_slot_no_by_info_id(value);
-                               else
-#endif /* _CONTACTS_IPC_SERVER */
-                               data->value.i = value;
-                               return CONTACTS_ERROR_NONE;
-                       }
-                       else {
-                               CTS_ERR("use another get_type API, (type : %d)", data->type);
-                               return CONTACTS_ERROR_INVALID_PARAMETER;
-                       }
-               }
-       }
-
-       data = calloc(1, sizeof(ctsvc_result_value_s));
-       if (NULL == data) {
-               CTS_ERR("calloc() Fail");
-               return CONTACTS_ERROR_OUT_OF_MEMORY;
-       }
-       data->property_id = property_id;
-       data->type = CTSVC_VIEW_DATA_TYPE_INT;
-#ifdef _CONTACTS_IPC_SERVER
-       if (property_id == CTSVC_PROPERTY_PHONELOG_SIM_SLOT_NO)
-               data->value.i = ctsvc_server_sim_get_sim_slot_no_by_info_id(value);
-       else
-#endif /* _CONTACTS_IPC_SERVER */
-       data->value.i = value;
-       result->values = g_slist_append(result->values, (void*)data);
-       return CONTACTS_ERROR_NONE;
-}
-
-static int __ctsvc_result_set_lli(contacts_record_h record, unsigned int property_id, long long int value)
-{
-       ctsvc_result_s* result = (ctsvc_result_s *)record;
-       GSList *cursor;
-       ctsvc_result_value_s *data;
-
-       /* TODO: check the value type of property_id is int */
-       for (cursor = result->values;cursor;cursor=cursor->next) {
-               data = cursor->data;
-               if (data->property_id == property_id) {
-                       if (data->type == CTSVC_VIEW_DATA_TYPE_LLI) {
-                               data->value.l = value;
-                               return CONTACTS_ERROR_NONE;
-                       }
-                       else {
-                               CTS_ERR("use another get_type API, (type : %d)", data->type);
-                               return CONTACTS_ERROR_INVALID_PARAMETER;
-                       }
-               }
-       }
-
-       data = calloc(1, sizeof(ctsvc_result_value_s));
-       if (NULL == data) {
-               CTS_ERR("calloc() Fail");
-               return CONTACTS_ERROR_OUT_OF_MEMORY;
-       }
-       data->property_id = property_id;
-       data->type = CTSVC_VIEW_DATA_TYPE_LLI;
-       data->value.l = value;
-       result->values = g_slist_append(result->values, (void*)data);
-       return CONTACTS_ERROR_NONE;
-}
-
-static int __ctsvc_result_set_double(contacts_record_h record, unsigned int property_id, double value)
-{
-       ctsvc_result_s* result = (ctsvc_result_s *)record;
-       GSList *cursor;
-       ctsvc_result_value_s *data;
-
-       for (cursor = result->values;cursor;cursor=cursor->next) {
-               data = cursor->data;
-               if (data->property_id == property_id) {
-                       if (data->type == CTSVC_VIEW_DATA_TYPE_DOUBLE) {
-                               data->value.d = value;
-                               return CONTACTS_ERROR_NONE;
-                       }
-                       else {
-                               CTS_ERR("use another get_type API, (type : %d)", data->type);
-                               return CONTACTS_ERROR_INVALID_PARAMETER;
-                       }
-               }
-       }
-
-       data = calloc(1, sizeof(ctsvc_result_value_s));
-       if (NULL == data) {
-               CTS_ERR("calloc() Fail");
-               return CONTACTS_ERROR_OUT_OF_MEMORY;
-       }
-       data->property_id = property_id;
-       data->type = CTSVC_VIEW_DATA_TYPE_DOUBLE;
-       data->value.d = value;
-       result->values = g_slist_append(result->values, (void*)data);
-       return CONTACTS_ERROR_NONE;
-}
-
-static int __ctsvc_result_set_bool(contacts_record_h record, unsigned int property_id, bool value)
-{
-       ctsvc_result_s* result = (ctsvc_result_s *)record;
-       GSList *cursor;
-       ctsvc_result_value_s *data;
-
-       /* TODO: check the value type of property_id is int */
-       for (cursor = result->values;cursor;cursor=cursor->next) {
-               data = cursor->data;
-               if (data->property_id == property_id) {
-                       if (data->type == CTSVC_VIEW_DATA_TYPE_BOOL) {
-                               data->value.b = value;
-                               return CONTACTS_ERROR_NONE;
-                       }
-                       else {
-                               CTS_ERR("use another get_type API, (type : %d)", data->type);
-                               return CONTACTS_ERROR_INVALID_PARAMETER;
-                       }
-               }
-       }
-
-       data = calloc(1, sizeof(ctsvc_result_value_s));
-       if (NULL == data) {
-               CTS_ERR("calloc() Fail");
-               return CONTACTS_ERROR_OUT_OF_MEMORY;
-       }
-       data->property_id = property_id;
-       data->type = CTSVC_VIEW_DATA_TYPE_BOOL;
-       data->value.i = value;
-       result->values = g_slist_append(result->values, (void*)data);
-       return CONTACTS_ERROR_NONE;
-}
-
-static int __ctsvc_result_set_str(contacts_record_h record, unsigned int property_id, const char *str)
-{
-       ctsvc_result_s* result = (ctsvc_result_s *)record;
-       GSList *cursor;
-       ctsvc_result_value_s *data;
-       char *full_path = NULL;
-       int str_len;
-
-       /* TODO: check the value type of property_id is int */
-       for (cursor = result->values;cursor;cursor=cursor->next) {
-               data = cursor->data;
-               if (data->property_id == property_id) {
-                       if (data->type == CTSVC_VIEW_DATA_TYPE_STR) {
-                               switch (property_id) {
-                               case CTSVC_PROPERTY_PERSON_IMAGE_THUMBNAIL:
-                               case CTSVC_PROPERTY_CONTACT_IMAGE_THUMBNAIL:
-                                       if (str) {
-                                               str_len = strlen(CTSVC_CONTACT_IMG_FULL_LOCATION) + strlen(str) + 2;
-                                               full_path = calloc(1, str_len);
-                                               if (NULL == full_path) {
-                                                       CTS_ERR("calloc() Fail");
-                                                       return CONTACTS_ERROR_OUT_OF_MEMORY;
-                                               }
-                                               snprintf(full_path, str_len, "%s/%s", CTSVC_CONTACT_IMG_FULL_LOCATION, str);
-                                       }
-                                       free(data->value.s);
-                                       data->value.s = full_path;
-                                       return CONTACTS_ERROR_NONE;
-                               default:
-                                       FREEandSTRDUP(data->value.s, str);
-                                       return CONTACTS_ERROR_NONE;
-                               }
-                       }
-                       else {
-                               CTS_ERR("use another get_type API, (type : %d)", data->type);
-                               return CONTACTS_ERROR_INVALID_PARAMETER;
-                       }
-               }
-       }
-
-       data = calloc(1, sizeof(ctsvc_result_value_s));
-       if (NULL == data) {
-               CTS_ERR("calloc() Fail");
-               return CONTACTS_ERROR_OUT_OF_MEMORY;
-       }
-       data->property_id = property_id;
-       data->type = CTSVC_VIEW_DATA_TYPE_STR;
-       switch (property_id) {
-       case CTSVC_PROPERTY_PERSON_IMAGE_THUMBNAIL:
-       case CTSVC_PROPERTY_CONTACT_IMAGE_THUMBNAIL:
-               if (str) {
-                       str_len = strlen(CTSVC_CONTACT_IMG_FULL_LOCATION) + strlen(str) + 2;
-                       full_path = calloc(1, str_len);
-                       if (NULL == full_path) {
-                               CTS_ERR("calloc() Fail");
-                               free(data);
-                               return CONTACTS_ERROR_OUT_OF_MEMORY;
-                       }
-                       snprintf(full_path, str_len, "%s/%s", CTSVC_CONTACT_IMG_FULL_LOCATION, str);
-               }
-               free(data->value.s);
-               data->value.s = full_path;
-               break;
-       default:
-               data->value.s = SAFE_STRDUP(str);
-               break;
-       }
-
-       result->values = g_slist_append(result->values, (void*)data);
-       return CONTACTS_ERROR_NONE;
-}
-
-static int __ctsvc_result_get_bool(contacts_record_h record, unsigned int property_id, bool* out_value)
-{
-       ctsvc_result_s* result = (ctsvc_result_s *)record;
-       GSList *cursor;
-       for (cursor = result->values;cursor;cursor=cursor->next) {
-               ctsvc_result_value_s *data = cursor->data;
-               if (data->property_id == property_id) {
-                       if (data->type == CTSVC_VIEW_DATA_TYPE_BOOL) {
-                               *out_value = data->value.b;
-                               return CONTACTS_ERROR_NONE;
-                       }
-                       else {
-                               CTS_ERR("use another get_type API, (type : %d)", data->type);
-                               return CONTACTS_ERROR_INVALID_PARAMETER;
-                       }
-               }
-       }
-
-       return CONTACTS_ERROR_NO_DATA;
-}
-
-static int __ctsvc_result_get_lli(contacts_record_h record, unsigned int property_id, long long int* out_value)
-{
-       ctsvc_result_s* result = (ctsvc_result_s *)record;
-       GSList *cursor;
-       for (cursor = result->values;cursor;cursor=cursor->next) {
-               ctsvc_result_value_s *data = cursor->data;
-               if (data->property_id == property_id) {
-                       if (data->type == CTSVC_VIEW_DATA_TYPE_LLI) {
-                               *out_value = data->value.l;
-                               return CONTACTS_ERROR_NONE;
-                               }
-                       else {
-                               CTS_ERR("use another get_type API, (type : %d)", data->type);
-                               return CONTACTS_ERROR_INVALID_PARAMETER;
-                       }
-               }
-       }
-
-       return CONTACTS_ERROR_NO_DATA;
-}
-
-static int __ctsvc_result_get_double(contacts_record_h record, unsigned int property_id, double* out_value)
-{
-       ctsvc_result_s* result = (ctsvc_result_s *)record;
-       GSList *cursor;
-       for (cursor = result->values;cursor;cursor=cursor->next) {
-               ctsvc_result_value_s *data = cursor->data;
-               if (data->property_id == property_id) {
-                       if (data->type == CTSVC_VIEW_DATA_TYPE_DOUBLE) {
-                               *out_value = data->value.d;
-                               return CONTACTS_ERROR_NONE;
-                               }
-                       else {
-                               CTS_ERR("use another get_type API, (type : %d)", data->type);
-                               return CONTACTS_ERROR_INVALID_PARAMETER;
-                       }
-               }
-       }
-
-       return CONTACTS_ERROR_NO_DATA;
-}
-
index c679474..8aaafa6 100644 (file)
@@ -32,8 +32,6 @@ static int __ctsvc_sdn_clone(contacts_record_h record, contacts_record_h *out_re
 static int __ctsvc_sdn_get_int(contacts_record_h record, unsigned int property_id, int *out);
 static int __ctsvc_sdn_get_str(contacts_record_h record, unsigned int property_id, char** out_str);
 static int __ctsvc_sdn_get_str_p(contacts_record_h record, unsigned int property_id, char** out_str);
-static int __ctsvc_sdn_set_int(contacts_record_h record, unsigned int property_id, int value);
-static int __ctsvc_sdn_set_str(contacts_record_h record, unsigned int property_id, const char* str);
 
 ctsvc_record_plugin_cb_s sdn_plugin_cbs = {
        .create = __ctsvc_sdn_create,
@@ -45,8 +43,8 @@ ctsvc_record_plugin_cb_s sdn_plugin_cbs = {
        .get_bool = NULL,
        .get_lli = NULL,
        .get_double = NULL,
-       .set_str = __ctsvc_sdn_set_str,
-       .set_int = __ctsvc_sdn_set_int,
+       .set_str = NULL,
+       .set_int = NULL,
        .set_bool = NULL,
        .set_lli = NULL,
        .set_double = NULL,
@@ -153,39 +151,3 @@ static int __ctsvc_sdn_get_str(contacts_record_h record, unsigned int property_i
        return __ctsvc_sdn_get_str_real(record, property_id, out_str, true);
 }
 
-static int __ctsvc_sdn_set_int(contacts_record_h record, unsigned int property_id, int value)
-{
-       ctsvc_sdn_s* sdn = (ctsvc_sdn_s*)record;
-
-       switch(property_id) {
-       case CTSVC_PROPERTY_SDN_ID:
-               sdn->id = value;
-               break;
-       case CTSVC_PROPERTY_SDN_SIM_SLOT_NO:
-               sdn->sim_slot_no = value;
-               break;
-       default:
-               CTS_ERR("This field(%d) is not supported in value(sdn)", property_id);
-               return CONTACTS_ERROR_INVALID_PARAMETER;
-       }
-       return CONTACTS_ERROR_NONE;
-}
-
-static int __ctsvc_sdn_set_str(contacts_record_h record, unsigned int property_id, const char* str)
-{
-       ctsvc_sdn_s* sdn = (ctsvc_sdn_s*)record;
-
-       switch(property_id) {
-       case CTSVC_PROPERTY_SDN_NAME:
-               FREEandSTRDUP(sdn->name, str);
-               break;
-       case CTSVC_PROPERTY_SDN_NUMBER:
-               FREEandSTRDUP(sdn->number, str);
-               break;
-       default :
-               CTS_ERR("This field(%d) is not supported in value(sdn)", property_id);
-               return CONTACTS_ERROR_INVALID_PARAMETER;
-       }
-       return CONTACTS_ERROR_NONE;
-}
-
index b5b76be..e85b91c 100644 (file)
@@ -33,7 +33,6 @@ static int __ctsvc_speeddial_get_int(contacts_record_h record, unsigned int prop
 static int __ctsvc_speeddial_get_str(contacts_record_h record, unsigned int property_id, char** out_str);
 static int __ctsvc_speeddial_get_str_p(contacts_record_h record, unsigned int property_id, char** out_str);
 static int __ctsvc_speeddial_set_int(contacts_record_h record, unsigned int property_id, int value);
-static int __ctsvc_speeddial_set_str(contacts_record_h record, unsigned int property_id, const char* str);
 
 
 ctsvc_record_plugin_cb_s speeddial_plugin_cbs = {
@@ -46,7 +45,7 @@ ctsvc_record_plugin_cb_s speeddial_plugin_cbs = {
        .get_bool = NULL,
        .get_lli = NULL,
        .get_double = NULL,
-       .set_str = __ctsvc_speeddial_set_str,
+       .set_str = NULL,
        .set_int = __ctsvc_speeddial_set_int,
        .set_bool = NULL,
        .set_lli = NULL,
@@ -199,26 +198,3 @@ static int __ctsvc_speeddial_set_int(contacts_record_h record, unsigned int prop
        return CONTACTS_ERROR_NONE;
 }
 
-static int __ctsvc_speeddial_set_str(contacts_record_h record, unsigned int property_id, const char* str)
-{
-       ctsvc_speeddial_s *speeddial = (ctsvc_speeddial_s*)record;
-
-       switch(property_id) {
-       case CTSVC_PROPERTY_SPEEDDIAL_DISPLAY_NAME:
-               FREEandSTRDUP(speeddial->display_name, str);
-               break;
-       case CTSVC_PROPERTY_SPEEDDIAL_NUMBER:
-               FREEandSTRDUP(speeddial->number, str);
-               break;
-       case CTSVC_PROPERTY_SPEEDDIAL_IMAGE_THUMBNAIL:
-               FREEandSTRDUP(speeddial->image_thumbnail_path, str);
-               break;
-       case CTSVC_PROPERTY_SPEEDDIAL_NUMBER_LABEL:
-               FREEandSTRDUP(speeddial->label, str);
-               break;
-       default :
-               CTS_ERR("This field(%d) is not supported in value(speeddial)", property_id);
-               return CONTACTS_ERROR_INVALID_PARAMETER;
-       }
-       return CONTACTS_ERROR_NONE;
-}
index 9e5219e..efd55b0 100644 (file)
@@ -350,17 +350,7 @@ static int __ctsvc_ipc_unmarshal_attribute_filter(const pims_ipc_data_h ipc_data
                }
                break;
        case CTSVC_FILTER_DOUBLE:
-               if (CONTACTS_ERROR_NONE != ctsvc_ipc_unmarshal_double(ipc_data,&filter->value.d)) {
-                       CTS_ERR("ctsvc_ipc_unmarshal_double() Fail");
-                       return CONTACTS_ERROR_INVALID_PARAMETER;
-               }
-               break;
        case CTSVC_FILTER_LLI:
-               if (CONTACTS_ERROR_NONE != ctsvc_ipc_unmarshal_lli(ipc_data,&filter->value.l)) {
-                       CTS_ERR("ctsvc_ipc_unmarshal_lli() Fail");
-                       return CONTACTS_ERROR_INVALID_PARAMETER;
-               }
-               break;
        default:
                break;
        }
@@ -401,17 +391,7 @@ static int __ctsvc_ipc_marshal_attribute_filter(const ctsvc_attribute_filter_s*
                }
                break;
        case CTSVC_FILTER_DOUBLE:
-               if (CONTACTS_ERROR_NONE != ctsvc_ipc_marshal_double((filter->value.d),ipc_data)) {
-                       CTS_ERR("ctsvc_ipc_marshal_double() Fail");
-                       return CONTACTS_ERROR_INVALID_PARAMETER;
-               }
-               break;
        case CTSVC_FILTER_LLI:
-               if (CONTACTS_ERROR_NONE != ctsvc_ipc_marshal_lli((filter->value.l),ipc_data)) {
-                       CTS_ERR("ctsvc_ipc_marshal_lli() Fail");
-                       return CONTACTS_ERROR_INVALID_PARAMETER;
-               }
-               break;
        default:
                break;
        }
@@ -569,57 +549,6 @@ int ctsvc_ipc_unmarshal_bool(const pims_ipc_data_h data, bool *pout)
        return CONTACTS_ERROR_NONE;
 }
 
-int ctsvc_ipc_unmarshal_lli(const pims_ipc_data_h data, long long int *pout)
-{
-       RETV_IF(data==NULL,CONTACTS_ERROR_INVALID_PARAMETER);
-       RETV_IF(pout==NULL,CONTACTS_ERROR_INVALID_PARAMETER);
-
-       unsigned int size = 0;
-       void *tmp = pims_ipc_data_get(data,&size);
-       if (tmp == NULL) {
-               CTS_ERR("pims_ipc_data_get() Fail");
-               return CONTACTS_ERROR_NO_DATA;
-       }
-       else {
-               *pout = *(long long int*)tmp;
-       }
-       return CONTACTS_ERROR_NONE;
-}
-
-int ctsvc_ipc_unmarshal_long(const pims_ipc_data_h data, long *pout)
-{
-       RETV_IF(data==NULL,CONTACTS_ERROR_INVALID_PARAMETER);
-       RETV_IF(pout==NULL,CONTACTS_ERROR_INVALID_PARAMETER);
-
-       unsigned int size = 0;
-       void *tmp = pims_ipc_data_get(data, &size);
-       if (tmp == NULL) {
-               CTS_ERR("pims_ipc_data_get() Fail");
-               return CONTACTS_ERROR_NO_DATA;
-       }
-       else {
-               *pout = *(long*)tmp;
-       }
-       return CONTACTS_ERROR_NONE;
-}
-
-int ctsvc_ipc_unmarshal_double(const pims_ipc_data_h data, double *pout)
-{
-       RETV_IF(data==NULL,CONTACTS_ERROR_INVALID_PARAMETER);
-       RETV_IF(pout==NULL,CONTACTS_ERROR_INVALID_PARAMETER);
-
-       unsigned int size = 0;
-       void* tmp = pims_ipc_data_get(data,&size);
-       if (tmp == NULL) {
-               CTS_ERR("pims_ipc_data_get() Fail");
-               return CONTACTS_ERROR_NO_DATA;
-       }
-       else {
-               *pout = *(double*)tmp;
-       }
-       return CONTACTS_ERROR_NONE;
-}
-
 int ctsvc_ipc_unmarshal_record_common(const pims_ipc_data_h ipc_data, ctsvc_record_s* common)
 {
        void *tmp = NULL;
@@ -732,36 +661,6 @@ int ctsvc_ipc_marshal_bool(const bool in, pims_ipc_data_h ipc_data)
        return CONTACTS_ERROR_NONE;
 }
 
-int ctsvc_ipc_marshal_lli(const long long int in, pims_ipc_data_h ipc_data)
-{
-       RETV_IF(ipc_data==NULL,CONTACTS_ERROR_INVALID_PARAMETER);
-
-       if (pims_ipc_data_put(ipc_data,(void*)&in,sizeof(long long int)) != 0) {
-               return CONTACTS_ERROR_OUT_OF_MEMORY;
-       }
-       return CONTACTS_ERROR_NONE;
-}
-
-int ctsvc_ipc_marshal_long(const long in, pims_ipc_data_h ipc_data)
-{
-       RETV_IF(ipc_data==NULL,CONTACTS_ERROR_INVALID_PARAMETER);
-
-       if (pims_ipc_data_put(ipc_data,(void*)&in,sizeof(long)) != 0) {
-               return CONTACTS_ERROR_OUT_OF_MEMORY;
-       }
-       return CONTACTS_ERROR_NONE;
-}
-
-int ctsvc_ipc_marshal_double(const double in, pims_ipc_data_h ipc_data)
-{
-       RETV_IF(ipc_data==NULL,CONTACTS_ERROR_INVALID_PARAMETER);
-
-       if (pims_ipc_data_put(ipc_data,(void*)&in,sizeof(double)) != 0) {
-               return CONTACTS_ERROR_OUT_OF_MEMORY;
-       }
-       return CONTACTS_ERROR_NONE;
-}
-
 int ctsvc_ipc_marshal_record_common(const ctsvc_record_s* common, pims_ipc_data_h ipc_data)
 {
 
index 17a640f..a056dd6 100644 (file)
@@ -50,9 +50,6 @@ int ctsvc_ipc_unmarshal_string(const pims_ipc_data_h ipc_data, char** ppbufchar)
 int ctsvc_ipc_unmarshal_bool(const pims_ipc_data_h data, bool *pout);
 int ctsvc_ipc_unmarshal_int(const pims_ipc_data_h data, int *pout);
 int ctsvc_ipc_unmarshal_unsigned_int(const pims_ipc_data_h data, unsigned int *pout);
-int ctsvc_ipc_unmarshal_lli(const pims_ipc_data_h data, long long int *pout);
-int ctsvc_ipc_unmarshal_long(const pims_ipc_data_h data, long *pout);
-int ctsvc_ipc_unmarshal_double(const pims_ipc_data_h data, double *pout);
 int ctsvc_ipc_unmarshal_record_common(const pims_ipc_data_h ipc_data, ctsvc_record_s* common);
 
 /*
@@ -62,9 +59,6 @@ int ctsvc_ipc_marshal_string(const char* bufchar, pims_ipc_data_h ipc_data);
 int ctsvc_ipc_marshal_bool(const bool in, pims_ipc_data_h ipc_data);
 int ctsvc_ipc_marshal_int(const int in, pims_ipc_data_h ipc_data);
 int ctsvc_ipc_marshal_unsigned_int(const unsigned int in, pims_ipc_data_h ipc_data);
-int ctsvc_ipc_marshal_lli(const long long int in, pims_ipc_data_h ipc_data);
-int ctsvc_ipc_marshal_long(const long in, pims_ipc_data_h ipc_data);
-int ctsvc_ipc_marshal_double(const double in, pims_ipc_data_h ipc_data);
 int ctsvc_ipc_marshal_record_common(const ctsvc_record_s* common, pims_ipc_data_h ipc_data);
 
 /*
index 22917f5..860dff6 100644 (file)
@@ -61,16 +61,10 @@ static int __ctsvc_ipc_unmarshal_search_value(pims_ipc_data_h ipc_data, ctsvc_re
                }
        }
        else if (CTSVC_VIEW_CHECK_DATA_TYPE(pvalue->property_id, CTSVC_VIEW_DATA_TYPE_DOUBLE) == true) {
-               if (ctsvc_ipc_unmarshal_double(ipc_data,&pvalue->value.d) != CONTACTS_ERROR_NONE) {
-                       CTS_ERR("ctsvc_ipc_marshal fail");
-                       return CONTACTS_ERROR_INVALID_PARAMETER;
-               }
+               return CONTACTS_ERROR_NONE;
        }
        else if (CTSVC_VIEW_CHECK_DATA_TYPE(pvalue->property_id, CTSVC_VIEW_DATA_TYPE_LLI) == true) {
-               if (ctsvc_ipc_unmarshal_lli(ipc_data,&pvalue->value.l) != CONTACTS_ERROR_NONE) {
-                       CTS_ERR("ctsvc_ipc_marshal fail");
-                       return CONTACTS_ERROR_INVALID_PARAMETER;
-               }
+               return CONTACTS_ERROR_NONE;
        }
        else {
                ASSERT_NOT_REACHED("invalid parameter (property:%d)",pvalue->property_id);
@@ -111,16 +105,10 @@ static int __ctsvc_ipc_marshal_search_value(const ctsvc_result_value_s* pvalue,
                }
        }
        else if (CTSVC_VIEW_CHECK_DATA_TYPE(pvalue->property_id, CTSVC_VIEW_DATA_TYPE_DOUBLE) == true) {
-               if (ctsvc_ipc_marshal_double(pvalue->value.d,ipc_data) != CONTACTS_ERROR_NONE) {
-                       CTS_ERR("ctsvc_ipc_marshal fail");
-                       return CONTACTS_ERROR_INVALID_PARAMETER;
-               }
+               return CONTACTS_ERROR_NONE;
        }
        else if (CTSVC_VIEW_CHECK_DATA_TYPE(pvalue->property_id, CTSVC_VIEW_DATA_TYPE_LLI) == true) {
-               if (ctsvc_ipc_marshal_lli(pvalue->value.l,ipc_data) != CONTACTS_ERROR_NONE) {
-                       CTS_ERR("ctsvc_ipc_marshal fail");
-                       return CONTACTS_ERROR_INVALID_PARAMETER;
-               }
+               return CONTACTS_ERROR_NONE;
        }
        else {
                ASSERT_NOT_REACHED("invalid parameter (property:%d)",pvalue->property_id);