#include "ctsvc_ipc_server.h"
#include "ctsvc_db_utils.h"
#include "ctsvc_handle.h"
+#include "ctsvc_server_utils.h"
void ctsvc_ipc_activity_delete_by_contact_id(pims_ipc_h ipc, pims_ipc_data_h indata, pims_ipc_data_h *outdata, void *userdata)
{
if (indata) {
ret = ctsvc_ipc_unmarshal_handle(indata, &contact);
if (CONTACTS_ERROR_NONE != ret) {
- CTS_ERR("ctsvc_ipc_unmarshal_handle Fail(%d)", ret);
+ /* LCOV_EXCL_START */
+ ERR("ctsvc_ipc_unmarshal_handle Fail(%d)", ret);
goto ERROR_RETURN;
+ /* LCOV_EXCL_STOP */
}
ret = ctsvc_ipc_unmarshal_int(indata, &contact_id);
if (ret != CONTACTS_ERROR_NONE) {
- CTS_ERR("ctsvc_ipc_unmarshal_int fail");
+ /* LCOV_EXCL_START */
+ ERR("ctsvc_ipc_unmarshal_int() Fail");
goto ERROR_RETURN;
+ /* LCOV_EXCL_STOP */
}
- }
- else {
- CTS_ERR("ctsvc_ipc_server_db_insert_record fail");
+ } else {
+ /* LCOV_EXCL_START */
+ ERR("ctsvc_ipc_server_db_insert_record() Fail");
goto ERROR_RETURN;
+ /* LCOV_EXCL_STOP */
}
if (!ctsvc_have_permission(ipc, CTSVC_PERMISSION_CONTACT_WRITE)) {
+ /* LCOV_EXCL_START */
ret = CONTACTS_ERROR_PERMISSION_DENIED;
goto ERROR_RETURN;
+ /* LCOV_EXCL_STOP */
}
ret = ctsvc_activity_delete_by_contact_id(contact_id);
if (outdata) {
*outdata = pims_ipc_data_create(0);
if (NULL == *outdata) {
- CTS_ERR("pims_ipc_data_create fail");
+ /* LCOV_EXCL_START */
+ ERR("pims_ipc_data_create() Fail");
goto DATA_FREE;
+ /* LCOV_EXCL_STOP */
}
- if (pims_ipc_data_put(*outdata, (void*)&ret, sizeof(int)) != 0) {
+
+ if (CONTACTS_ERROR_NONE != ctsvc_ipc_marshal_int(ret, *outdata)) {
+ /* LCOV_EXCL_START */
pims_ipc_data_destroy(*outdata);
*outdata = NULL;
- CTS_ERR("pims_ipc_data_put fail");
+ ERR("ctsvc_ipc_marshal_int() Fail");
goto DATA_FREE;
+ /* LCOV_EXCL_STOP */
}
if (ret == CONTACTS_ERROR_NONE) {
int transaction_ver = ctsvc_get_transaction_ver();
if (ctsvc_ipc_marshal_int(transaction_ver, *outdata) != CONTACTS_ERROR_NONE) {
+ /* LCOV_EXCL_START */
pims_ipc_data_destroy(*outdata);
*outdata = NULL;
- CTS_ERR("ctsvc_ipc_marshal_int fail");
+ ERR("ctsvc_ipc_marshal_int() Fail");
goto DATA_FREE;
+ /* LCOV_EXCL_STOP */
}
}
- }
- else {
- CTS_ERR("outdata is NULL");
+ } else {
+ /* LCOV_EXCL_START */
+ ERR("outdata is NULL");
+ /* LCOV_EXCL_STOP */
}
DATA_FREE:
ctsvc_handle_destroy(contact);
+ ctsvc_server_start_timeout();
return;
}
if (indata) {
ret = ctsvc_ipc_unmarshal_handle(indata, &contact);
if (CONTACTS_ERROR_NONE != ret) {
- CTS_ERR("ctsvc_ipc_unmarshal_handle Fail(%d)", ret);
+ /* LCOV_EXCL_START */
+ ERR("ctsvc_ipc_unmarshal_handle Fail(%d)", ret);
goto ERROR_RETURN;
+ /* LCOV_EXCL_STOP */
}
ret = ctsvc_ipc_unmarshal_int(indata, &account_id);
if (ret != CONTACTS_ERROR_NONE) {
- CTS_ERR("ctsvc_ipc_unmarshal_int fail");
+ /* LCOV_EXCL_START */
+ ERR("ctsvc_ipc_unmarshal_int() Fail");
goto ERROR_RETURN;
+ /* LCOV_EXCL_STOP */
}
- }
- else {
- CTS_ERR("ctsvc_ipc_activity_delete_by_account_id fail");
+ } else {
+ /* LCOV_EXCL_START */
+ ERR("ctsvc_ipc_activity_delete_by_account_id() Fail");
goto ERROR_RETURN;
+ /* LCOV_EXCL_STOP */
}
if (!ctsvc_have_permission(ipc, CTSVC_PERMISSION_CONTACT_WRITE)) {
+ /* LCOV_EXCL_START */
ret = CONTACTS_ERROR_PERMISSION_DENIED;
goto ERROR_RETURN;
+ /* LCOV_EXCL_STOP */
}
ret = ctsvc_activity_delete_by_account_id(account_id);
if (outdata) {
*outdata = pims_ipc_data_create(0);
if (NULL == *outdata) {
- CTS_ERR("pims_ipc_data_create fail");
+ /* LCOV_EXCL_START */
+ ERR("pims_ipc_data_create() Fail");
goto DATA_FREE;
+ /* LCOV_EXCL_STOP */
}
- if (pims_ipc_data_put(*outdata, (void*)&ret, sizeof(int)) != 0) {
+ if (CONTACTS_ERROR_NONE != ctsvc_ipc_marshal_int(ret, *outdata)) {
+ /* LCOV_EXCL_START */
pims_ipc_data_destroy(*outdata);
*outdata = NULL;
- CTS_ERR("pims_ipc_data_put fail");
+ ERR("ctsvc_ipc_marshal_int() Fail");
goto DATA_FREE;
+ /* LCOV_EXCL_STOP */
}
if (ret == CONTACTS_ERROR_NONE) {
int transaction_ver = ctsvc_get_transaction_ver();
if (ctsvc_ipc_marshal_int(transaction_ver, *outdata) != CONTACTS_ERROR_NONE) {
+ /* LCOV_EXCL_START */
pims_ipc_data_destroy(*outdata);
*outdata = NULL;
- CTS_ERR("ctsvc_ipc_marshal_int fail");
+ ERR("ctsvc_ipc_marshal_int() Fail");
goto DATA_FREE;
+ /* LCOV_EXCL_STOP */
}
}
- }
- else {
- CTS_ERR("outdata is NULL");
+ } else {
+ /* LCOV_EXCL_START */
+ ERR("outdata is NULL");
+ /* LCOV_EXCL_STOP */
}
DATA_FREE:
ctsvc_handle_destroy(contact);
+ ctsvc_server_start_timeout();
return;
}
if (indata) {
ret = ctsvc_ipc_unmarshal_handle(indata, &contact);
if (CONTACTS_ERROR_NONE != ret) {
- CTS_ERR("ctsvc_ipc_unmarshal_handle Fail(%d)", ret);
+ /* LCOV_EXCL_START */
+ ERR("ctsvc_ipc_unmarshal_handle Fail(%d)", ret);
goto ERROR_RETURN;
+ /* LCOV_EXCL_STOP */
}
ret = ctsvc_ipc_unmarshal_int(indata, &group_id);
if (ret != CONTACTS_ERROR_NONE) {
- CTS_ERR("ctsvc_ipc_unmarshal_int fail");
+ /* LCOV_EXCL_START */
+ ERR("ctsvc_ipc_unmarshal_int() Fail");
goto ERROR_RETURN;
+ /* LCOV_EXCL_STOP */
}
ret = ctsvc_ipc_unmarshal_int(indata, &contact_id);
if (ret != CONTACTS_ERROR_NONE) {
- CTS_ERR("ctsvc_ipc_unmarshal_int fail");
+ /* LCOV_EXCL_START */
+ ERR("ctsvc_ipc_unmarshal_int() Fail");
goto ERROR_RETURN;
+ /* LCOV_EXCL_STOP */
}
- }
- else {
- CTS_ERR("ctsvc_ipc_group_add_contact fail");
+ } else {
+ /* LCOV_EXCL_START */
+ ERR("ctsvc_ipc_group_add_contact() Fail");
goto ERROR_RETURN;
+ /* LCOV_EXCL_STOP */
}
if (!ctsvc_have_permission(ipc, CTSVC_PERMISSION_CONTACT_WRITE)) {
+ /* LCOV_EXCL_START */
ret = CONTACTS_ERROR_PERMISSION_DENIED;
goto ERROR_RETURN;
+ /* LCOV_EXCL_STOP */
}
ret = ctsvc_group_add_contact(group_id, contact_id);
if (outdata) {
*outdata = pims_ipc_data_create(0);
if (NULL == *outdata) {
- CTS_ERR("pims_ipc_data_create fail");
+ /* LCOV_EXCL_START */
+ ERR("pims_ipc_data_create() Fail");
goto DATA_FREE;
+ /* LCOV_EXCL_STOP */
}
- if (pims_ipc_data_put(*outdata, (void*)&ret, sizeof(int)) != 0) {
+ if (CONTACTS_ERROR_NONE != ctsvc_ipc_marshal_int(ret, *outdata)) {
+ /* LCOV_EXCL_START */
pims_ipc_data_destroy(*outdata);
*outdata = NULL;
- CTS_ERR("pims_ipc_data_put fail");
+ ERR("ctsvc_ipc_marshal_int() Fail");
goto DATA_FREE;
+ /* LCOV_EXCL_STOP */
}
if (ret == CONTACTS_ERROR_NONE) {
int transaction_ver = ctsvc_get_transaction_ver();
if (ctsvc_ipc_marshal_int(transaction_ver, *outdata) != CONTACTS_ERROR_NONE) {
+ /* LCOV_EXCL_START */
pims_ipc_data_destroy(*outdata);
*outdata = NULL;
- CTS_ERR("ctsvc_ipc_marshal_int fail");
+ ERR("ctsvc_ipc_marshal_int() Fail");
goto DATA_FREE;
+ /* LCOV_EXCL_STOP */
}
}
- }
- else {
- CTS_ERR("outdata is NULL");
+ } else {
+ /* LCOV_EXCL_START */
+ ERR("outdata is NULL");
+ /* LCOV_EXCL_STOP */
}
DATA_FREE:
ctsvc_handle_destroy(contact);
+ ctsvc_server_start_timeout();
return;
}
if (indata) {
ret = ctsvc_ipc_unmarshal_handle(indata, &contact);
if (CONTACTS_ERROR_NONE != ret) {
- CTS_ERR("ctsvc_ipc_unmarshal_handle Fail(%d)", ret);
+ /* LCOV_EXCL_START */
+ ERR("ctsvc_ipc_unmarshal_handle Fail(%d)", ret);
goto ERROR_RETURN;
+ /* LCOV_EXCL_STOP */
}
ret = ctsvc_ipc_unmarshal_int(indata, &group_id);
if (ret != CONTACTS_ERROR_NONE) {
- CTS_ERR("ctsvc_ipc_unmarshal_int fail");
+ /* LCOV_EXCL_START */
+ ERR("ctsvc_ipc_unmarshal_int() Fail");
goto ERROR_RETURN;
+ /* LCOV_EXCL_STOP */
}
ret = ctsvc_ipc_unmarshal_int(indata, &contact_id);
if (ret != CONTACTS_ERROR_NONE) {
- CTS_ERR("ctsvc_ipc_unmarshal_int fail");
+ /* LCOV_EXCL_START */
+ ERR("ctsvc_ipc_unmarshal_int() Fail");
goto ERROR_RETURN;
+ /* LCOV_EXCL_STOP */
}
- }
- else {
- CTS_ERR("ctsvc_ipc_group_remove_contact fail");
+ } else {
+ /* LCOV_EXCL_START */
+ ERR("ctsvc_ipc_group_remove_contact() Fail");
goto ERROR_RETURN;
+ /* LCOV_EXCL_STOP */
}
if (!ctsvc_have_permission(ipc, CTSVC_PERMISSION_CONTACT_WRITE)) {
+ /* LCOV_EXCL_START */
ret = CONTACTS_ERROR_PERMISSION_DENIED;
goto ERROR_RETURN;
+ /* LCOV_EXCL_STOP */
}
if (outdata) {
*outdata = pims_ipc_data_create(0);
if (NULL == *outdata) {
- CTS_ERR("pims_ipc_data_create fail");
+ /* LCOV_EXCL_START */
+ ERR("pims_ipc_data_create() Fail");
goto DATA_FREE;
+ /* LCOV_EXCL_STOP */
}
- if (pims_ipc_data_put(*outdata, (void*)&ret, sizeof(int)) != 0) {
+ if (CONTACTS_ERROR_NONE != ctsvc_ipc_marshal_int(ret, *outdata)) {
+ /* LCOV_EXCL_START */
pims_ipc_data_destroy(*outdata);
*outdata = NULL;
- CTS_ERR("pims_ipc_data_put fail");
+ ERR("ctsvc_ipc_marshal_int() Fail");
goto DATA_FREE;
+ /* LCOV_EXCL_STOP */
}
if (ret == CONTACTS_ERROR_NONE) {
int transaction_ver = ctsvc_get_transaction_ver();
if (ctsvc_ipc_marshal_int(transaction_ver, *outdata) != CONTACTS_ERROR_NONE) {
+ /* LCOV_EXCL_START */
pims_ipc_data_destroy(*outdata);
*outdata = NULL;
- CTS_ERR("ctsvc_ipc_marshal_int fail");
+ ERR("ctsvc_ipc_marshal_int() Fail");
goto DATA_FREE;
+ /* LCOV_EXCL_STOP */
}
}
- }
- else {
- CTS_ERR("outdata is NULL");
+ } else {
+ /* LCOV_EXCL_START */
+ ERR("outdata is NULL");
+ /* LCOV_EXCL_STOP */
}
DATA_FREE:
ctsvc_handle_destroy(contact);
+ ctsvc_server_start_timeout();
return;
}
if (indata) {
ret = ctsvc_ipc_unmarshal_handle(indata, &contact);
if (CONTACTS_ERROR_NONE != ret) {
- CTS_ERR("ctsvc_ipc_unmarshal_handle Fail(%d)", ret);
+ /* LCOV_EXCL_START */
+ ERR("ctsvc_ipc_unmarshal_handle Fail(%d)", ret);
goto ERROR_RETURN;
+ /* LCOV_EXCL_STOP */
}
ret = ctsvc_ipc_unmarshal_int(indata, &group_id);
if (ret != CONTACTS_ERROR_NONE) {
- CTS_ERR("ctsvc_ipc_unmarshal_int fail");
+ /* LCOV_EXCL_START */
+ ERR("ctsvc_ipc_unmarshal_int() Fail");
goto ERROR_RETURN;
+ /* LCOV_EXCL_STOP */
}
ret = ctsvc_ipc_unmarshal_int(indata, &previous_group_id);
if (ret != CONTACTS_ERROR_NONE) {
- CTS_ERR("ctsvc_ipc_unmarshal_int fail");
+ /* LCOV_EXCL_START */
+ ERR("ctsvc_ipc_unmarshal_int() Fail");
goto ERROR_RETURN;
+ /* LCOV_EXCL_STOP */
}
ret = ctsvc_ipc_unmarshal_int(indata, &next_group_id);
if (ret != CONTACTS_ERROR_NONE) {
- CTS_ERR("ctsvc_ipc_unmarshal_int fail");
+ /* LCOV_EXCL_START */
+ ERR("ctsvc_ipc_unmarshal_int() Fail");
goto ERROR_RETURN;
+ /* LCOV_EXCL_STOP */
}
- }
- else {
- CTS_ERR("ctsvc_ipc_group_link_group fail");
+ } else {
+ /* LCOV_EXCL_START */
+ ERR("ctsvc_ipc_group_link_group() Fail");
goto ERROR_RETURN;
+ /* LCOV_EXCL_STOP */
}
if (!ctsvc_have_permission(ipc, CTSVC_PERMISSION_CONTACT_WRITE)) {
+ /* LCOV_EXCL_START */
ret = CONTACTS_ERROR_PERMISSION_DENIED;
goto ERROR_RETURN;
+ /* LCOV_EXCL_STOP */
}
ret = ctsvc_group_set_group_order(group_id, previous_group_id, next_group_id);
if (outdata) {
*outdata = pims_ipc_data_create(0);
if (NULL == *outdata) {
- CTS_ERR("pims_ipc_data_create fail");
+ /* LCOV_EXCL_START */
+ ERR("pims_ipc_data_create() Fail");
goto DATA_FREE;
+ /* LCOV_EXCL_STOP */
}
- if (pims_ipc_data_put(*outdata, (void*)&ret, sizeof(int)) != 0) {
+ if (CONTACTS_ERROR_NONE != ctsvc_ipc_marshal_int(ret, *outdata)) {
+ /* LCOV_EXCL_START */
pims_ipc_data_destroy(*outdata);
*outdata = NULL;
- CTS_ERR("pims_ipc_data_put fail");
+ ERR("ctsvc_ipc_marshal_int() Fail");
goto DATA_FREE;
+ /* LCOV_EXCL_STOP */
}
if (ret == CONTACTS_ERROR_NONE) {
int transaction_ver = ctsvc_get_transaction_ver();
if (ctsvc_ipc_marshal_int(transaction_ver, *outdata) != CONTACTS_ERROR_NONE) {
+ /* LCOV_EXCL_START */
pims_ipc_data_destroy(*outdata);
*outdata = NULL;
- CTS_ERR("ctsvc_ipc_marshal_int fail");
+ ERR("ctsvc_ipc_marshal_int() Fail");
goto DATA_FREE;
+ /* LCOV_EXCL_STOP */
}
}
- }
- else {
- CTS_ERR("outdata is NULL");
+ } else {
+ /* LCOV_EXCL_START */
+ ERR("outdata is NULL");
+ /* LCOV_EXCL_STOP */
}
DATA_FREE:
ctsvc_handle_destroy(contact);
+ ctsvc_server_start_timeout();
return;
}
if (indata) {
ret = ctsvc_ipc_unmarshal_handle(indata, &contact);
if (CONTACTS_ERROR_NONE != ret) {
- CTS_ERR("ctsvc_ipc_unmarshal_handle Fail(%d)", ret);
+ /* LCOV_EXCL_START */
+ ERR("ctsvc_ipc_unmarshal_handle Fail(%d)", ret);
goto ERROR_RETURN;
+ /* LCOV_EXCL_STOP */
}
ret = ctsvc_ipc_unmarshal_int(indata, &base_person_id);
if (ret != CONTACTS_ERROR_NONE) {
- CTS_ERR("ctsvc_ipc_unmarshal_int fail");
+ /* LCOV_EXCL_START */
+ ERR("ctsvc_ipc_unmarshal_int() Fail");
goto ERROR_RETURN;
+ /* LCOV_EXCL_STOP */
}
ret = ctsvc_ipc_unmarshal_int(indata, &person_id);
if (ret != CONTACTS_ERROR_NONE) {
- CTS_ERR("ctsvc_ipc_unmarshal_int fail");
+ /* LCOV_EXCL_START */
+ ERR("ctsvc_ipc_unmarshal_int() Fail");
goto ERROR_RETURN;
+ /* LCOV_EXCL_STOP */
}
- }
- else {
- CTS_ERR("ctsvc_ipc_person_link_person fail");
+ } else {
+ /* LCOV_EXCL_START */
+ ERR("ctsvc_ipc_person_link_person() Fail");
goto ERROR_RETURN;
+ /* LCOV_EXCL_STOP */
}
if (!ctsvc_have_permission(ipc, CTSVC_PERMISSION_CONTACT_WRITE)) {
+ /* LCOV_EXCL_START */
ret = CONTACTS_ERROR_PERMISSION_DENIED;
goto ERROR_RETURN;
+ /* LCOV_EXCL_STOP */
}
ret = ctsvc_person_link_person(base_person_id, person_id);
if (outdata) {
*outdata = pims_ipc_data_create(0);
if (NULL == *outdata) {
- CTS_ERR("pims_ipc_data_create fail");
+ /* LCOV_EXCL_START */
+ ERR("pims_ipc_data_create() Fail");
goto DATA_FREE;
+ /* LCOV_EXCL_STOP */
}
- if (pims_ipc_data_put(*outdata, (void*)&ret, sizeof(int)) != 0) {
+ if (CONTACTS_ERROR_NONE != ctsvc_ipc_marshal_int(ret, *outdata)) {
+ /* LCOV_EXCL_START */
pims_ipc_data_destroy(*outdata);
*outdata = NULL;
- CTS_ERR("pims_ipc_data_put fail");
+ ERR("ctsvc_ipc_marshal_int() Fail");
goto DATA_FREE;
+ /* LCOV_EXCL_STOP */
}
if (ret == CONTACTS_ERROR_NONE) {
int transaction_ver = ctsvc_get_transaction_ver();
if (ctsvc_ipc_marshal_int(transaction_ver, *outdata) != CONTACTS_ERROR_NONE) {
+ /* LCOV_EXCL_START */
pims_ipc_data_destroy(*outdata);
*outdata = NULL;
- CTS_ERR("ctsvc_ipc_marshal_int fail");
+ ERR("ctsvc_ipc_marshal_int() Fail");
goto DATA_FREE;
+ /* LCOV_EXCL_STOP */
}
}
- }
- else {
- CTS_ERR("outdata is NULL");
+ } else {
+ /* LCOV_EXCL_START */
+ ERR("outdata is NULL");
+ /* LCOV_EXCL_STOP */
}
DATA_FREE:
ctsvc_handle_destroy(contact);
+ ctsvc_server_start_timeout();
return;
}
void ctsvc_ipc_person_unlink_contact(pims_ipc_h ipc, pims_ipc_data_h indata, pims_ipc_data_h *outdata, void *userdata)
int ret = CONTACTS_ERROR_NONE;
int person_id = 0;
int contact_id = 0;
+ int unlinked_person_id = 0;
contacts_h contact = NULL;
if (indata) {
ret = ctsvc_ipc_unmarshal_handle(indata, &contact);
if (CONTACTS_ERROR_NONE != ret) {
- CTS_ERR("ctsvc_ipc_unmarshal_handle Fail(%d)", ret);
+ /* LCOV_EXCL_START */
+ ERR("ctsvc_ipc_unmarshal_handle Fail(%d)", ret);
goto ERROR_RETURN;
+ /* LCOV_EXCL_STOP */
}
ret = ctsvc_ipc_unmarshal_int(indata, &person_id);
if (ret != CONTACTS_ERROR_NONE) {
- CTS_ERR("ctsvc_ipc_unmarshal_int fail");
+ /* LCOV_EXCL_START */
+ ERR("ctsvc_ipc_unmarshal_int() Fail");
goto ERROR_RETURN;
+ /* LCOV_EXCL_STOP */
}
ret = ctsvc_ipc_unmarshal_int(indata, &contact_id);
if (ret != CONTACTS_ERROR_NONE) {
- CTS_ERR("ctsvc_ipc_unmarshal_int fail");
+ /* LCOV_EXCL_START */
+ ERR("ctsvc_ipc_unmarshal_int() Fail");
goto ERROR_RETURN;
+ /* LCOV_EXCL_STOP */
}
- }
- else {
- CTS_ERR("ctsvc_ipc_person_link_person fail");
+ } else {
+ /* LCOV_EXCL_START */
+ ERR("ctsvc_ipc_person_link_person() Fail");
goto ERROR_RETURN;
+ /* LCOV_EXCL_STOP */
}
if (!ctsvc_have_permission(ipc, CTSVC_PERMISSION_CONTACT_WRITE)) {
+ /* LCOV_EXCL_START */
ret = CONTACTS_ERROR_PERMISSION_DENIED;
goto ERROR_RETURN;
+ /* LCOV_EXCL_STOP */
}
- int unlinked_person_id;
ret = ctsvc_person_unlink_contact(person_id, contact_id, &unlinked_person_id);
ERROR_RETURN:
if (outdata) {
*outdata = pims_ipc_data_create(0);
if (NULL == *outdata) {
- CTS_ERR("pims_ipc_data_create fail");
+ /* LCOV_EXCL_START */
+ ERR("pims_ipc_data_create() Fail");
goto DATA_FREE;
+ /* LCOV_EXCL_STOP */
}
- if (pims_ipc_data_put(*outdata, (void*)&ret, sizeof(int)) != 0) {
+ if (CONTACTS_ERROR_NONE != ctsvc_ipc_marshal_int(ret, *outdata)) {
+ /* LCOV_EXCL_START */
pims_ipc_data_destroy(*outdata);
*outdata = NULL;
- CTS_ERR("pims_ipc_data_put fail");
+ ERR("ctsvc_ipc_marshal_int() Fail");
goto DATA_FREE;
+ /* LCOV_EXCL_STOP */
}
if (ret == CONTACTS_ERROR_NONE) {
int transaction_ver = ctsvc_get_transaction_ver();
if (ctsvc_ipc_marshal_int(transaction_ver, *outdata) != CONTACTS_ERROR_NONE) {
+ /* LCOV_EXCL_START */
pims_ipc_data_destroy(*outdata);
*outdata = NULL;
- CTS_ERR("ctsvc_ipc_marshal_int fail");
+ ERR("ctsvc_ipc_marshal_int() Fail");
goto DATA_FREE;
+ /* LCOV_EXCL_STOP */
}
}
- if (pims_ipc_data_put(*outdata, (void*)&unlinked_person_id, sizeof(int)) != 0) {
+ if (CONTACTS_ERROR_NONE != ctsvc_ipc_marshal_int(unlinked_person_id, *outdata)) {
+ /* LCOV_EXCL_START */
pims_ipc_data_destroy(*outdata);
*outdata = NULL;
- CTS_ERR("pims_ipc_data_put fail");
+ ERR("ctsvc_ipc_marshal_int() Fail");
goto DATA_FREE;
+ /* LCOV_EXCL_STOP */
}
- }
- else {
- CTS_ERR("outdata is NULL");
+ } else {
+ /* LCOV_EXCL_START */
+ ERR("outdata is NULL");
+ /* LCOV_EXCL_STOP */
}
DATA_FREE:
ctsvc_handle_destroy(contact);
+ ctsvc_server_start_timeout();
return;
}
void ctsvc_ipc_person_reset_usage(pims_ipc_h ipc, pims_ipc_data_h indata, pims_ipc_data_h *outdata, void *userdata)
if (indata) {
ret = ctsvc_ipc_unmarshal_handle(indata, &contact);
if (CONTACTS_ERROR_NONE != ret) {
- CTS_ERR("ctsvc_ipc_unmarshal_handle Fail(%d)", ret);
+ /* LCOV_EXCL_START */
+ ERR("ctsvc_ipc_unmarshal_handle Fail(%d)", ret);
goto ERROR_RETURN;
+ /* LCOV_EXCL_STOP */
}
ret = ctsvc_ipc_unmarshal_int(indata, &person_id);
if (ret != CONTACTS_ERROR_NONE) {
- CTS_ERR("ctsvc_ipc_unmarshal_int fail");
+ /* LCOV_EXCL_START */
+ ERR("ctsvc_ipc_unmarshal_int() Fail");
goto ERROR_RETURN;
+ /* LCOV_EXCL_STOP */
}
int temp = 0;
ret = ctsvc_ipc_unmarshal_int(indata, &temp);
type = (int)temp;
if (ret != CONTACTS_ERROR_NONE) {
- CTS_ERR("ctsvc_ipc_unmarshal_int fail");
+ /* LCOV_EXCL_START */
+ ERR("ctsvc_ipc_unmarshal_int() Fail");
goto ERROR_RETURN;
+ /* LCOV_EXCL_STOP */
}
- }
- else {
- CTS_ERR("ctsvc_ipc_person_link_person fail");
+ } else {
+ /* LCOV_EXCL_START */
+ ERR("ctsvc_ipc_person_link_person() Fail");
goto ERROR_RETURN;
+ /* LCOV_EXCL_STOP */
}
if (!ctsvc_have_permission(ipc, CTSVC_PERMISSION_CONTACT_WRITE)) {
+ /* LCOV_EXCL_START */
ret = CONTACTS_ERROR_PERMISSION_DENIED;
goto ERROR_RETURN;
+ /* LCOV_EXCL_STOP */
}
ret = ctsvc_person_reset_usage(person_id, type);
if (outdata) {
*outdata = pims_ipc_data_create(0);
if (NULL == *outdata) {
- CTS_ERR("pims_ipc_data_create fail");
+ /* LCOV_EXCL_START */
+ ERR("pims_ipc_data_create() Fail");
goto DATA_FREE;
+ /* LCOV_EXCL_STOP */
}
- if (pims_ipc_data_put(*outdata, (void*)&ret, sizeof(int)) != 0) {
+ if (CONTACTS_ERROR_NONE != ctsvc_ipc_marshal_int(ret, *outdata)) {
+ /* LCOV_EXCL_START */
pims_ipc_data_destroy(*outdata);
*outdata = NULL;
- CTS_ERR("pims_ipc_data_put fail");
+ ERR("ctsvc_ipc_marshal_int() Fail");
goto DATA_FREE;
+ /* LCOV_EXCL_STOP */
}
if (ret == CONTACTS_ERROR_NONE) {
int transaction_ver = ctsvc_get_transaction_ver();
if (ctsvc_ipc_marshal_int(transaction_ver, *outdata) != CONTACTS_ERROR_NONE) {
+ /* LCOV_EXCL_START */
pims_ipc_data_destroy(*outdata);
*outdata = NULL;
- CTS_ERR("ctsvc_ipc_marshal_int fail");
+ ERR("ctsvc_ipc_marshal_int() Fail");
goto DATA_FREE;
+ /* LCOV_EXCL_STOP */
}
}
- }
- else {
- CTS_ERR("outdata is NULL");
+ } else {
+ /* LCOV_EXCL_START */
+ ERR("outdata is NULL");
+ /* LCOV_EXCL_STOP */
}
DATA_FREE:
ctsvc_handle_destroy(contact);
+ ctsvc_server_start_timeout();
return;
}
void ctsvc_ipc_person_set_favorite_order(pims_ipc_h ipc, pims_ipc_data_h indata, pims_ipc_data_h *outdata, void *userdata)
if (indata) {
ret = ctsvc_ipc_unmarshal_handle(indata, &contact);
if (CONTACTS_ERROR_NONE != ret) {
- CTS_ERR("ctsvc_ipc_unmarshal_handle Fail(%d)", ret);
+ /* LCOV_EXCL_START */
+ ERR("ctsvc_ipc_unmarshal_handle Fail(%d)", ret);
goto ERROR_RETURN;
+ /* LCOV_EXCL_STOP */
}
ret = ctsvc_ipc_unmarshal_int(indata, &person_id);
if (ret != CONTACTS_ERROR_NONE) {
- CTS_ERR("ctsvc_ipc_unmarshal_int fail");
+ /* LCOV_EXCL_START */
+ ERR("ctsvc_ipc_unmarshal_int() Fail");
goto ERROR_RETURN;
+ /* LCOV_EXCL_STOP */
}
ret = ctsvc_ipc_unmarshal_int(indata, &previous_person_id);
if (ret != CONTACTS_ERROR_NONE) {
- CTS_ERR("ctsvc_ipc_unmarshal_int fail");
+ /* LCOV_EXCL_START */
+ ERR("ctsvc_ipc_unmarshal_int() Fail");
goto ERROR_RETURN;
+ /* LCOV_EXCL_STOP */
}
ret = ctsvc_ipc_unmarshal_int(indata, &next_person_id);
if (ret != CONTACTS_ERROR_NONE) {
- CTS_ERR("ctsvc_ipc_unmarshal_int fail");
+ /* LCOV_EXCL_START */
+ ERR("ctsvc_ipc_unmarshal_int() Fail");
goto ERROR_RETURN;
+ /* LCOV_EXCL_STOP */
}
- }
- else {
- CTS_ERR("ctsvc_ipc_person_link_person fail");
+ } else {
+ /* LCOV_EXCL_START */
+ ERR("ctsvc_ipc_person_link_person() Fail");
goto ERROR_RETURN;
+ /* LCOV_EXCL_STOP */
}
if (!ctsvc_have_permission(ipc, CTSVC_PERMISSION_CONTACT_WRITE)) {
+ /* LCOV_EXCL_START */
ret = CONTACTS_ERROR_PERMISSION_DENIED;
goto ERROR_RETURN;
+ /* LCOV_EXCL_STOP */
}
ret = ctsvc_person_set_favorite_order(person_id, previous_person_id, next_person_id);
if (outdata) {
*outdata = pims_ipc_data_create(0);
if (NULL == *outdata) {
- CTS_ERR("pims_ipc_data_create fail");
+ /* LCOV_EXCL_START */
+ ERR("pims_ipc_data_create() Fail");
goto DATA_FREE;
+ /* LCOV_EXCL_STOP */
}
- if (pims_ipc_data_put(*outdata, (void*)&ret, sizeof(int)) != 0) {
+ if (CONTACTS_ERROR_NONE != ctsvc_ipc_marshal_int(ret, *outdata)) {
+ /* LCOV_EXCL_START */
pims_ipc_data_destroy(*outdata);
*outdata = NULL;
- CTS_ERR("pims_ipc_data_put fail");
+ ERR("ctsvc_ipc_marshal_int() Fail");
goto DATA_FREE;
+ /* LCOV_EXCL_STOP */
}
if (ret == CONTACTS_ERROR_NONE) {
int transaction_ver = ctsvc_get_transaction_ver();
if (ctsvc_ipc_marshal_int(transaction_ver, *outdata) != CONTACTS_ERROR_NONE) {
+ /* LCOV_EXCL_START */
pims_ipc_data_destroy(*outdata);
*outdata = NULL;
- CTS_ERR("ctsvc_ipc_marshal_int fail");
+ ERR("ctsvc_ipc_marshal_int() Fail");
goto DATA_FREE;
+ /* LCOV_EXCL_STOP */
}
}
- }
- else {
- CTS_ERR("outdata is NULL");
+ } else {
+ /* LCOV_EXCL_START */
+ ERR("outdata is NULL");
+ /* LCOV_EXCL_STOP */
}
DATA_FREE:
ctsvc_handle_destroy(contact);
+ ctsvc_server_start_timeout();
return;
}
if (indata) {
ret = ctsvc_ipc_unmarshal_handle(indata, &contact);
if (CONTACTS_ERROR_NONE != ret) {
- CTS_ERR("ctsvc_ipc_unmarshal_handle Fail(%d)", ret);
+ /* LCOV_EXCL_START */
+ ERR("ctsvc_ipc_unmarshal_handle Fail(%d)", ret);
goto ERROR_RETURN;
+ /* LCOV_EXCL_STOP */
}
ret = ctsvc_ipc_unmarshal_int(indata, &person_id);
if (ret != CONTACTS_ERROR_NONE) {
- CTS_ERR("ctsvc_ipc_unmarshal_int fail");
+ /* LCOV_EXCL_START */
+ ERR("ctsvc_ipc_unmarshal_int() Fail");
goto ERROR_RETURN;
+ /* LCOV_EXCL_STOP */
}
ret = ctsvc_ipc_unmarshal_unsigned_int(indata, &property);
if (ret != CONTACTS_ERROR_NONE) {
- CTS_ERR("ctsvc_ipc_unmarshal_int fail");
+ /* LCOV_EXCL_START */
+ ERR("ctsvc_ipc_unmarshal_int() Fail");
goto ERROR_RETURN;
+ /* LCOV_EXCL_STOP */
}
ret = ctsvc_ipc_unmarshal_int(indata, &id);
if (ret != CONTACTS_ERROR_NONE) {
- CTS_ERR("ctsvc_ipc_unmarshal_int fail");
+ /* LCOV_EXCL_START */
+ ERR("ctsvc_ipc_unmarshal_int() Fail");
goto ERROR_RETURN;
+ /* LCOV_EXCL_STOP */
}
+ } else {
+ /* LCOV_EXCL_START */
+ ERR("ctsvc_ipc_person_set_default_property() Fail");
+ goto ERROR_RETURN;
+ /* LCOV_EXCL_STOP */
}
- else {
- CTS_ERR("ctsvc_ipc_person_set_default_property fail");
+
+ if (!ctsvc_have_permission(ipc, CTSVC_PERMISSION_CONTACT_WRITE)) {
+ /* LCOV_EXCL_START */
+ ret = CONTACTS_ERROR_PERMISSION_DENIED;
goto ERROR_RETURN;
+ /* LCOV_EXCL_STOP */
}
ret = ctsvc_person_set_default_property(property, person_id, id);
if (outdata) {
*outdata = pims_ipc_data_create(0);
if (NULL == *outdata) {
- CTS_ERR("pims_ipc_data_create fail");
+ /* LCOV_EXCL_START */
+ ERR("pims_ipc_data_create() Fail");
goto DATA_FREE;
+ /* LCOV_EXCL_STOP */
}
- if (pims_ipc_data_put(*outdata, (void*)&ret, sizeof(int)) != 0) {
+ if (CONTACTS_ERROR_NONE != ctsvc_ipc_marshal_int(ret, *outdata)) {
+ /* LCOV_EXCL_START */
pims_ipc_data_destroy(*outdata);
*outdata = NULL;
- CTS_ERR("pims_ipc_data_put fail");
+ ERR("ctsvc_ipc_marshal_int() Fail");
goto DATA_FREE;
+ /* LCOV_EXCL_STOP */
}
if (ret == CONTACTS_ERROR_NONE) {
int transaction_ver = ctsvc_get_transaction_ver();
if (ctsvc_ipc_marshal_int(transaction_ver, *outdata) != CONTACTS_ERROR_NONE) {
+ /* LCOV_EXCL_START */
pims_ipc_data_destroy(*outdata);
*outdata = NULL;
- CTS_ERR("ctsvc_ipc_marshal_int fail");
+ ERR("ctsvc_ipc_marshal_int() Fail");
goto DATA_FREE;
+ /* LCOV_EXCL_STOP */
}
}
- }
- else {
- CTS_ERR("outdata is NULL");
+ } else {
+ /* LCOV_EXCL_START */
+ ERR("outdata is NULL");
+ /* LCOV_EXCL_STOP */
}
DATA_FREE:
ctsvc_handle_destroy(contact);
+ ctsvc_server_start_timeout();
return;
}
{
int ret = CONTACTS_ERROR_NONE;
int person_id = 0;
- int id;
+ int id = 0;
contacts_person_property_e op;
contacts_h contact = NULL;
if (indata) {
ret = ctsvc_ipc_unmarshal_handle(indata, &contact);
if (CONTACTS_ERROR_NONE != ret) {
- CTS_ERR("ctsvc_ipc_unmarshal_handle Fail(%d)", ret);
+ /* LCOV_EXCL_START */
+ ERR("ctsvc_ipc_unmarshal_handle Fail(%d)", ret);
goto ERROR_RETURN;
+ /* LCOV_EXCL_STOP */
}
ret = ctsvc_ipc_unmarshal_int(indata, &person_id);
if (ret != CONTACTS_ERROR_NONE) {
- CTS_ERR("ctsvc_ipc_unmarshal_int fail");
+ /* LCOV_EXCL_START */
+ ERR("ctsvc_ipc_unmarshal_int() Fail");
goto ERROR_RETURN;
+ /* LCOV_EXCL_STOP */
}
ret = ctsvc_ipc_unmarshal_unsigned_int(indata, &op);
if (ret != CONTACTS_ERROR_NONE) {
- CTS_ERR("ctsvc_ipc_unmarshal_int fail");
+ /* LCOV_EXCL_START */
+ ERR("ctsvc_ipc_unmarshal_int() Fail");
goto ERROR_RETURN;
+ /* LCOV_EXCL_STOP */
}
- }
- else {
- CTS_ERR("ctsvc_ipc_person_get_default_property fail");
+ } else {
+ /* LCOV_EXCL_START */
+ ERR("ctsvc_ipc_person_get_default_property() Fail");
goto ERROR_RETURN;
+ /* LCOV_EXCL_STOP */
}
if (!ctsvc_have_permission(ipc, CTSVC_PERMISSION_CONTACT_READ)) {
+ /* LCOV_EXCL_START */
ret = CONTACTS_ERROR_PERMISSION_DENIED;
goto ERROR_RETURN;
+ /* LCOV_EXCL_STOP */
}
ret = ctsvc_person_get_default_property(op, person_id, &id);
if (outdata) {
*outdata = pims_ipc_data_create(0);
if (NULL == *outdata) {
- CTS_ERR("pims_ipc_data_create fail");
+ /* LCOV_EXCL_START */
+ ERR("pims_ipc_data_create() Fail");
goto DATA_FREE;
+ /* LCOV_EXCL_STOP */
}
- if (pims_ipc_data_put(*outdata, (void*)&ret, sizeof(int)) != 0) {
+ if (CONTACTS_ERROR_NONE != ctsvc_ipc_marshal_int(ret, *outdata)) {
+ /* LCOV_EXCL_START */
pims_ipc_data_destroy(*outdata);
*outdata = NULL;
- CTS_ERR("pims_ipc_data_put fail (return value)");
+ ERR("ctsvc_ipc_marshal_int() Fail (return value)");
goto DATA_FREE;
+ /* LCOV_EXCL_STOP */
}
- if (pims_ipc_data_put(*outdata, (void*)&id, sizeof(int)) != 0) {
+ if (CONTACTS_ERROR_NONE != ctsvc_ipc_marshal_int(id, *outdata)) {
+ /* LCOV_EXCL_START */
pims_ipc_data_destroy(*outdata);
*outdata = NULL;
- CTS_ERR("pims_ipc_data_put fail (id)");
+ ERR("ctsvc_ipc_marshal_int() Fail (id)");
goto DATA_FREE;
+ /* LCOV_EXCL_STOP */
+ }
+ } else {
+ /* LCOV_EXCL_START */
+ ERR("outdata is NULL");
+ /* LCOV_EXCL_STOP */
+ }
+DATA_FREE:
+ ctsvc_handle_destroy(contact);
+ ctsvc_server_start_timeout();
+ return;
+}
+
+void ctsvc_ipc_person_get_aggregation_suggestions(pims_ipc_h ipc, pims_ipc_data_h indata,
+ pims_ipc_data_h *outdata, void *userdata)
+{
+ int ret = CONTACTS_ERROR_NONE;
+ int person_id = 0;
+ int limit = 0;
+ contacts_list_h list = NULL;
+ contacts_h contact = NULL;
+
+ if (indata) {
+ ret = ctsvc_ipc_unmarshal_handle(indata, &contact);
+ if (CONTACTS_ERROR_NONE != ret) {
+ /* LCOV_EXCL_START */
+ ERR("ctsvc_ipc_unmarshal_handle Fail(%d)", ret);
+ goto ERROR_RETURN;
+ /* LCOV_EXCL_STOP */
+ }
+ ret = ctsvc_ipc_unmarshal_int(indata, &person_id);
+ if (ret != CONTACTS_ERROR_NONE) {
+ /* LCOV_EXCL_START */
+ ERR("ctsvc_ipc_unmarshal_int() Fail(%d)", ret);
+ goto ERROR_RETURN;
+ /* LCOV_EXCL_STOP */
+ }
+ ret = ctsvc_ipc_unmarshal_int(indata, &limit);
+ if (ret != CONTACTS_ERROR_NONE) {
+ /* LCOV_EXCL_START */
+ ERR("ctsvc_ipc_unmarshal_int() Fail(%d)", ret);
+ goto ERROR_RETURN;
+ /* LCOV_EXCL_STOP */
}
+ } else {
+ /* LCOV_EXCL_START */
+ ERR("ctsvc_ipc_person_get_aggregation_suggestions() Fail");
+ goto ERROR_RETURN;
+ /* LCOV_EXCL_STOP */
+ }
+
+ if (!ctsvc_have_permission(ipc, CTSVC_PERMISSION_CONTACT_READ)) {
+ /* LCOV_EXCL_START */
+ ret = CONTACTS_ERROR_PERMISSION_DENIED;
+ goto ERROR_RETURN;
+ /* LCOV_EXCL_STOP */
}
- else {
- CTS_ERR("outdata is NULL");
+
+ ret = ctsvc_person_get_aggregation_suggestions(person_id, limit, &list);
+
+ERROR_RETURN:
+
+ if (outdata) {
+ *outdata = pims_ipc_data_create(0);
+ if (NULL == *outdata) {
+ /* LCOV_EXCL_START */
+ ERR("pims_ipc_data_create() Fail");
+ goto DATA_FREE;
+ /* LCOV_EXCL_STOP */
+ }
+ if (CONTACTS_ERROR_NONE != ctsvc_ipc_marshal_int(ret, *outdata)) {
+ /* LCOV_EXCL_START */
+ pims_ipc_data_destroy(*outdata);
+ *outdata = NULL;
+ ERR("ctsvc_ipc_marshal_int() Fail");
+ goto DATA_FREE;
+ /* LCOV_EXCL_STOP */
+ }
+
+ if (CONTACTS_ERROR_NO_DATA == ret) {
+ DBG("no data");
+ } else if (CONTACTS_ERROR_NONE == ret) {
+ ret = ctsvc_ipc_marshal_list(list, *outdata);
+
+ if (ret != CONTACTS_ERROR_NONE) {
+ /* LCOV_EXCL_START */
+ ERR("ctsvc_ipc_marshal_list() Fail(%d)", ret);
+ goto DATA_FREE;
+ /* LCOV_EXCL_STOP */
+ }
+ }
+ } else {
+ /* LCOV_EXCL_START */
+ ERR("outdata is NULL");
+ /* LCOV_EXCL_STOP */
}
DATA_FREE:
ctsvc_handle_destroy(contact);
+ contacts_list_destroy(list, true);
+ ctsvc_server_start_timeout();
return;
}
#ifdef ENABLE_LOG_FEATURE
-void ctsvc_ipc_phone_log_reset_statistics(pims_ipc_h ipc, pims_ipc_data_h indata, pims_ipc_data_h *outdata, void *userdata)
+void ctsvc_ipc_phone_log_reset_statistics(pims_ipc_h ipc,
+ pims_ipc_data_h indata, pims_ipc_data_h *outdata, void *userdata)
{
int ret;
contacts_h contact = NULL;
if (indata) {
ret = ctsvc_ipc_unmarshal_handle(indata, &contact);
if (CONTACTS_ERROR_NONE != ret) {
- CTS_ERR("ctsvc_ipc_unmarshal_handle Fail(%d)", ret);
+ /* LCOV_EXCL_START */
+ ERR("ctsvc_ipc_unmarshal_handle Fail(%d)", ret);
goto ERROR_RETURN;
+ /* LCOV_EXCL_STOP */
}
}
if (!ctsvc_have_permission(ipc, CTSVC_PERMISSION_PHONELOG_WRITE)) {
+ /* LCOV_EXCL_START */
ret = CONTACTS_ERROR_PERMISSION_DENIED;
goto ERROR_RETURN;
+ /* LCOV_EXCL_STOP */
}
ret = ctsvc_phone_log_reset_statistics();
if (outdata) {
*outdata = pims_ipc_data_create(0);
if (NULL == *outdata) {
- CTS_ERR("pims_ipc_data_create fail");
+ /* LCOV_EXCL_START */
+ ERR("pims_ipc_data_create() Fail");
goto DATA_FREE;
+ /* LCOV_EXCL_STOP */
}
- if (pims_ipc_data_put(*outdata, (void*)&ret, sizeof(int)) != 0) {
+ if (CONTACTS_ERROR_NONE != ctsvc_ipc_marshal_int(ret, *outdata)) {
+ /* LCOV_EXCL_START */
pims_ipc_data_destroy(*outdata);
*outdata = NULL;
- CTS_ERR("pims_ipc_data_put fail");
+ ERR("ctsvc_ipc_marshal_int() Fail");
goto DATA_FREE;
+ /* LCOV_EXCL_STOP */
}
if (ret == CONTACTS_ERROR_NONE) {
int transaction_ver = ctsvc_get_transaction_ver();
if (ctsvc_ipc_marshal_int(transaction_ver, *outdata) != CONTACTS_ERROR_NONE) {
+ /* LCOV_EXCL_START */
pims_ipc_data_destroy(*outdata);
*outdata = NULL;
- CTS_ERR("ctsvc_ipc_marshal_int fail");
+ ERR("ctsvc_ipc_marshal_int() Fail");
goto DATA_FREE;
+ /* LCOV_EXCL_STOP */
}
}
+ } else {
+ /* LCOV_EXCL_START */
+ ERR("outdata is NULL");
+ /* LCOV_EXCL_STOP */
+ }
+DATA_FREE:
+ ctsvc_handle_destroy(contact);
+ ctsvc_server_start_timeout();
+ return;
+}
+
+void ctsvc_ipc_phone_log_reset_statistics_by_sim(pims_ipc_h ipc,
+ pims_ipc_data_h indata, pims_ipc_data_h *outdata, void *userdata)
+{
+ int ret;
+ int sim_slot_no = 0;
+ contacts_h contact = NULL;
+
+ if (indata) {
+ ret = ctsvc_ipc_unmarshal_handle(indata, &contact);
+ if (CONTACTS_ERROR_NONE != ret) {
+ /* LCOV_EXCL_START */
+ ERR("ctsvc_ipc_unmarshal_handle Fail(%d)", ret);
+ goto ERROR_RETURN;
+ /* LCOV_EXCL_STOP */
+ }
+
+ ret = ctsvc_ipc_unmarshal_int(indata, &sim_slot_no);
+ if (CONTACTS_ERROR_NONE != ret) {
+ /* LCOV_EXCL_START */
+ ERR("ctsvc_ipc_unmarshal_int() Fail(%d)", ret);
+ goto ERROR_RETURN;
+ /* LCOV_EXCL_STOP */
+ }
+ } else {
+ /* LCOV_EXCL_START */
+ ret = CONTACTS_ERROR_IPC;
+ ERR("ctsvc_ipc_phone_log_reset_statistics_by_sim() Fail");
+ goto ERROR_RETURN;
+ /* LCOV_EXCL_STOP */
+ }
+
+ if (!ctsvc_have_permission(ipc, CTSVC_PERMISSION_PHONELOG_WRITE)) {
+ /* LCOV_EXCL_START */
+ ret = CONTACTS_ERROR_PERMISSION_DENIED;
+ goto ERROR_RETURN;
+ /* LCOV_EXCL_STOP */
}
- else {
- CTS_ERR("outdata is NULL");
+
+ ret = ctsvc_phone_log_reset_statistics_by_sim(sim_slot_no);
+
+ERROR_RETURN:
+ if (outdata) {
+ *outdata = pims_ipc_data_create(0);
+ if (NULL == *outdata) {
+ /* LCOV_EXCL_START */
+ ERR("pims_ipc_data_create() Fail");
+ goto DATA_FREE;
+ /* LCOV_EXCL_STOP */
+ }
+ if (CONTACTS_ERROR_NONE != ctsvc_ipc_marshal_int(ret, *outdata)) {
+ /* LCOV_EXCL_START */
+ pims_ipc_data_destroy(*outdata);
+ *outdata = NULL;
+ ERR("ctsvc_ipc_marshal_int() Fail");
+ goto DATA_FREE;
+ /* LCOV_EXCL_STOP */
+ }
+ if (CONTACTS_ERROR_NONE == ret) {
+ int transaction_ver = ctsvc_get_transaction_ver();
+ if (CONTACTS_ERROR_NONE != ctsvc_ipc_marshal_int(transaction_ver, *outdata)) {
+ /* LCOV_EXCL_START */
+ pims_ipc_data_destroy(*outdata);
+ *outdata = NULL;
+ ERR("ctsvc_ipc_marshal_int() Fail");
+ goto DATA_FREE;
+ /* LCOV_EXCL_STOP */
+ }
+ }
+ } else {
+ /* LCOV_EXCL_START */
+ ERR("outdata is NULL");
+ /* LCOV_EXCL_STOP */
}
DATA_FREE:
ctsvc_handle_destroy(contact);
+ ctsvc_server_start_timeout();
return;
}
+
void ctsvc_ipc_phone_log_delete(pims_ipc_h ipc, pims_ipc_data_h indata,
pims_ipc_data_h *outdata, void *userdata)
{
- int ret= CONTACTS_ERROR_NONE;
+ int ret = CONTACTS_ERROR_NONE;
int extra_data1;
char *number = NULL;
contacts_phone_log_delete_e op;
if (indata) {
ret = ctsvc_ipc_unmarshal_handle(indata, &contact);
if (CONTACTS_ERROR_NONE != ret) {
- CTS_ERR("ctsvc_ipc_unmarshal_handle Fail(%d)", ret);
+ /* LCOV_EXCL_START */
+ ERR("ctsvc_ipc_unmarshal_handle Fail(%d)", ret);
goto ERROR_RETURN;
+ /* LCOV_EXCL_STOP */
}
ret = ctsvc_ipc_unmarshal_int(indata, (int*)&op);
if (ret != CONTACTS_ERROR_NONE) {
- CTS_ERR("ctsvc_ipc_unmarshal_int fail");
+ /* LCOV_EXCL_START */
+ ERR("ctsvc_ipc_unmarshal_int() Fail");
goto ERROR_RETURN;
- if (!ctsvc_have_permission(ipc, CTSVC_PERMISSION_PHONELOG_WRITE)) {
- ret = CONTACTS_ERROR_PERMISSION_DENIED;
- goto ERROR_RETURN;
- }
+ /* LCOV_EXCL_STOP */
+ }
+ if (!ctsvc_have_permission(ipc, CTSVC_PERMISSION_PHONELOG_WRITE)) {
+ /* LCOV_EXCL_START */
+ ret = CONTACTS_ERROR_PERMISSION_DENIED;
+ goto ERROR_RETURN;
+ /* LCOV_EXCL_STOP */
}
- switch(op) {
+ switch (op) {
case CONTACTS_PHONE_LOG_DELETE_BY_ADDRESS:
ret = ctsvc_ipc_unmarshal_string(indata, &number);
if (ret != CONTACTS_ERROR_NONE) {
- CTS_ERR("ctsvc_ipc_unmarshal_string fail");
+ /* LCOV_EXCL_START */
+ ERR("ctsvc_ipc_unmarshal_string() Fail");
goto ERROR_RETURN;
+ /* LCOV_EXCL_STOP */
}
ret = ctsvc_phone_log_delete(op, number);
break;
case CONTACTS_PHONE_LOG_DELETE_BY_EMAIL_EXTRA_DATA1:
ret = ctsvc_ipc_unmarshal_int(indata, &extra_data1);
if (ret != CONTACTS_ERROR_NONE) {
- CTS_ERR("ctsvc_ipc_unmarshal_int fail");
+ /* LCOV_EXCL_START */
+ ERR("ctsvc_ipc_unmarshal_int() Fail");
goto ERROR_RETURN;
+ /* LCOV_EXCL_STOP */
}
ret = ctsvc_phone_log_delete(op, extra_data1);
break;
default:
- CTS_ERR("Invalid parameter : the operation is not proper (op : %d)", op);
+ /* LCOV_EXCL_START */
+ ERR("the operation is not proper (op : %d)", op);
ret = CONTACTS_ERROR_INVALID_PARAMETER;
break;
+ /* LCOV_EXCL_STOP */
}
}
if (outdata) {
*outdata = pims_ipc_data_create(0);
if (NULL == *outdata) {
- CTS_ERR("pims_ipc_data_create fail");
+ /* LCOV_EXCL_START */
+ ERR("pims_ipc_data_create() Fail");
goto DATA_FREE;
+ /* LCOV_EXCL_STOP */
}
- if (pims_ipc_data_put(*outdata, (void*)&ret, sizeof(int)) != 0) {
+ if (CONTACTS_ERROR_NONE != ctsvc_ipc_marshal_int(ret, *outdata)) {
+ /* LCOV_EXCL_START */
pims_ipc_data_destroy(*outdata);
*outdata = NULL;
- CTS_ERR("pims_ipc_data_put fail");
+ ERR("ctsvc_ipc_marshal_int() Fail");
goto DATA_FREE;
+ /* LCOV_EXCL_STOP */
}
if (ret == CONTACTS_ERROR_NONE) {
int transaction_ver = ctsvc_get_transaction_ver();
if (ctsvc_ipc_marshal_int(transaction_ver, *outdata) != CONTACTS_ERROR_NONE) {
+ /* LCOV_EXCL_START */
pims_ipc_data_destroy(*outdata);
*outdata = NULL;
- CTS_ERR("ctsvc_ipc_marshal_int fail");
+ ERR("ctsvc_ipc_marshal_int() Fail");
goto DATA_FREE;
+ /* LCOV_EXCL_STOP */
}
}
}
ctsvc_handle_destroy(contact);
free(number);
+ ctsvc_server_start_timeout();
return;
}
#endif /* ENABLE_LOG_FEATURE */
pims_ipc_data_h *outdata, void *userdata)
{
int ret = CONTACTS_ERROR_NONE;
- contacts_name_display_order_e order;
+ contacts_name_display_order_e order = CONTACTS_NAME_DISPLAY_ORDER_FIRSTLAST;
if (!ctsvc_have_permission(ipc, CTSVC_PERMISSION_CONTACT_READ)) {
+ /* LCOV_EXCL_START */
ret = CONTACTS_ERROR_PERMISSION_DENIED;
goto ERROR_RETURN;
+ /* LCOV_EXCL_STOP */
}
ret = ctsvc_setting_get_name_display_order(&order);
if (outdata) {
*outdata = pims_ipc_data_create(0);
if (NULL == *outdata) {
- CTS_ERR("pims_ipc_data_create fail");
+ /* LCOV_EXCL_START */
+ ERR("pims_ipc_data_create() Fail");
+ ctsvc_server_start_timeout();
return;
+ /* LCOV_EXCL_STOP */
}
- if (pims_ipc_data_put(*outdata, (void*)&ret, sizeof(int)) != 0) {
+ if (CONTACTS_ERROR_NONE != ctsvc_ipc_marshal_int(ret, *outdata)) {
+ /* LCOV_EXCL_START */
pims_ipc_data_destroy(*outdata);
*outdata = NULL;
- CTS_ERR("pims_ipc_data_put fail (return value)");
+ ERR("ctsvc_ipc_marshal_int() Fail (return value)");
+ ctsvc_server_start_timeout();
return;
+ /* LCOV_EXCL_STOP */
}
- if (pims_ipc_data_put(*outdata, (void*)&order, sizeof(int)) != 0) {
+ if (CONTACTS_ERROR_NONE != ctsvc_ipc_marshal_int(order, *outdata)) {
+ /* LCOV_EXCL_START */
pims_ipc_data_destroy(*outdata);
*outdata = NULL;
- CTS_ERR("pims_ipc_data_put fail (id)");
+ ERR("ctsvc_ipc_marshal_int() Fail (id)");
+ ctsvc_server_start_timeout();
return;
+ /* LCOV_EXCL_STOP */
}
- }
- else {
- CTS_ERR("outdata is NULL");
+ } else {
+ /* LCOV_EXCL_START */
+ ERR("outdata is NULL");
+ /* LCOV_EXCL_STOP */
}
+ ctsvc_server_start_timeout();
return;
}
pims_ipc_data_h *outdata, void *userdata)
{
int ret = CONTACTS_ERROR_NONE;
- contacts_name_sorting_order_e order;
+ contacts_name_sorting_order_e order = CONTACTS_NAME_SORTING_ORDER_FIRSTLAST;
if (!ctsvc_have_permission(ipc, CTSVC_PERMISSION_CONTACT_READ)) {
ret = CONTACTS_ERROR_PERMISSION_DENIED;
if (outdata) {
*outdata = pims_ipc_data_create(0);
if (NULL == *outdata) {
- CTS_ERR("pims_ipc_data_create fail");
+ /* LCOV_EXCL_START */
+ ERR("pims_ipc_data_create() Fail");
+ ctsvc_server_start_timeout();
return;
+ /* LCOV_EXCL_STOP */
}
- if (pims_ipc_data_put(*outdata, (void*)&ret, sizeof(int)) != 0) {
+ if (CONTACTS_ERROR_NONE != ctsvc_ipc_marshal_int(ret, *outdata)) {
+ /* LCOV_EXCL_START */
pims_ipc_data_destroy(*outdata);
*outdata = NULL;
- CTS_ERR("pims_ipc_data_put fail (return value)");
+ ERR("ctsvc_ipc_marshal_int() Fail (return value)");
+ ctsvc_server_start_timeout();
return;
+ /* LCOV_EXCL_STOP */
}
- if (pims_ipc_data_put(*outdata, (void*)&order, sizeof(int)) != 0) {
+ if (CONTACTS_ERROR_NONE != ctsvc_ipc_marshal_int(order, *outdata)) {
+ /* LCOV_EXCL_START */
pims_ipc_data_destroy(*outdata);
*outdata = NULL;
- CTS_ERR("pims_ipc_data_put fail (id)");
+ ERR("ctsvc_ipc_marshal_int() Fail (id)");
return;
+ /* LCOV_EXCL_STOP */
}
- }
- else {
- CTS_ERR("outdata is NULL");
+ } else {
+ /* LCOV_EXCL_START */
+ ERR("outdata is NULL");
+ /* LCOV_EXCL_STOP */
}
+ ctsvc_server_start_timeout();
return;
}
void ctsvc_ipc_setting_set_name_display_order(pims_ipc_h ipc,
- pims_ipc_data_h indata, pims_ipc_data_h *outdata, void *userdata)
+ pims_ipc_data_h indata, pims_ipc_data_h *outdata, void *userdata)
{
int ret = CONTACTS_ERROR_NONE;
int order;
if (indata) {
ret = ctsvc_ipc_unmarshal_int(indata, &order);
if (ret != CONTACTS_ERROR_NONE) {
- CTS_ERR("ctsvc_ipc_unmarshal_int fail");
+ /* LCOV_EXCL_START */
+ ERR("ctsvc_ipc_unmarshal_int() Fail");
goto ERROR_RETURN;
+ /* LCOV_EXCL_STOP */
}
- }
- else {
- CTS_ERR("ctsvc_ipc_person_set_default_property fail");
+ } else {
+ /* LCOV_EXCL_START */
+ ERR("ctsvc_ipc_person_set_default_property() Fail");
goto ERROR_RETURN;
+ /* LCOV_EXCL_STOP */
}
if (!ctsvc_have_permission(ipc, CTSVC_PERMISSION_CONTACT_WRITE)) {
+ /* LCOV_EXCL_START */
ret = CONTACTS_ERROR_PERMISSION_DENIED;
goto ERROR_RETURN;
+ /* LCOV_EXCL_STOP */
}
ret = ctsvc_setting_set_name_display_order((contacts_name_display_order_e)order);
if (outdata) {
*outdata = pims_ipc_data_create(0);
if (NULL == *outdata) {
- CTS_ERR("pims_ipc_data_create fail");
+ /* LCOV_EXCL_START */
+ ERR("pims_ipc_data_create() Fail");
+ ctsvc_server_start_timeout();
return;
+ /* LCOV_EXCL_STOP */
}
- if (pims_ipc_data_put(*outdata, (void*)&ret, sizeof(int)) != 0) {
+ if (CONTACTS_ERROR_NONE != ctsvc_ipc_marshal_int(ret, *outdata)) {
+ /* LCOV_EXCL_START */
pims_ipc_data_destroy(*outdata);
*outdata = NULL;
- CTS_ERR("pims_ipc_data_put fail");
+ ERR("ctsvc_ipc_marshal_int() Fail");
+ ctsvc_server_start_timeout();
return;
+ /* LCOV_EXCL_STOP */
}
- }
- else {
- CTS_ERR("outdata is NULL");
+ } else {
+ /* LCOV_EXCL_START */
+ ERR("outdata is NULL");
+ /* LCOV_EXCL_STOP */
}
+ ctsvc_server_start_timeout();
return;
}
void ctsvc_ipc_setting_set_name_sorting_order(pims_ipc_h ipc,
- pims_ipc_data_h indata, pims_ipc_data_h *outdata, void *userdata)
+ pims_ipc_data_h indata, pims_ipc_data_h *outdata, void *userdata)
{
int ret = CONTACTS_ERROR_NONE;
int order;
if (indata) {
ret = ctsvc_ipc_unmarshal_int(indata, &order);
if (ret != CONTACTS_ERROR_NONE) {
- CTS_ERR("ctsvc_ipc_unmarshal_int fail");
+ /* LCOV_EXCL_START */
+ ERR("ctsvc_ipc_unmarshal_int() Fail");
goto ERROR_RETURN;
+ /* LCOV_EXCL_STOP */
}
- }
- else {
- CTS_ERR("ctsvc_ipc_person_set_default_property fail");
+ } else {
+ /* LCOV_EXCL_START */
+ ERR("ctsvc_ipc_person_set_default_property() Fail");
goto ERROR_RETURN;
+ /* LCOV_EXCL_STOP */
}
if (!ctsvc_have_permission(ipc, CTSVC_PERMISSION_CONTACT_WRITE)) {
+ /* LCOV_EXCL_START */
ret = CONTACTS_ERROR_PERMISSION_DENIED;
goto ERROR_RETURN;
+ /* LCOV_EXCL_STOP */
}
ret = ctsvc_setting_set_name_sorting_order((contacts_name_sorting_order_e)order);
if (outdata) {
*outdata = pims_ipc_data_create(0);
if (NULL == *outdata) {
- CTS_ERR("pims_ipc_data_create fail");
+ /* LCOV_EXCL_START */
+ ERR("pims_ipc_data_create() Fail");
+ ctsvc_server_start_timeout();
return;
+ /* LCOV_EXCL_STOP */
}
- if (pims_ipc_data_put(*outdata, (void*)&ret, sizeof(int)) != 0) {
+ if (CONTACTS_ERROR_NONE != ctsvc_ipc_marshal_int(ret, *outdata)) {
+ /* LCOV_EXCL_START */
pims_ipc_data_destroy(*outdata);
*outdata = NULL;
- CTS_ERR("pims_ipc_data_put fail");
+ ERR("ctsvc_ipc_marshal_int() Fail");
+ ctsvc_server_start_timeout();
return;
+ /* LCOV_EXCL_STOP */
}
- }
- else {
- CTS_ERR("outdata is NULL");
+ } else {
+ /* LCOV_EXCL_START */
+ ERR("outdata is NULL");
+ /* LCOV_EXCL_STOP */
}
+ ctsvc_server_start_timeout();
return;
}