ADD_DEFINITIONS("-DPREFIX=\"${PREFIX}\"")
# for tizen open build test
-IF(ENABLE_SIM_FEATURE)
- ADD_DEFINITIONS("-DENABLE_SIM_FEATURE")
-ENDIF(ENABLE_SIM_FEATURE)
IF(ENABLE_LOG_FEATURE)
ADD_DEFINITIONS("-DENABLE_LOG_FEATURE")
ENDIF(ENABLE_LOG_FEATURE)
${CMAKE_SOURCE_DIR}/common/ctsvc_socket.c
${CMAKE_SOURCE_DIR}/common/ctsvc_vcard.c
${CMAKE_SOURCE_DIR}/common/ctsvc_view.c
-)
-IF(ENABLE_SIM_FEATURE)
-SET(SRCS ${SRCS}
${CMAKE_SOURCE_DIR}/common/ipc/ctsvc_ipc_sdn.c
${CMAKE_SOURCE_DIR}/common/ctsvc_record_sdn.c
${CMAKE_SOURCE_DIR}/common/ctsvc_sim.c
${CMAKE_SOURCE_DIR}/common/ipc/ctsvc_ipc_speeddial.c
${CMAKE_SOURCE_DIR}/common/ctsvc_record_speeddial.c
)
-ENDIF(ENABLE_SIM_FEATURE)
IF(ENABLE_LOG_FEATURE)
SET(SRCS ${SRCS}
extern ctsvc_record_plugin_cb_s nickname_plugin_cbs;
extern ctsvc_record_plugin_cb_s email_plugin_cbs;
extern ctsvc_record_plugin_cb_s result_plugin_cbs;
-#ifdef ENABLE_SIM_FEATURE
extern ctsvc_record_plugin_cb_s sdn_plugin_cbs;
extern ctsvc_record_plugin_cb_s speeddial_plugin_cbs;
-#endif /* ENABLE_SIM_FEATURE */
extern ctsvc_record_plugin_cb_s extension_plugin_cbs;
#ifdef ENABLE_LOG_FEATURE
extern ctsvc_record_plugin_cb_s phonelog_plugin_cbs;
case CTSVC_RECORD_PHONELOG:
return &phonelog_plugin_cbs;
#endif /* ENABLE_LOG_FEATURE */
-#ifdef ENABLE_SIM_FEATURE
case CTSVC_RECORD_SPEEDDIAL:
return &speeddial_plugin_cbs;
case CTSVC_RECORD_SDN:
return &sdn_plugin_cbs;
-#endif /* ENABLE_SIM_FEATURE */
case CTSVC_RECORD_UPDATED_INFO:
return &updated_info_plugin_cbs;
case CTSVC_RECORD_RESULT:
#include "ctsvc_notify.h"
#ifdef _CONTACTS_IPC_SERVER
-#ifdef ENABLE_SIM_FEATURE
#include "ctsvc_server_sim.h"
-#endif /* ENABLE_SIM_FEATURE */
-#endif
+#endif /* _CONTACTS_IPC_SERVER */
static int __ctsvc_result_create(contacts_record_h* out_record);
static int __ctsvc_result_destroy(contacts_record_h record, bool delete_child);
if (data->property_id == property_id) {
if (data->type == CTSVC_VIEW_DATA_TYPE_INT) {
#ifdef _CONTACTS_IPC_SERVER
-#ifdef ENABLE_SIM_FEATURE
-
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 /* ENABLE_SIM_FEATURE */
-#endif
+#endif /* _CONTACTS_IPC_SERVER */
data->value.i = value;
return CONTACTS_ERROR_NONE;
}
data->property_id = property_id;
data->type = CTSVC_VIEW_DATA_TYPE_INT;
#ifdef _CONTACTS_IPC_SERVER
-#ifdef ENABLE_SIM_FEATURE
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 /* ENABLE_SIM_FEATURE */
-#endif
+#endif /* _CONTACTS_IPC_SERVER */
data->value.i = value;
result->values = g_slist_append(result->values, (void*)data);
return CONTACTS_ERROR_NONE;
API int contacts_sim_import_all_contacts()
{
-#ifndef ENABLE_SIM_FEATURE
- return CONTACTS_ERROR_NOT_SUPPORTED;
-#endif /* ENABLE_SIM_FEATURE */
-
int ret;
ctsvc_mutex_lock(CTS_MUTEX_SOCKET_FD);
API int contacts_sim_get_initialization_status(bool *completed)
{
-#ifndef ENABLE_SIM_FEATURE
- return CONTACTS_ERROR_NOT_SUPPORTED;
-#endif /* ENABLE_SIM_FEATURE */
-
int ret;
RETVM_IF(completed == NULL, CONTACTS_ERROR_INVALID_PARAMETER,
return read_size;
}
-#ifdef ENABLE_SIM_FEATURE
static int __ctsvc_socket_handle_return(int fd, ctsvc_socket_msg_s *msg)
{
CTS_FN_CALL;
return msg.val;
}
-
-#endif /* ENABLE_SIM_FEATURE */
int attach_sizes[CTSVC_SOCKET_MSG_REQUEST_MAX_ATTACH];
}ctsvc_socket_msg_s;
-#ifdef ENABLE_SIM_FEATURE
int ctsvc_request_sim_import(int sim_slot_no);
int ctsvc_request_sim_get_initialization_status(int sim_slot_no, bool* completed);
-#endif /* ENABLE_SIM_FEATURE */
-
int ctsvc_socket_init(void);
void ctsvc_socket_final(void);
.im_id = CTSVC_PROPERTY_MESSENGER_IM_ID,
};
-#ifdef ENABLE_SIM_FEATURE
API const _contacts_sdn_property_ids _contacts_sdn = {
._uri = CTSVC_VIEW_URI_SDN,
.id = CTSVC_PROPERTY_SDN_ID,
.cleaned_number = CTSVC_PROPERTY_SPEEDDIAL_CLEANED_NUMBER,
.number_filter = CTSVC_PROPERTY_SPEEDDIAL_NUMBER_FILTER,
};
-#endif /* ENABLE_SIM_FEATURE */
API const _contacts_contact_updated_info_property_ids _contacts_contact_updated_info = {
._uri = CTSVC_VIEW_URI_CONTACTS_UPDATED_INFO,
{CTSVC_PROPERTY_ADDRESSBOOK_MODE, CTSVC_SEARCH_PROPERTY_ALL, "mode"},
};
-#ifdef ENABLE_SIM_FEATURE
const property_info_s __property_sdn[] = { /* _contacts_sdn */
{CTSVC_PROPERTY_SDN_ID, CTSVC_SEARCH_PROPERTY_ALL, "id"},
{CTSVC_PROPERTY_SDN_NAME, CTSVC_SEARCH_PROPERTY_ALL, "name"},
{CTSVC_PROPERTY_SDN_NUMBER, CTSVC_SEARCH_PROPERTY_ALL, "number"},
{CTSVC_PROPERTY_SDN_SIM_SLOT_NO, CTSVC_SEARCH_PROPERTY_ALL, "sim_slot_no"},
};
-#endif /* ENABLE_SIM_FEATURE */
const property_info_s __property_group[] = {
{CTSVC_PROPERTY_GROUP_ID, CTSVC_SEARCH_PROPERTY_ALL, "group_id"},
{CTSVC_PROPERTY_MY_PROFILE_EXTENSION, CTSVC_SEARCH_PROPERTY_NONE,(void*)__property_extension},
};
-#ifdef ENABLE_SIM_FEATURE
const property_info_s __property_speeddial[] = { /* _contacts_speeddial */
{CTSVC_PROPERTY_SPEEDDIAL_DIAL_NUMBER, CTSVC_SEARCH_PROPERTY_ALL, "speed_number"},
{CTSVC_PROPERTY_SPEEDDIAL_NUMBER_ID, CTSVC_SEARCH_PROPERTY_ALL, "number_id"},
{CTSVC_PROPERTY_SPEEDDIAL_CLEANED_NUMBER, CTSVC_SEARCH_PROPERTY_FILTER, "cleaned_number"},
{CTSVC_PROPERTY_SPEEDDIAL_NUMBER_FILTER, CTSVC_SEARCH_PROPERTY_FILTER, "minmatch"},
};
-#endif /* ENABLE_SIM_FEATURE */
#ifdef ENABLE_LOG_FEATURE
const property_info_s __property_phonelog[] = { /* _contacts_phone_log */
};
#endif /* ENABLE_LOG_FEATURE */
-#if 0
-const property_info_s __property_updated_info[] = {
- {CTSVC_PROPERTY_UPDATE_INFO_ID, CTSVC_SEARCH_PROPERTY_ALL, "id"},
- {CTSVC_PROPERTY_UPDATE_INFO_ADDRESSBOOK_ID, CTSVC_SEARCH_PROPERTY_ALL, "addressbook_id"},
- {CTSVC_PROPERTY_UPDATE_INFO_TYPE, CTSVC_SEARCH_PROPERTY_ALL, "type"},
- {CTSVC_PROPERTY_UPDATE_INFO_VERSION, CTSVC_SEARCH_PROPERTY_ALL, "version"},
- {CTSVC_PROPERTY_UPDATE_INFO_IMAGE_CHANGED, CTSVC_SEARCH_PROPERTY_ALL, "image_changed"},
- {CTSVC_PROPERTY_UPDATE_INFO_LAST_CHANGED_TYPE, CTSVC_SEARCH_PROPERTY_ALL, "is_deleted"},
-};
-
-const property_info_s __property_grouprel_updated_info[] = {
- {CTSVC_PROPERTY_GROUP_ID, CTSVC_SEARCH_PROPERTY_ALL, "group_id"},
- {CTSVC_PROPERTY_CONTACT_ID, CTSVC_SEARCH_PROPERTY_ALL, "id"},
- {CTSVC_PROPERTY_ADDRESSBOOK_ID, CTSVC_SEARCH_PROPERTY_ALL, "addressbook_id"},
- {CTSVC_PROPERTY_UPDATE_INFO_TYPE, CTSVC_SEARCH_PROPERTY_ALL, "type"},
- {CTSVC_PROPERTY_UPDATE_INFO_VERSION, CTSVC_SEARCH_PROPERTY_ALL, "version"},
-};
-#endif
-
/* search properties */
const property_info_s __property_person_contact[] = { /* _contacts_person_contact */
{CTSVC_PROPERTY_PERSON_ID, CTSVC_SEARCH_PROPERTY_ALL, "person_id"},
#ifdef ENABLE_LOG_FEATURE
{CTSVC_VIEW_URI_PHONELOG, CTSVC_RECORD_PHONELOG, PTR_COUNT(__property_phonelog)},
#endif /* ENABLE_LOG_FEATURE */
-#ifdef ENABLE_SIM_FEATURE
{CTSVC_VIEW_URI_SPEEDDIAL, CTSVC_RECORD_SPEEDDIAL, PTR_COUNT(__property_speeddial)},
{CTSVC_VIEW_URI_SDN, CTSVC_RECORD_SDN, PTR_COUNT(__property_sdn)},
-#endif /* ENABLE_SIM_FEATURE */
{CTSVC_VIEW_URI_NAME, CTSVC_RECORD_NAME, PTR_COUNT(__property_name)},
{CTSVC_VIEW_URI_COMPANY, CTSVC_RECORD_COMPANY, PTR_COUNT(__property_company)},
extern ctsvc_ipc_marshal_record_plugin_cb_s _ctsvc_ipc_record_phonelog_plugin_cb;
#endif /* ENABLE_LOG_FEATURE */
extern ctsvc_ipc_marshal_record_plugin_cb_s _ctsvc_ipc_record_result_plugin_cb;
-#ifdef ENABLE_SIM_FEATURE
extern ctsvc_ipc_marshal_record_plugin_cb_s _ctsvc_ipc_record_sdn_plugin_cb;
extern ctsvc_ipc_marshal_record_plugin_cb_s _ctsvc_ipc_record_speeddial_plugin_cb;
-#endif /* ENABLE_SIM_FEATURE */
extern ctsvc_ipc_marshal_record_plugin_cb_s _ctsvc_ipc_record_updated_info_plugin_cb;
extern ctsvc_ipc_marshal_record_plugin_cb_s _ctsvc_ipc_record_simple_contact_plugin_cb;
case CTSVC_RECORD_PHONELOG:
return (&_ctsvc_ipc_record_phonelog_plugin_cb);
#endif /* ENABLE_LOG_FEATURE */
-#ifdef ENABLE_SIM_FEATURE
case CTSVC_RECORD_SPEEDDIAL:
return (&_ctsvc_ipc_record_speeddial_plugin_cb);
case CTSVC_RECORD_SDN:
return (&_ctsvc_ipc_record_sdn_plugin_cb);
-#endif /* ENABLE_SIM_FEATURE */
case CTSVC_RECORD_RESULT:
return (&_ctsvc_ipc_record_result_plugin_cb);
case CTSVC_RECORD_SIMPLE_CONTACT:
#ifdef ENABLE_LOG_FEATURE
extern ctsvc_db_plugin_info_s ctsvc_db_plugin_phonelog;
#endif /* ENABLE_LOG_FEATURE */
-#ifdef ENABLE_SIM_FEATURE
extern ctsvc_db_plugin_info_s ctsvc_db_plugin_speeddial;
extern ctsvc_db_plugin_info_s ctsvc_db_plugin_sdn;
-#endif /* ENABLE_SIM_FEATURE */
extern ctsvc_db_plugin_info_s ctsvc_db_plugin_activity;
extern ctsvc_db_plugin_info_s ctsvc_db_plugin_activity_photo;
extern ctsvc_db_plugin_info_s ctsvc_db_plugin_address;
case CTSVC_RECORD_PHONELOG:
return &ctsvc_db_plugin_phonelog;
#endif /* ENABLE_LOG_FEATURE */
-#ifdef ENABLE_SIM_FEATURE
case CTSVC_RECORD_SPEEDDIAL:
return &ctsvc_db_plugin_speeddial;
case CTSVC_RECORD_SDN:
return &ctsvc_db_plugin_sdn;
-#endif /* ENABLE_SIM_FEATURE */
case CTSVC_RECORD_UPDATED_INFO:
case CTSVC_RECORD_RESULT:
default:
ret = ctsvc_query_exec(query);
RETVM_IF(CONTACTS_ERROR_NONE != ret, ret, "DB error : ctsvc_query_exec() Fail(%d)", ret);
-#ifdef ENABLE_SIM_FEATURE
/* CTSVC_DB_VIEW_SPEEDIDAL */
snprintf(query, sizeof(query),
"CREATE VIEW IF NOT EXISTS "CTSVC_DB_VIEW_SPEEDIDAL" AS "
"ORDER BY speeddials.speed_number");
ret = ctsvc_query_exec(query);
RETVM_IF(CONTACTS_ERROR_NONE != ret, ret, "DB error : ctsvc_query_exec() Fail(%d)", ret);
-#endif /* ENABLE_SIM_FEATURE */
-
/* CTSVC_DB_VIEW_PERSON_CONTACT */
snprintf(query, sizeof(query),
#ifdef _CONTACTS_IPC_SERVER
#include "ctsvc_server_change_subject.h"
-#ifdef ENABLE_SIM_FEATURE
#include "ctsvc_server_sim.h"
-#endif /* ENABLE_SIM_FEATURE */
-#endif
+#endif /* _CONTACTS_IPC_SERVER */
static int __ctsvc_db_phonelog_insert_record(contacts_record_h record, int *id);
static int __ctsvc_db_phonelog_get_record(int id, contacts_record_h* out_record);
temp = ctsvc_stmt_get_text(stmt, i++);
phonelog->extra_data2 = SAFE_STRDUP(temp);
#ifdef _CONTACTS_IPC_SERVER
-#ifdef ENABLE_SIM_FEATURE
phonelog->sim_slot_no = ctsvc_server_sim_get_sim_slot_no_by_info_id(ctsvc_stmt_get_int(stmt, i++));
-#endif /* ENABLE_SIM_FEATURE */
-#endif
+#endif /* _CONTACTS_IPC_SERVER */
return CONTACTS_ERROR_NONE;
}
free(phonelog->extra_data2);
phonelog->extra_data2 = SAFE_STRDUP(temp);
break;
-#ifdef ENABLE_SIM_FEATURE
case CTSVC_PROPERTY_PHONELOG_SIM_SLOT_NO:
phonelog->sim_slot_no = ctsvc_server_sim_get_sim_slot_no_by_info_id(ctsvc_stmt_get_int(stmt, i));
break;
-#endif /* ENABLE_SIM_FEATURE */
default:
break;
}
if (phonelog->extra_data2)
ctsvc_stmt_bind_text(stmt, 6, phonelog->extra_data2);
-#ifdef ENABLE_SIM_FEATURE
if (0 <= phonelog->sim_slot_no) {
int sim_info_id;
sim_info_id = ctsvc_server_sim_get_info_id_by_sim_slot_no(phonelog->sim_slot_no);
ctsvc_stmt_bind_int(stmt, 7, sim_info_id);
}
else
-#endif /* ENABLE_SIM_FEATURE */
ctsvc_stmt_bind_int(stmt, 7, -1);
ret = ctsvc_stmt_step(stmt);
#include "ctsvc_db_plugin_company_helper.h"
#ifdef _CONTACTS_IPC_SERVER
-#ifdef ENABLE_SIM_FEATURE
#include "ctsvc_server_sim.h"
-#endif /* ENABLE_SIM_FEATURE */
#include "ctsvc_server_change_subject.h"
-#endif
+#endif /* _CONTACTS_IPC_SERVER */
/* It is used to sort search results */
const char *hangul_syllable[19][3] = {
"Invalid parameter : property id(%d)", filter->property_id);
#ifdef _CONTACTS_IPC_SERVER
-#ifdef ENABLE_SIM_FEATURE
if (filter->property_id == CTSVC_PROPERTY_PHONELOG_SIM_SLOT_NO) {
/* get real sim info id by SIM slot number 0/1 */
int sim_info_id = ctsvc_server_sim_get_info_id_by_sim_slot_no(filter->value.i);
}
return CONTACTS_ERROR_INVALID_PARAMETER;
}
-#endif /* ENABLE_SIM_FEATURE */
-#endif
+#endif /* _CONTACTS_IPC_SERVER */
switch(filter->match) {
case CONTACTS_MATCH_EQUAL:
#ifdef _CONTACTS_IPC_SERVER
#include "ctsvc_server_change_subject.h"
-#ifdef ENABLE_SIM_FEATURE
#include "ctsvc_server_sim.h"
-#endif /* ENABLE_SIM_FEATURE */
-#endif
+#endif /* _CONTACTS_IPC_SERVER */
API int contacts_phone_log_reset_statistics()
{
MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
%cmake . -DTZ_SYS_ETC=%TZ_SYS_ETC \
--DENABLE_SIM_FEATURE:BOOL=ON \
-DENABLE_LOG_FEATURE:BOOL=ON \
-DMAJORVER=${MAJORVER} \
-DFULLVER=%{version}
ctsvc_server_update.c
ctsvc_server_bg.c
ctsvc_server.c
-)
-IF(ENABLE_SIM_FEATURE)
-SET(SRCS ${SRCS}
${CMAKE_SOURCE_DIR}/common/ipc/ctsvc_ipc_sdn.c
${CMAKE_SOURCE_DIR}/common/ctsvc_record_sdn.c
${CMAKE_SOURCE_DIR}/native/ctsvc_db_plugin_sdn.c
${CMAKE_SOURCE_DIR}/native/ctsvc_db_plugin_speeddial.c
ctsvc_server_sim.c
)
-ENDIF(ENABLE_SIM_FEATURE)
IF(ENABLE_LOG_FEATURE)
SET(SRCS ${SRCS}
#include <errno.h>
#include <pims-ipc-svc.h>
-#ifdef ENABLE_SIM_FEATURE
#include <cynara-client.h>
#include <cynara-error.h>
#include <cynara-session.h>
#include <cynara-creds-socket.h>
-#endif
#include "contacts.h"
#include "ctsvc_internal.h"
#include "ctsvc_server_socket.h"
#include "ctsvc_server_utils.h"
-#ifdef ENABLE_SIM_FEATURE
#include "ctsvc_mutex.h"
#include "ctsvc_server_sim.h"
#include "ctsvc_db_access_control.h"
-#endif
static int sockfd = -1;
-#ifdef ENABLE_SIM_FEATURE
struct client_info {
char *smack;
char *uid;
char *client_session;
};
static GHashTable *_client_info_table = NULL; // key : socket_fd, value : struct client_info*
-#endif
static inline int __ctsvc_server_socket_safe_write(int fd, char *buf, int buf_size)
{
return CONTACTS_ERROR_NONE;
}
-#ifdef ENABLE_SIM_FEATURE
static void __ctsvc_server_socket_import_sim(GIOChannel *src, int size)
{
CTS_FN_CALL;
g_error_free(gerr);
}
}
-#endif /* ENABLIE_SIM_FEATURE */
-#ifdef ENABLE_SIM_FEATURE
static cynara *_cynara = NULL;
static int _ctsvc_server_initialize_cynara()
{
}
return CONTACTS_ERROR_NONE;
}
-#endif
-#ifdef ENABLE_SIM_FEATURE
static void _ctsvc_server_finalize_cynara()
{
int ret;
CTS_ERR("cynara_finish() Fail(%d,%s)", ret, errmsg);
}
}
-#endif
-#ifdef ENABLE_SIM_FEATURE
static bool _ctsvc_server_check_privilege(struct client_info *info, const char *privilege)
{
RETVM_IF(NULL == info, false, "info is NULL");
return false;
}
-#endif
static gboolean __ctsvc_server_socket_request_handler(GIOChannel *src, GIOCondition condition,
gpointer data)
{
int ret;
int fd;
-#ifdef ENABLE_SIM_FEATURE
bool have_read_permission = false;
bool have_write_permission = false;
-#endif /* ENABLE_SIM_FEATURE */
ctsvc_socket_msg_s msg = {0};
CTS_FN_CALL;
fd = g_io_channel_unix_get_fd(src);
if (G_IO_HUP & condition) {
-#ifdef ENABLE_SIM_FEATURE
ctsvc_mutex_lock(CTS_MUTEX_SOCKET_CLIENT_INFO);
if (_client_info_table)
g_hash_table_remove(_client_info_table, GINT_TO_POINTER(fd));
ctsvc_mutex_unlock(CTS_MUTEX_SOCKET_CLIENT_INFO);
-#endif
close(fd);
return FALSE;
}
return TRUE;
}
-#ifdef ENABLE_SIM_FEATURE
ctsvc_mutex_lock(CTS_MUTEX_SOCKET_CLIENT_INFO);
struct client_info *info = g_hash_table_lookup(_client_info_table, GINT_TO_POINTER(fd));
have_read_permission = _ctsvc_server_check_privilege(info, CTSVC_PRIVILEGE_CONTACT_READ);
if (!have_write_permission)
INFO("fd(%d) : does not have contact write permission", fd);
ctsvc_mutex_unlock(CTS_MUTEX_SOCKET_CLIENT_INFO);
-#endif /* ENABLE_SIM_FEATURE */
switch (msg.type) {
-#ifdef ENABLE_SIM_FEATURE
case CTSVC_SOCKET_MSG_TYPE_REQUEST_IMPORT_SIM:
if (false == have_write_permission) {
CTS_ERR("write permission denied");
}
__ctsvc_server_socket_get_sim_init_status(src, msg.attach_sizes[0]);
break;
-#endif /* ENABLE_SIM_FEATURE */
default:
CTS_ERR("Unknown request type(%d)", msg.type);
break;
return TRUE;
}
-#ifdef ENABLE_SIM_FEATURE
static void _ctsvc_server_destroy_client_info(gpointer p)
{
struct client_info *info = p;
free(info->client_session);
free(info);
}
-#endif
-#ifdef ENABLE_SIM_FEATURE
static int _ctsvc_server_create_client_info(int fd, struct client_info **p_info)
{
int ret;
return CONTACTS_ERROR_NONE;
}
-#endif
static gboolean __ctsvc_server_socket_handler(GIOChannel *src,
client_sockfd = accept(sockfd, (struct sockaddr *)&clientaddr, &client_len);
RETVM_IF(-1 == client_sockfd, TRUE, "accept() Fail(errno = %d)", errno);
-#ifdef ENABLE_SIM_FEATURE
if (NULL == _client_info_table)
_client_info_table = g_hash_table_new_full(g_direct_hash, g_direct_equal, NULL, _ctsvc_server_destroy_client_info);
struct client_info *info = NULL;
CTS_ERR("_create_client_info() Fail(%d)", ret);
else
g_hash_table_insert(_client_info_table, GINT_TO_POINTER(client_sockfd), info);
-#endif
channel = g_io_channel_unix_new(client_sockfd);
g_io_add_watch(channel, G_IO_IN|G_IO_HUP, __ctsvc_server_socket_request_handler, NULL);
struct sockaddr_un addr;
GIOChannel *gio;
-#ifdef ENABLE_SIM_FEATURE
_ctsvc_server_initialize_cynara();
-#endif
char sock_file[CTSVC_PATH_MAX_LEN] = {0};
snprintf(sock_file, sizeof(sock_file), CTSVC_SOCK_PATH"/%s", getuid(), CTSVC_SOCKET_FILE);
int ctsvc_server_socket_deinit(void)
{
-#ifdef ENABLE_SIM_FEATURE
_ctsvc_server_finalize_cynara();
-#endif
if (sockfd != -1)
close(sockfd);
return CONTACTS_ERROR_NONE;
#include "ctsvc_internal.h"
#include "ctsvc_setting.h"
#include "ctsvc_server_utils.h"
-#ifdef ENABLE_SIM_FEATURE
#include "ctsvc_server_sim.h"
-#endif /* ENABLE_SIM_FEATURE */
#include "ctsvc_server_sqlite.h"
#include "ctsvc_localize.h"
#include "ctsvc_normalize.h"
ret = vconf_ignore_key_changed(VCONFKEY_LANGSET, __ctsvc_server_change_language_cb);
RETM_IF(ret<0,"vconf_ignore_key_changed(%s) Fail(%d)", VCONFKEY_LANGSET, ret);
-#ifdef ENABLE_SIM_FEATURE
ctsvc_server_sim_final();
-#endif /* ENABLE_SIM_FEATURE */
}
int ctsvc_server_init_configuration(void)
RETVM_IF(ret<0, CONTACTS_ERROR_SYSTEM, "vconf_notify_key_changed(%s) Fail(%d)",
VCONFKEY_LANGSET, ret);
-#ifdef ENABLE_SIM_FEATURE
ret = ctsvc_server_sim_init();
RETVM_IF(ret !=CONTACTS_ERROR_NONE, ret, "ctsvc_server_sim_init Fail(%d)", ret);
-#endif /* ENABLE_SIM_FEATURE */
return CONTACTS_ERROR_NONE;
}