static char *__callmgr_popup_sim_list_gl_label_get(void *data, Evas_Object *obj, const char *part)
{
- int idx = (int) data;
+ int idx = GPOINTER_TO_INT(data);
char *sim_name = NULL;
if (strcmp(part, "elm.text.main.left") == 0) {
if (idx == 0) {
static Evas_Object *__callmgr_popup_sim_list_gl_icon_get(void *data, Evas_Object *obj, const char *part)
{
- int idx = (int) data;
+ int idx = GPOINTER_TO_INT(data);
Evas_Object *sim_icon = NULL;
int sim_icon_index = 0;
Evas_Object *main_ly = NULL;
_callmgr_popup_del_popup(ad);
if (item != NULL) {
- int index = (int)elm_object_item_data_get(item);
+ int index = GPOINTER_TO_INT(elm_object_item_data_get(item));
DBG("index: %d", index);
_callmgr_popup_reply_to_launch_request(ad, "RESULT", "1"); /* "1" means OK */
elm_scroller_content_min_limit(glist, EINA_FALSE, EINA_TRUE);
- it = elm_genlist_item_append(glist, itc, (void *)index, NULL, ELM_GENLIST_ITEM_NONE, __callmgr_popup_sim_list_gl_sel, ad);
- elm_object_item_data_set(it, (void*)index);
+ it = elm_genlist_item_append(glist, itc, GINT_TO_POINTER(index), NULL, ELM_GENLIST_ITEM_NONE, __callmgr_popup_sim_list_gl_sel, ad);
+ elm_object_item_data_set(it, GINT_TO_POINTER(index));
index++;
- it = elm_genlist_item_append(glist, itc, (void *)index, NULL, ELM_GENLIST_ITEM_NONE, __callmgr_popup_sim_list_gl_sel, ad);
- elm_object_item_data_set(it, (void*)index);
+ it = elm_genlist_item_append(glist, itc, GINT_TO_POINTER(index), NULL, ELM_GENLIST_ITEM_NONE, __callmgr_popup_sim_list_gl_sel, ad);
+ elm_object_item_data_set(it, GINT_TO_POINTER(index));
evas_object_smart_callback_add(ad->popup, "response",
__callmgr_popup_hw_key_unload, ad);
#include <stdio.h>
#include <aul.h>
#include <app_control.h>
-//#include <aul_svc.h>
+#include <appsvc.h>
#include <sys/sysinfo.h>
#include <stdlib.h>
#include <metadata_extractor.h>
kb = bundle_create();
- //aul_svc_set_operation(kb, AUL_SVC_OPERATION_CALL);
+ appsvc_set_operation(kb, APPSVC_OPERATION_CALL);
appsvc_set_pkgname(kb, "org.tizen.call");
appsvc_set_uri(kb,"tel:MT");
kb = bundle_create();
- //aul_svc_set_operation(kb, AUL_SVC_OPERATION_CALL);
+ appsvc_set_operation(kb, APPSVC_OPERATION_CALL);
appsvc_set_uri(kb, "tel:SAT");
g_snprintf(buf, 2, "%d", cb_data->sim_slot);
kb = bundle_create();
/*
* This operation will work when VT stack and VT UI are support
- aul_svc_set_operation(kb, AUL_SVC_OPERATION_VTCALL);
+ appsvc_set_operation(kb, AUL_SVC_OPERATION_VTCALL);
*/
appsvc_set_uri(kb, "tel:MT");
return NULL;
}
-
-
-
-
-
int _callmgr_util_is_ringtone_playable(char *ringtone_path, gboolean *is_playable)
{
int err = METADATA_EXTRACTOR_ERROR_NONE;
metadata_extractor_h metadata = NULL;
char *value = NULL;
- dbg("_callmgr_util_is_ringtone_playable()");
-
CM_RETURN_VAL_IF_FAIL(ringtone_path, -1);
+ dbg("_callmgr_util_is_ringtone_playable()");
+
if (g_file_test(ringtone_path, G_FILE_TEST_EXISTS) == FALSE) {
warn("File missing");
*is_playable = FALSE;
if (metadata_extractor_create(&metadata) != METADATA_EXTRACTOR_ERROR_NONE) {
err("metadata_extractor_create() failed: ret(%d)", err);
-
return -1;
}
int _callmgr_util_is_silent_ringtone(char *ringtone_path, gboolean *is_silent_ringtone)
{
- dbg("_callmgr_util_is_ringtone_playable()");
-
CM_RETURN_VAL_IF_FAIL(ringtone_path, -1);
+ dbg("_callmgr_util_is_ringtone_playable()");
+
if ((strlen(ringtone_path) == strlen(SOUND_PATH_SILENT)) && ((strncmp(ringtone_path, SOUND_PATH_SILENT, strlen(SOUND_PATH_SILENT)) == 0))) {
*is_silent_ringtone = TRUE;
} else {
*is_silent_ringtone = FALSE;
}
-
return 0;
}
-
-
int _callmgr_util_is_callui_running(gboolean *is_callui_running)
{
- dbg("_callmgr_util_is_callui_running");
bool running = FALSE;
+ dbg("_callmgr_util_is_callui_running");
+
app_manager_is_running(CALLUI_PKG_NAME, &running);
if (running) {
dbg("call app is already running");
dbg("call app is not running");
*is_callui_running = FALSE;
}
-
return 0;
}
if(do_not_disturb) {
err = notification_setting_get_setting_by_package_name(CALLUI_PKG_NAME, &setting);
- if(err = NOTIFICATION_ERROR_NONE || setting == NULL) {
+ if((err = NOTIFICATION_ERROR_NONE) || (setting == NULL)) {
err("notification_setting_get_setting_by_package_name failed [%d]", err);
goto out;
}
int _callmgr_telephony_is_cs_available(callmgr_telephony_t telephony_handle, gboolean *is_available);
int _callmgr_telephony_get_call_list(callmgr_telephony_t telephony_handle, GSList **call_list);
int _callmgr_telephony_set_audio_path(callmgr_telephony_t telephony_handle, cm_telephony_audio_path_type_e path, gboolean is_extra_vol);
-#ifdef SUPPORT_NOISE_REDUCTION
-int _callmgr_telephony_set_noise_reduction(callmgr_telephony_t telephony_handle, gboolean is_noise_reduction);
-#endif
int _callmgr_telephony_set_audio_tx_mute(callmgr_telephony_t telephony_handle, gboolean is_mute_state);
int _callmgr_telephony_reset_call_start_time(cm_telephony_call_data_t *call);
int _callmgr_telephony_get_imsi_mcc_mnc(callmgr_telephony_t telephony_handle, unsigned long *mcc, unsigned long *mnc);
if (snd_type == SOUND_TYPE_CALL) {
dbg("sound type : %d, volume : %d", snd_type, volume);
- audio_handle->cb_fn(CM_AUDIO_EVENT_VOLUME_CHANGED_E, (void *)volume, audio_handle->user_data);
+ audio_handle->cb_fn(CM_AUDIO_EVENT_VOLUME_CHANGED_E, GUINT_TO_POINTER(volume), audio_handle->user_data);
}
return;
}
dbg("_callmgr_audio_create_call_sound_session()");
CM_RETURN_VAL_IF_FAIL(audio_handle, -1);
-/*
if (audio_handle->current_mode == session_mode) {
warn("already (%d) set ", session_mode);
return -2;
return -1;
}
+/*
if (CALLMGR_AUDIO_SESSION_VOICE_E == session_mode) {
ret = sound_manager_set_session_type_internal(SOUND_SESSION_TYPE_CALL);
} else {
sound_device_h device = NULL;
sound_device_type_e o_device_type;
int ret = -1;
- int index = 0;
ret = sound_manager_get_current_device_list (SOUND_DEVICE_ALL_MASK, &device_list);
if (ret != SOUND_MANAGER_ERROR_NONE) {
break;
}
- bt_handle->cb_fn(bt_event, (void *)call_id, bt_handle->user_data);
+ bt_handle->cb_fn(bt_event, GUINT_TO_POINTER(call_id), bt_handle->user_data);
}
static void __callmgr_bt_ag_multi_call_handling_event_cb(bt_ag_multi_call_handling_event_e event, void *user_data)
CM_RETURN_IF_FAIL(bt_handle);
dbg("gain : %d", gain);
- bt_handle->cb_fn(CM_BT_EVENT_SPK_GAIN_CHANGED_E, (void *)gain, bt_handle->user_data);
+ bt_handle->cb_fn(CM_BT_EVENT_SPK_GAIN_CHANGED_E, GINT_TO_POINTER(gain), bt_handle->user_data);
}
static void __callmgr_bt_register_handler(callmgr_bt_handle_h bt_handle)
while(CONTACTS_ERROR_NONE == contacts_list_get_current_record_p(list, &record)) {
contacts_record_get_int(record, _contacts_person_grouprel.group_id, &group_id);
- *group_list = g_slist_append(*group_list, (void *)group_id);
+ *group_list = g_slist_append(*group_list, GINT_TO_POINTER(group_id));
err = contacts_list_next(list);
if (CONTACTS_ERROR_NONE != err)
break;
if (group_len > 0) {
for (idx = 0; idx < group_len; idx++) {
- int group_id = (int)g_slist_nth_data(group_list, idx);
+ int group_id = GPOINTER_TO_INT(g_slist_nth_data(group_list, idx));
err = contacts_db_get_record(_contacts_group._uri, group_id , &group_record);
if (CONTACTS_ERROR_NONE != err) {
#include <ITapiSim.h>
#include <ITapiModem.h>
#include <ITapiNetwork.h>
-#ifdef SUPPORT_NOISE_REDUCTION
-#include <ITapiCall_product.h>
-#endif
#include <ITapiSat.h>
#include <vconf.h>
}
}
- telephony_handle->cb_fn(CM_TELEPHONY_EVENT_IDLE, (void *)callIdleInfo->id, telephony_handle->user_data);
+ telephony_handle->cb_fn(CM_TELEPHONY_EVENT_IDLE, GUINT_TO_POINTER(callIdleInfo->id), telephony_handle->user_data);
__callmgr_telephony_get_call_to_be_retreived(telephony_handle, &held_call);
if (held_call) {
/*If all wait calls are updated*/
if (modem_info->wait_call_list == NULL) {
__callmgr_telephony_get_all_call_list(telephony_handle);
- telephony_handle->cb_fn(modem_info->wait_event, (void *)callActiveInfo->id, telephony_handle->user_data);
+ telephony_handle->cb_fn(modem_info->wait_event, GUINT_TO_POINTER(callActiveInfo->id), telephony_handle->user_data);
}
} else if (g_strcmp0(noti_id, TAPI_NOTI_VOICE_CALL_STATUS_HELD) == 0) {
cm_telephony_call_data_t *call_data = NULL;
/*If all wait calls are updated*/
if (modem_info->wait_call_list == NULL) {
__callmgr_telephony_get_all_call_list(telephony_handle);
- telephony_handle->cb_fn(modem_info->wait_event, (void *)callHeldInfo->id, telephony_handle->user_data);
+ telephony_handle->cb_fn(modem_info->wait_event, GUINT_TO_POINTER(callHeldInfo->id), telephony_handle->user_data);
call_data = NULL;
_callmgr_telephony_get_call_by_call_id(telephony_handle, NO_CALL_HANDLE, &call_data);
}
__callmgr_telephony_set_call_state(call_data, CM_TEL_CALL_STATE_DIALING);
__callmgr_telephony_set_call_id(call_data, callDialingInfo->id);
- telephony_handle->cb_fn(CM_TELEPHONY_EVENT_DIALING, (void *)callDialingInfo->id, telephony_handle->user_data);
+ telephony_handle->cb_fn(CM_TELEPHONY_EVENT_DIALING, GUINT_TO_POINTER(callDialingInfo->id), telephony_handle->user_data);
} else if ((g_strcmp0(noti_id, TAPI_NOTI_VOICE_CALL_STATUS_ALERT) == 0) || (g_strcmp0(noti_id, TAPI_NOTI_VIDEO_CALL_STATUS_ALERT) == 0)) {
TelCallStatusAlertNoti_t *callAlertInfo = NULL;
cm_telephony_call_data_t *call_data = NULL;
return;
}
__callmgr_telephony_set_call_state(call_data, CM_TEL_CALL_STATE_ALERT);
- telephony_handle->cb_fn(CM_TELEPHONY_EVENT_ALERT, (void *)callAlertInfo->id, telephony_handle->user_data);
+ telephony_handle->cb_fn(CM_TELEPHONY_EVENT_ALERT, GUINT_TO_POINTER(callAlertInfo->id), telephony_handle->user_data);
} else if ((g_strcmp0(noti_id, TAPI_NOTI_VOICE_CALL_STATUS_INCOMING) == 0) || (g_strcmp0(noti_id, TAPI_NOTI_VIDEO_CALL_STATUS_INCOMING) == 0)) {
TelCallIncomingCallInfo_t callIncomingInfo = {0,};
cm_telephony_call_data_t *call = NULL;
wbamr_status = TRUE;
}
- telephony_handle->cb_fn(CM_TELEPHONY_EVENT_SOUND_WBAMR, (void *)wbamr_status, telephony_handle->user_data);
+ telephony_handle->cb_fn(CM_TELEPHONY_EVENT_SOUND_WBAMR, GINT_TO_POINTER(wbamr_status), telephony_handle->user_data);
} else if (g_strcmp0(noti_id, TAPI_NOTI_CALL_SOUND_CLOCK_STATUS) == 0) {
dbg("TAPI_NOTI_CALL_SOUND_CLOCK_STATUS");
/* ToDo : We have to handle this event for 1st MO call */
case CM_TELEPHONY_SAT_EVENT_CALL_CONTROL_RESULT:
{
cm_telephony_call_data_t *sat_dial_active_call = NULL;
- int ret = 0;
CM_RETURN_IF_FAIL(sat_data->call_control_result);
switch(sat_data->call_control_result->callCtrlResult) {
break;
case TAPI_SAT_CALL_CTRL_R_ALLOWED_WITH_MOD:
/* Fetch the Sat / Dial / Active call data for */
- ret = _callmgr_telephony_get_sat_originated_call(telephony_handle, &sat_dial_active_call);
+ _callmgr_telephony_get_sat_originated_call(telephony_handle, &sat_dial_active_call);
if (!sat_dial_active_call)
- ret = _callmgr_telephony_get_call_by_state(telephony_handle, CM_TEL_CALL_STATE_DIALING, &sat_dial_active_call);
+ _callmgr_telephony_get_call_by_state(telephony_handle, CM_TEL_CALL_STATE_DIALING, &sat_dial_active_call);
if (!sat_dial_active_call)
- ret = _callmgr_telephony_get_call_by_state(telephony_handle, CM_TEL_CALL_STATE_ACTIVE, &sat_dial_active_call);
+ _callmgr_telephony_get_call_by_state(telephony_handle, CM_TEL_CALL_STATE_ACTIVE, &sat_dial_active_call);
_callmgr_telephony_set_call_number(sat_dial_active_call, sat_data->call_control_result->u.callCtrlCnfCallData.address.string);
_callmgr_telephony_set_calling_name(sat_dial_active_call, sat_data->call_control_result->dispData.string);
{
int ret = -1;
cm_telephony_call_data_t *incoming_call_data = NULL;
- cm_telephony_call_data_t *held_call_data = NULL;
unsigned int incoming_call_id = NO_CALL_HANDLE;
CM_RETURN_VAL_IF_FAIL(telephony_handle, -1);
CM_RETURN_VAL_IF_FAIL(telephony_handle->active_sim_slot < telephony_handle->modem_cnt, -1);
return 0;
}
-#ifdef SUPPORT_NOISE_REDUCTION
-static void __callmgr_telephony_set_noise_reduction_resp_cb(TapiHandle *handle, int result, void *tapi_data, void *user_data)
-{
- dbg("Result : %d", result);
-}
-
-int _callmgr_telephony_set_noise_reduction(callmgr_telephony_t telephony_handle, gboolean is_noise_reduction)
-{
- CM_RETURN_VAL_IF_FAIL(telephony_handle, -1);
- CM_RETURN_VAL_IF_FAIL(telephony_handle->active_sim_slot < telephony_handle->modem_cnt, -1);
-
- dbg(">>");
-
- TapiResult_t tapi_error = TAPI_API_SUCCESS;
- TelSoundNoiseReduction_t noise_reduction_status = TAPI_SOUND_NOISE_REDUCTION_OFF;
-
- dbg("Noise reduction = %d", is_noise_reduction);
-
- if (is_noise_reduction) {
- noise_reduction_status = TAPI_SOUND_NOISE_REDUCTION_ON;
- } else {
- noise_reduction_status = TAPI_SOUND_NOISE_REDUCTION_OFF;
- }
-
- tapi_error = tel_set_call_sound_noise_reduction(telephony_handle->multi_handles[telephony_handle->active_sim_slot], noise_reduction_status, __callmgr_telephony_set_noise_reduction_resp_cb, NULL);
- if (tapi_error != TAPI_API_SUCCESS) {
- err("tel_set_call_sound_noise_reduction error: %d", tapi_error);
- return -1;
- }
-
- return 0;
-}
-#endif
static void __callmgr_telephony_set_audio_tx_mute_resp_cb(TapiHandle *handle, int result, void *tapi_data, void *user_data)
{
%install
%make_install
mkdir -p %{buildroot}%{_unitdir}/multi-user.target.wants
-ln -s ../callmgr.service %{buildroot}%{_unitdir}/multi-user.target.wants/callmgr.service
+ln -s %{_unitdir}/callmgr.service %{buildroot}%{_unitdir}/multi-user.target.wants/callmgr.service
mkdir -p %{buildroot}/usr/share/license
cp LICENSE %{buildroot}/usr/share/license/call-manager
%defattr(644,system,system,-)
%attr(755,system,system) %{_bindir}/callmgrd
#/etc/*
-%{_unitdir}/*
+%{_unitdir}/callmgr.service
+%{_unitdir}/multi-user.target.wants/callmgr.service
%{_datadir}/license/call-manager
%if 0%{?enable_slient_log}
%attr(755,system,system) /opt/usr/devel/usr/bin/call_silent_logger
After=tizen-runtime.target telephony-daemon.service contacts-service.service
[Service]
-User=system
-Group=system
Type=simple
ExecStart=/usr/bin/callmgrd
Restart=always
}
else {
err("Invalid call type[%d].", call_type);
- sound_mode = CALLMGR_AUDIO_SESSION_VIDEO_E;
+ sound_mode = CALLMGR_AUDIO_SESSION_VOICE_E;
}
_callmgr_ringer_stop_signal(core_data->ringer_handle);
err("_callmgr_audio_set_noise_reduction() failed");
return -1;
}
-#ifdef SUPPORT_NOISE_REDUCTION
- if (_callmgr_telephony_set_noise_reduction(core_data->telephony_handle, is_noise_reduction) < 0) {
- err("_callmgr_telephony_set_noise_reduction() failed");
- return -1;
- }
-#endif
return 0;
}